14 namespace Tempus_Unit_Test {
20 static double PI = M_PI;
21 static double eps = 1.0e-14;
30 std::vector<double> scales;
31 scales.push_back(1.0);
32 scales.push_back(100.0);
33 scales.push_back(0.01);
34 scales.push_back(1.0e-28);
35 scales.push_back(1.0e+28);
37 std::vector<double> numbers;
38 numbers.push_back(one);
39 numbers.push_back(
PI);
41 for (
auto& s : scales) {
42 out <<
" *****************************" << std::endl;
43 out <<
" s, eps = " << s <<
", " <<
eps << std::endl;
58 for (
auto& n : numbers) {
59 out <<
" n = " << n << std::endl;
74 out <<
" *****************************" << std::endl;
82 double numTol = Tempus::numericalTol<double>();
86 std::vector<double> scales;
87 scales.push_back(1.0);
88 scales.push_back(100.0);
89 scales.push_back(0.01);
90 scales.push_back(1.0e-28);
91 scales.push_back(1.0e+28);
93 std::vector<double> numbers;
94 numbers.push_back(zero);
95 numbers.push_back(one);
96 numbers.push_back(
PI);
98 for (
auto& s : scales) {
99 for (
auto& n : numbers) {
100 out <<
" *****************************" << std::endl;
101 out <<
" n, s, eps = " << n <<
", " << s <<
", " <<
eps << std::endl;
124 out <<
" *****************************" << std::endl;
136 std::vector<double> scales;
137 scales.push_back(1.0);
138 scales.push_back(100.0);
139 scales.push_back(0.01);
140 scales.push_back(1.0e-28);
141 scales.push_back(1.0e+28);
143 std::vector<double> numbers;
144 numbers.push_back(zero);
145 numbers.push_back(one);
146 numbers.push_back(
PI);
148 for (
auto& s : scales) {
149 for (
auto& n : numbers) {
150 out <<
" *****************************" << std::endl;
151 out <<
" n, s, eps = " << n <<
", " << s <<
", " <<
eps << std::endl;
166 out <<
" *****************************" << std::endl;
#define TEST_COMPARE(v1, comp, v2)
bool approxEqual(Scalar a, Scalar b, Scalar relTol=numericalTol< Scalar >())
Test if values are approximately equal within the relative tolerance.
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)
bool approxEqualAbsTol(Scalar a, Scalar b, Scalar absTol)
Test if values are approximately equal within the absolute tolerance.
bool approxEqualScale(Scalar a, Scalar b, Scalar scale, Scalar relTol=numericalTol< Scalar >())