Skip to content

Commit

Permalink
Add Euler2Solver unit test for second order
Browse files Browse the repository at this point in the history
This test exercises the reinit_func fix. Before, we didn't have
the correct time in the context so we didn't integrate this ODE
exactly as we should have. Now we do.
  • Loading branch information
pbauman committed Aug 25, 2016
1 parent 45744d0 commit 0b40def
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/solvers/first_order_unsteady_solver_test.C
Expand Up @@ -125,6 +125,7 @@ public:
CPPUNIT_TEST_SUITE( Euler2SolverTest );

CPPUNIT_TEST( testEuler2SolverConstantFirstOrderODE );
CPPUNIT_TEST( testEuler2SolverLinearTimeFirstOrderODE );

CPPUNIT_TEST_SUITE_END();

Expand All @@ -138,6 +139,12 @@ public:
this->run_test_with_exact_soln<ConstantFirstOrderODE>(0.5,10);
}

void testEuler2SolverLinearTimeFirstOrderODE()
{
// Need \theta = 0.5 since this has t in F.
this->set_theta(0.5);
this->run_test_with_exact_soln<LinearTimeFirstOrderODE>(0.5,10);
}
};

CPPUNIT_TEST_SUITE_REGISTRATION( EulerSolverTest );
Expand Down

0 comments on commit 0b40def

Please sign in to comment.