diff --git a/.hgsubstate b/.hgsubstate index 2ec64ad..81e2c49 100644 --- a/.hgsubstate +++ b/.hgsubstate @@ -1 +1 @@ -335bb8e27ad82ccf4b60c2a0042041a704d50691 dune/porsol/opmpressure +21bc2a469f51c79031128235a9f696e9ca20d351 dune/porsol/opmpressure diff --git a/examples/tpfa_compressible_solver_test.cpp b/examples/tpfa_compressible_solver_test.cpp index a79df1b..1c63e09 100644 --- a/examples/tpfa_compressible_solver_test.cpp +++ b/examples/tpfa_compressible_solver_test.cpp @@ -53,7 +53,7 @@ template -void test_flowsolver(const GI& g, const RI& r) +void test_flowsolver(const GI& g, const RI& r, double dt) { typedef typename GI::CellIterator CI; typedef typename CI::FaceIterator FI; @@ -84,7 +84,6 @@ void test_flowsolver(const GI& g, const RI& r) src.back() = -1.0; } std::vector cell_pressure(g.numberOfCells(), 0.0); - double dt = 1; solver.solve(r, cell_pressure, sat, flow_bc, src, dt, 1e-8, 3, 1); @@ -100,8 +99,8 @@ void test_flowsolver(const GI& g, const RI& r) getCellPressure(cell_pressure, g, soln); Dune::VTKWriter vtkwriter(g.grid().leafView()); - vtkwriter.addCellData(cell_velocity_flat, "velocity", dim); vtkwriter.addCellData(cell_pressure, "pressure"); + vtkwriter.addCellData(cell_velocity_flat, "velocity", dim); vtkwriter.write("testsolution-" + boost::lexical_cast(0), Dune::VTKOptions::ascii); } @@ -122,7 +121,9 @@ int main(int argc, char** argv) // Make the grid interface. Dune::GridInterfaceEuler g(grid); + double dt = param.getDefault("dt", 1.0); + // Run test. - test_flowsolver<3>(g, res_prop); + test_flowsolver<3>(g, res_prop, dt); }