adamantine
Public Member Functions | List of all members
adamantine::ThermalPhysicsInterface< dim, MemorySpaceType > Class Template Referenceabstract

#include <ThermalPhysicsInterface.hh>

Inheritance diagram for adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >:
adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >

Public Member Functions

 ThermalPhysicsInterface ()=default
 
virtual ~ThermalPhysicsInterface ()=default
 
virtual void setup ()=0
 
virtual void setup_dofs ()=0
 
virtual void compute_inverse_mass_matrix ()=0
 
virtual void add_material_start (std::vector< std::vector< typename dealii::DoFHandler< dim >::active_cell_iterator >> const &elements_to_activate, std::vector< double > const &new_deposition_cos, std::vector< double > const &new_deposition_sin, std::vector< bool > &new_has_melted, unsigned int const activation_start, unsigned int const activation_end, dealii::LA::distributed::Vector< double, MemorySpaceType > &solution)=0
 
virtual void add_material_end (double const new_material_temperature, dealii::LA::distributed::Vector< double, MemorySpaceType > &solution)=0
 
virtual void update_physics_parameters (boost::property_tree::ptree const &database)=0
 
virtual double evolve_one_time_step (double t, double delta_t, dealii::LA::distributed::Vector< double, MemorySpaceType > &solution, std::vector< Timer > &timers)=0
 
virtual void initialize_dof_vector (double const value, dealii::LA::distributed::Vector< double, MemorySpaceType > &vector) const =0
 
virtual void get_state_from_material_properties ()=0
 
virtual void set_state_to_material_properties ()=0
 
virtual void load_checkpoint (std::string const &filename, dealii::LA::distributed::Vector< double, MemorySpaceType > &temperature)=0
 
virtual void save_checkpoint (std::string const &filename, dealii::LA::distributed::Vector< double, MemorySpaceType > &temperature)=0
 
virtual void set_material_deposition_orientation (std::vector< double > const &deposition_cos, std::vector< double > const &deposition_sin)=0
 
virtual double get_deposition_cos (unsigned int const i) const =0
 
virtual double get_deposition_sin (unsigned int const i) const =0
 
virtual void mark_has_melted (double const threshold_temperature, dealii::LA::distributed::Vector< double, MemorySpaceType > &temperature)=0
 
virtual std::vector< bool > get_has_melted_vector () const =0
 
virtual void set_has_melted_vector (std::vector< bool > const &has_melted)=0
 
virtual bool get_has_melted (const unsigned int) const =0
 
virtual dealii::DoFHandler< dim > & get_dof_handler ()=0
 
virtual dealii::AffineConstraints< double > & get_affine_constraints ()=0
 
virtual std::vector< std::shared_ptr< HeatSource< dim > > > & get_heat_sources ()=0
 
virtual unsigned int get_fe_degree () const =0
 

Detailed Description

template<int dim, typename MemorySpaceType>
class adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >

This class defines the interface for ThermalPhysics used in run(). The objective of this class is to simplify code in run() by reducing the number of template parameters from four to two.

Definition at line 28 of file ThermalPhysicsInterface.hh.

Constructor & Destructor Documentation

◆ ThermalPhysicsInterface()

template<int dim, typename MemorySpaceType >
adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::ThermalPhysicsInterface ( )
default

◆ ~ThermalPhysicsInterface()

template<int dim, typename MemorySpaceType >
virtual adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::~ThermalPhysicsInterface ( )
virtualdefault

Member Function Documentation

◆ add_material_end()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::add_material_end ( double const  new_material_temperature,
dealii::LA::distributed::Vector< double, MemorySpaceType > &  solution 
)
pure virtual

Finalize adding material by completing the transfer of solutions after the discretization has been adapted to the activated cells.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ add_material_start()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::add_material_start ( std::vector< std::vector< typename dealii::DoFHandler< dim >::active_cell_iterator >> const &  elements_to_activate,
std::vector< double > const &  new_deposition_cos,
std::vector< double > const &  new_deposition_sin,
std::vector< bool > &  new_has_melted,
unsigned int const  activation_start,
unsigned int const  activation_end,
dealii::LA::distributed::Vector< double, MemorySpaceType > &  solution 
)
pure virtual

Activate more elements of the mesh and interpolate the solution to the new domain.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ compute_inverse_mass_matrix()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::compute_inverse_mass_matrix ( )
pure virtual

Compute the inverse of the mass matrix associated to the Physics.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ evolve_one_time_step()

template<int dim, typename MemorySpaceType >
virtual double adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::evolve_one_time_step ( double  t,
double  delta_t,
dealii::LA::distributed::Vector< double, MemorySpaceType > &  solution,
std::vector< Timer > &  timers 
)
pure virtual

Evolve the physics from time t to time t+delta_t. solution first contains the field at time t and after execution of the function, the field at time t+delta_t.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ get_affine_constraints()

template<int dim, typename MemorySpaceType >
virtual dealii::AffineConstraints<double>& adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::get_affine_constraints ( )
pure virtual

◆ get_deposition_cos()

template<int dim, typename MemorySpaceType >
virtual double adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::get_deposition_cos ( unsigned int const  i) const
pure virtual

Return the cosine of the material deposition angle for the activated cell i.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ get_deposition_sin()

template<int dim, typename MemorySpaceType >
virtual double adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::get_deposition_sin ( unsigned int const  i) const
pure virtual

Return the sine of the material deposition angle for the activated cell i.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ get_dof_handler()

template<int dim, typename MemorySpaceType >
virtual dealii::DoFHandler<dim>& adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::get_dof_handler ( )
pure virtual

◆ get_fe_degree()

template<int dim, typename MemorySpaceType >
virtual unsigned int adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::get_fe_degree ( ) const
pure virtual

◆ get_has_melted()

template<int dim, typename MemorySpaceType >
virtual bool adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::get_has_melted ( const unsigned int  ) const
pure virtual

◆ get_has_melted_vector()

template<int dim, typename MemorySpaceType >
virtual std::vector<bool> adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::get_has_melted_vector ( ) const
pure virtual

◆ get_heat_sources()

template<int dim, typename MemorySpaceType >
virtual std::vector<std::shared_ptr<HeatSource<dim> > >& adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::get_heat_sources ( )
pure virtual

◆ get_state_from_material_properties()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::get_state_from_material_properties ( )
pure virtual

Populate the state of the materials in the Physics object from the MaterialProperty object.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ initialize_dof_vector()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::initialize_dof_vector ( double const  value,
dealii::LA::distributed::Vector< double, MemorySpaceType > &  vector 
) const
pure virtual

◆ load_checkpoint()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::load_checkpoint ( std::string const &  filename,
dealii::LA::distributed::Vector< double, MemorySpaceType > &  temperature 
)
pure virtual

◆ mark_has_melted()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::mark_has_melted ( double const  threshold_temperature,
dealii::LA::distributed::Vector< double, MemorySpaceType > &  temperature 
)
pure virtual

Mark cells above the given temperature to denote that they have melted

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ save_checkpoint()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::save_checkpoint ( std::string const &  filename,
dealii::LA::distributed::Vector< double, MemorySpaceType > &  temperature 
)
pure virtual

Write the current state of the simulation on the filesystem.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ set_has_melted_vector()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::set_has_melted_vector ( std::vector< bool > const &  has_melted)
pure virtual

◆ set_material_deposition_orientation()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::set_material_deposition_orientation ( std::vector< double > const &  deposition_cos,
std::vector< double > const &  deposition_sin 
)
pure virtual

Set the deposition cosine and sine and call update_material_deposition_orientation.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ set_state_to_material_properties()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::set_state_to_material_properties ( )
pure virtual

Populate the state of the materials in the MaterialProperty object from the Physics object.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ setup()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::setup ( )
pure virtual

◆ setup_dofs()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::setup_dofs ( )
pure virtual

Associate the AffineConstraints<double> and the MatrixFree objects to the underlying Triangulation.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.

◆ update_physics_parameters()

template<int dim, typename MemorySpaceType >
virtual void adamantine::ThermalPhysicsInterface< dim, MemorySpaceType >::update_physics_parameters ( boost::property_tree::ptree const &  database)
pure virtual

Public interface for modifying the private state of the Physics object. One use of this is to modify nominally constant parameters in the middle of a simulation based on data assimilation with an augmented state.

Implemented in adamantine::ThermalPhysics< dim, n_materials, p_order, fe_degree, MaterialStates, MemorySpaceType, QuadratureType >.