17#include <range/v3/action/sort.hpp>
18#include <range/v3/action/unique.hpp>
19#include <range/v3/range/conversion.hpp>
20#include <range/v3/view/unique.hpp>
31 if (!bounds.has_value())
33 INFO(
"\t{:s}: Could not get value bounds for property vector.",
38 property.
size(), bounds->first, bounds->second);
46 const std::vector<MeshLib::Node*>& nodes(mesh.
getNodes());
50std::map<MeshLib::MeshElemType, unsigned>
53 std::map<MeshLib::MeshElemType, unsigned> n_element_types;
54 const std::vector<MeshLib::Element*>& elements(mesh.
getElements());
55 for (
auto element : elements)
60 return n_element_types;
65 auto const& nr_ele_types =
68 INFO(
"Number of elements in the mesh:");
69 for (
auto entry : nr_ele_types)
81 INFO(
"There are {:d} properties in the mesh:", properties.size());
83 for (
auto [name, property] : properties)
90 else if (
auto const* p =
95 else if (
auto const* p =
100 else if (
auto const* p =
105 else if (
auto const* p =
110 else if (
auto const* p =
116 else if (
auto const* p =
122 else if (
auto const* p =
128 else if (
auto const* p =
134 else if (
auto const* p =
142 "\t{:s}: Could not get value bounds for property vector of "
144 name,
typeid(*p).name());
151 INFO(
"Mesh Quality Control:");
159 INFO(
"{:d} hole(s) detected within the mesh", n_holes);
163 INFO(
"No holes found within the mesh.");
172 INFO(
"No MaterialIDs were found.");
176 return *matids | ranges::views::unique | ranges::to<std::vector> |
177 ranges::actions::sort | ranges::actions::unique |
178 ranges::to<std::vector>;
Definition of the Element class.
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the MeshValidation class.
Class AABB is an axis aligned bounding box around a given set of geometric points of (template) type ...
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
Properties & getProperties()
std::string const & getPropertyName() const
std::string MeshElemType2String(const MeshElemType t)
Given a MeshElemType this returns the appropriate string.
PropertyVector< int > const * materialIDs(Mesh const &mesh)
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.