|
NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
|
#include <nimble_model_data.h>
Public Member Functions | |
| ModelData ()=default | |
| ~ModelData () override=default | |
| int | AllocateNodeData (Length length, std::string label, int num_objects) override |
| Allocate data storage for a node-based quantity. | |
| int | GetFieldId (const std::string &label) const override |
| Returns the field ID for a specific label. | |
| void | InitializeBlocks (nimble::DataManager &data_manager, const std::shared_ptr< nimble::MaterialFactoryBase > &material_factory_base) override |
| Initialize the different blocks in the mesh. | |
| void | UpdateStates (const nimble::DataManager &data_manager) override |
| Copy time state (n+1) into time state (n) | |
| nimble::Viewify< 1 > | GetScalarNodeData (int field_id) override |
| Get view of scalar quantity defined on nodes. | |
| nimble::Viewify< 2 > | GetVectorNodeData (int field_id) override |
| Get view of vector quantity defined on nodes. | |
| void | ComputeLumpedMass (nimble::DataManager &data_manager) override |
| Compute the lumped mass. | |
| void | InitializeExodusOutput (nimble::DataManager &data_manager) override |
| void | WriteExodusOutput (nimble::DataManager &data_manager, double time_current) override |
| Write output of simulation in Exodus format. | |
| void | ComputeExternalForce (nimble::DataManager &data_manager, double time_previous, double time_current, bool is_output_step) override |
| Compute the external force. | |
| 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) override |
| Compute the internal force. | |
| Field | GetField (int field_id) |
| double * | GetNodeData (int field_id) |
| void | GetNodeDataForOutput (std::vector< std::vector< double > > &single_component_arrays) |
| void | DeclareElementData (int block_id, std::vector< std::pair< std::string, Length > > const &data_labels_and_lengths) |
| void | AllocateElementData (std::map< int, int > const &num_integration_points_in_each_block) |
| std::vector< double > & | GetElementDataOld (int block_id) |
| std::vector< double > & | GetElementDataNew (int block_id) |
| void | GetElementDataForOutput (std::map< int, std::vector< std::vector< double > > > &single_component_arrays) |
| void | SpecifyOutputFields (const std::string &output_field_string) |
| std::map< int, std::shared_ptr< nimble::Block > > & | GetBlocks () |
| std::map< int, std::shared_ptr< nimble::Block > > const & | GetBlocks () const |
| std::vector< int > & | GetGloballySharedNodes () |
| std::map< int, int > & | GetGlobalNodeIdToLocalNodeIdMap () |
| nimble::Viewify< 1 > | GetScalarNodeData (const std::string &label) |
| Get view of scalar quantity defined on nodes. | |
| nimble::Viewify< 2 > | GetVectorNodeData (const std::string &label) |
| Get view of vector quantity defined on nodes. | |
Public Member Functions inherited from nimble::ModelDataBase | |
| ModelDataBase ()=default | |
| Constructor. | |
| virtual | ~ModelDataBase ()=default |
| Destructor. | |
| int | GetFieldIdChecked (const std::string &field_label) const |
| nimble::Viewify< 1 > | GetScalarNodeData (const std::string &label) |
| 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 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 Member Functions | |
| void | AssignFieldId (Field &field) |
| void | GetNodeDataComponent (int field_id, int component, double *const component_data) |
| double * | GetNodeData (const std::string &label) |
| template<typename TBlock> | |
| void | EmplaceBlocks (nimble::DataManager &data_manager, const std::shared_ptr< nimble::MaterialFactoryBase > &material_factory_base) |
| void | AllocateInitializeElementData (nimble::DataManager &data_manager, const std::shared_ptr< nimble::MaterialFactoryBase > &material_factory_base) |
Protected Attributes | |
| std::vector< int > | block_ids_ |
| Block ids. | |
| std::map< int, std::shared_ptr< nimble::Block > > | blocks_ |
| Blocks. | |
| std::map< int, Field > | data_fields_ |
| Map key is the field_id, value is the corresponding Field. | |
| std::map< int, std::vector< double > > | node_data_ |
| std::map< int, std::vector< int > > | element_data_fields_ |
| std::map< int, std::vector< double > > | element_data_n_ |
| std::map< int, std::vector< double > > | element_data_np1_ |
| std::vector< int > | globally_shared_nodes_ |
| List of node ids that are shared across multiple ranks. | |
| std::map< int, int > | global_node_id_to_local_node_id_ |
| Map from global node it to local node id. | |
| std::vector< std::vector< double > > | node_data_for_output_ |
| Information for Exodus output about node data. | |
| std::map< int, std::vector< std::vector< double > > > | elem_data_for_output_ |
| Information for Exodus output about element data. | |
| std::map< int, std::vector< std::vector< double > > > | derived_elem_data_ |
| Information for Exodus output about element data. | |
Protected Attributes inherited from nimble::ModelDataBase | |
| 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 |
|
overridedefault |
| void nimble::ModelData::AllocateElementData | ( | std::map< int, int > const & | num_integration_points_in_each_block | ) |
|
protected |
|
overridevirtual |
Allocate data storage for a node-based quantity.
| length | |
| label | |
| num_objects |
Implements nimble::ModelDataBase.
|
protected |
|
overridevirtual |
Compute the external force.
| data_manager | Reference to the DataManager |
| time_previous | |
| time_current | |
| is_output_step |
Reimplemented from nimble::ModelDataBase.
|
overridevirtual |
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 from nimble::ModelDataBase.
|
overridevirtual |
Compute the lumped mass.
| data_manager | Reference to the data manager |
Implements nimble::ModelDataBase.
| void nimble::ModelData::DeclareElementData | ( | int | block_id, |
| std::vector< std::pair< std::string, Length > > const & | data_labels_and_lengths ) |
|
protected |
|
inline |
|
inline |
| void nimble::ModelData::GetElementDataForOutput | ( | std::map< int, std::vector< std::vector< double > > > & | single_component_arrays | ) |
|
inline |
|
inline |
| Field nimble::ModelData::GetField | ( | int | field_id | ) |
|
overridevirtual |
Returns the field ID for a specific label.
| field_label | Label for a stored quantity |
Implements nimble::ModelDataBase.
|
inline |
|
inline |
|
protected |
| double * nimble::ModelData::GetNodeData | ( | int | field_id | ) |
|
protected |
| void nimble::ModelData::GetNodeDataForOutput | ( | std::vector< std::vector< double > > & | single_component_arrays | ) |
|
inline |
Get view of scalar quantity defined on nodes.
| label | the data label |
|
overridevirtual |
Get view of scalar quantity defined on nodes.
| field_id | the field id (see DataManager::GetFieldIDs()) |
Implements nimble::ModelDataBase.
|
inline |
Get view of vector quantity defined on nodes.
| label | the data label |
|
overridevirtual |
Get view of vector quantity defined on nodes.
| field_id | the field id (see DataManager::GetFieldIDs()) |
Implements nimble::ModelDataBase.
|
overridevirtual |
Initialize the different blocks in the mesh.
| data_manager | Reference to the data manager |
| material_factory_base | Shared pointer to the material factory |
Implements nimble::ModelDataBase.
|
overridevirtual |
Reimplemented from nimble::ModelDataBase.
| void nimble::ModelData::SpecifyOutputFields | ( | const std::string & | output_field_string | ) |
|
inlineoverridevirtual |
Copy time state (n+1) into time state (n)
| data_manager | Reference to the data manager |
Implements nimble::ModelDataBase.
|
overridevirtual |
Write output of simulation in Exodus format.
| [in] | data_manager | Reference to data manager |
| [in] | time_current | Time value |
Reimplemented from nimble::ModelDataBase.
|
protected |
Block ids.
|
protected |
Blocks.
|
protected |
Map key is the field_id, value is the corresponding Field.
|
protected |
Information for Exodus output about element data.
|
protected |
Information for Exodus output about element data.
|
protected |
Map key is the block_id, the vector contains the field ids for the fields on that block.
|
protected |
Map key is the block_id, vector contains full data array for that block at step N.
|
protected |
Map key is the block_id, vector contains full data array for that block at step N+1.
|
protected |
Map from global node it to local node id.
|
protected |
List of node ids that are shared across multiple ranks.
|
protected |
Map key is the field_id, vector contains the nested data array for the given nodal field.
|
protected |
Information for Exodus output about node data.