include/meltpooldg/level_set/normal_vector_operation.hpp Source File

Developer Documentation: include/meltpooldg/level_set/normal_vector_operation.hpp Source File
Developer Documentation
normal_vector_operation.hpp
Go to the documentation of this file.
1#pragma once
2// for parallelization
3#include <deal.II/lac/generic_linear_algebra.h>
4
5// MeltPoolDG
16
18{
36 template <int dim, typename number>
38 {
39 private:
40 using VectorType = dealii::LinearAlgebra::distributed::Vector<number>;
41 using BlockVectorType = dealii::LinearAlgebra::distributed::BlockVector<number>;
42 using SparseMatrixType = dealii::TrilinosWrappers::SparseMatrix;
43
44 public:
48 const std::array<unsigned int, dim> &normal_dof_indices_per_block_in,
49 const unsigned int normal_no_bc_dof_idx_in,
50 const unsigned int normal_quad_idx_in,
51 const unsigned int ls_dof_idx_in);
52
53 void
54 reinit() override;
55
56 void
57 solve() override;
58
59 const BlockVectorType &
60 get_solution_normal_vector() const override;
61
64
65 void
67 std::vector<dealii::LinearAlgebra::distributed::Vector<number> *> &vectors) override;
68
69 private:
74 void
76
77 private:
81 /*
82 * Based on the following indices the correct DoFHandler or quadrature rule from
83 * ScratchData<dim,dim,number> object is selected. This is important when
84 * ScratchData<dim,dim,number> holds multiple DoFHandlers, quadrature rules, etc.
85 */
86 const unsigned int normal_no_bc_dof_idx;
87 const std::array<unsigned int, dim> normal_dof_indices_per_block;
88 const unsigned int normal_quad_idx;
89 const unsigned int ls_dof_idx;
90
92
93 std::unique_ptr<Predictor<BlockVectorType, number>> predictor;
94 /*
95 * This is the primary solution variable of this module, which will be also publicly
96 * accessible for output_results.
97 */
100 /*
101 * This pointer will point to your user-defined normal vector operator.
102 */
103 std::unique_ptr<NormalVectorOperator<dim, number>> normal_vector_operator;
104 /*
105 * Preconditioner for the curvature operator
106 */
108 };
109} // namespace MeltPoolDG::LevelSet
Definition normal_vector_operation_base.hpp:8
Definition normal_vector_operation.hpp:38
dealii::LinearAlgebra::distributed::BlockVector< number > BlockVectorType
Definition normal_vector_operation.hpp:41
TimeIntegration::SolutionHistory< BlockVectorType > solution_history
Definition normal_vector_operation.hpp:91
dealii::LinearAlgebra::distributed::Vector< number > VectorType
Definition normal_vector_operation.hpp:40
const VectorType & solution_level_set
Definition normal_vector_operation.hpp:80
void attach_vectors(std::vector< dealii::LinearAlgebra::distributed::Vector< number > * > &vectors) override
Definition normal_vector_operation.cpp:187
const unsigned int normal_no_bc_dof_idx
Definition normal_vector_operation.hpp:86
const std::array< unsigned int, dim > normal_dof_indices_per_block
Definition normal_vector_operation.hpp:87
dealii::TrilinosWrappers::SparseMatrix SparseMatrixType
Definition normal_vector_operation.hpp:42
BlockVectorType solution_normal_vector_predictor
Definition normal_vector_operation.hpp:98
std::unique_ptr< NormalVectorOperator< dim, number > > normal_vector_operator
Definition normal_vector_operation.hpp:103
void create_operator()
Definition normal_vector_operation.cpp:198
Preconditioner< dim, BlockVectorType, number > preconditioner
Definition normal_vector_operation.hpp:107
const unsigned int normal_quad_idx
Definition normal_vector_operation.hpp:88
std::unique_ptr< Predictor< BlockVectorType, number > > predictor
Definition normal_vector_operation.hpp:93
const BlockVectorType & get_solution_normal_vector() const override
Definition normal_vector_operation.cpp:173
const unsigned int ls_dof_idx
Definition normal_vector_operation.hpp:89
void reinit() override
Definition normal_vector_operation.cpp:38
const NormalVectorData< number > normal_vector_data
Definition normal_vector_operation.hpp:79
BlockVectorType rhs
Definition normal_vector_operation.hpp:99
const ScratchData< dim, dim, number > & scratch_data
Definition normal_vector_operation.hpp:78
void solve() override
Definition normal_vector_operation.cpp:67
Definition preconditioner.hpp:42
Container for shared scratch data between operations/operators.
Definition scratch_data.hpp:61
Definition solution_history.hpp:21
This operation solves the reinitialization problem for a CG- or DG-FEM-based discrete level-set field...
Definition advection_DG_operation.hpp:20
Definition normal_vector_data.hpp:15