https://linen.dev logo
Using Catalyst with openFOAM, it executes some int...
# programming
f
Using Catalyst with openFOAM, it executes some internal python scripts and I hit a floating point exception when loading numpy library. The exception is not fatal (you can recover safely), but OpenFOAM catches it by default and stops. After hours of googling I modified icoFoam code directly with initialise=false in the argList (found here: https://github.com/pybind/pybind11/issues/1889#issuecomment-1029584553):
Copy code
// create argument list
    Foam::argList args(argc, argv, true,true,/*initialise=*/false);
    if (!args.checkRootCase())
    {
        Foam::FatalError.exit();
    }
It works, but is there a better way to remove floating point exception catching without modifying the solver code itself?