The Interface used to retrieve mesh meta data (attributes) set by the MeshGenerator system. More...
#include <MeshMetaDataInterface.h>
Static Public Attributes | |
static constexpr auto | SYSTEM = "MeshMetaData" |
The system name used when initializing the Restartable interface. More... | |
static constexpr auto | NAME = "<empty>" |
The data name used when initializing the Restartable interface for non-MeshGenerator objects. More... | |
Protected Member Functions | |
MeshMetaDataInterface (const MooseObject *moose_object) | |
Interface for all objects reading MeshMetaData. More... | |
MeshMetaDataInterface (MooseApp &moose_app) | |
This class constructor is used for non-Moose-based objects like interfaces. More... | |
template<typename T > | |
const T & | getMeshProperty (const std::string &data_name, const std::string &prefix) |
Method for retrieving a property with the given type and name exists in the mesh meta-data store. More... | |
template<typename T > | |
const T & | getMeshProperty (const std::string &data_name) |
bool | hasMeshProperty (const std::string &data_name, const std::string &prefix) const |
template<typename T > | |
bool | hasMeshProperty (const std::string &data_name, const std::string &prefix) const |
bool | hasMeshProperty (const std::string &data_name) const |
template<typename T > | |
bool | hasMeshProperty (const std::string &data_name) const |
std::string | meshPropertyName (const std::string &data_name) const |
Static Protected Member Functions | |
static std::string | meshPropertyName (const std::string &data_name, const std::string &prefix) |
Private Member Functions | |
virtual std::string | meshPropertyPrefix (const std::string &data_name) const |
The default prefix to use for getting/seeing if mesh properties exist. More... | |
const RestartableDataValue & | getMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const |
Helper for getting a mesh property. More... | |
template<typename... Args> | |
void | mooseErrorInternal (Args &&... args) const |
Helper for forwarding a mooseError to an object's mooseError if it is available (said error will provide more context: object name and type) More... | |
Private Attributes | |
MooseApp & | _meta_data_app |
Reference to the application. More... | |
const MooseObject *const | _meta_data_object |
The MooseObject (if any); used for better error handling. More... | |
The Interface used to retrieve mesh meta data (attributes) set by the MeshGenerator system.
MOOSE objects should avoid retrieving and casting MeshGenerator objects since they are not re-created during a recover operation. This data is read from files early during the simulation setup an d can be used to make decisions about how to setup the rest of the problem.
Definition at line 26 of file MeshMetaDataInterface.h.
|
protected |
Interface for all objects reading MeshMetaData.
The name of the object gets a bogus prefix, which is not intended to be used for storing data. Instead this value is overridden during retrieval.
Definition at line 14 of file MeshMetaDataInterface.C.
|
protected |
This class constructor is used for non-Moose-based objects like interfaces.
A name for the storage as well as a system name must be passed in along with the thread ID explicitly.
Definition at line 19 of file MeshMetaDataInterface.C.
|
protected |
Method for retrieving a property with the given type and name exists in the mesh meta-data store.
This method will throw an error if the property does not exist.
Definition at line 134 of file MeshMetaDataInterface.h.
|
inlineprotected |
Definition at line 56 of file MeshMetaDataInterface.h.
|
private |
Helper for getting a mesh property.
Definition at line 46 of file MeshMetaDataInterface.C.
Referenced by getMeshProperty(), and hasMeshProperty().
|
protected |
Definition at line 25 of file MeshMetaDataInterface.C.
Referenced by MeshGenerator::declareMeshProperty(), getMeshProperty(), hasMeshProperty(), and MeshGenerator::setMeshProperty().
|
protected |
Definition at line 158 of file MeshMetaDataInterface.h.
|
inlineprotected |
Definition at line 74 of file MeshMetaDataInterface.h.
|
inlineprotected |
Definition at line 82 of file MeshMetaDataInterface.h.
|
staticprotected |
Definition at line 33 of file MeshMetaDataInterface.C.
Referenced by MeshGenerator::declareMeshProperty(), getMeshPropertyInternal(), hasMeshProperty(), meshPropertyName(), and MeshGenerator::setMeshPropertyHelper().
|
inlineprotected |
Definition at line 95 of file MeshMetaDataInterface.h.
|
privatevirtual |
The default prefix to use for getting/seeing if mesh properties exist.
For now, this is not supported except in MeshGenerators. In the future, we will automate looking for mesh properties.
Reimplemented in MeshGenerator.
Definition at line 39 of file MeshMetaDataInterface.C.
Referenced by getMeshProperty(), hasMeshProperty(), and meshPropertyName().
|
inlineprivate |
Helper for forwarding a mooseError to an object's mooseError if it is available (said error will provide more context: object name and type)
Definition at line 124 of file MeshMetaDataInterface.h.
Referenced by getMeshProperty().
|
private |
Reference to the application.
Definition at line 114 of file MeshMetaDataInterface.h.
Referenced by getMeshPropertyInternal(), and hasMeshProperty().
|
private |
The MooseObject (if any); used for better error handling.
Definition at line 117 of file MeshMetaDataInterface.h.
Referenced by mooseErrorInternal().
|
static |
The data name used when initializing the Restartable interface for non-MeshGenerator objects.
Definition at line 33 of file MeshMetaDataInterface.h.
|
static |
The system name used when initializing the Restartable interface.
Definition at line 30 of file MeshMetaDataInterface.h.
Referenced by meshPropertyName().