NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
|
#include <nimble_model_data_base.h>
Public Member Functions | |
ModelDataBase ()=default | |
Constructor. | |
virtual | ~ModelDataBase ()=default |
Destructor. | |
virtual int | AllocateNodeData (Length length, std::string label, int num_objects)=0 |
Allocate data storage for a node-based quantity. | |
int | GetFieldIdChecked (const std::string &field_label) const |
virtual int | GetFieldId (const std::string &field_label) const =0 |
Returns the field ID for a specific label. | |
virtual void | InitializeBlocks (nimble::DataManager &data_manager, const std::shared_ptr< nimble::MaterialFactoryBase > &material_factory_base)=0 |
Initialize the different blocks in the mesh. | |
virtual void | UpdateStates (const nimble::DataManager &data_manager)=0 |
Copy time state (n+1) into time state (n) | |
nimble::Viewify< 1 > | GetScalarNodeData (const std::string &label) |
Get view of scalar quantity defined on nodes. | |
virtual nimble::Viewify< 1 > | GetScalarNodeData (int field_id)=0 |
Get view of scalar quantity defined on nodes. | |
nimble::Viewify< 2 > | GetVectorNodeData (const std::string &label) |
Get view of vector quantity defined on nodes. | |
virtual nimble::Viewify< 2 > | GetVectorNodeData (int field_id)=0 |
Get view of scalar quantity defined on nodes. | |
virtual void | ComputeLumpedMass (nimble::DataManager &data_manager)=0 |
Compute the lumped mass. | |
virtual void | InitializeExodusOutput (nimble::DataManager &data_manager) |
virtual void | WriteExodusOutput (nimble::DataManager &data_manager, double time_current) |
Write output of simulation in Exodus format. | |
virtual void | ComputeExternalForce (nimble::DataManager &data_manager, double time_previous, double time_current, bool is_output_step) |
Compute the external force. | |
virtual void | ComputeInternalForce (nimble::DataManager &data_manager, double time_previous, double time_current, bool is_output_step, const nimble::Viewify< 2 > &displacement, nimble::Viewify< 2 > &force) |
Compute the internal force. | |
virtual void | ApplyInitialConditions (nimble::DataManager &data_manager) |
Apply initial conditions. | |
virtual void | ApplyKinematicConditions (nimble::DataManager &data_manager, double time_current, double time_previous) |
Apply kinematic conditions. | |
virtual void | UpdateWithNewVelocity (nimble::DataManager &data_manager, double dt) |
Update model with new velocity. | |
virtual void | UpdateWithNewDisplacement (nimble::DataManager &data_manager, double dt) |
Update model with new displacement. | |
int | GetDimension () const |
Get the spatial dimension. | |
void | SetCriticalTimeStep (double time_step) |
Set the critical time step. | |
void | SetDimension (int dim) |
Set spatial dimension. | |
void | SetReferenceCoordinates (const nimble::GenesisMesh &mesh) |
Set reference coordinates. | |
double | GetCriticalTimeStep () const |
Get the critical time step. | |
const std::vector< std::string > & | GetNodeDataLabelsForOutput () const |
const std::map< int, std::vector< std::string > > & | GetElementDataLabels () const |
const std::map< int, std::vector< std::string > > & | GetElementDataLabelsForOutput () const |
const std::map< int, std::vector< std::string > > & | GetDerivedElementDataLabelsForOutput () const |
Protected Attributes | |
int | dim_ = 3 |
Problem dimension, either 2 or 3. | |
double | critical_time_step_ = 0.0 |
Critical time step. | |
std::vector< std::string > | output_node_component_labels_ |
Output labels for node data that will be written to disk. | |
std::map< int, std::vector< std::string > > | element_component_labels_ |
std::map< int, std::vector< std::string > > | output_element_component_labels_ |
Output labels for element data that will be written to disk. | |
std::map< int, std::vector< std::string > > | derived_output_element_data_labels_ |
Output labels for derived element data that will be written to disk. | |
|
default |
Constructor.
|
virtualdefault |
Destructor.
|
pure virtual |
Allocate data storage for a node-based quantity.
length | |
label | |
num_objects |
Implemented in nimble::ModelData, and nimble_kokkos::ModelData.
|
virtual |
Apply initial conditions.
|
virtual |
Apply kinematic conditions.
|
inlinevirtual |
Compute the external force.
data_manager | Reference to the DataManager object |
time_previous | |
time_current | |
is_output_step |
Reimplemented in nimble::ModelData.
|
inlinevirtual |
Compute the internal force.
[in] | data_manager | |
[in] | time_previous | |
[in] | time_current | |
[in] | is_output_step | |
[in] | displacement | |
[out] | internal_force | Output for internal force |
Reimplemented in nimble::ModelData, and nimble_kokkos::ModelData.
|
pure virtual |
Compute the lumped mass.
data_manager | Reference to the data manager |
Implemented in nimble::ModelData, and nimble_kokkos::ModelData.
|
inline |
Get the critical time step.
|
inline |
|
inline |
Get the spatial dimension.
|
inline |
|
inline |
|
pure virtual |
Returns the field ID for a specific label.
field_label | Label for a stored quantity |
Implemented in nimble::ModelData, and nimble_kokkos::ModelData.
|
inline |
|
inline |
|
inline |
Get view of scalar quantity defined on nodes.
label | the data label |
|
pure virtual |
Get view of scalar quantity defined on nodes.
field_id | the field id (see DataManager::GetFieldIDs()) |
Implemented in nimble::ModelData, and nimble_kokkos::ModelData.
|
inline |
Get view of vector quantity defined on nodes.
label | the data label |
|
pure virtual |
Get view of scalar quantity defined on nodes.
field_id | the field id (see DataManager::GetFieldIDs()) |
Implemented in nimble::ModelData, and nimble_kokkos::ModelData.
|
pure virtual |
Initialize the different blocks in the mesh.
data_manager | Reference to the data manager |
material_factory_base | Shared pointer to the material factory |
Implemented in nimble::ModelData.
|
inlinevirtual |
Reimplemented in nimble::ModelData, and nimble_kokkos::ModelData.
|
inline |
Set the critical time step.
time_step | Critical time step to use. |
void nimble::ModelDataBase::SetDimension | ( | int | dim | ) |
Set spatial dimension.
dim | Spatial dimension |
void nimble::ModelDataBase::SetReferenceCoordinates | ( | const nimble::GenesisMesh & | mesh | ) |
Set reference coordinates.
mesh | Mesh |
|
pure virtual |
Copy time state (n+1) into time state (n)
data_manager | Reference to the data manager |
Implemented in nimble::ModelData, and nimble_kokkos::ModelData.
|
inlinevirtual |
Update model with new displacement.
[in] | data_manager | Reference to the data manager |
[in] | dt | Current time step |
Reimplemented in nimble_kokkos::ModelData.
|
inlinevirtual |
Update model with new velocity.
[in] | data_manager | Reference to the data manager |
[in] | dt | Current time step |
Reimplemented in nimble_kokkos::ModelData.
|
inlinevirtual |
Write output of simulation in Exodus format.
[in] | data_manager | Reference to data manager |
[in] | time_current | Time value |
Reimplemented in nimble::ModelData, and nimble_kokkos::ModelData.
|
protected |
Critical time step.
|
protected |
Output labels for derived element data that will be written to disk.
|
protected |
Problem dimension, either 2 or 3.
|
protected |
Map key is the block_id, vector contains component-wise label for each scalar entry in the data array.
|
protected |
Output labels for element data that will be written to disk.
|
protected |
Output labels for node data that will be written to disk.