Skip to content

Commit

Permalink
Merge branch 'SmallFixes' into 'master'
Browse files Browse the repository at this point in the history
[App|DataExplorer] Replace OGS_FATAL with error box

See merge request ogs/ogs!4944
  • Loading branch information
endJunction committed Mar 12, 2024
2 parents 311f327 + 6765869 commit 718338e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Applications/DataExplorer/DataView/Vtu2GridDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <optional>
#include <string>

#include "Base/OGSError.h"
#include "Base/StrictDoubleValidator.h"
#include "GeoLib/AABB.h"
#include "MeshLib/IO/writeMeshToFile.h"
Expand Down Expand Up @@ -185,20 +186,19 @@ void Vtu2GridDialog::accept()
(*cellsize)[1], (*cellsize)[2], min, "grid"));
if (grid == nullptr)
{
OGS_FATAL(
"Could not generate regular hex mesh. With parameters dims={} {} "
"{}, "
"cellsize={} {} {}",
dims[0], dims[1], dims[2], (*cellsize)[0], (*cellsize)[1],
(*cellsize)[2]);
OGSError::box(QString::fromStdString(
fmt::format("Could not generate regular hex mesh. With "
"parameters dims={} {} {}, cellsize={} {} {}",
dims[0], dims[1], dims[2], (*cellsize)[0],
(*cellsize)[1], (*cellsize)[2])));
}

std::vector<int>* cell_ids =
grid->getProperties().createNewPropertyVector<int>(
VoxelGridFromMesh::cell_id_name, MeshLib::MeshItemType::Cell, 1);
if (cell_ids == nullptr)
{
OGS_FATAL("Could not create cell ids.");
OGSError::box("Could not create cell ids.");
}
*cell_ids = VoxelGridFromMesh::assignCellIds(mesh, min, dims, *cellsize);
if (!VoxelGridFromMesh::removeUnusedGridCells(mesh, grid))
Expand Down

0 comments on commit 718338e

Please sign in to comment.