Skip to content
Snippets Groups Projects
Commit 9ff5e9e7 authored by Karsten Rink's avatar Karsten Rink
Browse files

changes based on pr comments

Conflicts:
	MeshLib/MeshGenerators/LayeredVolume.cpp
parent f0d7e156
No related branches found
No related tags found
No related merge requests found
......@@ -57,8 +57,8 @@ bool LayeredVolume::createRasterLayers(const MeshLib::Mesh &mesh, const std::vec
// map each layer and attach to subsurface mesh
const std::size_t nRasters (rasters.size());
for (int i=nRasters-2; i>=0; --i)
this->addLayerToMesh(*top, nRasters-i-1, *rasters[i]);
for (std::size_t i=1; i<nRasters; ++i)
this->addLayerToMesh(*top, i, *rasters[i]);
// close boundaries between layers
this->addLayerBoundaries(*top, nRasters);
......
......@@ -109,7 +109,7 @@ MeshLib::Mesh* MeshLayerMapper::createStaticLayers(MeshLib::Mesh const& mesh, st
bool MeshLayerMapper::createRasterLayers(MeshLib::Mesh const& mesh, std::vector<GeoLib::Raster const*> const& rasters, double noDataReplacementValue)
{
const std::size_t nLayers(rasters.size());
if (nLayers < 1 || mesh.getDimension() != 2)
if (nLayers < 2 || mesh.getDimension() != 2)
{
ERR("MeshLayerMapper::createRasterLayers(): A 2D mesh and at least two rasters required as input.");
return nullptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment