Commit 11826ff9 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[2p][incompressible] use unified main file for cc and box

parent e0af954f
......@@ -2,7 +2,7 @@ dune_symlink_to_source_files(FILES "test_2p.input")
# using tpfa
dune_add_test(NAME test_2p_incompressible_tpfa
SOURCES test_2p_cc.cc
SOURCES test_2p_fv.cc
COMPILE_DEFINITIONS TYPETAG=TwoPIncompressibleTpfa
COMMAND python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
--script fuzzy
......@@ -12,7 +12,8 @@ dune_add_test(NAME test_2p_incompressible_tpfa
# using box
dune_add_test(NAME test_2p_incompressible_box
SOURCES test_2p_box.cc
SOURCES test_2p_fv.cc
COMPILE_DEFINITIONS TYPETAG=TwoPIncompressibleBox
COMMAND python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
--script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/lensbox-reference.vtu
......@@ -21,7 +22,7 @@ dune_add_test(NAME test_2p_incompressible_box
# using mpfa
dune_add_test(NAME test_2p_incompressible_mpfa
SOURCES test_2p_cc.cc
SOURCES test_2p_fv.cc
COMPILE_DEFINITIONS TYPETAG=TwoPIncompressibleMpfa
COMMAND python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
--script fuzzy
......
......@@ -123,7 +123,7 @@ int main(int argc, char** argv) try
// the solution vector
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
SolutionVector x(leafGridView.size(0));
SolutionVector x(fvGridGeometry->numDofs());
problem->applyInitialSolution(x);
auto xOld = x;
......@@ -160,11 +160,11 @@ int main(int argc, char** argv) try
// the linear solver
using LinearSolver = AMGBackend<TypeTag>;
auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->elementMapper());
auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper());
// the non-linear solver
using NewtonController = NewtonController<TypeTag>;
using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>;
using NewtonController = Dumux::NewtonController<TypeTag>;
using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>;
auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop);
NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment