www.mooseframework.org
MooseTypes.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
16 namespace Moose
17 {
23 const BoundaryID ANY_BOUNDARY_ID = static_cast<BoundaryID>(-1);
25 const TagID INVALID_TAG_ID = static_cast<TagID>(-1);
26 const TagTypeID INVALID_TAG_TYPE_ID = static_cast<TagTypeID>(-1);
27 const TagName SOLUTION_TAG = "SOLUTION";
28 const TagName OLD_SOLUTION_TAG = "SOLUTION_STATE_1";
29 const TagName OLDER_SOLUTION_TAG = "SOLUTION_STATE_2";
30 const TagName PREVIOUS_NL_SOLUTION_TAG = "U_PREVIOUS_NL_NEWTON";
31 }
32 
37 #define DerivativeStringToJSON(TheName) \
38  namespace nlohmann \
39  { \
40  void adl_serializer<TheName>::to_json(json & j, const TheName & v) \
41  { \
42  j = static_cast<std::string>(v); \
43  } \
44  } \
45  static_assert(true, "")
46 DerivativeStringToJSON(FileName);
47 DerivativeStringToJSON(FileNameNoExtension);
48 DerivativeStringToJSON(RelativeFileName);
49 DerivativeStringToJSON(DataFileName);
50 DerivativeStringToJSON(MeshFileName);
51 DerivativeStringToJSON(OutFileBase);
52 DerivativeStringToJSON(NonlinearVariableName);
53 DerivativeStringToJSON(AuxVariableName);
54 DerivativeStringToJSON(VariableName);
55 DerivativeStringToJSON(BoundaryName);
56 DerivativeStringToJSON(SubdomainName);
57 DerivativeStringToJSON(PostprocessorName);
58 DerivativeStringToJSON(VectorPostprocessorName);
59 DerivativeStringToJSON(MeshDivisionName);
60 DerivativeStringToJSON(FunctionName);
61 DerivativeStringToJSON(DistributionName);
62 DerivativeStringToJSON(SamplerName);
63 DerivativeStringToJSON(UserObjectName);
64 DerivativeStringToJSON(IndicatorName);
65 DerivativeStringToJSON(MarkerName);
66 DerivativeStringToJSON(MultiAppName);
67 DerivativeStringToJSON(OutputName);
68 DerivativeStringToJSON(MaterialPropertyName);
69 DerivativeStringToJSON(MooseFunctorName);
70 DerivativeStringToJSON(MaterialName);
71 DerivativeStringToJSON(TagName);
72 DerivativeStringToJSON(MeshGeneratorName);
73 DerivativeStringToJSON(ExtraElementIDName);
74 DerivativeStringToJSON(ReporterValueName);
75 DerivativeStringToJSON(PositionsName);
76 DerivativeStringToJSON(TimesName);
77 DerivativeStringToJSON(ExecutorName);
78 DerivativeStringToJSON(ParsedFunctionExpression);
79 DerivativeStringToJSON(NonlinearSystemName);
80 DerivativeStringToJSON(CLIArgString);
unsigned int TagTypeID
Definition: MooseTypes.h:200
const TagTypeID INVALID_TAG_TYPE_ID
Definition: MooseTypes.C:26
unsigned int TagID
Definition: MooseTypes.h:199
const BoundaryID INVALID_BOUNDARY_ID
Definition: MooseTypes.C:24
const TagName OLDER_SOLUTION_TAG
Definition: MooseTypes.C:29
const SubdomainID BOUNDARY_SIDE_LOWERD_ID
Definition: MooseTypes.C:21
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.C:22
uint8_t processor_id_type
static const subdomain_id_type invalid_subdomain_id
static const boundary_id_type invalid_id
const TagName OLD_SOLUTION_TAG
Definition: MooseTypes.C:28
static const processor_id_type invalid_processor_id
boundary_id_type BoundaryID
const processor_id_type INVALID_PROCESSOR_ID
Definition: MooseTypes.C:18
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19
DerivativeStringToJSON(FileName)
const TagID INVALID_TAG_ID
Definition: MooseTypes.C:25
const SubdomainID INTERNAL_SIDE_LOWERD_ID
Definition: MooseTypes.C:20
const TagName SOLUTION_TAG
Definition: MooseTypes.C:27
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const TagName PREVIOUS_NL_SOLUTION_TAG
Definition: MooseTypes.C:30
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:23