CutUtil Namespace Reference

Developer Documentation: MeltPoolDG::CutUtil Namespace Reference
Developer Documentation
MeltPoolDG::CutUtil Namespace Reference

Classes

class  SolutionTransferOperator
 Operator for the solution transfer in moving boundary/interface simulations. More...
 

Typedefs

using NormType = dealii::VectorTools::NormType
 
template<int dim, typename number >
using MappingInfoType = dealii::NonMatching::MappingInfo< dim, dim, dealii::VectorizedArray< number > >
 
template<int dim, typename number >
using MappingInfoVectorType = std::vector< std::shared_ptr< MappingInfoType< dim, number > > >
 

Enumerations

enum  CellCategory { liquid = 0 , intersected = 1 , gas = 2 }
 Definition of the cell category numbering (active FE index). More...
 
enum  FaceType {
  inside_face_liquid , inside_face_gas , intersected_face , mixed_face_liquid_intersected ,
  mixed_face_intersected_liquid , mixed_face_gas_intersected , mixed_face_intersected_gas
}
 Enumeration for the face type. More...
 

Functions

template<int dim, typename VectorType , typename number = typename VectorType::value_type>
void refine_grid (const AMR::MarkCellsForRefinementType< dim > &mark_cells_for_refinement, const AttachDoFHandlerAndVectorsType< dim, VectorType > &attach_vectors, const std::function< void()> &post, const std::function< void()> &distribute_level_set_dofs, const dealii::DoFHandler< dim > &level_set_dof_handler, VectorType &level_set_dof_vector, const std::function< void()> &setup_dof_system, const AdaptiveMeshingData< number > &amr, dealii::Triangulation< dim > &tria, const int n_time_step)
 same as AMR::refine_grid(), but adapted for cases where one or more DoFHandler objects are used in CutFEM operations.
 
template<int dim, typename number >
number compute_cut_norm (const dealii::LinearAlgebra::distributed::Vector< number > &solution, const dealii::MatrixFree< dim, number, dealii::VectorizedArray< number > > &matrix_free, const std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< dim, dim, dealii::VectorizedArray< number > > > > &mapping_info_cells, const bool is_two_phase, const dealii::FE_Q< dim > &reference_element, const unsigned int dof_idx, const unsigned int quad_idx, const NormType norm_type=NormType::L2_norm)
 Compute the norm of a solution vector with a non-fitted (cut) domain representation.
 
template<int dim, typename VectorType >
void deserialize_internal (const AttachDoFHandlerAndVectorsType< dim, VectorType > &attach_vectors, const std::function< void()> &post, const std::function< void()> &distribute_level_set_dofs, const dealii::DoFHandler< dim > &level_set_dof_handler, const std::function< void()> &setup_dof_system, const std::string &prefix)
 Same as Restart::deserialize_internal(), but adapted for cases where one or more DoFHandler objects are used in CutFEM operations.
 
template<int dim>
CutPhaseType get_cut_type (const dealii::DoFHandler< dim > &dof_handler)
 Enum that names a type of CutFEM in use.
 
FaceType get_face_type (const std::pair< unsigned int, unsigned int > &adjacent_cell_categories)
 This function categorizes the FaceType of the current face range.
 
template<int dim>
void set_fe_index (const dealii::DoFHandler< dim > &dof_handler, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const bool set_future)
 This function is setting the FE index for every cell.
 
template<int dim, typename number , typename VectorType >
void compute_intersected_quadrature (MappingInfoVectorType< dim, number > mapping_info_cells, MappingInfoType< dim, number > &mapping_info_surface, const dealii::DoFHandler< dim > &level_set_dof_handler, const VectorType &level_set, const dealii::MatrixFree< dim, number, dealii::VectorizedArray< number > > &matrix_free, const int fe_degree, const bool is_two_phase, const bool is_dg=false, MappingInfoVectorType< dim, number > mapping_info_faces={})
 This function generates the immersed quadrature rules in the case that the domain is described by a discrete level-set function.
 
template<int dim, typename number , typename VectorType >
void compute_immersed_surface_quadrature (MappingInfoType< dim, number > &mapping_info_surface, const dealii::DoFHandler< dim > &level_set_dof_handler, const VectorType &level_set, const dealii::MatrixFree< dim, number, dealii::VectorizedArray< number > > &matrix_free, const int fe_degree)
 This function generates the immersed quadrature rules in the case that the domain is described by a discrete level-set function.
 
template<int dim, typename number , int n_components = 1>
void evaluate_intersected_domain (dealii::FEPointEvaluation< n_components, dim, dim, dealii::VectorizedArray< number > > &point_eval, const FECellIntegrator< dim, n_components, number > &cell_eval, const dealii::EvaluationFlags::EvaluationFlags evaluation_flags, const unsigned int cell_batch, const unsigned int cell_lane, const unsigned int n_dofs_per_cell)
 Evaluates solution values in the intersected domain for a specific SIMD lane within a cell batch.
 
template<int dim>
bool face_has_ghost_penalty (const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const typename dealii::Triangulation< dim >::active_cell_iterator &cell, const unsigned int face_index, const dealii::NonMatching::LocationToLevelSet &inactive_location=dealii::NonMatching::LocationToLevelSet::inside)
 This function checks whether the currently considered face requires the application of ghost-penalty stabilization or not.
 
template<int dim>
bool is_new_intersected_face (const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier_old, const typename dealii::Triangulation< dim >::active_cell_iterator &cell, const unsigned int face_index, const dealii::NonMatching::LocationToLevelSet &inactive_location=dealii::NonMatching::LocationToLevelSet::inside)
 This function checks whether the considered face is a newly created intersected face.
 
template void refine_grid (const AMR::MarkCellsForRefinementType< 1 > &, const AttachDoFHandlerAndVectorsType< 1, dealii::LinearAlgebra::distributed::Vector< double > > &, const std::function< void()> &, const std::function< void()> &, const dealii::DoFHandler< 1 > &, dealii::LinearAlgebra::distributed::Vector< double > &, const std::function< void()> &, const AdaptiveMeshingData< double > &, dealii::Triangulation< 1 > &, const int)
 
template void refine_grid (const AMR::MarkCellsForRefinementType< 2 > &, const AttachDoFHandlerAndVectorsType< 2, dealii::LinearAlgebra::distributed::Vector< double > > &, const std::function< void()> &, const std::function< void()> &, const dealii::DoFHandler< 2 > &, dealii::LinearAlgebra::distributed::Vector< double > &, const std::function< void()> &, const AdaptiveMeshingData< double > &, dealii::Triangulation< 2 > &, const int)
 
template void refine_grid (const AMR::MarkCellsForRefinementType< 3 > &, const AttachDoFHandlerAndVectorsType< 3, dealii::LinearAlgebra::distributed::Vector< double > > &, const std::function< void()> &, const std::function< void()> &, const dealii::DoFHandler< 3 > &, dealii::LinearAlgebra::distributed::Vector< double > &, const std::function< void()> &, const AdaptiveMeshingData< double > &, dealii::Triangulation< 3 > &, const int)
 
template double compute_cut_norm (const dealii::LinearAlgebra::distributed::Vector< double > &, const dealii::MatrixFree< 1, double, dealii::VectorizedArray< double > > &, const std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > > > &, const bool, const dealii::FE_Q< 1 > &, const unsigned int, const unsigned int, const NormType)
 
template double compute_cut_norm (const dealii::LinearAlgebra::distributed::Vector< double > &, const dealii::MatrixFree< 2, double, dealii::VectorizedArray< double > > &, const std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > > > &, const bool, const dealii::FE_Q< 2 > &, const unsigned int, const unsigned int, const NormType)
 
template double compute_cut_norm (const dealii::LinearAlgebra::distributed::Vector< double > &, const dealii::MatrixFree< 3, double, dealii::VectorizedArray< double > > &, const std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > > > &, const bool, const dealii::FE_Q< 3 > &, const unsigned int, const unsigned int, const NormType)
 
template void deserialize_internal (const AttachDoFHandlerAndVectorsType< 1, dealii::LinearAlgebra::distributed::Vector< double > > &, const std::function< void()> &, const std::function< void()> &, const dealii::DoFHandler< 1 > &, const std::function< void()> &, const std::string &)
 
template void deserialize_internal (const AttachDoFHandlerAndVectorsType< 2, dealii::LinearAlgebra::distributed::Vector< double > > &, const std::function< void()> &, const std::function< void()> &, const dealii::DoFHandler< 2 > &, const std::function< void()> &, const std::string &)
 
template void deserialize_internal (const AttachDoFHandlerAndVectorsType< 3, dealii::LinearAlgebra::distributed::Vector< double > > &, const std::function< void()> &, const std::function< void()> &, const dealii::DoFHandler< 3 > &, const std::function< void()> &, const std::string &)
 
template CutPhaseType get_cut_type (const dealii::DoFHandler< 1 > &dof_handler)
 
template CutPhaseType get_cut_type (const dealii::DoFHandler< 2 > &dof_handler)
 
template CutPhaseType get_cut_type (const dealii::DoFHandler< 3 > &dof_handler)
 
template void set_fe_index< 1 > (const dealii::DoFHandler< 1 > &, const dealii::NonMatching::MeshClassifier< 1 > &, const bool)
 
template void set_fe_index< 2 > (const dealii::DoFHandler< 2 > &, const dealii::NonMatching::MeshClassifier< 2 > &, const bool)
 
template void set_fe_index< 3 > (const dealii::DoFHandler< 3 > &, const dealii::NonMatching::MeshClassifier< 3 > &, const bool)
 
template void compute_intersected_quadrature (std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > > >, dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > &, const dealii::DoFHandler< 1 > &, const dealii::LinearAlgebra::distributed::Vector< double > &, const dealii::MatrixFree< 1, double, dealii::VectorizedArray< double > > &, const int, const bool, const bool, std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > > >)
 
template void compute_intersected_quadrature (std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > > >, dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > &, const dealii::DoFHandler< 2 > &, const dealii::LinearAlgebra::distributed::Vector< double > &, const dealii::MatrixFree< 2, double, dealii::VectorizedArray< double > > &, const int, const bool, const bool, std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > > >)
 
template void compute_intersected_quadrature (std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > > >, dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > &, const dealii::DoFHandler< 3 > &, const dealii::LinearAlgebra::distributed::Vector< double > &, const dealii::MatrixFree< 3, double, dealii::VectorizedArray< double > > &, const int, const bool, const bool, std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > > >)
 
template void compute_immersed_surface_quadrature (dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > &, const dealii::DoFHandler< 1 > &, const dealii::LinearAlgebra::distributed::Vector< double > &, const dealii::MatrixFree< 1, double, dealii::VectorizedArray< double > > &, const int)
 
template void compute_immersed_surface_quadrature (dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > &, const dealii::DoFHandler< 2 > &, const dealii::LinearAlgebra::distributed::Vector< double > &, const dealii::MatrixFree< 2, double, dealii::VectorizedArray< double > > &, const int)
 
template void compute_immersed_surface_quadrature (dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > &, const dealii::DoFHandler< 3 > &, const dealii::LinearAlgebra::distributed::Vector< double > &, const dealii::MatrixFree< 3, double, dealii::VectorizedArray< double > > &, const int)
 

Typedef Documentation

◆ MappingInfoType

template<int dim, typename number >
using MeltPoolDG::CutUtil::MappingInfoType = typedef dealii::NonMatching::MappingInfo<dim, dim, dealii::VectorizedArray<number> >

Definition of aliases for dealii::MappingInfo types.

◆ MappingInfoVectorType

template<int dim, typename number >
using MeltPoolDG::CutUtil::MappingInfoVectorType = typedef std::vector<std::shared_ptr<MappingInfoType<dim, number> >>

◆ NormType

using MeltPoolDG::CutUtil::NormType = typedef dealii::VectorTools::NormType

Enumeration Type Documentation

◆ CellCategory

Definition of the cell category numbering (active FE index).

Enumerator
liquid 
intersected 
gas 

◆ FaceType

Enumeration for the face type.

Enumerator
inside_face_liquid 
inside_face_gas 
intersected_face 
mixed_face_liquid_intersected 
mixed_face_intersected_liquid 
mixed_face_gas_intersected 
mixed_face_intersected_gas 

Function Documentation

◆ compute_cut_norm() [1/4]

template double MeltPoolDG::CutUtil::compute_cut_norm ( const dealii::LinearAlgebra::distributed::Vector< double > &  ,
const dealii::MatrixFree< 1, double, dealii::VectorizedArray< double > > &  ,
const std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > > > &  ,
const bool  ,
const dealii::FE_Q< 1 > &  ,
const unsigned int  ,
const unsigned int  ,
const NormType   
)

◆ compute_cut_norm() [2/4]

template double MeltPoolDG::CutUtil::compute_cut_norm ( const dealii::LinearAlgebra::distributed::Vector< double > &  ,
const dealii::MatrixFree< 2, double, dealii::VectorizedArray< double > > &  ,
const std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > > > &  ,
const bool  ,
const dealii::FE_Q< 2 > &  ,
const unsigned int  ,
const unsigned int  ,
const NormType   
)

◆ compute_cut_norm() [3/4]

template double MeltPoolDG::CutUtil::compute_cut_norm ( const dealii::LinearAlgebra::distributed::Vector< double > &  ,
const dealii::MatrixFree< 3, double, dealii::VectorizedArray< double > > &  ,
const std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > > > &  ,
const bool  ,
const dealii::FE_Q< 3 > &  ,
const unsigned int  ,
const unsigned int  ,
const NormType   
)

◆ compute_cut_norm() [4/4]

template<int dim, typename number >
number MeltPoolDG::CutUtil::compute_cut_norm ( const dealii::LinearAlgebra::distributed::Vector< number > &  solution,
const dealii::MatrixFree< dim, number, dealii::VectorizedArray< number > > &  matrix_free,
const std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< dim, dim, dealii::VectorizedArray< number > > > > &  mapping_info_cells,
const bool  is_two_phase,
const dealii::FE_Q< dim > &  reference_element,
const unsigned int  dof_idx,
const unsigned int  quad_idx,
const NormType  norm_type = NormType::L2_norm 
)

Compute the norm of a solution vector with a non-fitted (cut) domain representation.

This function computes either the L1 or L2 norm of the given solution vector on a mesh that may include non-fitted (sub)domain boundaries (e.g., liquid, gas, or intersected cells). The norm is computed with optional two-phase support.

Parameters
solutionThe current solution vector.
matrix_freeThe MatrixFree object.
mapping_info_cellsVector of MappingInfo objects for subdomains (e.g., liquid/gas), required for intersected cells.
is_two_phaseIf true, handles the two-phase setup, processing both components separately (liquid and gas).
reference_elementReference finite element used for FEPointEvaluation.
dof_idxIndex of the DoFHandler inside the MatrixFree object.
quad_idxIndex of the quadrature rule inside the MatrixFree object.
norm_typeThe type of norm to compute (L1 or L2), defined by NormType enum.
Returns
The computed norm (L1 or L2) over the mesh, correctly reduced across MPI processes.
Note
Currently implemented only for scalar fields (n_components == 1). An assertion fails if this is not satisfied.

◆ compute_immersed_surface_quadrature() [1/4]

template void MeltPoolDG::CutUtil::compute_immersed_surface_quadrature ( dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > &  ,
const dealii::DoFHandler< 1 > &  ,
const dealii::LinearAlgebra::distributed::Vector< double > &  ,
const dealii::MatrixFree< 1, double, dealii::VectorizedArray< double > > &  ,
const int   
)

◆ compute_immersed_surface_quadrature() [2/4]

template void MeltPoolDG::CutUtil::compute_immersed_surface_quadrature ( dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > &  ,
const dealii::DoFHandler< 2 > &  ,
const dealii::LinearAlgebra::distributed::Vector< double > &  ,
const dealii::MatrixFree< 2, double, dealii::VectorizedArray< double > > &  ,
const int   
)

◆ compute_immersed_surface_quadrature() [3/4]

template void MeltPoolDG::CutUtil::compute_immersed_surface_quadrature ( dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > &  ,
const dealii::DoFHandler< 3 > &  ,
const dealii::LinearAlgebra::distributed::Vector< double > &  ,
const dealii::MatrixFree< 3, double, dealii::VectorizedArray< double > > &  ,
const int   
)

◆ compute_immersed_surface_quadrature() [4/4]

template<int dim, typename number , typename VectorType >
void MeltPoolDG::CutUtil::compute_immersed_surface_quadrature ( MappingInfoType< dim, number > &  mapping_info_surface,
const dealii::DoFHandler< dim > &  level_set_dof_handler,
const VectorType &  level_set,
const dealii::MatrixFree< dim, number, dealii::VectorizedArray< number > > &  matrix_free,
const int  fe_degree 
)

This function generates the immersed quadrature rules in the case that the domain is described by a discrete level-set function.

It is an overload of the above function, which is used when the cut quadrature rules are only needed for the surface integrals.

The class NonMatching::DiscreteQuadratureGenerator<dim> is used to generate the immersed quadrature rules, for the immersed geometry described by discrete level-set function via a (level_set_dof_handler, level_set) pair.

Template Parameters
dimDimension in which this function is to be used.
numberFloating-point value type used for this function.
VectorTypeVector type used for this function.
Parameters
mapping_info_surfacedealii::NonMatching::MappingInfo object, provides the mapping information computation and mapping data storage of the surface.
level_set_dof_handlerDoFHandler object of the discrete level-set.
level_setDiscrete level-set vector.
matrix_freeMatrix free object, provides the iterators.
fe_degree
Note
Currently, the fe_degree has to be the same for both subdomains in the case of a two-domain problem.
Keep attention of the definition of the level-set field orientation. Currently, the single-phase region is assigned to the positive level-set region.

◆ compute_intersected_quadrature() [1/4]

template<int dim, typename number , typename VectorType >
void MeltPoolDG::CutUtil::compute_intersected_quadrature ( MappingInfoVectorType< dim, number >  mapping_info_cells,
MappingInfoType< dim, number > &  mapping_info_surface,
const dealii::DoFHandler< dim > &  level_set_dof_handler,
const VectorType &  level_set,
const dealii::MatrixFree< dim, number, dealii::VectorizedArray< number > > &  matrix_free,
const int  fe_degree,
const bool  is_two_phase,
const bool  is_dg = false,
MappingInfoVectorType< dim, number >  mapping_info_faces = {} 
)

This function generates the immersed quadrature rules in the case that the domain is described by a discrete level-set function.

The class NonMatching::DiscreteQuadratureGenerator<dim> is used to generate the immersed quadrature rules, for the immersed geometry described by discrete level-set function via a (level_set_dof_handler, level_set) pair.

Template Parameters
dimDimension in which this function is to be used.
numberFloating-point value type used for this function.
VectorTypeVector type used for this function.
Parameters
level_set_dof_handlerDoFHandler object of the discrete level-set.
level_setDiscrete level-set vector.
matrix_freeMatrix free object, provides the iterators.
mapping_info_cellsVector of dealii::NonMatching::MappingInfo objects, provides the mapping information computation and mapping data storage of the cells on the inner subdomain and the outer subdomain, respectively.
mapping_info_surfacedealii::NonMatching::MappingInfo object, provides the mapping information computation and mapping data storage of the surface.
fe_degree
is_two_phase
is_dgConsider FE_DGQ elements?
mapping_info_facesVector of dealii::NonMatching::MappingInfo objects, provides the mapping information computation and mapping data storage of the faces on the inner subdomain and the outer subdomain, respectively.
Note
Currently, the fe_degree has to be the same for both subdomains in the case of a two-domain problem.
Keep attention of the definition of the level-set field orientation. Currently, the single-phase region is assigned to the positive level-set region.

◆ compute_intersected_quadrature() [2/4]

template void MeltPoolDG::CutUtil::compute_intersected_quadrature ( std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > > >  ,
dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > &  ,
const dealii::DoFHandler< 1 > &  ,
const dealii::LinearAlgebra::distributed::Vector< double > &  ,
const dealii::MatrixFree< 1, double, dealii::VectorizedArray< double > > &  ,
const int  ,
const bool  ,
const bool  ,
std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 1, 1, dealii::VectorizedArray< double > > > >   
)

◆ compute_intersected_quadrature() [3/4]

template void MeltPoolDG::CutUtil::compute_intersected_quadrature ( std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > > >  ,
dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > &  ,
const dealii::DoFHandler< 2 > &  ,
const dealii::LinearAlgebra::distributed::Vector< double > &  ,
const dealii::MatrixFree< 2, double, dealii::VectorizedArray< double > > &  ,
const int  ,
const bool  ,
const bool  ,
std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 2, 2, dealii::VectorizedArray< double > > > >   
)

◆ compute_intersected_quadrature() [4/4]

template void MeltPoolDG::CutUtil::compute_intersected_quadrature ( std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > > >  ,
dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > &  ,
const dealii::DoFHandler< 3 > &  ,
const dealii::LinearAlgebra::distributed::Vector< double > &  ,
const dealii::MatrixFree< 3, double, dealii::VectorizedArray< double > > &  ,
const int  ,
const bool  ,
const bool  ,
std::vector< std::shared_ptr< dealii::NonMatching::MappingInfo< 3, 3, dealii::VectorizedArray< double > > > >   
)

◆ deserialize_internal() [1/4]

template void MeltPoolDG::CutUtil::deserialize_internal ( const AttachDoFHandlerAndVectorsType< 1, dealii::LinearAlgebra::distributed::Vector< double > > &  ,
const std::function< void()> &  ,
const std::function< void()> &  ,
const dealii::DoFHandler< 1 > &  ,
const std::function< void()> &  ,
const std::string &   
)

◆ deserialize_internal() [2/4]

template void MeltPoolDG::CutUtil::deserialize_internal ( const AttachDoFHandlerAndVectorsType< 2, dealii::LinearAlgebra::distributed::Vector< double > > &  ,
const std::function< void()> &  ,
const std::function< void()> &  ,
const dealii::DoFHandler< 2 > &  ,
const std::function< void()> &  ,
const std::string &   
)

◆ deserialize_internal() [3/4]

template void MeltPoolDG::CutUtil::deserialize_internal ( const AttachDoFHandlerAndVectorsType< 3, dealii::LinearAlgebra::distributed::Vector< double > > &  ,
const std::function< void()> &  ,
const std::function< void()> &  ,
const dealii::DoFHandler< 3 > &  ,
const std::function< void()> &  ,
const std::string &   
)

◆ deserialize_internal() [4/4]

template<int dim, typename VectorType >
void MeltPoolDG::CutUtil::deserialize_internal ( const AttachDoFHandlerAndVectorsType< dim, VectorType > &  attach_vectors,
const std::function< void()> &  post,
const std::function< void()> &  distribute_level_set_dofs,
const dealii::DoFHandler< dim > &  level_set_dof_handler,
const std::function< void()> &  setup_dof_system,
const std::string &  prefix 
)

Same as Restart::deserialize_internal(), but adapted for cases where one or more DoFHandler objects are used in CutFEM operations.

Similarly to CutUtil::refine_grid(), the level set must be transferred first, so the CutFEM operation can classify the mesh to distribute its DoFs before transferring its solution.

Parameters
distribute_level_set_dofsLambda function, that distributes the DoFs of the level_set_dof_handler.
level_set_dof_handlerDoF-Handler for the level-set field.

same as in Restart::deserialize_internal():

Parameters
attach_vectorsLambda function of type AttachDoFHandlerAndVectorsType, that attaches all DoFHandlers and their respective DoFVectors that ought to be reconstructed.
postThis lambda function is run after AMR was executed.
setup_dof_systemSet up the dof system, this includes:
  • distribute DoFs on the new mesh
  • create partitioning for the new mesh
  • setup constraints on the new mesh
  • reinit the MatrixFree object for the new DoFs (ScratchData::build())
  • initialize all DoF vectors for the new DoF layout
prefixFile basename.

◆ evaluate_intersected_domain()

template<int dim, typename number , int n_components = 1>
void MeltPoolDG::CutUtil::evaluate_intersected_domain ( dealii::FEPointEvaluation< n_components, dim, dim, dealii::VectorizedArray< number > > &  point_eval,
const FECellIntegrator< dim, n_components, number > &  cell_eval,
const dealii::EvaluationFlags::EvaluationFlags  evaluation_flags,
const unsigned int  cell_batch,
const unsigned int  cell_lane,
const unsigned int  n_dofs_per_cell 
)
inline

Evaluates solution values in the intersected domain for a specific SIMD lane within a cell batch.

This function performs finite element point evaluation on a single lane (i.e., SIMD vector entry) of a cell batch in the context of vectorized matrix-free computations.

It uses the given FECellIntegrator to access DoF values and performs an evaluation at the point corresponding to the provided lane index.

Template Parameters
dimDimension in which this function is to be used.
numberFloating-point value type used for this function.
n_componentsNumber of solution components (per phase). The default value is 1, which corresponds to scalar problems.
Parameters
point_evalFEPointEvaluation object in which the evaluations are stored.
cell_evalFECellIntegrator providing the DoF values.
evaluation_flagsFlags indicating what kind of evaluation (values, gradients, etc.) to perform.
cell_batchCell batch index
cell_laneThe SIMD lane within the batch to evaluate.
n_dofs_per_cellNumber of DoFs per cell in the evaluated system.

◆ face_has_ghost_penalty()

template<int dim>
bool MeltPoolDG::CutUtil::face_has_ghost_penalty ( const dealii::NonMatching::MeshClassifier< dim > &  mesh_classifier,
const typename dealii::Triangulation< dim >::active_cell_iterator &  cell,
const unsigned int  face_index,
const dealii::NonMatching::LocationToLevelSet &  inactive_location = dealii::NonMatching::LocationToLevelSet::inside 
)

This function checks whether the currently considered face requires the application of ghost-penalty stabilization or not.

A face is a ghost-penalty face if one of the two adjacent cells is an intersected cell and the other cell is either inside the active domain or is also an intersected cell.

Template Parameters
dimDimension in which this function is to be used.
Parameters
mesh_classifierThe NonMatching::MeshClassifier object which contains the information, how the active cells and faces of the triangulation are related to the sign of a level set function. Note that the reclassify() function has to be called before, so that the cell and face locations are categorized as one of the values of LocationToLevelSet: inside, outside or intersected.
cellThe considered cell for the function evaluation.
face_indexThe index of the considered face, for which the check is done, whether this face is a ghost-penalty-face or not.
inactive_locationLocation of the domain, which is not active (location for which a FE_Nothing element is set).
Note
For multiple component problems, the inactive_location has to be chosen carefully at the relevant code section, at which this function is called, as the inactive_location depends on the currently considered component. For single component problems, the default value of the inactive location is outside.

◆ get_cut_type() [1/4]

template CutPhaseType MeltPoolDG::CutUtil::get_cut_type ( const dealii::DoFHandler< 1 > &  dof_handler)

◆ get_cut_type() [2/4]

template CutPhaseType MeltPoolDG::CutUtil::get_cut_type ( const dealii::DoFHandler< 2 > &  dof_handler)

◆ get_cut_type() [3/4]

template CutPhaseType MeltPoolDG::CutUtil::get_cut_type ( const dealii::DoFHandler< 3 > &  dof_handler)

◆ get_cut_type() [4/4]

template<int dim>
CutPhaseType MeltPoolDG::CutUtil::get_cut_type ( const dealii::DoFHandler< dim > &  dof_handler)

Enum that names a type of CutFEM in use.

  • not_cut: no CutFEM in use, the field in continuous
  • one_phase_cut: The domain of the field is restricted to the liquid domain, i.e., positive level set values. CutFEM is used for cells that contain the interface.
  • two_phase_cut: The domain is cut at the interface with the liquid domain

Determine the CutPhaseType of the dof_handler.

Template Parameters
dimDimension in which this function is to be used.
Parameters
dof_handlerGiven DoF-Handler.
Returns
CutPhaseType of the considered dof_handler.

◆ get_face_type()

FaceType MeltPoolDG::CutUtil::get_face_type ( const std::pair< unsigned int, unsigned int > &  adjacent_cell_categories)

This function categorizes the FaceType of the current face range.

Parameters
adjacent_cell_categoriesPair which contains the category of the cells on the two sides of the current range of faces.

@retrun FaceType of the shared face between the provided cell pair.

◆ is_new_intersected_face()

template<int dim>
bool MeltPoolDG::CutUtil::is_new_intersected_face ( const dealii::NonMatching::MeshClassifier< dim > &  mesh_classifier,
const dealii::NonMatching::MeshClassifier< dim > &  mesh_classifier_old,
const typename dealii::Triangulation< dim >::active_cell_iterator &  cell,
const unsigned int  face_index,
const dealii::NonMatching::LocationToLevelSet &  inactive_location = dealii::NonMatching::LocationToLevelSet::inside 
)

This function checks whether the considered face is a newly created intersected face.

This occurs when both adjacent cells of the face are currently intersected cells and were in the inactive location in the old state. This function is created for handling moving interface problems.

Template Parameters
dimDimension in which this function is to be used.
Parameters
mesh_classifier_oldThe NonMatching::MeshClassifier object which contains the information, how the active cells and faces of the triangulation are related to the sign of a level set function at the old state. The cell and face locations are categorized as one of the values of LocationToLevelSet: inside, outside or intersected.
mesh_classifierThe NonMatching::MeshClassifier object which contains the information, how the active cells and faces of the triangulation are related to the sign of a level set function at the current state. The cell and face locations are categorized as one of the values of LocationToLevelSet: inside, outside or intersected.
cellThe considered cell for the function evaluation.
face_indexThe index of the considered face, for which the check is done, whether this face is a newly created intersected face or not.
inactive_locationLocation of the domain, which is not active (location for which a FE_Nothing element is set).
Note
For multiple component problems, the inactive_location has to be chosen carefully at the relevant code section, at which this function is called, as the inactive_location depends on the currently considered component. For single component problems, the default value of the inactive location is outside. It has to be ensured that the mesh_classifier_old and mesh_classifier are reclassified according to the correct states.

◆ refine_grid() [1/4]

template void MeltPoolDG::CutUtil::refine_grid ( const AMR::MarkCellsForRefinementType< 1 > &  ,
const AttachDoFHandlerAndVectorsType< 1, dealii::LinearAlgebra::distributed::Vector< double > > &  ,
const std::function< void()> &  ,
const std::function< void()> &  ,
const dealii::DoFHandler< 1 > &  ,
dealii::LinearAlgebra::distributed::Vector< double > &  ,
const std::function< void()> &  ,
const AdaptiveMeshingData< double > &  ,
dealii::Triangulation< 1 > &  ,
const int   
)

◆ refine_grid() [2/4]

template void MeltPoolDG::CutUtil::refine_grid ( const AMR::MarkCellsForRefinementType< 2 > &  ,
const AttachDoFHandlerAndVectorsType< 2, dealii::LinearAlgebra::distributed::Vector< double > > &  ,
const std::function< void()> &  ,
const std::function< void()> &  ,
const dealii::DoFHandler< 2 > &  ,
dealii::LinearAlgebra::distributed::Vector< double > &  ,
const std::function< void()> &  ,
const AdaptiveMeshingData< double > &  ,
dealii::Triangulation< 2 > &  ,
const int   
)

◆ refine_grid() [3/4]

template void MeltPoolDG::CutUtil::refine_grid ( const AMR::MarkCellsForRefinementType< 3 > &  ,
const AttachDoFHandlerAndVectorsType< 3, dealii::LinearAlgebra::distributed::Vector< double > > &  ,
const std::function< void()> &  ,
const std::function< void()> &  ,
const dealii::DoFHandler< 3 > &  ,
dealii::LinearAlgebra::distributed::Vector< double > &  ,
const std::function< void()> &  ,
const AdaptiveMeshingData< double > &  ,
dealii::Triangulation< 3 > &  ,
const int   
)

◆ refine_grid() [4/4]

template<int dim, typename VectorType , typename number = typename VectorType::value_type>
void MeltPoolDG::CutUtil::refine_grid ( const AMR::MarkCellsForRefinementType< dim > &  mark_cells_for_refinement,
const AttachDoFHandlerAndVectorsType< dim, VectorType > &  attach_vectors,
const std::function< void()> &  post,
const std::function< void()> &  distribute_level_set_dofs,
const dealii::DoFHandler< dim > &  level_set_dof_handler,
VectorType &  level_set_dof_vector,
const std::function< void()> &  setup_dof_system,
const AdaptiveMeshingData< number > &  amr,
dealii::Triangulation< dim > &  tria,
const int  n_time_step 
)

same as AMR::refine_grid(), but adapted for cases where one or more DoFHandler objects are used in CutFEM operations.

Similarly to CutUtil::deserialize_internal(), the level set must be transferred first, so the CutFEM operation can classify the mesh to distribute its DoFs before transferring its solution.

Parameters
distribute_level_set_dofsLambda function, that distributes the DoFs of the level_set_dof_handler. If no data is attached by attach_vectors, e.g., for AMR at the initial condition, this lambda function must also interpolate the initial level set solution onto the level_set_dof_vector.
level_set_dof_handlerDoF-Handler for the level-set field.
level_set_dof_vectorLevel-set DoF vector.

same as in AMR::refine_grid():

Parameters
mark_cells_for_refinementLambda function of type MarkCellsForRefinementType, see its documentation for info.
attach_vectorsLambda function of type AttachDoFHandlerAndVectorsType, that attaches all DoFHandlers and their respective DoFVectors that ought to be transferred to the new mesh.
postThis lambda function is run after AMR was executed.
setup_dof_systemSet up the dof system, this includes:
  • distribute DoFs on the new mesh
  • create partitioning for the new mesh
  • set up constraints on the new mesh
  • reinit the MatrixFree object for the new DoFs (ScratchData::build())
  • initialize all DoF vectors for the new DoF
amrData struct for adaptive meshing parameters.
triaTriangulation object.
n_time_stepCurrent time step number.

◆ set_fe_index()

template<int dim>
void MeltPoolDG::CutUtil::set_fe_index ( const dealii::DoFHandler< dim > &  dof_handler,
const dealii::NonMatching::MeshClassifier< dim > &  mesh_classifier,
const bool  set_future 
)

This function is setting the FE index for every cell.

Template Parameters
dimDimension in which this function is to be used.
Parameters
dof_handlerDoFHandler object, provides the cell iterator.
mesh_classifierThe dealii::NonMatching::MeshClassifier object which contains the information, how the active cells and faces of the triangulation are related to the sign of a level set function. Note that the reclassify() function has to be called before, so that the cell and face locations are categorized as one of the values of dealii::NonMatching::LocationToLevelSet: inside, outside or intersected.
set_futureCriteria, whether the active FE index should be set (false) or the future FE index should be set (true) in this function.

◆ set_fe_index< 1 >()

template void MeltPoolDG::CutUtil::set_fe_index< 1 > ( const dealii::DoFHandler< 1 > &  ,
const dealii::NonMatching::MeshClassifier< 1 > &  ,
const bool   
)

◆ set_fe_index< 2 >()

template void MeltPoolDG::CutUtil::set_fe_index< 2 > ( const dealii::DoFHandler< 2 > &  ,
const dealii::NonMatching::MeshClassifier< 2 > &  ,
const bool   
)

◆ set_fe_index< 3 >()

template void MeltPoolDG::CutUtil::set_fe_index< 3 > ( const dealii::DoFHandler< 3 > &  ,
const dealii::NonMatching::MeshClassifier< 3 > &  ,
const bool   
)