ReinitializationEllipticOperator< dim, number > Class Template Reference
|
Developer Documentation
|
Operator for the matrix-free evaluation of diffusive reinitialization of the level set function. More...
#include <reinitialization_elliptic_operator.hpp>
Public Types | |
| using | VectorType = dealii::LinearAlgebra::distributed::Vector< number > |
| using | VectorizedArrayType = dealii::VectorizedArray< number > |
| using | MappingInfoType = CutUtil::MappingInfoType< dim, number > |
| using | PointEvaluationType = dealii::FEPointEvaluation< 1, dim, dim, VectorizedArrayType > |
Public Types inherited from MeltPoolDG::OperatorMatrixFree< dim, number > | |
| using | VectorType = dealii::LinearAlgebra::distributed::Vector< number > |
| using | BlockVectorType = dealii::LinearAlgebra::distributed::BlockVector< number > |
| using | SparseMatrixType = dealii::TrilinosWrappers::SparseMatrix |
Public Member Functions | |
| ReinitializationEllipticOperator (const MeltPoolDG::ScratchData< dim, dim, number > &scratch_data_in, const ReinitializationData< number > &reinit_data_in, const unsigned int reinit_dof_idx_in, const unsigned int reinit_quad_idx_in, const MappingInfoType &mapping_info_surface_in, const unsigned int ls_dof_idx_in, const std::shared_ptr< dealii::NonMatching::MeshClassifier< dim > > mesh_classifier_in) | |
| Constructor. | |
| void | vmult (VectorType &dst, const VectorType &src) const final |
| Apply the operator in a matrix-free fashion. Top-level function for the evaluation of the left-hand side. | |
| void | create_rhs (VectorType &rhs, const VectorType &old_level_set) const final |
| Create the right-hand side vector using a matrix-free evaluation. Top-level function. | |
| void | reinit () final |
| Reinitialize internal data structures, typically after mesh changes. | |
| void | rhs_cell_operation (FECellIntegrator< dim, 1, number > &cell_eval, const FECellIntegrator< dim, 1, number > &psi_old) const |
| Compute the contribution of a single cell integral to the right-hand side. First-level function for the evaluation of the volume integrals. | |
| void | interface_penalty_cell_operation (PointEvaluationType &interface_penalty_surface, FECellIntegrator< dim, 1, number > &interface_penalty, const unsigned int lane, const number penalty_coefficient) const |
| Calculate the contribution of a single cell surface integral to the penalty term for the weak imposition of interface Dirichlet boundary condition. | |
| void | compute_system_matrix_from_matrixfree (dealii::TrilinosWrappers::SparseMatrix &system_matrix) const final |
| Compute and assemble the system matrix from matrix-free operator evaluations. Used by the preconditioner. | |
| void | compute_inverse_diagonal_from_matrixfree (VectorType &diagonal) const final |
| Compute the inverse diagonal of the system matrix. Used by the preconditioner. | |
Public Member Functions inherited from MeltPoolDG::OperatorMatrixFree< dim, number > | |
| virtual | ~OperatorMatrixFree ()=default |
| virtual void | create_rhs (BlockVectorType &, const VectorType &) const |
Compute the right-hand side vector for block vectors dst. | |
| virtual void | create_rhs (VectorType &, const BlockVectorType &) const |
Compute the right-hand side vector for block vectors src. | |
| virtual void | vmult (BlockVectorType &, const BlockVectorType &) const |
| virtual void | compute_inverse_diagonal_from_matrixfree (BlockVectorType &) const |
| Compute the inverse diagonal using matrix-free techniques for block vectors. | |
Public Member Functions inherited from MeltPoolDG::OperatorBase< number > | |
| virtual | ~OperatorBase ()=default |
| void | reset_dof_index (const unsigned int dof_idx_in) |
| Set the index for the current degrees of freedom (DoF). | |
| void | reset_time_increment (const number dt) |
| Set the time increment for the operator. | |
| virtual void | pre () |
| Prepare for computations (e.g. update ghost values). Can be overridden by derived classes. | |
| virtual void | post () |
| Finalize for computations (e.g. zero out ghost values). Can be overridden by derived classes. | |
Private Member Functions | |
| template<int n_components> | |
| VectorizedArrayType | evaluate_rhs_coefficient (const FECellIntegrator< dim, n_components, number > &psi_old, const unsigned int q_index) const |
| This evaluates the coefficient for the rhs integral. | |
| void | lhs_cell_operation (FECellIntegrator< dim, 1, number > &interface_penalty, FECellIntegrator< dim, 1, number > &cell_eval, PointEvaluationType &interface_penalty_surface, const unsigned int cell_batch) const |
| Calculate the contribution of a single cell integral to the left-hand side. First-level function for the evaluation of the laplace operator and the surface penalty term. | |
| void | laplace_cell_operation (FECellIntegrator< dim, 1, number > &cell_eval) const |
| Calculate the contribution of the laplace operator of a cell to the lhs. | |
Private Attributes | |
| std::shared_ptr< dealii::NonMatching::MeshClassifier< dim > > | mesh_classifier |
| const ScratchData< dim, dim, number > & | scratch_data |
| Reference to scratch data containing mesh, geometry, and FE evaluation utilities. | |
| const ReinitializationData< number > & | reinit_data |
| Reference to the reinitialization parameters and coefficients. | |
| const unsigned int | reinit_quad_idx |
| Quadrature index for evaluating terms during reinitialization. | |
| const MappingInfoType & | mapping_info_surface |
| Mapping information for integration over the interface. | |
| dealii::FE_Q< dim > | fe_point_level_set |
| Temporary FE object required by FEPointEvaluation. | |
| const unsigned int | n_dofs_per_cell |
| Number of DoFs per cell of the temporary FE. | |
| const unsigned int | ls_dof_idx |
| DOF handler index for the level set field. | |
| dealii::AlignedVector< dealii::VectorizedArray< number > > | solution_old |
| Solution vector from the previous iteration or time step (used in matrix-free mode). | |
| VectorType | zero_interface |
Additional Inherited Members | |
Protected Attributes inherited from MeltPoolDG::OperatorBase< number > | |
| unsigned int | dof_idx = dealii::numbers::invalid_unsigned_int |
| number | time_increment = numbers::invalid_double |
| number | time_increment_inv = numbers::invalid_double |
Detailed Description
class MeltPoolDG::LevelSet::ReinitializationEllipticOperator< dim, number >
Operator for the matrix-free evaluation of diffusive reinitialization of the level set function.
The implementation is based on the elliptic level set reinitialization method described in:
T. Adams, S. Giani, and W. M. Coombs, "A high-order elliptic PDE based level set reinitialisation method using a discontinuous Galerkin discretisation," Journal of Computational Physics, vol. 379, pp. 373–391, 2019. https://doi.org/10.1016/j.jcp.2018.12.003
- Template Parameters
-
dim Spatial dimension. number Scalar number type (e.g., double or float).
Member Typedef Documentation
◆ MappingInfoType
| using MeltPoolDG::LevelSet::ReinitializationEllipticOperator< dim, number >::MappingInfoType = CutUtil::MappingInfoType<dim, number> |
◆ PointEvaluationType
| using MeltPoolDG::LevelSet::ReinitializationEllipticOperator< dim, number >::PointEvaluationType = dealii::FEPointEvaluation<1, dim, dim, VectorizedArrayType> |
◆ VectorizedArrayType
| using MeltPoolDG::LevelSet::ReinitializationEllipticOperator< dim, number >::VectorizedArrayType = dealii::VectorizedArray<number> |
◆ VectorType
| using MeltPoolDG::LevelSet::ReinitializationEllipticOperator< dim, number >::VectorType = dealii::LinearAlgebra::distributed::Vector<number> |
Constructor & Destructor Documentation
◆ ReinitializationEllipticOperator()
| MeltPoolDG::LevelSet::ReinitializationEllipticOperator< dim, number >::ReinitializationEllipticOperator | ( | const MeltPoolDG::ScratchData< dim, dim, number > & | scratch_data_in, |
| const ReinitializationData< number > & | reinit_data_in, | ||
| const unsigned int | reinit_dof_idx_in, | ||
| const unsigned int | reinit_quad_idx_in, | ||
| const MappingInfoType & | mapping_info_surface_in, | ||
| const unsigned int | ls_dof_idx_in, | ||
| const std::shared_ptr< dealii::NonMatching::MeshClassifier< dim > > | mesh_classifier_in | ||
| ) |
Constructor.
Operator for the matrix-free solution of the nonlinear elliptic reinitialization.
- Parameters
-
scratch_data_in Reference to the used ScratchData object. reinit_data_in Reference to the object for reinitialization-specific data. reinit_dof_idx_in Index of the used dof-handler object in scratch_data_in.reinit_quad_idx_in Index of the used quadrature object in scratch_data_in.mapping_info_surface_in Mapping information for the interface surface. ls_dof_idx_in DOF handler index for the level set function. mesh_classifier_in Shared pointer to the mesh classifier object containing information about cut cells.
Member Function Documentation
◆ compute_inverse_diagonal_from_matrixfree()
|
finalvirtual |
Compute the inverse diagonal of the system matrix. Used by the preconditioner.
- Parameters
-
diagonal Output vector containing the diagonal inverse values.
Reimplemented from MeltPoolDG::OperatorMatrixFree< dim, number >.
◆ compute_system_matrix_from_matrixfree()
|
finalvirtual |
Compute and assemble the system matrix from matrix-free operator evaluations. Used by the preconditioner.
- Parameters
-
system_matrix Output sparse matrix.
Reimplemented from MeltPoolDG::OperatorMatrixFree< dim, number >.
◆ create_rhs()
|
finalvirtual |
Create the right-hand side vector using a matrix-free evaluation. Top-level function.
- Parameters
-
rhs Right-hand side vector. old_level_set The level set vector where the signed distance property needs to be restored.
Reimplemented from MeltPoolDG::OperatorMatrixFree< dim, number >.
◆ evaluate_rhs_coefficient()
|
private |
This evaluates the coefficient for the rhs integral.
- Parameters
-
psi_old Cell integrator for the old level set values. q_index Index of the quadrature point.
- Returns
- Value of the source term.
◆ interface_penalty_cell_operation()
| void MeltPoolDG::LevelSet::ReinitializationEllipticOperator< dim, number >::interface_penalty_cell_operation | ( | PointEvaluationType & | interface_penalty_surface, |
| FECellIntegrator< dim, 1, number > & | interface_penalty, | ||
| const unsigned int | lane, | ||
| const number | penalty_coefficient | ||
| ) | const |
Calculate the contribution of a single cell surface integral to the penalty term for the weak imposition of interface Dirichlet boundary condition.
- Parameters
-
interface_penalty_surface Point evaluation object for the surface integral. interface_penalty Cell integrator for the penalty term. lane The SIMD lane for which the operation is performed. Corresponds to one cell in the cell batch. penalty_coefficient Penalty coefficient for the interface penalty term.
◆ laplace_cell_operation()
|
private |
Calculate the contribution of the laplace operator of a cell to the lhs.
- Parameters
-
cell_eval Cell integrator.
◆ lhs_cell_operation()
|
private |
Calculate the contribution of a single cell integral to the left-hand side. First-level function for the evaluation of the laplace operator and the surface penalty term.
- Parameters
-
interface_penalty Cell integrator for the penalty term. cell_eval Cell integrator for the laplace operator (plus, provides function values for the penalty term). interface_penalty_surface Point evaluation object for the surface integral. cell_batch Batch index for the current cell.
◆ reinit()
|
finalvirtual |
Reinitialize internal data structures, typically after mesh changes.
Reimplemented from MeltPoolDG::OperatorBase< number >.
◆ rhs_cell_operation()
| void MeltPoolDG::LevelSet::ReinitializationEllipticOperator< dim, number >::rhs_cell_operation | ( | FECellIntegrator< dim, 1, number > & | cell_eval, |
| const FECellIntegrator< dim, 1, number > & | psi_old | ||
| ) | const |
Compute the contribution of a single cell integral to the right-hand side. First-level function for the evaluation of the volume integrals.
- Parameters
-
cell_eval Cell integrator for the right-hand side. psi_old Cell integrator for the old level set values.
◆ vmult()
|
finalvirtual |
Apply the operator in a matrix-free fashion. Top-level function for the evaluation of the left-hand side.
- Parameters
-
dst Output vector. src Input vector.
Reimplemented from MeltPoolDG::OperatorMatrixFree< dim, number >.
Member Data Documentation
◆ fe_point_level_set
|
private |
Temporary FE object required by FEPointEvaluation.
◆ ls_dof_idx
|
private |
DOF handler index for the level set field.
◆ mapping_info_surface
|
private |
Mapping information for integration over the interface.
◆ mesh_classifier
|
private |
Mesh classifier, which contains information if a cell is inside or outside the physically relevant region, or cut by the immersed boundary. It corresponds to the current level set position.
◆ n_dofs_per_cell
|
private |
Number of DoFs per cell of the temporary FE.
◆ reinit_data
|
private |
Reference to the reinitialization parameters and coefficients.
◆ reinit_quad_idx
|
private |
Quadrature index for evaluating terms during reinitialization.
◆ scratch_data
|
private |
Reference to scratch data containing mesh, geometry, and FE evaluation utilities.
◆ solution_old
|
private |
Solution vector from the previous iteration or time step (used in matrix-free mode).
◆ zero_interface
|
private |
This vector is used to create an empty cell integrator buffer for cut cells. The buffer accumulates penalty contribution. This vector is initialized to zero every reinit() operation.
The documentation for this class was generated from the following files:
- include/meltpooldg/level_set/reinitialization_elliptic_operator.hpp
- source/level_set/reinitialization_elliptic_operator.cpp
Generated by
Public Types inherited from