33 std::vector<GeoLib::Raster const*>
const& rasters,
34 double minimum_thickness,
35 double noDataReplacementValue)
42 auto const elem_count =
46 ERR(
"Input mesh contains QUAD-elements. Please use input mesh "
47 "containing LINE and TRIANGLE elements only.");
52 mesh, rasters, minimum_thickness, noDataReplacementValue);
53 std::for_each(rasters.begin(),
60 std::string
const& mesh_name)
const
64 WARN(
"LayeredMeshGenerator has not created any nodes.");
69 WARN(
"LayeredMeshGenerator has not created any elements.");
78 assert(materials !=
nullptr);
82 std::back_inserter(*materials));
87 "Skipping MaterialID information, number of entries does not match "
91 std::unique_ptr<MeshLib::Mesh> result(
96 std::unique_ptr<MeshLib::Mesh> new_mesh(
106 const double max(*std::max_element(high.
begin(), high.
end()));
107 const double min(*std::min_element(low.
begin(), low.
end()));
108 return ((max - min) * 1e-07);
115 std::size_t new_node_id)
const
117 double const elevation =
121 std::numeric_limits<double>::epsilon()) ||
127 return new MeshLib::Node(dem_node[0], dem_node[1], elevation, new_node_id);
Definition of the Element class.
Definition of the SubsurfaceMapper class.
void ERR(char const *fmt, Args const &... args)
void WARN(char const *fmt, Args const &... args)
Definition of the class Properties that implements a container of properties.
Definition of the Mesh class.
Definition of the Node class.
Definition of the GeoLib::Raster class.
Class Raster is used for managing raster data.
double interpolateValueAtPoint(const MathLib::Point3d &pnt) const
Interpolates the elevation of the given point based on the 8-neighbourhood of the raster cell it is l...
const_iterator begin() const
RasterHeader const & getHeader() const
Returns the complete header information.
const_iterator end() const
virtual bool createLayers(MeshLib::Mesh const &mesh, std::vector< GeoLib::Raster const * > const &rasters, double minimum_thickness, double noDataReplacementValue=0.0) final
double _minimum_thickness
std::vector< int > _materials
static double calcEpsilon(GeoLib::Raster const &low, GeoLib::Raster const &high)
Calculates a data-dependent epsilon value.
MeshLib::Node * getNewLayerNode(MeshLib::Node const &dem_node, MeshLib::Node const &last_layer_node, GeoLib::Raster const &raster, std::size_t new_node_id) const
std::vector< MeshLib::Node * > _nodes
virtual bool createRasterLayers(MeshLib::Mesh const &mesh, std::vector< GeoLib::Raster const * > const &rasters, double minimum_thickness, double noDataReplacementValue)=0
std::unique_ptr< MeshLib::Mesh > getMesh(std::string const &mesh_name) const
Returns a mesh of the subsurface representation.
std::vector< MeshLib::Element * > _elements
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
const std::vector< std::size_t > & getSearchedNodeIDs() const
return marked node IDs
std::size_t searchUnused()
Marks all unused nodes.
Property manager on mesh items. Class Properties manages scalar, vector or matrix properties....
PropertyVector< T > * createNewPropertyVector(std::string const &name, MeshItemType mesh_item_type, std::size_t n_components=1)
void copy(PETScVector const &x, PETScVector &y)
MeshLib::Mesh * removeNodes(const MeshLib::Mesh &mesh, const std::vector< std::size_t > &del_nodes_idx, const std::string &new_mesh_name)