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

#include <MechanicalOperator.hh>

Public Member Functions

 MechanicalOperator (MPI_Comm const &communicator, MaterialProperty< dim, n_materials, p_order, MaterialStates, MemorySpaceType > &material_properties, std::vector< double > const &reference_temperatures)
 
void reinit (dealii::DoFHandler< dim > const &dof_handler, dealii::AffineConstraints< double > const &affine_constraints, dealii::hp::QCollection< dim > const &quad, std::vector< std::shared_ptr< BodyForce< dim >>> const &body_forces=std::vector< std::shared_ptr< BodyForce< dim >>>())
 
void update_temperature (dealii::DoFHandler< dim > const &thermal_dof_handler, dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > const &temperature, std::vector< bool > const &has_melted)
 
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > const & rhs () const
 
dealii::TrilinosWrappers::SparseMatrix const & system_matrix () const
 

Private Member Functions

void assemble_system (std::vector< std::shared_ptr< BodyForce< dim >>> const &body_forces)
 

Private Attributes

MPI_Comm const & _communicator
 
std::vector< double > _reference_temperatures
 
MaterialProperty< dim, n_materials, p_order, MaterialStates, MemorySpaceType > & _material_properties
 
dealii::DoFHandler< dim > const * _dof_handler = nullptr
 
dealii::DoFHandler< dim > const * _thermal_dof_handler = nullptr
 
dealii::AffineConstraints< double > const * _affine_constraints = nullptr
 
dealii::hp::QCollection< dim > const * _q_collection = nullptr
 
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > _system_rhs
 
dealii::TrilinosWrappers::SparseMatrix _system_matrix
 
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > _temperature
 
std::vector< bool > _has_melted
 

Detailed Description

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

This class is the operator associated with the solid mechanics equations. The class is templated on the MemorySpace because it use MaterialProperty which itself is templated on the MemorySpace but the operator is CPU only.

Definition at line 30 of file MechanicalOperator.hh.

Constructor & Destructor Documentation

◆ MechanicalOperator()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::MechanicalOperator ( MPI_Comm const &  communicator,
MaterialProperty< dim, n_materials, p_order, MaterialStates, MemorySpaceType > &  material_properties,
std::vector< double > const &  reference_temperatures 
)

Constructor. If the initial temperature is negative, the simulation is mechanical only. Otherwise, we solve a thermo-mechanical problem.

Definition at line 32 of file MechanicalOperator.cc.

Member Function Documentation

◆ assemble_system()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
void adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::assemble_system ( std::vector< std::shared_ptr< BodyForce< dim >>> const &  body_forces)
private

Assemble the matrix and the right-hand-side.

Note
The 2D case does not represent any physical model but it is convenient for testing.

Definition at line 77 of file MechanicalOperator.cc.

◆ reinit()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
void adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::reinit ( dealii::DoFHandler< dim > const &  dof_handler,
dealii::AffineConstraints< double > const &  affine_constraints,
dealii::hp::QCollection< dim > const &  quad,
std::vector< std::shared_ptr< BodyForce< dim >>> const &  body_forces = std::vector<std::shared_ptr<BodyForce<dim>>>() 
)

Definition at line 47 of file MechanicalOperator.cc.

◆ rhs()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > const & adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::rhs
inline

Definition at line 128 of file MechanicalOperator.hh.

◆ system_matrix()

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::TrilinosWrappers::SparseMatrix const & adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::system_matrix
inline

Definition at line 137 of file MechanicalOperator.hh.

◆ update_temperature()

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

Update the DoFHandler used by ThermalPhysics and update the temperature.

Definition at line 62 of file MechanicalOperator.cc.

Member Data Documentation

◆ _affine_constraints

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::AffineConstraints<double> const* adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_affine_constraints = nullptr
private

Non-owning pointer to the AffineConstraints from MechanicalPhysics

Definition at line 96 of file MechanicalOperator.hh.

◆ _communicator

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
MPI_Comm const& adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_communicator
private

MPI communicator.

Definition at line 74 of file MechanicalOperator.hh.

◆ _dof_handler

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::DoFHandler<dim> const* adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_dof_handler = nullptr
private

Non-owning pointer to the DoFHandler from MechanicalPhysics

Definition at line 88 of file MechanicalOperator.hh.

◆ _has_melted

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
std::vector<bool> adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_has_melted
private

Indicator variable for whether a point has ever been above the solidus. The value is false for material that has not yet melted and true for material that has melted.

Definition at line 120 of file MechanicalOperator.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::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_material_properties
private

Reference to the MaterialProperty from MechanicalPhysics.

Definition at line 84 of file MechanicalOperator.hh.

◆ _q_collection

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::hp::QCollection<dim> const* adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_q_collection = nullptr
private

Non-owning pointer to the QCollection from MechanicalPhysics

Definition at line 100 of file MechanicalOperator.hh.

◆ _reference_temperatures

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

List of initial temperatures of the material. If the length of the vector is nonzero, we solve a thermo-mechanical problem.

Definition at line 79 of file MechanicalOperator.hh.

◆ _system_matrix

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::TrilinosWrappers::SparseMatrix adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_system_matrix
private

Matrix of the mechanical problem.

Definition at line 109 of file MechanicalOperator.hh.

◆ _system_rhs

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

Right-hand-side of the mechanical problem.

Definition at line 105 of file MechanicalOperator.hh.

◆ _temperature

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

Temperature of the material.

Definition at line 114 of file MechanicalOperator.hh.

◆ _thermal_dof_handler

template<int dim, int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
dealii::DoFHandler<dim> const* adamantine::MechanicalOperator< dim, n_materials, p_order, MaterialStates, MemorySpaceType >::_thermal_dof_handler = nullptr
private

Non-owning pointer to the DoFHandler from ThermalPhysics

Definition at line 92 of file MechanicalOperator.hh.