9 #include "Teuchos_UnitTestHarness.hpp"
10 #include "Teuchos_XMLParameterListHelpers.hpp"
11 #include "Teuchos_TimeMonitor.hpp"
12 #include "Teuchos_DefaultComm.hpp"
16 #include "../TestUtils/Tempus_ConvergenceTestUtils.hpp"
19 namespace Tempus_Unit_Test {
23 using Teuchos::rcp_const_cast;
24 using Teuchos::rcp_dynamic_cast;
33 TEST_COMPARE(te->getName(), ==,
"TimeEventBase");
34 te->setName(
"TestName");
35 TEST_COMPARE(te->getName(), ==,
"TestName");
37 TEST_COMPARE(te->isTime(0.0), ==,
false);
38 TEST_FLOATING_EQUALITY(te->timeToNextEvent(0.0), te->getDefaultTime(), 1.0e-14);
39 TEST_FLOATING_EQUALITY(te->timeOfNextEvent(0.0), te->getDefaultTime(), 1.0e-14);
40 TEST_COMPARE(te->eventInRange(0.0, 1.0), ==,
false);
42 TEST_COMPARE(te->isIndex(0), ==,
false);
43 TEST_COMPARE(te->indexToNextEvent(0), ==, te->getDefaultIndex());
44 TEST_COMPARE(te->indexOfNextEvent(0), ==, te->getDefaultIndex());
45 TEST_COMPARE(te->eventInRange(0, 10), ==,
false);
48 TEST_COMPARE(te->isIndex(1), ==,
false);
49 TEST_COMPARE(te->indexToNextEvent(1), ==, te->getDefaultIndex());
50 TEST_COMPARE(te->indexOfNextEvent(1), ==, te->getDefaultIndex());
51 TEST_COMPARE(te->eventInRangeIndex(1,4), ==,
false);
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)
This class defines time events which can be used to "trigger" an action. Time events are points in ti...