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

#include <PostProcessor.hh>

Public Types

using kokkos_host = dealii::MemorySpace::Host::kokkos_space
 
using kokkos_default = dealii::MemorySpace::Default::kokkos_space
 

Public Member Functions

 PostProcessor (MPI_Comm const &communicator, boost::property_tree::ptree const &database, dealii::DoFHandler< dim > &dof_handler, int ensemble_member_index=-1)
 
 PostProcessor (MPI_Comm const &communicator, boost::property_tree::ptree const &database, dealii::DoFHandler< dim > &thermal_dof_handler, dealii::DoFHandler< dim > &mechanical_dof_handler, int ensemble_member_index=-1)
 
template<typename LayoutType >
void write_thermal_output (unsigned int time_step, double time, dealii::LA::distributed::Vector< double > const &temperature, Kokkos::View< double **, LayoutType, kokkos_host > state, std::unordered_map< dealii::types::global_dof_index, unsigned int > const &dofs_map, dealii::DoFHandler< dim > const &material_dof_handler)
 
template<typename LayoutType >
void write_mechanical_output (unsigned int time_step, double time, dealii::LA::distributed::Vector< double > const &displacement, std::vector< std::vector< dealii::SymmetricTensor< 2, dim >>> const &stress_tensor, Kokkos::View< double **, LayoutType, kokkos_host > state, std::unordered_map< dealii::types::global_dof_index, unsigned int > const &dofs_map, dealii::DoFHandler< dim > const &material_dof_handler)
 
template<typename LayoutType >
void write_output (unsigned int time_step, double time, dealii::LA::distributed::Vector< double > const &temperature, dealii::LA::distributed::Vector< double > const &displacement, std::vector< std::vector< dealii::SymmetricTensor< 2, dim >>> const &stress_tensor, Kokkos::View< double **, LayoutType, kokkos_host > state, std::unordered_map< dealii::types::global_dof_index, unsigned int > const &dofs_map, dealii::DoFHandler< dim > const &material_dof_handler)
 
void write_pvd () const
 

Private Member Functions

dealii::Vector< double > get_stress_norm (std::vector< std::vector< dealii::SymmetricTensor< 2, dim >>> const &stress_tensor)
 
void thermal_dataout (dealii::LA::distributed::Vector< double > const &temperature)
 
void mechanical_dataout (dealii::LA::distributed::Vector< double > const &displacement, StrainPostProcessor< dim > const &strain, std::vector< std::vector< dealii::SymmetricTensor< 2, dim >>> const &stress_tensor)
 
template<typename LayoutType >
void material_dataout (Kokkos::View< double **, LayoutType, kokkos_host > state, std::unordered_map< dealii::types::global_dof_index, unsigned int > const &dofs_map, dealii::DoFHandler< dim > const &material_dof_handler)
 
void subdomain_dataout ()
 
void write_pvtu (unsigned int time_step, double time)
 

Private Attributes

MPI_Comm _communicator
 
bool _thermal_output
 
bool _mechanical_output
 
std::string _filename_prefix
 
std::string _output_dir
 
std::vector< std::pair< double, std::string > > _times_filenames
 
dealii::DataOut< dim > _data_out
 
dealii::DoFHandler< dim > * _thermal_dof_handler = nullptr
 
dealii::DoFHandler< dim > * _mechanical_dof_handler = nullptr
 
unsigned int _additional_output_refinement
 

Detailed Description

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

This class outputs the results using the vtu format.

Definition at line 40 of file PostProcessor.hh.

Member Typedef Documentation

◆ kokkos_default

template<int dim>
using adamantine::PostProcessor< dim >::kokkos_default = dealii::MemorySpace::Default::kokkos_space

Definition at line 44 of file PostProcessor.hh.

◆ kokkos_host

template<int dim>
using adamantine::PostProcessor< dim >::kokkos_host = dealii::MemorySpace::Host::kokkos_space

Definition at line 43 of file PostProcessor.hh.

Constructor & Destructor Documentation

◆ PostProcessor() [1/2]

template<int dim>
adamantine::PostProcessor< dim >::PostProcessor ( MPI_Comm const &  communicator,
boost::property_tree::ptree const &  database,
dealii::DoFHandler< dim > &  dof_handler,
int  ensemble_member_index = -1 
)

Constructor takes the DoFHandler of the thermal or the mechanical simulation.

Definition at line 19 of file PostProcessor.cc.

◆ PostProcessor() [2/2]

template<int dim>
adamantine::PostProcessor< dim >::PostProcessor ( MPI_Comm const &  communicator,
boost::property_tree::ptree const &  database,
dealii::DoFHandler< dim > &  thermal_dof_handler,
dealii::DoFHandler< dim > &  mechanical_dof_handler,
int  ensemble_member_index = -1 
)

Constructor takes the DoFHandlers of the thermal and the mechanical simulations.

Definition at line 56 of file PostProcessor.cc.

Member Function Documentation

◆ get_stress_norm()

template<int dim>
dealii::Vector< double > adamantine::PostProcessor< dim >::get_stress_norm ( std::vector< std::vector< dealii::SymmetricTensor< 2, dim >>> const &  stress_tensor)
private

Compute the norm of the stress.

Definition at line 94 of file PostProcessor.cc.

◆ material_dataout()

template<int dim>
template<typename LayoutType >
void adamantine::PostProcessor< dim >::material_dataout ( Kokkos::View< double **, LayoutType, kokkos_host state,
std::unordered_map< dealii::types::global_dof_index, unsigned int > const &  dofs_map,
dealii::DoFHandler< dim > const &  material_dof_handler 
)
private

Fill _data_out with material data.

Definition at line 285 of file PostProcessor.hh.

◆ mechanical_dataout()

template<int dim>
void adamantine::PostProcessor< dim >::mechanical_dataout ( dealii::LA::distributed::Vector< double > const &  displacement,
StrainPostProcessor< dim > const &  strain,
std::vector< std::vector< dealii::SymmetricTensor< 2, dim >>> const &  stress_tensor 
)
private

Fill _data_out with mechanical data.

Definition at line 130 of file PostProcessor.cc.

◆ subdomain_dataout()

template<int dim>
void adamantine::PostProcessor< dim >::subdomain_dataout
private

Fill _data_out with subdomain data.

Definition at line 156 of file PostProcessor.cc.

◆ thermal_dataout()

template<int dim>
void adamantine::PostProcessor< dim >::thermal_dataout ( dealii::LA::distributed::Vector< double > const &  temperature)
private

Fill _data_out with thermal data.

Definition at line 122 of file PostProcessor.cc.

◆ write_mechanical_output()

template<int dim>
template<typename LayoutType >
void adamantine::PostProcessor< dim >::write_mechanical_output ( unsigned int  time_step,
double  time,
dealii::LA::distributed::Vector< double > const &  displacement,
std::vector< std::vector< dealii::SymmetricTensor< 2, dim >>> const &  stress_tensor,
Kokkos::View< double **, LayoutType, kokkos_host state,
std::unordered_map< dealii::types::global_dof_index, unsigned int > const &  dofs_map,
dealii::DoFHandler< dim > const &  material_dof_handler 
)

Write the different vtu and pvtu files for a mechanical problem.

Definition at line 238 of file PostProcessor.hh.

◆ write_output()

template<int dim>
template<typename LayoutType >
void adamantine::PostProcessor< dim >::write_output ( unsigned int  time_step,
double  time,
dealii::LA::distributed::Vector< double > const &  temperature,
dealii::LA::distributed::Vector< double > const &  displacement,
std::vector< std::vector< dealii::SymmetricTensor< 2, dim >>> const &  stress_tensor,
Kokkos::View< double **, LayoutType, kokkos_host state,
std::unordered_map< dealii::types::global_dof_index, unsigned int > const &  dofs_map,
dealii::DoFHandler< dim > const &  material_dof_handler 
)

Write the different vtu and pvtu files for themo-mechanical problems.

Definition at line 260 of file PostProcessor.hh.

◆ write_pvd()

template<int dim>
void adamantine::PostProcessor< dim >::write_pvd

Write the pvd file for Paraview.

Definition at line 83 of file PostProcessor.cc.

◆ write_pvtu()

template<int dim>
void adamantine::PostProcessor< dim >::write_pvtu ( unsigned int  time_step,
double  time 
)
private

Write pvtu file.

Definition at line 171 of file PostProcessor.cc.

◆ write_thermal_output()

template<int dim>
template<typename LayoutType >
void adamantine::PostProcessor< dim >::write_thermal_output ( unsigned int  time_step,
double  time,
dealii::LA::distributed::Vector< double > const &  temperature,
Kokkos::View< double **, LayoutType, kokkos_host state,
std::unordered_map< dealii::types::global_dof_index, unsigned int > const &  dofs_map,
dealii::DoFHandler< dim > const &  material_dof_handler 
)

Write the different vtu and pvtu files for a thermal problem.

Definition at line 220 of file PostProcessor.hh.

Member Data Documentation

◆ _additional_output_refinement

template<int dim>
unsigned int adamantine::PostProcessor< dim >::_additional_output_refinement
private

Additional levels of refinement for the output.

Definition at line 187 of file PostProcessor.hh.

◆ _communicator

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

MPI communicator.

Definition at line 151 of file PostProcessor.hh.

◆ _data_out

template<int dim>
dealii::DataOut<dim> adamantine::PostProcessor< dim >::_data_out
private

DataOut associated with the post-processing.

Definition at line 175 of file PostProcessor.hh.

◆ _filename_prefix

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

Prefix of the different output files.

Definition at line 163 of file PostProcessor.hh.

◆ _mechanical_dof_handler

template<int dim>
dealii::DoFHandler<dim>* adamantine::PostProcessor< dim >::_mechanical_dof_handler = nullptr
private

DoFHandler associated with the mechanical simulation.

Definition at line 183 of file PostProcessor.hh.

◆ _mechanical_output

template<int dim>
bool adamantine::PostProcessor< dim >::_mechanical_output
private

Flag is true if we output the results of the mechanical simulation.

Definition at line 159 of file PostProcessor.hh.

◆ _output_dir

template<int dim>
std::string adamantine::PostProcessor< dim >::_output_dir
private

Output directory name.

Definition at line 167 of file PostProcessor.hh.

◆ _thermal_dof_handler

template<int dim>
dealii::DoFHandler<dim>* adamantine::PostProcessor< dim >::_thermal_dof_handler = nullptr
private

DoFHandler associated with the thermal simulation.

Definition at line 179 of file PostProcessor.hh.

◆ _thermal_output

template<int dim>
bool adamantine::PostProcessor< dim >::_thermal_output
private

Flag is true if we output the results of the thermal simulation.

Definition at line 155 of file PostProcessor.hh.

◆ _times_filenames

template<int dim>
std::vector<std::pair<double, std::string> > adamantine::PostProcessor< dim >::_times_filenames
private

Vector of pair of time and pvtu file.

Definition at line 171 of file PostProcessor.hh.