adamantine
Public Member Functions | Private Attributes | List of all members
adamantine::Microstructure< dim > Class Template Reference

#include <Microstructure.hh>

Public Member Functions

 Microstructure (MPI_Comm communicator, std::string const &filename_prefix)
 
 ~Microstructure ()
 
void set_old_temperature (dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > &old_temperature)
 
template<int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
void compute_G_and_R (MaterialProperty< dim, n_materials, p_order, MaterialStates, MemorySpaceType > const &material_properties, dealii::DoFHandler< dim > const &dof_handler, dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > const &temperature, double delta_t)
 

Private Attributes

MPI_Comm _communicator
 
std::string _filename_prefix
 
std::ofstream _file
 
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > _old_temperature
 

Detailed Description

template<int dim>
class adamantine::Microstructure< dim >

This class computes data need for microstructure simulation.

Definition at line 26 of file Microstructure.hh.

Constructor & Destructor Documentation

◆ Microstructure()

template<int dim>
adamantine::Microstructure< dim >::Microstructure ( MPI_Comm  communicator,
std::string const &  filename_prefix 
)

Constructor.

Definition at line 14 of file Microstructure.cc.

◆ ~Microstructure()

template<int dim>
adamantine::Microstructure< dim >::~Microstructure

On each rank, the destructor closes their own temporary file. On rank zero, the destructor concatenates the temporary files into a single new file, and it removes all the temporary files.

Definition at line 25 of file Microstructure.cc.

Member Function Documentation

◆ compute_G_and_R()

template<int dim>
template<int n_materials, int p_order, typename MaterialStates , typename MemorySpaceType >
void adamantine::Microstructure< dim >::compute_G_and_R ( MaterialProperty< dim, n_materials, p_order, MaterialStates, MemorySpaceType > const &  material_properties,
dealii::DoFHandler< dim > const &  dof_handler,
dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > const &  temperature,
double  delta_t 
)

Compute the following data

  • Temperature Gradient: G (K/m) = sqrt(G_x^2+G_y^2+G_z^2)
  • Cooling Rate (K/s) = |dT/dt|
  • Interface Velocity: R (m/s) = cooling rate / G

Definition at line 87 of file Microstructure.hh.

◆ set_old_temperature()

template<int dim>
void adamantine::Microstructure< dim >::set_old_temperature ( dealii::LA::distributed::Vector< double, dealii::MemorySpace::Host > &  old_temperature)

Save the temperature before calling evolve_one_time_step().

Definition at line 57 of file Microstructure.cc.

Member Data Documentation

◆ _communicator

template<int dim>
MPI_Comm adamantine::Microstructure< dim >::_communicator
private

Local MPI communicator.

Definition at line 68 of file Microstructure.hh.

◆ _file

template<int dim>
std::ofstream adamantine::Microstructure< dim >::_file
private

Temporary output file.

Definition at line 76 of file Microstructure.hh.

◆ _filename_prefix

template<int dim>
std::string adamantine::Microstructure< dim >::_filename_prefix
private

Prefix of the output filename.

Definition at line 72 of file Microstructure.hh.

◆ _old_temperature

template<int dim>
dealii::LA::distributed::Vector<double, dealii::MemorySpace::Host> adamantine::Microstructure< dim >::_old_temperature
private

Temperature at the previous time step.

Definition at line 81 of file Microstructure.hh.