29 #ifndef NEMOSYS_CONVERSIONJSON_H_ 30 #define NEMOSYS_CONVERSIONJSON_H_ 32 #include <jsoncons/json.hpp> 51 # define IF_CFMSH(a) a, 58 #if defined(HAVE_CFMSH) && defined(HAVE_GMSH) 59 # define IF_CFMSH_GMSH(a) a, 62 # define IF_CFMSH_GMSH(a) 73 const std::string &input) {
78 const std::vector<PNTMesh::surfaceBCTag> &input) {
82 inline std::vector<int>
rangeToVec(
const std::pair<int, int> &input) {
83 std::vector<int> out(input.second - input.first + 1);
84 std::iota(out.begin(), out.end(), input.first);
107 [](
const jsoncons::string_view &x) {
119 JSONCONS_ALL_MEMBER_NAME_TRAITS(
122 [](
const jsoncons::string_view &x) {
133 JSONCONS_ALL_MEMBER_NAME_TRAITS(
136 [](
const jsoncons::string_view &x) {
149 JSONCONS_ALL_MEMBER_NAME_TRAITS(
152 [](
const jsoncons::string_view &x) {
163 JSONCONS_N_MEMBER_NAME_TRAITS(
166 [](
const jsoncons::string_view &x) {
169 (numMeshes,
"Number of Mesh"), (meshData,
"Mesh Data"),
170 (needsPostProc,
"Post Processing"), (numTasks,
"Number of Tasks"),
174 (meshFileName,
"File"), (meshName,
"Name"),
175 (usePhys,
"Use Physical Groups"),
176 (makeFreeSurfSS,
"Free Surface Side Set"),
177 (splitTopBotSS,
"Split Top and Bottom"),
178 (sideSetNames,
"Side Set Names"),
179 (elmBlkNames,
"Element Block Names"),
180 (addGlobalNodeSet,
"Add Global Node Set"))
182 JSONCONS_ALL_MEMBER_NAME_TRAITS(
191 JSONCONS_ALL_MEMBER_NAME_TRAITS(
194 [](
const jsoncons::string_view &x) {
204 JSONCONS_N_MEMBER_NAME_TRAITS(
207 [](
const jsoncons::string_view &x) {
210 (combineBlocks,
"CombineBlocks"))
213 0, (blockIds,
"BlockIDs"), (newName,
"Rename"))
221 JSONCONS_ALL_MEMBER_NAME_TRAITS(
224 [](
const jsoncons::string_view &x) {
234 JSONCONS_ALL_MEMBER_NAME_TRAITS(
237 [](
const jsoncons::string_view &x) {
250 (outputCgiFile,
"Output Patch Map File"))
252 JSONCONS_ALL_MEMBER_NAME_TRAITS(
255 [](
const jsoncons::string_view &x) {
265 JSONCONS_N_MEMBER_NAME_TRAITS(
268 [](
const jsoncons::string_view &x) {
271 (bcInfo,
"BC Info"), (nodePatchPreference,
"Node Patch Preference"))
277 1, (patchNum,
"Patch Number"), (getBCType(),
"BC Type", JSONCONS_RDONLY))
285 (rocFracFSIType,
"Rocfrac FSI Type"),
287 [](
const jsoncons::string_view &x) {
294 (rocfracControlType,
"RocfracControl Type"), (structural,
"Structural"),
295 (meshMotion,
"Mesh Motion"), (thermal,
"Thermal"),
297 [](
const jsoncons::string_view &x) {
307 JSONCONS_N_MEMBER_NAME_TRAITS(
310 [](
const jsoncons::string_view &x) {
313 (dim,
"Dimension"), (elemBlockMap,
"Block Data"))
319 #define PAIR_INT_DUMMY_FUNC(X) \ 320 std::pair<int, int> {} 323 (ordEquat,
"Equation Order"),
328 (regionName,
"Name"),
331 (elmIds,
"Element ID"))
332 #undef PAIR_INT_DUMMY_FUNC 337 #endif // NEMOSYS_CONVERSIONJSON_H_ static constexpr auto convMethod
static constexpr const char * bcType
#define NEM_JSON_CHECK_KEY_ONLY(x)
static constexpr const char * programType
static constexpr const char * methodName
std::vector< int > rangeToVec(const std::pair< int, int > &input)
static constexpr const char * methodName
static constexpr auto inMeshFile
#define NEM_JSON_RDWR_OVERRIDE(X)
static constexpr const char * methodName
static constexpr const char * methodName
std::string elmTypeStr(elementType tag)
static constexpr auto outMeshFile
#define NEM_JSON_N_MEMBER_NAME_TRAITS_BASE(BaseClass, ChildClasses, NumMandatoryParams,...)
Manipulates an existing EXODUSII mesh.
PATRAN specific BC information.
#define NEM_JSON_N_MEMBER_NAME_TRAITS_FINAL(ValueType, ParentType, NumMandatoryParams,...)
static constexpr const char * methodName
#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_FINAL(ValueType, ParentType, NumMandatoryParams,...)
#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_INTERMEDIATE(BaseClass, ChildClasses, ParentClass, NumMandatoryParams,...)
surfaceBCTag bcTagNum(const std::string &tag)
static constexpr const char * methodName
static constexpr const char * methodName
static constexpr const char * bcType
static constexpr auto convOptions
static constexpr const char * methodName
std::string pntMeshBcTagToJSON(const std::vector< PNTMesh::surfaceBCTag > &input)
static constexpr const char * methodName
static constexpr const char * methodName
std::vector< PNTMesh::surfaceBCTag > pntMeshBcTagFromJSON(const std::string &input)
static constexpr auto programType
static constexpr const char * methodName
elementType elmTypeNum(const std::string &tag)
#define NEM_JSON_WRAP_SMART_PTR(BaseClass, PointerTempl)
#define PAIR_INT_DUMMY_FUNC(X)
static constexpr auto meshFiles
std::string bcTagStr(surfaceBCTag tag)
#define NEM_JSON_RDONLY_OVERRIDE(X)
#define NEM_JSON_N_MEMBER_NAME_TRAITS_VAL(ValueType, NumMandatoryParams,...)