Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
cls_subequations.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2025-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_subequations_h
5#define lethe_cls_subequations_h
6
7/**
8 * @brief IDs associated to the different subequations solved in Lethe.
9 */
10enum class CLSSubequationsID : unsigned int
11{
12 /// CLS phase indicator gradient L2 projection
14 /// CLS curvature L2 projection
16 /// CLS PDE-based interface reinitialization
18};
19
20/**
21 * @brief Get the CLSSubequationsID associated to a specific CLS subequation
22 * from a string.
23 *
24 * @param[in] cls_subequation_name String corresponding to a particular CLS
25 * subequation.
26 *
27 * @return CLSSubequationsID corresponding to @p cls_subequation_name.
28 */
30get_cls_subequation_id(const std::string &cls_subequation_name)
31{
32 if (cls_subequation_name == "CLS phase gradient L2 projection")
34 else if (cls_subequation_name == "CLS curvature L2 projection")
36 else if (cls_subequation_name == "CLS PDE-based interface reinitialization")
38 else
39 throw(std::invalid_argument("Invalid CLS subequation name. Options are: \n"
40 " <CLS phase gradient L2 projection>\n"
41 " <CLS curvature L2 projection>\n"
42 " <CLS PDE-based interface reinitialization>"));
43}
44
45#endif
CLSSubequationsID get_cls_subequation_id(const std::string &cls_subequation_name)
Get the CLSSubequationsID associated to a specific CLS subequation from a string.
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.
@ phase_gradient_projection
CLS phase indicator gradient L2 projection.