Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
cls_curvature_projection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_cls_curvature_projection_h
5#define lethe_cls_curvature_projection_h
6
8
9#include <deal.II/fe/fe_simplex_p.h>
10
11#include <utility>
12
13/**
14 * @brief CLS curvature L2 projection solver.
15 *
16 * @tparam dim Number of dimensions of the problem.
17 */
18template <int dim>
20{
21public:
22 /**
23 * @brief Constructor for the L2 projection of the CLS interface curvature.
24 *
25 * @param[in] p_simulation_parameters Simulation parameters.
26 *
27 * @param[in] p_pcout Parallel cout used to print the information.
28 *
29 * @param[in] p_triangulation Distributed mesh information.
30 *
31 * @param[in,out] p_subequations_interface Subequations interface object used
32 * to get information from other subequations and store information from the
33 * current one.
34 */
36 const SimulationParameters<dim> &p_simulation_parameters,
37 const ConditionalOStream &p_pcout,
38 std::shared_ptr<parallel::DistributedTriangulationBase<dim>>
39 p_triangulation,
40 CLSSubequationsInterface<dim> &p_subequations_interface)
43 p_simulation_parameters,
44 ((p_simulation_parameters.multiphysics.cls_parameters
45 .surface_tension_force.verbosity != Parameters::Verbosity::quiet) ||
46 ((p_simulation_parameters.multiphysics.cls_parameters
47 .reinitialization_method.pde_based_interface_reinitialization
48 .enable) &&
49 (p_simulation_parameters.multiphysics.cls_parameters
50 .reinitialization_method.verbosity !=
51 Parameters::Verbosity::quiet))) ?
52 Parameters::Verbosity::verbose :
53 Parameters::Verbosity::quiet, // Set to verbose if surface tension
54 // verbosity is enabled or if PDE-based
55 // interface reinitialization is enabled
56 // and set to verbose
57 p_pcout,
58 std::move(p_triangulation),
59 p_subequations_interface)
60 {
61 if (this->simulation_parameters.mesh.simplex)
62 {
63 // For simplex meshes
64 this->fe = std::make_shared<FE_SimplexP<dim>>(
65 this->simulation_parameters.fem_parameters.CLS_degree);
66 this->mapping = std::make_shared<MappingFE<dim>>(*this->fe);
67 this->cell_quadrature =
68 std::make_shared<QGaussSimplex<dim>>(this->fe->degree + 1);
69 }
70 else
71 {
72 // Usual case, for quad/hex meshes
73 this->fe = std::make_shared<FE_Q<dim>>(
74 this->simulation_parameters.fem_parameters.CLS_degree);
75 this->mapping = std::make_shared<MappingQ<dim>>(this->fe->degree);
76 this->cell_quadrature =
77 std::make_shared<QGauss<dim>>(this->fe->degree + 1);
78 }
79 }
80
81 /**
82 * @brief Default destructor.
83 */
85
86private:
87 /**
88 * @brief Assemble system matrix and right-hand side (rhs).
89 */
90 void
92
93 /**
94 * @brief Check if the phase gradient L2 projection has been solved.
95 */
96 void
98};
99
100#endif
void assemble_system_matrix_and_rhs() override
Assemble system matrix and right-hand side (rhs).
void check_dependencies_validity() override
Check if the phase gradient L2 projection has been solved.
~CLSCurvatureProjection()=default
Default destructor.
CLSCurvatureProjection(const SimulationParameters< dim > &p_simulation_parameters, const ConditionalOStream &p_pcout, std::shared_ptr< parallel::DistributedTriangulationBase< dim > > p_triangulation, CLSSubequationsInterface< dim > &p_subequations_interface)
Constructor for the L2 projection of the CLS interface curvature.
CLSLinearSubequationsSolver(const CLSSubequationsID &p_subequation_id, const SimulationParameters< dim > &p_simulation_parameters, const Parameters::Verbosity &p_subequation_verbosity, const ConditionalOStream &p_pcout, std::shared_ptr< parallel::DistributedTriangulationBase< dim > > p_triangulation, CLSSubequationsInterface< dim > &p_subequations_interface)
Constructor for linear subequations solvers within the CLS auxiliary physics.
const SimulationParameters< dim > & simulation_parameters
Interface for secondary equations (subequations) solved within the CLS auxiliary physics.
CLSSubequationsID
IDs associated to the different subequations solved in Lethe.
@ curvature_projection
CLS curvature L2 projection.
@ pde_based_interface_reinitialization
CLS PDE-based interface reinitialization.