Commit 426404f1 authored by Ned Coltman's avatar Ned Coltman
Browse files

Merge branch 'cherry-pick-e7830614' into 'releases/3.2'

Merge branch 'fix/test-sequential-diffusion3d' into 'master'

See merge request !2101
parents b48dc239 9784e60b
......@@ -22,6 +22,7 @@
// dumux environment
#include <type_traits>
#include <dumux/common/math.hh>
#include <dumux/common/exceptions.hh>
#include <dumux/porousmediumflow/sequential/pressureproperties.hh>
#include <map>
/**
......@@ -547,7 +548,10 @@ void FVPressure<TypeTag>::solve()
// printvector(std::cout, f_, "right hand side", "row", 10, 1, 3);
auto solver = getSolver<Solver>(problem_);
solver.solve(A_, pressure_, f_);
bool converged = solver.solve(A_, pressure_, f_);
if (!converged)
DUNE_THROW(Dumux::NumericalProblem, "Pressure solver did not converge!");
// printvector(std::cout, pressure_, "pressure", "row", 200, 1, 3);
}
......
......@@ -23,6 +23,7 @@ dumux_add_test(NAME test_diffusion3d
LABELS porousmediumflow 1p sequential
SOURCES test_diffusion3d.cc
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMAKE_GUARD "( dune-alugrid_FOUND AND HAVE_UMFPACK )"
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_diffusion3d_fv-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_diffusion3d_fv-00000.vtu
......
......@@ -22,13 +22,7 @@
#ifndef DUMUX_TEST_DIFFUSION_3D_PROBLEM_HH
#define DUMUX_TEST_DIFFUSION_3D_PROBLEM_HH
#if HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#if HAVE_UG
#include <dune/grid/uggrid.hh>
#endif
#include <dune/grid/yaspgrid.hh>
#include <dumux/material/components/constant.hh>
......@@ -40,6 +34,8 @@
#include <dumux/porousmediumflow/2p/sequential/diffusion/problem.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/velocity.hh>
#include <dumux/linear/seqsolverbackend.hh>
#include "test_diffusionspatialparams3d.hh"
namespace Dumux
......@@ -71,16 +67,8 @@ struct MimeticTest { using InheritsFrom = std::tuple<DiffusionTest, MimeticPress
} // end namespace TTag
// Set the grid type
#if HAVE_DUNE_ALUGRID
template<class TypeTag>
struct Grid<TypeTag, TTag::DiffusionTest> { using type = Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>; };
#elif HAVE_UG
template<class TypeTag>
struct Grid<TypeTag, TTag::DiffusionTest> { using type = Dune::UGGrid<3>; };
#else
template<class TypeTag>
struct Grid<TypeTag, TTag::DiffusionTest> { using type = Dune::YaspGrid<3>; };
#endif
template<class TypeTag>
struct Problem<TypeTag, TTag::DiffusionTest> { using type = TestDiffusion3DProblem<TypeTag>; };
......@@ -95,13 +83,8 @@ struct FluidSystem<TypeTag, TTag::DiffusionTest>
using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>;
};
#if HAVE_SUPERLU
template<class TypeTag>
struct LinearSolver<TypeTag, TTag::DiffusionTest> { using type = SuperLUBackend; };
#else
template<class TypeTag>
struct LinearSolver<TypeTag, TTag::DiffusionTest> { using type = ILUnRestartedGMResBackend; };
#endif
struct LinearSolver<TypeTag, TTag::DiffusionTest> { using type = UMFPackBackend; };
}
......
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