GRINS-0.8.0
List of all members | Static Public Member Functions
GRINSTesting::TestingUtils Class Reference

#include <testing_utils.h>

Static Public Member Functions

static libMesh::Real abs_tol_from_rel_tol (libMesh::Real exact, libMesh::Real rel_tol)
 Get absolute tolerance from input relative tol. More...
 
static libMesh::Real epsilon ()
 Convenience function. More...
 

Detailed Description

Definition at line 36 of file testing_utils.h.

Member Function Documentation

static libMesh::Real GRINSTesting::TestingUtils::abs_tol_from_rel_tol ( libMesh::Real  exact,
libMesh::Real  rel_tol 
)
inlinestatic

Get absolute tolerance from input relative tol.

CppUnit uses absolute tolerance for double tests. This will let the user input a relative tolerance and an exact value to get back the corresponding absolute tolerance.

Definition at line 44 of file testing_utils.h.

Referenced by GRINSTesting::NASAThermoTestBase::test_cp_common(), GRINSTesting::NASAThermoTestBase::test_h_common(), and GRINSTesting::KineticsTestBase::test_omega_dot_common().

45  {
46  return std::abs(exact)*rel_tol;
47  }
static libMesh::Real GRINSTesting::TestingUtils::epsilon ( )
inlinestatic

Convenience function.

Definition at line 50 of file testing_utils.h.

Referenced by GRINSTesting::AntiochAirNASA9ThermoTest::test_cp(), GRINSTesting::AntiochAirNASA9ThermoTest::test_hs(), and GRINSTesting::AntiochAirNASA9KineticsTest::test_omega_dot().

51  {
52  return std::numeric_limits<libMesh::Real>::epsilon();
53  }

The documentation for this class was generated from the following file:

Generated on Tue Dec 19 2017 12:47:33 for GRINS-0.8.0 by  doxygen 1.8.9.1