|
Smith
0.1
Smith is an implicit thermal structural mechanics simulation code.
|
Manages the lifetimes of FEState objects such that restarts are abstracted from physics modules. More...
#include <state_manager.hpp>
Static Public Member Functions | |
| static void | initialize (axom::sidre::DataStore &ds, const std::string &output_directory) |
| Initializes the StateManager with a sidre DataStore (into which state will be written/read) More... | |
| static bool | hasState (const std::string &name) |
| Checks if StateManager has a state with the given name. More... | |
| template<typename FunctionSpace > | |
| static FiniteElementState | newState (FunctionSpace space, const std::string &state_name, const std::string &mesh_tag) |
| Factory method for creating a new FEState object. More... | |
| static FiniteElementState | newState (const mfem::ParFiniteElementSpace &space, const std::string &state_name) |
| Factory method for creating a new FEState object. More... | |
| static void | storeState (FiniteElementState &state) |
| Store a pre-constructed finite element state in the state manager. More... | |
| template<typename T > | |
| static void | storeQuadratureData (const std::string &mesh_tag, std::shared_ptr< QuadratureData< T >> qdata) |
| Store a pre-constructed Quadrature Data in the state manager. More... | |
| template<typename T > | |
| static std::shared_ptr< QuadratureData< T > > | newQuadratureDataBuffer (const std::string &mesh_tag, const Domain &domain, int order, int dim, T initial_state) |
| Create a shared ptr to a quadrature data buffer for the given material type. More... | |
| static bool | hasDual (const std::string &name) |
| Checks if StateManager has a dual with the given name. More... | |
| template<typename FunctionSpace > | |
| static FiniteElementDual | newDual (FunctionSpace space, const std::string &dual_name, const std::string &mesh_tag) |
| Factory method for creating a new FEDual object. More... | |
| static FiniteElementDual | newDual (const mfem::ParFiniteElementSpace &space, const std::string &dual_name) |
| Factory method for creating a new FEDual object. More... | |
| static void | storeDual (FiniteElementDual &dual) |
| Store a pre-constructed finite element dual in the state manager. More... | |
| static void | updateState (const FiniteElementState &state) |
| Updates the StateManager-owned grid function using the values from a given FiniteElementState. More... | |
| static void | updateDual (const FiniteElementDual &dual) |
| Updates the StateManager-owned grid function using the values from a given FiniteElementDual. More... | |
| static void | save (const double t, const int cycle, const std::string &mesh_tag) |
| Updates the Conduit Blueprint state in the datastore and saves to a file. More... | |
| static double | load (const int cycle_to_load, const std::string &mesh_tag) |
| Loads an existing DataCollection. More... | |
| static void | reset () |
| Resets the underlying global datacollection object. More... | |
| static bool | hasMesh (const std::string &mesh_tag) |
| Checks if StateManager has a mesh with the given mesh_tag. More... | |
| static mfem::ParMesh & | setMesh (std::unique_ptr< mfem::ParMesh > pmesh, const std::string &mesh_tag) |
| Gives ownership of mesh to StateManager. More... | |
| static mfem::ParMesh & | mesh (const std::string &mesh_tag) |
| Returns a non-owning reference to mesh held by StateManager. More... | |
| static FiniteElementState & | shapeDisplacement (const std::string &mesh_tag) |
| Get the shape displacement finite element state. More... | |
| static FiniteElementDual & | shapeDisplacementDual (const std::string &mesh_tag) |
| Get the shape displacement finite element dual. More... | |
| static void | loadCheckpointedStates (int cycle_to_load, std::vector< FiniteElementState * > states_to_load) |
| loads the finite element states from a previously checkpointed cycle More... | |
| static FiniteElementDual & | shapeDisplacementSensitivity (const std::string &mesh_tag) |
| Get the shape displacement sensitivity finite element dual. More... | |
| static std::string | collectionID (const mfem::ParMesh *pmesh) |
| Returns the datacollection ID for a given mesh. More... | |
| static bool | isRestart () |
| Returns true if data was loaded into a DataCollection. | |
| static int | cycle (std::string mesh_tag) |
| Get the current cycle (iteration number) from the underlying datacollection. More... | |
| static double | time (std::string mesh_tag) |
| Get the current simulation time from the underlying datacollection. More... | |
Manages the lifetimes of FEState objects such that restarts are abstracted from physics modules.
Definition at line 41 of file state_manager.hpp.
|
static |
Returns the datacollection ID for a given mesh.
| [in] | pmesh | Pointer to a mesh (non-owning) |
nullptr then the default collection ID is returned. Definition at line 286 of file state_manager.cpp.
|
static |
Get the current cycle (iteration number) from the underlying datacollection.
| mesh_tag | The datacollection (mesh name) to query |
Definition at line 297 of file state_manager.cpp.
|
inlinestatic |
Checks if StateManager has a dual with the given name.
| name | A string that uniquely identifies the name |
Definition at line 243 of file state_manager.hpp.
|
inlinestatic |
Checks if StateManager has a mesh with the given mesh_tag.
| [in] | mesh_tag | A string that uniquely identifies the mesh |
Definition at line 364 of file state_manager.hpp.
|
inlinestatic |
Checks if StateManager has a state with the given name.
| [in] | name | A string that uniquely identifies the state |
Definition at line 55 of file state_manager.hpp.
|
static |
Initializes the StateManager with a sidre DataStore (into which state will be written/read)
| [in] | ds | The DataStore to use |
| [in] | output_directory | The directory to output files to - cannot be empty |
Definition at line 103 of file state_manager.cpp.
|
inlinestatic |
Loads an existing DataCollection.
| [in] | cycle_to_load | What cycle to load the DataCollection from |
| [in] | mesh_tag | The mesh_tag associated with the DataCollection when it was saved |
Definition at line 331 of file state_manager.hpp.
|
static |
loads the finite element states from a previously checkpointed cycle
| cycle_to_load | |
| states_to_load |
Definition at line 79 of file state_manager.cpp.
|
static |
Returns a non-owning reference to mesh held by StateManager.
| [in] | mesh_tag | A string that uniquely identifies the mesh |
Definition at line 278 of file state_manager.cpp.
|
static |
Factory method for creating a new FEDual object.
| space | A finite element space to copy for use in the new dual |
| dual_name | The name of the new dual |
Definition at line 194 of file state_manager.cpp.
|
inlinestatic |
Factory method for creating a new FEDual object.
| FunctionSpace | The function space (e.g. H1<1>) to build the finite element dual on |
| space | The function space (e.g. H1<1>) to build the finite element dual on |
| dual_name | The name of the new finite element dual field |
| mesh_tag | The tag for the stored mesh used to construct the finite element state |
Definition at line 257 of file state_manager.hpp.
|
inlinestatic |
Create a shared ptr to a quadrature data buffer for the given material type.
| T | the type to be created at each quadrature point |
| mesh_tag | The tag for the stored mesh used to locate the datacollection |
| domain | The spatial domain over which to allocate the quadrature data |
| order | The order of the discretization of the primal fields |
| dim | The spatial dimension of the mesh |
| initial_state | the value to be broadcast to each quadrature point |
Definition at line 214 of file state_manager.hpp.
|
static |
Factory method for creating a new FEState object.
| space | A finite element space to copy for use in the new state |
| state_name | The name of the new state |
Definition at line 156 of file state_manager.cpp.
|
inlinestatic |
Factory method for creating a new FEState object.
| FunctionSpace | The function space (e.g. H1<1>) to build the finite element state on |
| space | The function space (e.g. H1<1>) to build the finite element state on |
| state_name | The name of the new finite element state field |
| mesh_tag | The tag for the stored mesh used to construct the finite element state |
Definition at line 69 of file state_manager.hpp.
|
inlinestatic |
Resets the underlying global datacollection object.
After this method, the StateManager is in the same state that it would be after the program started and before any StateManager methods have been called. If the client wants to use StateManager after a call to reset(), the initialize() method must be called.
Definition at line 347 of file state_manager.hpp.
|
static |
Updates the Conduit Blueprint state in the datastore and saves to a file.
| [in] | t | The current sim time |
| [in] | cycle | The current iteration number of the simulation |
| [in] | mesh_tag | A string that uniquely identifies the mesh (and accompanying fields) to save |
Definition at line 207 of file state_manager.cpp.
|
static |
Gives ownership of mesh to StateManager.
| [in] | pmesh | The mesh to register |
| [in] | mesh_tag | A string that uniquely identifies the mesh |
Definition at line 222 of file state_manager.cpp.
|
static |
Get the shape displacement finite element state.
This is the vector-valued H1 field of order 1 (linear nodal displacements) representing perturbations of the underlying mesh. This is used for shape optimization problems.
| mesh_tag | A string that uniquely identifies the mesh |
Definition at line 125 of file state_manager.cpp.
|
static |
Get the shape displacement finite element dual.
This is the linear form which is dual to a vector-valued H1 field of order 1 (linear nodal displacements) representing sensitivities to perturbations of the underlying mesh. This is used for shape optimization problems.
| mesh_tag | A string that uniquely identifies the mesh |
Definition at line 118 of file state_manager.cpp.
|
static |
Get the shape displacement sensitivity finite element dual.
This is the vector-valued H1 dual of order 1 representing sensitivities of the shape displacement field of the underlying mesh. This is used for shape optimization problems.
| mesh_tag | A string that uniquely identifies the mesh |
|
static |
Store a pre-constructed finite element dual in the state manager.
| dual | The finite element dual to store |
Definition at line 169 of file state_manager.cpp.
|
inlinestatic |
Store a pre-constructed Quadrature Data in the state manager.
| T | the type to be created at each quadrature point |
| mesh_tag | The tag for the stored mesh used to locate the datacollection |
| qdata | The quadrature data to store |
Definition at line 106 of file state_manager.hpp.
|
static |
Store a pre-constructed finite element state in the state manager.
| state | The finite element state to store |
Definition at line 132 of file state_manager.cpp.
|
static |
Get the current simulation time from the underlying datacollection.
| mesh_tag | The datacollection (mesh name) to query |
Definition at line 303 of file state_manager.cpp.
|
inlinestatic |
Updates the StateManager-owned grid function using the values from a given FiniteElementDual.
This sync operation must occur prior to writing a restart file.
| dual | The dual used to update the internal grid function |
Definition at line 309 of file state_manager.hpp.
|
inlinestatic |
Updates the StateManager-owned grid function using the values from a given FiniteElementState.
This sync operation must occur prior to writing a restart file.
| state | The state used to update the internal grid function |
Definition at line 293 of file state_manager.hpp.