OGS
|
Base class for creation of 3D subsurface meshes based on raster data.
Definition at line 37 of file LayeredMeshGenerator.h.
#include <LayeredMeshGenerator.h>
Public Member Functions | |
virtual bool | createLayers (MeshLib::Mesh const &mesh, std::vector< GeoLib::Raster const * > const &rasters, double minimum_thickness, double noDataReplacementValue=0.0) final |
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. | |
Protected Member Functions | |
LayeredMeshGenerator ()=default | |
virtual | ~LayeredMeshGenerator ()=default |
virtual void | addLayerToMesh (MeshLib::Mesh const &mesh_layer, unsigned layer_id, GeoLib::Raster const &raster)=0 |
Adds another layer to the subsurface mesh. | |
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 |
Static Protected Member Functions | |
static double | calcEpsilon (GeoLib::Raster const &low, GeoLib::Raster const &high) |
Calculates a data-dependent epsilon value. | |
Protected Attributes | |
double | _elevation_epsilon {0.0001} |
double | _minimum_thickness {std::numeric_limits<float>::epsilon()} |
std::vector< int > | _materials |
std::vector< MeshLib::Node * > | _nodes |
std::vector< MeshLib::Element * > | _elements |
|
protecteddefault |
|
protectedvirtualdefault |
|
protectedpure virtual |
Adds another layer to the subsurface mesh.
Implemented in LayeredVolume, and MeshToolsLib::MeshLayerMapper.
|
staticprotected |
Calculates a data-dependent epsilon value.
Definition at line 107 of file LayeredMeshGenerator.cpp.
References GeoLib::Raster::begin(), and GeoLib::Raster::end().
Referenced by LayeredVolume::createRasterLayers().
|
finalvirtual |
Returns a subsurface representation of a region represented by a 2D mesh by reading raster files and calling the appropriate construction method.
mesh | The 2D surface mesh that is used as a basis for the subsurface mesh |
rasters | Containing all the rasters for the subsurface layers from bottom to top (starting with the bottom of the oldest layer and ending with the DEM) |
minimum_thickness | Minimum thickness of each of the newly created layers (i.e. nodes with a vertical distance smaller than this will be collapsed) |
noDataReplacementValue | Default z-coordinate if there are mesh nodes not located on the DEM raster (i.e. raster_paths[0]) |
Definition at line 31 of file LayeredMeshGenerator.cpp.
References createRasterLayers(), ERR(), MeshLib::Mesh::getDimension(), MeshToolsLib::MeshInformation::getNumberOfElementTypes(), and MeshLib::QUAD.
Referenced by MeshLayerEditDialog::createPrismMesh(), MeshLayerEditDialog::createTetMesh(), and main().
|
pure virtual |
Constructs a subsurface representation based on a 2D mesh and a number of rasters representing subsurface layer boundaries.
mesh | The 2D surface mesh that is used as a basis for the subsurface mesh |
rasters | Containing all the raster-data for the subsurface layers from bottom to top (starting with the bottom of the oldest layer and ending with the DEM) |
minimum_thickness | Minimum thickness of each of the newly created layers (i.e. nodes with a vertical distance smaller than this will be collapsed) |
noDataReplacementValue | Default z-coordinate if there are mesh nodes not located on the DEM raster (i.e. raster_paths[0]) |
Implemented in LayeredVolume, and MeshToolsLib::MeshLayerMapper.
Referenced by createLayers().
std::unique_ptr< MeshLib::Mesh > LayeredMeshGenerator::getMesh | ( | std::string const & | mesh_name | ) | const |
Returns a mesh of the subsurface representation.
Definition at line 59 of file LayeredMeshGenerator.cpp.
References _elements, _materials, _nodes, MeshLib::Cell, MeshLib::Properties::createNewPropertyVector(), MeshLib::NodeSearch::getSearchedNodeIDs(), MeshToolsLib::removeNodes(), MeshLib::NodeSearch::searchUnused(), and WARN().
Referenced by MeshLayerEditDialog::createPrismMesh(), MeshLayerEditDialog::createTetMesh(), and main().
|
protected |
Calculates the node Position of a subsurface node based on the given raster but also constrained by the DEM layer as an upper bound and the the layer located below as a lower bound (i.e. older stratigraphic layers are favored and nodes cannot be located above surface).
dem_node | The node at this xy-location on the DEM |
last_layer_node | The node at this xy-location on the layer below |
raster | The raster file for the current layer |
new_node_id | Node ID to be used if there is a meaningful node position to be found |
Definition at line 115 of file LayeredMeshGenerator.cpp.
References _minimum_thickness, GeoLib::Raster::getHeader(), GeoLib::Raster::interpolateValueAtPoint(), GeoLib::RasterHeader::no_data, and MeshLib::Node.
Referenced by LayeredVolume::addLayerToMesh(), and MeshToolsLib::MeshLayerMapper::addLayerToMesh().
|
protected |
Definition at line 120 of file LayeredMeshGenerator.h.
Referenced by LayeredVolume::addLayerBoundaries(), LayeredVolume::addLayerToMesh(), MeshToolsLib::MeshLayerMapper::addLayerToMesh(), LayeredVolume::createRasterLayers(), MeshToolsLib::MeshLayerMapper::createRasterLayers(), getMesh(), and LayeredVolume::removeCongruentElements().
|
protected |
Definition at line 116 of file LayeredMeshGenerator.h.
Referenced by LayeredVolume::createRasterLayers().
|
protected |
Definition at line 118 of file LayeredMeshGenerator.h.
Referenced by LayeredVolume::addLayerBoundaries(), LayeredVolume::addLayerToMesh(), MeshToolsLib::MeshLayerMapper::addLayerToMesh(), LayeredVolume::createRasterLayers(), MeshToolsLib::MeshLayerMapper::createRasterLayers(), getMesh(), and LayeredVolume::removeCongruentElements().
|
protected |
Definition at line 117 of file LayeredMeshGenerator.h.
Referenced by LayeredVolume::createRasterLayers(), MeshToolsLib::MeshLayerMapper::createRasterLayers(), and getNewLayerNode().
|
protected |
Definition at line 119 of file LayeredMeshGenerator.h.
Referenced by LayeredVolume::addLayerBoundaries(), LayeredVolume::addLayerToMesh(), MeshToolsLib::MeshLayerMapper::addLayerToMesh(), LayeredVolume::createRasterLayers(), MeshToolsLib::MeshLayerMapper::createRasterLayers(), getMesh(), and LayeredVolume::removeCongruentElements().