#include <nimble_kokkos_block.h>
|
| | Block () |
| |
| | ~Block () override |
| |
| void | Initialize (std::string const &model_material_parameters, int num_elements, MaterialFactory &factory) |
| |
| void | InstantiateMaterialModel (int num_material_points, MaterialFactory &factory) |
| |
| void | InstantiateElement () override |
| |
| std::shared_ptr< nimble::Element > | GetHostElement () |
| |
| nimble::Element * | GetDeviceElement () |
| |
| std::shared_ptr< nimble::Material > | GetHostMaterialModel () |
| |
| nimble::Material * | GetDeviceMaterialModel () |
| |
| DeviceElementConnectivityView & | GetDeviceElementConnectivityView () |
| |
| std::shared_ptr< nimble::NGPLAMEData > | GetNGPLAMEData () |
| |
| | BlockBase ()=default |
| |
| virtual | ~BlockBase ()=default |
| |
| double | GetDensity () const |
| |
| double | GetBulkModulus () const |
| |
| double | GetShearModulus () const |
| |
| std::shared_ptr< Material > | GetMaterialPointer () const |
| |
| std::shared_ptr< Element > | GetElementPointer () const |
| |
| virtual double | ComputeCriticalTimeStep (const nimble::Viewify< 2 > &node_reference_coordinates, const nimble::Viewify< 2 > &node_displacements, int num_elem, const int *elem_conn) const |
| |
| template<typename MatT> |
| void | ComputeTangentStiffnessMatrix (int num_global_unknowns, const double *const reference_coordinates, const double *const displacement, int num_elem, const int *const elem_conn, const int *const global_node_ids, MatT &tangent_stiffness) const |
| |
◆ Block()
| nimble_kokkos::Block::Block |
( |
| ) |
|
|
inline |
75 :
BlockBase(), elem_conn_d(
"element_connectivity_d", 0), element_device_(
nullptr), material_device_(
nullptr)
76 {
77 }
◆ ~Block()
| nimble_kokkos::Block::~Block |
( |
| ) |
|
|
inlineoverride |
80 {
81
82
83
84 if (element_device_ != nullptr) { Kokkos::kokkos_free(element_device_); }
85 if (material_device_ != nullptr) { Kokkos::kokkos_free(material_device_); }
86 }
◆ GetDeviceElement()
105 {
106 return element_device_;
107 }
◆ GetDeviceElementConnectivityView()
123 {
124 return elem_conn_d;
125 }
◆ GetDeviceMaterialModel()
117 {
118 return material_device_;
119 }
◆ GetHostElement()
| std::shared_ptr< nimble::Element > nimble_kokkos::Block::GetHostElement |
( |
| ) |
|
|
inline |
99 {
101 }
std::shared_ptr< Element > element_
Definition nimble_block_base.h:117
◆ GetHostMaterialModel()
| std::shared_ptr< nimble::Material > nimble_kokkos::Block::GetHostMaterialModel |
( |
| ) |
|
|
inline |
111 {
113 }
std::shared_ptr< Material > material_
Definition nimble_block_base.h:118
◆ GetNGPLAMEData()
| std::shared_ptr< nimble::NGPLAMEData > nimble_kokkos::Block::GetNGPLAMEData |
( |
| ) |
|
|
inline |
129 {
130 return ngp_lame_data_;
131 }
◆ Initialize()
| void nimble_kokkos::Block::Initialize |
( |
std::string const & | model_material_parameters, |
|
|
int | num_elements, |
|
|
MaterialFactory & | factory ) |
51{
54 int num_material_points = num_elements *
element_->NumIntegrationPointsPerElement();
56}
std::string model_material_parameters_
Definition nimble_block_base.h:116
void InstantiateElement() override
Definition nimble_kokkos_block.cc:68
void InstantiateMaterialModel(int num_material_points, MaterialFactory &factory)
Definition nimble_kokkos_block.cc:59
◆ InstantiateElement()
| void nimble_kokkos::Block::InstantiateElement |
( |
| ) |
|
|
overridevirtual |
Implements nimble::BlockBase.
69{
70
71 element_ = std::make_shared<nimble::HexElement>();
72
73
74 element_device_ = static_cast<nimble::Element*>(Kokkos::kokkos_malloc<>("Element", sizeof(nimble::HexElement)));
75 nimble::Element* pointer_that_lives_on_the_stack = element_device_;
76 Kokkos::parallel_for(
77 1, KOKKOS_LAMBDA(int) { new (pointer_that_lives_on_the_stack) nimble::HexElement(); });
78}
◆ InstantiateMaterialModel()
| void nimble_kokkos::Block::InstantiateMaterialModel |
( |
int | num_material_points, |
|
|
MaterialFactory & | factory ) |
60{
63 material_device_ = factory.get_material_device();
64 ngp_lame_data_ = factory.get_ngp_lame_data();
65}
The documentation for this class was generated from the following files: