https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FloatingPointExceptionGuard.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseApp.h"
13#include "libmesh/libmesh.h"
14
19{
20public:
27 : _trapping_enabled(moose_app.getFPTrapFlag())
28 {
31 }
32
41
42private:
45};
Scope guard for starting and stopping Floating Point Exception Trapping.
~FloatingPointExceptionGuard()
Stop FPE Trapping on destruction.
const bool _trapping_enabled
Determine whether or not PFE trapping needs to be toggled off.
FloatingPointExceptionGuard(const MooseApp &moose_app)
Instantiation turns on FPE Trapping as long as trapping is enabled on the application.
Base class for MOOSE-based applications.
Definition MooseApp.h:110
void enableFPE(bool on)