Loading tools/mesh_converter/MeshElement.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <Eigen/Eigen> #include <array> #include <cmath> #include <utility> #include "core/utils/log.h" Loading @@ -26,6 +27,8 @@ namespace mesh_converter { Point(double px, double py, double pz) noexcept : x(px), y(py), z(pz), dim(3){}; Point(double py, double pz) noexcept : y(py), z(pz), dim(2){}; bool isFinite() const { return std::isfinite(x) && std::isfinite(y) && std::isfinite(z); }; double x{0}, y{0}, z{0}; unsigned int dim{0}; Loading Loading @@ -154,6 +157,10 @@ namespace mesh_converter { if(valid_) { LOG(DEBUG) << element.print(reference_); result_ = element.getObservable(reference_); if(!result_.isFinite()) { LOG(WARNING) << "Interpolated result not a finite number at " << reference_; return false; } } return valid_; Loading Loading
tools/mesh_converter/MeshElement.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <Eigen/Eigen> #include <array> #include <cmath> #include <utility> #include "core/utils/log.h" Loading @@ -26,6 +27,8 @@ namespace mesh_converter { Point(double px, double py, double pz) noexcept : x(px), y(py), z(pz), dim(3){}; Point(double py, double pz) noexcept : y(py), z(pz), dim(2){}; bool isFinite() const { return std::isfinite(x) && std::isfinite(y) && std::isfinite(z); }; double x{0}, y{0}, z{0}; unsigned int dim{0}; Loading Loading @@ -154,6 +157,10 @@ namespace mesh_converter { if(valid_) { LOG(DEBUG) << element.print(reference_); result_ = element.getObservable(reference_); if(!result_.isFinite()) { LOG(WARNING) << "Interpolated result not a finite number at " << reference_; return false; } } return valid_; Loading