12 #include "Teuchos_DefaultComm.hpp"
14 #include "Tempus_TimeEventRangeIndex.hpp"
16 #include "../TestUtils/Tempus_ConvergenceTestUtils.hpp"
19 namespace Tempus_Unit_Test {
23 using Teuchos::rcp_const_cast;
24 using Teuchos::rcp_dynamic_cast;
43 TEST_COMPARE(te->timeToNextEvent(1.0), ==, te->getDefaultTime());
44 TEST_COMPARE(te->timeOfNextEvent(1.0), ==, te->getDefaultTime());
54 "TestName", -1, 10, 2));
72 te->setName(
"TestName");
90 te->setIndexStride(2);
97 te->setIndexRange(-5, 5, 3);
110 te->setIndexStart(1);
111 te->setIndexStop (5);
116 te->setIndexStride(-1);
121 te->setIndexStride(5);
132 te->setIndexRange(-5, 5, 3);
154 te->setIndexRange(-5, 5, 3);
176 te->setIndexRange(-5, 5, 3);
198 te->setIndexRange(-5, 5, 3);
215 TEST_COMPARE(te->eventInRangeIndex(-6.0, -3), ==, true );
216 TEST_COMPARE(te->eventInRangeIndex(-5.0, -3), ==, true );
217 TEST_COMPARE(te->eventInRangeIndex(-4.0, -3), ==,
false);
TimeEventRangeIndex specifies a start, stop and stride index.
#define TEST_COMPARE(v1, comp, v2)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)