Skip to content
Snippets Groups Projects
Verified Commit 627ec220 authored by Paul Dechamps's avatar Paul Dechamps :speech_balloon:
Browse files

(def) Prevent computation for too small mesh

DDicretization now throws a runtime error if the mesh size is < 2 elements.
parent 139545e4
No related branches found
No related tags found
1 merge request!1BLASTER v1.0
Pipeline #19874 passed
......@@ -17,6 +17,8 @@ void Discretization::setGlob(std::vector<double> &_x, std::vector<double> &_y, s
{
if (_x.size() != _y.size() || _y.size() != _z.size() || _x.size() != _z.size())
throw std::runtime_error("blast::Discretization Wrong mesh sizes.\n");
if (_x.size() < 2 || _y.size() < 2 || _z.size() < 2)
throw std::runtime_error("blast::Discretization Mesh too small.\n");
nMarkers = _x.size();
x.resize(nMarkers, 0.);
......
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