Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
mesh_controller.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2023-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_mesh_controller_h
5#define lethe_mesh_controller_h
6
7/**
8 * @Class Controller that target a given number of elements in the mesh. This
9 * controller is used to define the coarsening factor.
10 */
11
13{
14public:
15 /**
16 * @brief Constructor of the controller.
17 * @param target_number_of_elements Number of element the controller tries to obtain.
18 */
24 virtual ~MeshController() = default;
25 /**
26 * @brief Returns the coarsening factor.
27 */
28 double
29 calculate_coarsening_factor(unsigned int current_number_of_elements);
30
31private:
32 const unsigned int target_number_of_elements;
35};
36
37#endif
const unsigned int target_number_of_elements
virtual ~MeshController()=default
unsigned int previous_number_of_elements
double calculate_coarsening_factor(unsigned int current_number_of_elements)
Returns the coarsening factor.
MeshController(const unsigned int target_number_of_elements)
Constructor of the controller.
double previous_mesh_control_error