ikarus-project / ikarus

Ikarus is a C++-based library that uses DUNE modules to solve partial differential equations with the finite element method and more.
https://ikarus-project.github.io/
Other
6 stars 3 forks source link

Trap floating-point exceptions in tests #330

Open tarun-mitruka opened 2 months ago

tarun-mitruka commented 2 months ago

Using the header cfenv, floating-point exceptions can be trapped, for instance via

#include <cfenv>
feenableexcept(FE_ALL_EXCEPT & ~FE_INEXACT);

Explore all such options and include it in every test.. to avoid, example, division-by-zero, nans, infs, etc..