Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
cahn_hilliard_filter.cc
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
5
6std::shared_ptr<CahnHilliardFilterBase>
8 const Parameters::CahnHilliard &cahn_hilliard_parameters)
9{
10 if (cahn_hilliard_parameters.cahn_hilliard_phase_filter.type ==
12 return std::make_shared<CahnHilliardTanhFilter>(
13 cahn_hilliard_parameters.cahn_hilliard_phase_filter.beta);
14 else if (cahn_hilliard_parameters.cahn_hilliard_phase_filter.type ==
16 return std::make_shared<CahnHilliardClipFilter>();
17 else
18 return std::make_shared<CahnHilliardNoFilter>();
19}
static std::shared_ptr< CahnHilliardFilterBase > model_cast(const Parameters::CahnHilliard &cahn_hilliard_parameters)
Instantiate and return a pointer to a CahnHilliardFilterBase object by casting it to the proper child...
Parameters::CahnHilliard_PhaseFilter cahn_hilliard_phase_filter