Go to the source code of this file.
◆ TEST_F()
Definition at line 14 of file TimeRampFunctionTest.C.
15{
16 const Function & fn = _fe_problem->getFunction(_fn_name);
17 const Point
p(0, 0, 0);
18
19
20 {
21 const Real test_time = 3.0;
22 const Real slope = (_final_value - _initial_value) / _ramp_duration;
23 const Real elapsed_time = test_time - _initial_time;
24 const Real test_value = _initial_value + slope * elapsed_time;
25
26 ABS_TEST(fn.
value(test_time,
p), test_value, ABS_TOL_ROUNDOFF);
27 }
28
29
30 {
31 const Real test_time = 10.0;
32 ABS_TEST(fn.
value(test_time,
p), _final_value, ABS_TOL_ROUNDOFF);
33 }
34}
virtual Real value(Real t, const Point &p) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real