Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
electric_conductivity_model.cc
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
5
6std::shared_ptr<ElectricConductivityModel>
8 const Parameters::Material &material_properties)
9{
10 if (material_properties.electric_conductivity_model ==
12 return std::make_shared<ConstantElectricConductivity>(
13 material_properties.electric_conductivity);
14 else if (material_properties.electric_conductivity_model ==
16 return std::make_shared<PolynomialElectricConductivity>(
18 else
19 AssertThrow(
20 false,
21 ExcMessage(
22 "Invalid electric conductivity model. The choices are <constant|polynomial>"));
23}
static std::shared_ptr< ElectricConductivityModel > model_cast(const Parameters::Material &material_properties)
Instantiates and returns a pointer to an ElectricConductivityModel object by casting it to the proper...
Material - Class that defines the physical property of a material. Generally a material will be a flu...
Definition parameters.h:594
enum Parameters::Material::ElectricConductivityModel electric_conductivity_model
double electric_conductivity
Electric_conductivity.
Definition parameters.h:737
std::vector< double > electric_conductivity_polynomial_coefficients
Definition parameters.h:738