OGS
CheckMaterialSpatialDistributionMap.h
Go to the documentation of this file.
1
12#include "Medium.h"
14#include "MeshLib/Mesh.h"
15#include "Phase.h"
16
17namespace MaterialPropertyLib
18{
19template <typename ContainerMedium,
20 typename ContainerSolid,
21 typename ContainerLiquid,
22 typename ContainerGas>
24 MeshLib::Mesh const& mesh,
26 ContainerMedium const& required_properties_medium,
27 ContainerSolid const& required_properties_solid_phase,
28 ContainerLiquid const& required_properties_liquid_phase,
29 ContainerGas const& required_properties_gas_phase)
30{
31 for (auto const element_id : mesh.getElements() | MeshLib::views::ids)
32 {
33 auto const& medium = *media_map.getMedium(element_id);
34 if (!required_properties_medium.empty())
35 {
37 medium, required_properties_medium);
38 }
39 if (!required_properties_liquid_phase.empty())
40 {
42 medium.phase("AqueousLiquid"),
43 required_properties_liquid_phase);
44 }
45 if (!required_properties_gas_phase.empty())
46 {
48 medium.phase("Gas"), required_properties_gas_phase);
49 }
50 if (!required_properties_solid_phase.empty())
51 {
53 medium.phase("Solid"), required_properties_solid_phase);
54 }
55 }
56}
57
58} // namespace MaterialPropertyLib
Definition of the Element class.
Definition of the Mesh class.
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
Definition Mesh.h:109
void checkMaterialSpatialDistributionMap(MeshLib::Mesh const &mesh, MaterialPropertyLib::MaterialSpatialDistributionMap const &media_map, ContainerMedium const &required_properties_medium, ContainerSolid const &required_properties_solid_phase, ContainerLiquid const &required_properties_liquid_phase, ContainerGas const &required_properties_gas_phase)
void checkRequiredProperties(Component const &c, std::span< PropertyType const > const required_properties)
Definition Component.cpp:60
constexpr ranges::views::view_closure ids
For an element of a range view return its id.
Definition Mesh.h:225