OGS
|
Creates a volume geometry from 2D mesh layers based on raster data.
Definition at line 32 of file LayeredVolume.h.
#include <LayeredVolume.h>
Public Member Functions | |
LayeredVolume ()=default | |
~LayeredVolume () override=default | |
bool | createRasterLayers (const MeshLib::Mesh &mesh, const std::vector< GeoLib::Raster const * > &rasters, double minimum_thickness, double noDataReplacementValue=0.0) override |
std::vector< MeshLib::Node > | getAttributePoints () const |
Public Member Functions inherited from LayeredMeshGenerator | |
virtual bool | createLayers (MeshLib::Mesh const &mesh, std::vector< GeoLib::Raster const * > const &rasters, double minimum_thickness, double noDataReplacementValue=0.0) final |
std::unique_ptr< MeshLib::Mesh > | getMesh (std::string const &mesh_name) const |
Returns a mesh of the subsurface representation. | |
Private Member Functions | |
void | addLayerToMesh (const MeshLib::Mesh &dem_mesh, unsigned layer_id, GeoLib::Raster const &raster) override |
Adds another layer to the subsurface mesh. | |
void | addLayerBoundaries (const MeshLib::Mesh &layer, std::size_t nLayers) |
void | removeCongruentElements (std::size_t nLayers, std::size_t nElementsPerLayer) |
Removes duplicate 2D elements (possible due to outcroppings) | |
Private Attributes | |
std::vector< MeshLib::Node > | _attribute_points |
Additional Inherited Members | |
Protected Member Functions inherited from LayeredMeshGenerator | |
LayeredMeshGenerator ()=default | |
virtual | ~LayeredMeshGenerator ()=default |
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 inherited from LayeredMeshGenerator | |
static double | calcEpsilon (GeoLib::Raster const &low, GeoLib::Raster const &high) |
Calculates a data-dependent epsilon value. | |
Protected Attributes inherited from LayeredMeshGenerator | |
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 |
|
default |
|
overridedefault |
|
private |
Creates boundary surfaces between the mapped layers to make the volumes watertight
Definition at line 133 of file LayeredVolume.cpp.
References LayeredMeshGenerator::_elements, LayeredMeshGenerator::_materials, LayeredMeshGenerator::_nodes, MathLib::Point3d::asEigenVector3d(), MeshLib::Mesh::getElements(), and MeshLib::Mesh::getNumberOfNodes().
Referenced by createRasterLayers().
|
overrideprivatevirtual |
Adds another layer to the subsurface mesh.
Implements LayeredMeshGenerator.
Definition at line 90 of file LayeredVolume.cpp.
References LayeredMeshGenerator::_elements, LayeredMeshGenerator::_materials, LayeredMeshGenerator::_nodes, MeshLib::Mesh::getElements(), LayeredMeshGenerator::getNewLayerNode(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfNodes(), MeshLib::QUAD, and MeshLib::TRIANGLE.
Referenced by createRasterLayers().
|
overridevirtual |
Constructs a subsurface representation of a mesh using only 2D elements (i.e. layer boundaries are represented by surfaces)
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]) |
Implements LayeredMeshGenerator.
Definition at line 27 of file LayeredVolume.cpp.
References LayeredMeshGenerator::_elements, LayeredMeshGenerator::_elevation_epsilon, LayeredMeshGenerator::_materials, LayeredMeshGenerator::_minimum_thickness, LayeredMeshGenerator::_nodes, addLayerBoundaries(), addLayerToMesh(), LayeredMeshGenerator::calcEpsilon(), MeshLib::copyElementVector(), MeshLib::copyNodeVector(), ERR(), MeshLib::Mesh::getDimension(), MeshLib::ElementSearch::getSearchedElementIDs(), MeshToolsLib::MeshLayerMapper::layerMapping(), MeshLib::LINE, removeCongruentElements(), MeshToolsLib::removeElements(), and MeshLib::ElementSearch::searchByElementType().
|
inline |
Returns the region attribute vector necessary for assigning region attributes via TetGen
Definition at line 64 of file LayeredVolume.h.
References _attribute_points.
Referenced by MeshLayerEditDialog::createTetMesh(), and main().
|
private |
Removes duplicate 2D elements (possible due to outcroppings)
Definition at line 183 of file LayeredVolume.cpp.
References _attribute_points, LayeredMeshGenerator::_elements, LayeredMeshGenerator::_materials, LayeredMeshGenerator::_nodes, MeshLib::getCenterOfGravity(), MeshLib::Element::getNumberOfBaseNodes(), and MeshLib::Element::setNode().
Referenced by createRasterLayers().
|
private |
Definition at line 83 of file LayeredVolume.h.
Referenced by getAttributePoints(), and removeCongruentElements().