adamantine
Public Member Functions | Private Member Functions | Private Attributes | List of all members
adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType > Class Template Reference

#include <MechanicalPhysics.hh>

Public Member Functions

 MechanicalPhysics (MPI_Comm const &communicator, unsigned int const fe_degree, Geometry< dim > &geometry, Boundary const &boundary, MaterialProperty< dim, n_materials, p_order, MaterialStates, MemorySpaceType > &material_properties, std::vector< double > const &initial_temperatures)
 
void setup_dofs (std::vector< std::shared_ptr< BodyForce< dim >>> const &body_forces=std::vector< std::shared_ptr< BodyForce< dim >>>())
 
void setup_dofs (dealii::DoFHandler< dim > const &thermal_dof_handler, dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > const &temperature, std::vector< bool > const &has_melted, std::vector< std::shared_ptr< BodyForce< dim >>> const &body_forces=std::vector< std::shared_ptr< BodyForce< dim >>>())
 
void prepare_transfer_mpi ()
 
void complete_transfer_mpi ()
 
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > solve ()
 
dealii::DoFHandler< dim > & get_dof_handler ()
 
dealii::AffineConstraints< double > & get_affine_constraints ()
 
std::vector< std::vector< dealii::SymmetricTensor< 2, dim > > > & get_stress_tensor ()
 

Private Member Functions

void compute_stress (dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > const &displacement)
 

Private Attributes

Geometry< dim > & _geometry
 
Boundary _boundary
 
MaterialProperty< dim, n_materials, p_order, MaterialStates, MemorySpaceType > & _material_properties
 
dealii::hp::FECollection< dim > _fe_collection
 
dealii::DoFHandler< dim > _dof_handler
 
dealii::AffineConstraints< double > _affine_constraints
 
dealii::hp::QCollection< dim > _q_collection
 
std::unique_ptr< MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType > > _mechanical_operator
 
bool _include_gravity
 
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > _old_displacement
 
std::vector< std::vector< double > > _plastic_internal_variable
 
std::vector< std::vector< dealii::SymmetricTensor< 2, dim > > > _stress
 
std::vector< std::vector< dealii::SymmetricTensor< 2, dim > > > _back_stress
 
dealii::parallel::distributed::SolutionTransfer< dim, dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > > _solution_transfer
 
dealii::parallel::distributed::CellDataTransfer< dim, dim, std::vector< std::vector< double > > > _cell_data_transfer
 
std::vector< std::vector< double > > _data_to_transfer
 

Detailed Description

template<int dim, int n_materials, int p_order, typename MaterialStates, typename MemorySpaceType>
class adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >

Definition at line 23 of file MechanicalPhysics.hh.

Constructor & Destructor Documentation

◆ MechanicalPhysics()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::MechanicalPhysics ( MPI_Comm const &  communicator,
unsigned int const  fe_degree,
Geometry< dim > &  geometry,
Boundary const &  boundary,
MaterialProperty< dim, n_materials, p_order, MaterialStates, MemorySpaceType > &  material_properties,
std::vector< double > const &  initial_temperatures 
)

Constructor.

Definition at line 27 of file MechanicalPhysics.cc.

Member Function Documentation

◆ complete_transfer_mpi()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
void adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::complete_transfer_mpi

Complete transfer of displacment and stress data after activating cells or refining the mesh.

Definition at line 190 of file MechanicalPhysics.cc.

◆ compute_stress()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
void adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::compute_stress ( dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > const &  displacement)
private

Definition at line 477 of file MechanicalPhysics.cc.

◆ get_affine_constraints()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::AffineConstraints< double > & adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::get_affine_constraints
inline

Return the AffineConstraints<double>.

Definition at line 192 of file MechanicalPhysics.hh.

◆ get_dof_handler()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::DoFHandler< dim > & adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::get_dof_handler
inline

Return the DoFHandler.

Definition at line 183 of file MechanicalPhysics.hh.

◆ get_stress_tensor()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
std::vector< std::vector< dealii::SymmetricTensor< 2, dim > > > & adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::get_stress_tensor
inline

Return the stress tensor associated to each quadrature point.

Definition at line 201 of file MechanicalPhysics.hh.

◆ prepare_transfer_mpi()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
void adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::prepare_transfer_mpi

Prepare displacement and stresses to be communicated when activating cells or refining the mesh.

Definition at line 136 of file MechanicalPhysics.cc.

◆ setup_dofs() [1/2]

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
void adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::setup_dofs ( dealii::DoFHandler< dim > const &  thermal_dof_handler,
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > const &  temperature,
std::vector< bool > const &  has_melted,
std::vector< std::shared_ptr< BodyForce< dim >>> const &  body_forces = std::vector<std::shared_ptr<BodyForce<dim>>>() 
)

Same as above when solving a thermo-mechanical problem.

Definition at line 255 of file MechanicalPhysics.cc.

◆ setup_dofs() [2/2]

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
void adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::setup_dofs ( std::vector< std::shared_ptr< BodyForce< dim >>> const &  body_forces = std::vector<std::shared_ptr<BodyForce<dim>>>())

Setup the DoFHandler, the AffineConstraints, and the MechanicalOperator.

Definition at line 105 of file MechanicalPhysics.cc.

◆ solve()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::solve

Solve the mechanical problem and return the displacement.

Definition at line 421 of file MechanicalPhysics.cc.

Member Data Documentation

◆ _affine_constraints

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::AffineConstraints<double> adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_affine_constraints
private

Associated AffineConstraints.

Definition at line 119 of file MechanicalPhysics.hh.

◆ _back_stress

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
std::vector<std::vector<dealii::SymmetricTensor<2, dim> > > adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_back_stress
private

Back stress tensor at each (cell, quadrature point).

Definition at line 154 of file MechanicalPhysics.hh.

◆ _boundary

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
Boundary adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_boundary
private

Associated Boundary.

Definition at line 102 of file MechanicalPhysics.hh.

◆ _cell_data_transfer

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::parallel::distributed::CellDataTransfer< dim, dim, std::vector<std::vector<double> > > adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_cell_data_transfer
private

Cell data transfer object used for updating _plastic_internal_variable, _stress, and _back_stress when the triangulation is updated when adding material

Definition at line 171 of file MechanicalPhysics.hh.

◆ _data_to_transfer

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
std::vector<std::vector<double> > adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_data_to_transfer
private

Temporary storaged used by _cell_data_transfer

Definition at line 176 of file MechanicalPhysics.hh.

◆ _dof_handler

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::DoFHandler<dim> adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_dof_handler
private

Associated DoFHandler.

Definition at line 115 of file MechanicalPhysics.hh.

◆ _fe_collection

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::hp::FECollection<dim> adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_fe_collection
private

Associated FECollection.

Definition at line 111 of file MechanicalPhysics.hh.

◆ _geometry

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
Geometry<dim>& adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_geometry
private

Associated Geometry.

Definition at line 98 of file MechanicalPhysics.hh.

◆ _include_gravity

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
bool adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_include_gravity
private

Whether to include a gravitional body force in the calculation.

Definition at line 133 of file MechanicalPhysics.hh.

◆ _material_properties

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
MaterialProperty<dim, n_materials, p_order, MaterialStates, MemorySpaceType>& adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_material_properties
private

Associated MaterialProperty.

Definition at line 107 of file MechanicalPhysics.hh.

◆ _mechanical_operator

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
std::unique_ptr<MechanicalOperator<dim, n_materials, p_order, MaterialStates, MemorySpaceType> > adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_mechanical_operator
private

Pointer to the MechanicalOperator

Definition at line 129 of file MechanicalPhysics.hh.

◆ _old_displacement

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::LA::distributed::Vector<double, dealii::MemorySpace::Host> adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_old_displacement
private

Save displacement from the previous time step.

Definition at line 139 of file MechanicalPhysics.hh.

◆ _plastic_internal_variable

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
std::vector<std::vector<double> > adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_plastic_internal_variable
private

Plastic internal variable related to the strain

Definition at line 144 of file MechanicalPhysics.hh.

◆ _q_collection

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::hp::QCollection<dim> adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_q_collection
private

Associated QCollection.

Definition at line 123 of file MechanicalPhysics.hh.

◆ _solution_transfer

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::parallel::distributed::SolutionTransfer< dim, dealii::LA::distributed::Vector<double, dealii::MemorySpace::Host> > adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_solution_transfer
private

Solution transfer object used for updating _old_displacement when the triangulation is updated when adding material

Definition at line 162 of file MechanicalPhysics.hh.

◆ _stress

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
std::vector<std::vector<dealii::SymmetricTensor<2, dim> > > adamantine::MechanicalPhysics< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_stress
private

Stress tensor at each (cell, quadrature point).

Definition at line 149 of file MechanicalPhysics.hh.