| 1 |
// Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions |
| 2 |
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
// NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
// |
| 5 |
// See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
#pragma once |
| 8 |
namespace Ioss { |
| 9 |
/** \brief Method used to split sidesets into homogeneous blocks. |
| 10 |
*/ |
| 11 |
enum SurfaceSplitType { |
| 12 |
SPLIT_INVALID = -1, |
| 13 |
SPLIT_BY_TOPOLOGIES = 1, |
| 14 |
SPLIT_BY_ELEMENT_BLOCK = 2, |
| 15 |
SPLIT_BY_DONT_SPLIT = 3, |
| 16 |
SPLIT_LAST_ENTRY = 4 |
| 17 |
}; |
| 18 |
|
| 19 |
/** \brief Convert an integer code for the method used to split sidesets into homogeneous blocks. |
| 20 |
* |
| 21 |
* \param[in] split_int The code. |
| 22 |
* \returns The corresponding SurfaceSplitType. |
| 23 |
*/ |
| 24 |
inline SurfaceSplitType int_to_surface_split(int split_int) |
| 25 |
{ |
| 26 |
SurfaceSplitType split_type = Ioss::SPLIT_INVALID; |
| 27 |
if (split_int == 1) { |
| 28 |
split_type = Ioss::SPLIT_BY_TOPOLOGIES; |
| 29 |
} |
| 30 |
else if (split_int == 2) { |
| 31 |
split_type = Ioss::SPLIT_BY_ELEMENT_BLOCK; |
| 32 |
} |
| 33 |
else if (split_int == 3) { |
| 34 |
split_type = Ioss::SPLIT_BY_DONT_SPLIT; |
| 35 |
} |
| 36 |
return split_type; |
| 37 |
} |
| 38 |
} // namespace Ioss |