https://mooseframework.inl.gov
Loading...
Searching...
No Matches
THMTestUtils.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
13#include "MooseTypes.h"
14
15// Absolute tolerance to use for calculations that should only differ by the
16// accumulation of roundoff
17#define ABS_TOL_ROUNDOFF 1e-12
18
19// Minimum perturbation to be used in FD Jacobian computations
20#define PERTURBATION_MIN 1e-12
21
22inline Real
23computeFDPerturbation(const Real & value, const Real & relative_perturbation = REL_PERTURBATION)
24{
25 return std::max(relative_perturbation * std::abs(value), PERTURBATION_MIN);
26}
Real computeFDPerturbation(const Real &value, const Real &relative_perturbation=REL_PERTURBATION)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real