https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MooseTypes.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "MooseTypes.h"
11#include "libmesh/elem.h"
12#include "libmesh/libmesh.h"
13
14#include "nlohmann/json.h"
15
16namespace Moose
17{
19const SubdomainID ANY_BLOCK_ID = libMesh::Elem::invalid_subdomain_id - 1;
20const SubdomainID INVALID_BLOCK_ID = libMesh::Elem::invalid_subdomain_id;
21const BoundaryID ANY_BOUNDARY_ID = static_cast<BoundaryID>(-1);
23const TagID INVALID_TAG_ID = static_cast<TagID>(-1);
24const TagTypeID INVALID_TAG_TYPE_ID = static_cast<TagTypeID>(-1);
25const TagName SOLUTION_TAG = "SOLUTION";
26const TagName OLD_SOLUTION_TAG = "SOLUTION_STATE_1";
27const TagName OLDER_SOLUTION_TAG = "SOLUTION_STATE_2";
28const TagName PREVIOUS_NL_SOLUTION_TAG = "U_PREVIOUS_NL_NEWTON";
29const TagName PREVIOUS_MULTIAPP_FP_SOLUTION_TAG = "U_PREVIOUS_MULTIAPP_FP";
30const TagName PREVIOUS_MULTISYSTEM_FP_SOLUTION_TAG = "U_PREVIOUS_MULTISYSTEM_FP";
31const TagName SOLUTION_DOT_TAG = "u_dot_factor";
32const TagName SOLUTION_DOTDOT_TAG = "u_dotdot_factor";
33}
34
39#define DerivativeStringToJSON(TheName) \
40 namespace nlohmann \
41 { \
42 void adl_serializer<TheName>::to_json(json & j, const TheName & v) \
43 { \
44 j = static_cast<std::string>(v); \
45 } \
46 } \
47 static_assert(true, "")
49DerivativeStringToJSON(FileNameNoExtension);
50DerivativeStringToJSON(RelativeFileName);
53DerivativeStringToJSON(MatrixFileName);
55DerivativeStringToJSON(NonlinearVariableName);
56DerivativeStringToJSON(LinearVariableName);
57DerivativeStringToJSON(SolverVariableName);
58DerivativeStringToJSON(AuxVariableName);
62DerivativeStringToJSON(PostprocessorName);
63DerivativeStringToJSON(VectorPostprocessorName);
64DerivativeStringToJSON(MeshDivisionName);
66DerivativeStringToJSON(DistributionName);
68DerivativeStringToJSON(UserObjectName);
69DerivativeStringToJSON(InterpolationMethodName);
74DerivativeStringToJSON(MaterialPropertyName);
75DerivativeStringToJSON(MooseFunctorName);
78DerivativeStringToJSON(MeshGeneratorName);
79DerivativeStringToJSON(ExtraElementIDName);
80DerivativeStringToJSON(ReporterValueName);
84DerivativeStringToJSON(ParsedFunctionExpression);
85DerivativeStringToJSON(NonlinearSystemName);
86DerivativeStringToJSON(LinearSystemName);
87DerivativeStringToJSON(SolverSystemName);
89#ifdef MOOSE_MFEM_ENABLED
90DerivativeStringToJSON(MFEMScalarCoefficientName);
91DerivativeStringToJSON(MFEMVectorCoefficientName);
92DerivativeStringToJSON(MFEMMatrixCoefficientName);
93DerivativeStringToJSON(MFEMFESpaceName);
94DerivativeStringToJSON(MFEMSolverName);
95#endif
boundary_id_type BoundaryID
DerivativeStringToJSON(FileName)
unsigned int TagID
Definition MooseTypes.h:238
unsigned int TagTypeID
Definition MooseTypes.h:239
static const boundary_id_type invalid_id
static constexpr processor_id_type invalid_processor_id
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const TagName SOLUTION_DOTDOT_TAG
Definition MooseTypes.C:32
const TagID INVALID_TAG_ID
Definition MooseTypes.C:23
const TagName PREVIOUS_MULTISYSTEM_FP_SOLUTION_TAG
Definition MooseTypes.C:30
const TagName OLDER_SOLUTION_TAG
Definition MooseTypes.C:27
const TagName SOLUTION_DOT_TAG
Definition MooseTypes.C:31
const SubdomainID ANY_BLOCK_ID
Definition MooseTypes.C:19
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition MooseTypes.C:28
const TagName PREVIOUS_MULTIAPP_FP_SOLUTION_TAG
Definition MooseTypes.C:29
const TagTypeID INVALID_TAG_TYPE_ID
Definition MooseTypes.C:24
const TagName OLD_SOLUTION_TAG
Definition MooseTypes.C:26
const processor_id_type INVALID_PROCESSOR_ID
Definition MooseTypes.C:18
const BoundaryID INVALID_BOUNDARY_ID
Definition MooseTypes.C:22
const SubdomainID INVALID_BLOCK_ID
Definition MooseTypes.C:20
const TagName SOLUTION_TAG
Definition MooseTypes.C:25
const BoundaryID ANY_BOUNDARY_ID
Definition MooseTypes.C:21