14#include <range/v3/algorithm/any_of.hpp>
15#include <range/v3/algorithm/for_each.hpp>
16#include <range/v3/view/transform.hpp>
31 [&](
auto const& element_id)
32 { media_map.checkElementHasMedium(element_id); });
37 ranges::views::transform([&](
auto const& medium)
41 assert(!all_phases.empty());
44 if (ranges::any_of(all_phases,
45 [p0 = all_phases.front()](
auto const*
const p)
46 { return p->name != p0->name; }))
49 "You are mixing liquid and gas phases in your model domain. OGS "
50 "does not yet know how to handle this.");
Definition of the Element class.
Definition of the Mesh class.
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
void checkMPLPhasesForSinglePhaseFlow(MeshLib::Mesh const &mesh, MaterialPropertyLib::MaterialSpatialDistributionMap const &media_map)
Phase const & fluidPhase(Medium const &medium)
Returns a gas or aqueous liquid phase of the given medium.
constexpr ranges::views::view_closure ids
For an element of a range view return its id.