NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
Loading...
Searching...
No Matches
nimble_kokkos::MaterialFactory Class Reference

#include <nimble_kokkos_material_factory.h>

Inheritance diagram for nimble_kokkos::MaterialFactory:
nimble::MaterialFactoryBase

Public Member Functions

 MaterialFactory ()
 
 ~MaterialFactory () override=default
 
std::shared_ptr< nimble::Materialget_material_host () const
 
nimble::Materialget_material_device () const
 
std::shared_ptr< nimble::NGPLAMEData > get_ngp_lame_data () const
 
- Public Member Functions inherited from nimble::MaterialFactoryBase
 MaterialFactoryBase ()
 
virtual ~MaterialFactoryBase ()=default
 
void add_valid_double_parameter_name (const char *name)
 
void add_valid_string_parameter_name (const char *name)
 
virtual std::shared_ptr< nimble::Materialget_material () const
 
virtual void parse_and_create (const std::string &mat_params, int num_points)
 
virtual void parse_and_create (const std::string &mat_params)
 
virtual std::map< std::string, double > parse_material_params_string (const std::string &mat_params)
 

Protected Member Functions

void create () override
 
- Protected Member Functions inherited from nimble::MaterialFactoryBase
std::shared_ptr< nimble::MaterialParametersParseMaterialParametersString (const std::string &material_parameters, int num_material_points=0) const
 
std::map< std::string, double > ParseMaterialParamsStringToMap (const std::string &material_parameters) const
 

Protected Attributes

nimble::Materialmaterial_device
 
std::shared_ptr< nimble::NGPLAMEData > ngp_lame_data
 
- Protected Attributes inherited from nimble::MaterialFactoryBase
std::shared_ptr< nimble::Materialmaterial = nullptr
 
std::shared_ptr< const nimble::MaterialParametersmaterial_params
 

Constructor & Destructor Documentation

◆ MaterialFactory()

nimble_kokkos::MaterialFactory::MaterialFactory ( )
explicit
MaterialFactoryBase()
Definition nimble_material_factory_base.cc:56
nimble::Material * material_device
Definition nimble_kokkos_material_factory.h:94

◆ ~MaterialFactory()

nimble_kokkos::MaterialFactory::~MaterialFactory ( )
overridedefault

Member Function Documentation

◆ create()

void nimble_kokkos::MaterialFactory::create ( )
overrideprotectedvirtual

Implements nimble::MaterialFactoryBase.

73{
74 auto name_string = material_params->GetMaterialName(false);
75 if (name_string == "neohookean") {
76 std::tie(material, material_device) =
78 } else if (name_string == "elastic") {
79 std::tie(material, material_device) =
81 } else {
82 throw std::invalid_argument(
83 "\nError in Block::InstantiateMaterialModel(), invalid material model "
84 "name.\n");
85 }
86}
std::shared_ptr< nimble::Material > material
Definition nimble_material_factory_base.h:125
std::shared_ptr< const nimble::MaterialParameters > material_params
Definition nimble_material_factory_base.h:126
std::pair< std::shared_ptr< MatType >, MatType * > allocate_material_on_host_and_device(const nimble::MaterialParameters &mat_params_struct)
Definition nimble_kokkos_material_factory.cc:60

◆ get_material_device()

nimble::Material * nimble_kokkos::MaterialFactory::get_material_device ( ) const
inline
74 {
75 return material_device;
76 }

◆ get_material_host()

std::shared_ptr< nimble::Material > nimble_kokkos::MaterialFactory::get_material_host ( ) const
inline
68 {
69 return material;
70 }

◆ get_ngp_lame_data()

std::shared_ptr< nimble::NGPLAMEData > nimble_kokkos::MaterialFactory::get_ngp_lame_data ( ) const
inline
80 {
81 return ngp_lame_data;
82 }
std::shared_ptr< nimble::NGPLAMEData > ngp_lame_data
Definition nimble_kokkos_material_factory.h:95

Member Data Documentation

◆ material_device

nimble::Material* nimble_kokkos::MaterialFactory::material_device
protected
Note
The variable material is used as 'material_host' (i.e. a variable defined on the host memory space).

◆ ngp_lame_data

std::shared_ptr<nimble::NGPLAMEData> nimble_kokkos::MaterialFactory::ngp_lame_data
protected

The documentation for this class was generated from the following files: