SolutionTransferOperator< dim, Number > Class Template Reference
|
Developer Documentation
|
Operator for the solution transfer in moving boundary/interface simulations. More...
#include <solution_transfer.hpp>
Public Types | |
| using | VectorType = dealii::LinearAlgebra::distributed::Vector< Number > |
Public Member Functions | |
| SolutionTransferOperator (const GhostPenaltyData< Number > &ghost_penalty_in, const bool is_two_phase, const int verbosity=0) | |
| Constructor. | |
| void | reinit (dealii::DoFHandler< dim > &cut_dof_handler, dealii::Triangulation< dim > &tria, const VectorType &cut_solution, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier_old, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const std::function< void(VectorType &)> &reinit_cut_vector, const std::function< void()> &setup_dof_system, const AttachDoFHandlerAndVectorsType< dim, VectorType > &attach_vectors={}) |
| Reinit function for the solution transfer according to the new immersed interface position. | |
| void | reinit (dealii::DoFHandler< dim > &cut_dof_handler, dealii::Triangulation< dim > &tria, const std::vector< const VectorType * > &cut_solutions, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier_old, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const std::function< void(VectorType &)> &reinit_cut_vector, const std::function< void()> &setup_dof_system, const AttachDoFHandlerAndVectorsType< dim, VectorType > &attach_vectors={}) |
Same as above but with multiple cut solution vectors given by cut_solutions. | |
| const std::vector< VectorType > & | get_updated_solutions () const |
| Getter function for multiple transferred solution vectors (const. version). | |
| std::vector< VectorType > & | get_updated_solutions () |
| Getter function for multiple transferred solution vectors (non-const. version). | |
| const VectorType & | get_updated_solution () const |
| Getter function for the transferred solution vector (const. version). | |
| VectorType & | get_updated_solution () |
| Getter function for the transferred solution vector (non-const. version). | |
Private Member Functions | |
| void | transfer_solution_constant_dofs (dealii::DoFHandler< dim > &cut_dof_handler, dealii::Triangulation< dim > &tria, const std::vector< const VectorType * > &cut_solutions, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier_old, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const std::function< void(VectorType &)> &reinit_cut_vector, const std::function< void()> &setup_dof_system, const AttachDoFHandlerAndVectorsType< dim, VectorType > &attach_vectors={}) |
| Update FE-index and distribute DoFs according to the new state with the moved interface. | |
| VectorType | mark_dofs_for_gp_extrapolation (const dealii::DoFHandler< dim > &cut_dof_handler, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier_old) const |
| Mark the unknown DoFs, which need to be ghost-penalty extrapolated. | |
| dealii::AffineConstraints< Number > | create_constraints_gp_extrapolation (const dealii::DoFHandler< dim > &cut_dof_handler, const VectorType &flags_dofs_gp_extrapolation) const |
| Create constraints for the known DoFs that do not need to be ghost-penalty extrapolated. | |
| void | extrapolate_solution_new_dofs (const dealii::DoFHandler< dim > &cut_dof_handler, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier_old, const std::function< void(VectorType &)> &reinit_vector) |
| Assemble and solve system for ghost-penalty extrapolation, apply constraints. | |
Private Attributes | |
| std::vector< VectorType > | new_solutions |
| Collection of extrapolated solution vectors. | |
| unsigned int | fe_degree |
| Finite element degree. | |
| unsigned int | n_components_per_phase |
| bool | is_dg |
| Boolean indicator whether DG is used. | |
| const GhostPenaltyData< Number > | ghost_penalty |
| Ghost-penalty parameters for stabilization of cut elements. | |
| const bool | is_two_phase |
| Boolean indicator whether a two-phase case is considered. | |
| const unsigned int | verbosity |
| Verbosity level for output (0: nothing(=default), 1: something, 2: some more details) | |
| dealii::ConditionalOStream | pcout |
| Stream object for conditional output. | |
Detailed Description
class MeltPoolDG::CutUtil::SolutionTransferOperator< dim, Number >
Operator for the solution transfer in moving boundary/interface simulations.
The operator transfers the solution vector between different function spaces at two consecutive time steps. It adapts the DoF layout to a moved interface position and extrapolates unknown new DoF values using ghost-penalty extrapolation.
The solution transfer works for both single- and two-phase cases, and for scalar as well as vector-valued solution fields.
- Note
- Currently, the solution transfer is limited to interface movements of less than one element length between two subsequent time steps.
Member Typedef Documentation
◆ VectorType
| using MeltPoolDG::CutUtil::SolutionTransferOperator< dim, Number >::VectorType = dealii::LinearAlgebra::distributed::Vector<Number> |
Constructor & Destructor Documentation
◆ SolutionTransferOperator()
| MeltPoolDG::CutUtil::SolutionTransferOperator< dim, number >::SolutionTransferOperator | ( | const GhostPenaltyData< Number > & | ghost_penalty_in, |
| const bool | is_two_phase, | ||
| const int | verbosity = 0 |
||
| ) |
Constructor.
- Parameters
-
ghost_penalty_in Set of ghost-penalty parameters for stabilization of cut elements. is_two_phase Boolean indicator whether a two-phase case is considered. verbosity Verbosity level with default value 0.
Member Function Documentation
◆ create_constraints_gp_extrapolation()
|
private |
Create constraints for the known DoFs that do not need to be ghost-penalty extrapolated.
- Parameters
-
cut_dof_handler DoF-Handler of the considered field with non-fitted (cut) domain representation. flags_dofs_gp_extrapolation A DoF vector in which the DoF values set to 1 indicate the degrees of freedom to be extrapolated. All other DoF values are set to 0.
- Returns
- A dealii::AffineConstraints object that contains the constraints for the DoFs that do not need to be extrapolated.
◆ extrapolate_solution_new_dofs()
|
private |
Assemble and solve system for ghost-penalty extrapolation, apply constraints.
- Parameters
-
cut_dof_handler DoF-Handler of the considered field with non-fitted (cut) domain representation. mesh_classifier_old Mesh classifier object which corresponds to the old interface position. mesh_classifier Mesh classifier object which corresponds to the new (moved) interface position. reinit_vector A Lambda function for the vector reinitialization.
◆ get_updated_solution() [1/2]
|
inline |
Getter function for the transferred solution vector (non-const. version).
It is intended to be used in contexts where only a single solution vector is present.
- Returns
- A reference to the updated solution vector.
- Exceptions
-
dealii::ExcMessage if there is not exactly one solution vector in the new_solutionscontainer.
◆ get_updated_solution() [2/2]
|
inline |
Getter function for the transferred solution vector (const. version).
It is intended to be used in contexts where only a single solution vector is present.
- Returns
- A constant reference to the updated solution vector.
- Exceptions
-
dealii::ExcMessage if there is not exactly one solution vector in the new_solutionscontainer.
◆ get_updated_solutions() [1/2]
|
inline |
Getter function for multiple transferred solution vectors (non-const. version).
- Returns
- A reference to the std::vector containing updated solution vectors.
◆ get_updated_solutions() [2/2]
|
inline |
Getter function for multiple transferred solution vectors (const. version).
- Returns
- A constant reference to the std::vector containing updated solution vectors.
◆ mark_dofs_for_gp_extrapolation()
|
private |
Mark the unknown DoFs, which need to be ghost-penalty extrapolated.
- Parameters
-
cut_dof_handler DoF-Handler of the considered field with non-fitted (cut) domain representation. mesh_classifier_old Mesh classifier object which corresponds to the old interface position. mesh_classifier Mesh classifier object which corresponds to the new (moved) interface position.
- Returns
- A DoF vector in which the DoF values set to 1 indicate the degrees of freedom to be extrapolated. All other DoF values are set to 0.
◆ reinit() [1/2]
| void MeltPoolDG::CutUtil::SolutionTransferOperator< dim, number >::reinit | ( | dealii::DoFHandler< dim > & | cut_dof_handler, |
| dealii::Triangulation< dim > & | tria, | ||
| const std::vector< const VectorType * > & | cut_solutions, | ||
| const dealii::NonMatching::MeshClassifier< dim > & | mesh_classifier_old, | ||
| const dealii::NonMatching::MeshClassifier< dim > & | mesh_classifier, | ||
| const std::function< void(VectorType &)> & | reinit_cut_vector, | ||
| const std::function< void()> & | setup_dof_system, | ||
| const AttachDoFHandlerAndVectorsType< dim, VectorType > & | attach_vectors = {} |
||
| ) |
Same as above but with multiple cut solution vectors given by cut_solutions.
1) Update FE-index and distribute DoFs according to new state with the moved interface. 2) Set up and solve system for ghost-penalty extrapolation to determine the values of the remaining undetermined DoFs.
- Parameters
-
cut_dof_handler DoF-Handler of the considered field with non-fitted (cut) domain representation. tria Triangulation object. cut_solutions Collection of solution vectors which corresponds to the DoF-layout of the mesh_classifier_old.mesh_classifier_old Mesh classifier object which corresponds to the old interface position. mesh_classifier Mesh classifier object which corresponds to the new (moved) interface position. reinit_cut_vector A Lambda function for the vector reinitialization. setup_dof_system Set 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 layout
attach_vectors Lambda function of type AttachDoFHandlerAndVectorsType, that attaches all DoFHandlers and their respective DoFVectors that ought to be reconstructed.
◆ reinit() [2/2]
| void MeltPoolDG::CutUtil::SolutionTransferOperator< dim, number >::reinit | ( | dealii::DoFHandler< dim > & | cut_dof_handler, |
| dealii::Triangulation< dim > & | tria, | ||
| const VectorType & | cut_solution, | ||
| const dealii::NonMatching::MeshClassifier< dim > & | mesh_classifier_old, | ||
| const dealii::NonMatching::MeshClassifier< dim > & | mesh_classifier, | ||
| const std::function< void(VectorType &)> & | reinit_cut_vector, | ||
| const std::function< void()> & | setup_dof_system, | ||
| const AttachDoFHandlerAndVectorsType< dim, VectorType > & | attach_vectors = {} |
||
| ) |
Reinit function for the solution transfer according to the new immersed interface position.
1) Update FE-index and distribute DoFs according to new state with the moved interface. 2) Set up and solve system for ghost-penalty extrapolation to determine the values of the remaining undetermined DoFs
- Parameters
-
cut_dof_handler DoF-Handler of the considered field with non-fitted (cut) domain representation. tria Triangulation object. cut_solution Solution vector which corresponds to the DoF-layout of the mesh_classifier_old.mesh_classifier_old Mesh classifier object which corresponds to the old interface position. mesh_classifier Mesh classifier object which corresponds to the new (moved) interface position. reinit_cut_vector A Lambda function for the vector reinitialization. setup_dof_system Set 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 layout
attach_vectors Lambda function of type AttachDoFHandlerAndVectorsType, that attaches all DoFHandlers and their respective DoFVectors that ought to be reconstructed.
- Exceptions
-
dealii::ExcMessage if the FECollection contains unsupported finite element types or if assumptions about the problem phase structure are violated.
◆ transfer_solution_constant_dofs()
|
private |
Update FE-index and distribute DoFs according to the new state with the moved interface.
- Parameters
-
cut_dof_handler DoF-Handler of the considered field with non-fitted (cut) domain representation. tria Triangulation object. cut_solutions Collection of solution vectors which corresponds to the DoF-layout of the mesh_classifier_old.mesh_classifier_old Mesh classifier object which corresponds to the old interface position. mesh_classifier Mesh classifier object which corresponds to the new (moved) interface position. reinit_cut_vector A Lambda function for the vector reinitialization. setup_dof_system Set 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 layout
attach_vectors Lambda function of type AttachDoFHandlerAndVectorsType, that attaches all DoFHandlers and their respective DoFVectors that ought to be reconstructed.
Member Data Documentation
◆ fe_degree
|
private |
Finite element degree.
◆ ghost_penalty
|
private |
Ghost-penalty parameters for stabilization of cut elements.
◆ is_dg
|
private |
Boolean indicator whether DG is used.
◆ is_two_phase
|
private |
Boolean indicator whether a two-phase case is considered.
◆ n_components_per_phase
|
private |
Components of the solution in one phase (for scalar-valued solutions: 1, for vector-valued solutions: >1)
◆ new_solutions
|
private |
Collection of extrapolated solution vectors.
◆ pcout
|
private |
Stream object for conditional output.
◆ verbosity
|
private |
Verbosity level for output (0: nothing(=default), 1: something, 2: some more details)
The documentation for this class was generated from the following files:
- include/meltpooldg/cut/solution_transfer.hpp
- source/cut/solution_transfer.cpp
Generated by