Skip to content
Snippets Groups Projects
Commit ed2472c8 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Throw an exception if getCommonMesh cannot find a common mesh

parent f0c17b59
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
#include <scheme/DiscreteFunctionType.hpp>
#include <scheme/IDiscreteFunction.hpp>
#include <scheme/IDiscreteFunctionDescriptor.hpp>
#include <utils/Exceptions.hpp>
#include <vector>
......@@ -30,7 +31,7 @@ getCommonMesh(const std::vector<std::shared_ptr<const IDiscreteFunction>>& discr
i_mesh = discrete_function->mesh();
} else {
if (i_mesh != discrete_function->mesh()) {
return {};
throw NormalError("discrete functions are not defined on the same mesh");
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment