diff --git a/dumux/freeflow/stokes/stokesfluxvariables.hh b/dumux/freeflow/stokes/stokesfluxvariables.hh index c338272db454256bb17487520bd3cfe2ef846584..15029d7e9b699306224e7d51087af126f886b35c 100644 --- a/dumux/freeflow/stokes/stokesfluxvariables.hh +++ b/dumux/freeflow/stokes/stokesfluxvariables.hh @@ -63,6 +63,7 @@ class StokesFluxVariables typedef typename FVElementGeometry::SubControlVolumeFace SCVFace; public: + //! \brief The constructor StokesFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, diff --git a/dumux/freeflow/stokes/stokespropertydefaults.hh b/dumux/freeflow/stokes/stokespropertydefaults.hh index d2fb953ff3470129b0ce5d55b43248b4e805758e..bbd7e996bacf9748f2c48b1c981131544981fa5e 100644 --- a/dumux/freeflow/stokes/stokespropertydefaults.hh +++ b/dumux/freeflow/stokes/stokespropertydefaults.hh @@ -78,6 +78,8 @@ SET_TYPE_PROP(BoxStokes, NewtonController, StokesNewtonController<TypeTag>); #if HAVE_SUPERLU SET_TYPE_PROP(BoxStokes, LinearSolver, SuperLUBackend<TypeTag>); +#elif HAVE_UMFPACK +SET_TYPE_PROP(BoxStokes, LinearSolver, UMFPackBackend<TypeTag>); #endif //! the Model property diff --git a/test/freeflow/navierstokes/navierstokestestproblem.hh b/test/freeflow/navierstokes/navierstokestestproblem.hh index 0c45b1f7025741f5283f8f351250cf3b4873e333..3c06d2e33b3f56bd51ce04df3e124b02afa123a6 100644 --- a/test/freeflow/navierstokes/navierstokestestproblem.hh +++ b/test/freeflow/navierstokes/navierstokestestproblem.hh @@ -68,13 +68,11 @@ namespace Dumux // Set calculation to Navier-Stokes, not Stokes SET_BOOL_PROP(NavierStokesTestProblem, EnableNavierStokes, true); - SET_PROP(NavierStokesTestProblem, Fluid) - { - private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - public: - typedef Dumux::GasPhase<Scalar, Dumux::N2ConstViscosity<Scalar> > type; - }; + // Use nitrogen with a constant viscosity as gas phase + SET_TYPE_PROP(NavierStokesTestProblem, Fluid, + Dumux::GasPhase<typename GET_PROP_TYPE(TypeTag, Scalar), + Dumux::N2ConstViscosity<typename GET_PROP_TYPE(TypeTag, Scalar)> >); + // Scalar is set to type double SET_TYPE_PROP(BoxStokes, Scalar, double); } diff --git a/test/freeflow/navierstokes/test_navierstokes.cc b/test/freeflow/navierstokes/test_navierstokes.cc index 9f035d50e15dfb85618a395e8cad2751be1e8c55..7bb7e20163c56c79ca75a3794a705ee70edb94ce 100644 --- a/test/freeflow/navierstokes/test_navierstokes.cc +++ b/test/freeflow/navierstokes/test_navierstokes.cc @@ -55,7 +55,8 @@ int main(int argc, char** argv) typedef TTAG(NavierStokesTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); #else - std::cout << "Test skipped, it needs SuperLU and ALUGrid or UG." << std::endl; +#warning "You need to have SuperLU and ALUGrid or UG to run this test." + std::cout << "You need to have SuperLU and ALUGrid or UG to run this test." << std::endl; return 77; #endif } diff --git a/test/freeflow/stokes/stokestestproblem.hh b/test/freeflow/stokes/stokestestproblem.hh index f6541a442cc2781966cd033d167ad674dfc2ffba..d87fc4558e2bb04c3c4c94ea1f9ae7574ac134ca 100644 --- a/test/freeflow/stokes/stokestestproblem.hh +++ b/test/freeflow/stokes/stokestestproblem.hh @@ -49,18 +49,10 @@ SET_TYPE_PROP(StokesTestProblem, Grid, Dune::YaspGrid<2>); // Set the problem property SET_TYPE_PROP(StokesTestProblem, Problem, Dumux::StokesTestProblem<TypeTag>); -SET_PROP(StokesTestProblem, Fluid) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef Dumux::GasPhase<Scalar, Dumux::N2<Scalar> > type; -}; -//! Scalar is set to type long double for higher accuracy -SET_TYPE_PROP(BoxStokes, Scalar, double); - -//! Disable unsymmetrized velocity gradient by default -SET_BOOL_PROP(StokesTestProblem, EnableUnsymmetrizedVelocityGradient, false); +// Use nitrogen as gas phase +SET_TYPE_PROP(StokesTestProblem, Fluid, + Dumux::GasPhase<typename GET_PROP_TYPE(TypeTag, Scalar), + Dumux::N2<typename GET_PROP_TYPE(TypeTag, Scalar)> >); } /*! diff --git a/test/freeflow/stokes/test_stokes.cc b/test/freeflow/stokes/test_stokes.cc index 7515d12576b2390c8e4e9bb35411845e932610cc..bada422a19b4509b11531e2f776c22bf0308f3b8 100644 --- a/test/freeflow/stokes/test_stokes.cc +++ b/test/freeflow/stokes/test_stokes.cc @@ -39,8 +39,8 @@ void usage(const char *progName, const std::string &errorMsg) errorMessageOut += " [options]\n"; errorMessageOut += errorMsg; errorMessageOut += "\n\nThe List of Mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd The end of the simulation. [s] \n" - "\t-TimeManager.DtInitial The initial timestep size. [s] \n" + "\t-TimeManager.TEnd The end of the simulation. [s] \n" + "\t-TimeManager.DtInitial The initial timestep size. [s] \n" "\t-Grid.File The file name of the file containing the grid \n" "\t definition in DGF format\n"; @@ -51,12 +51,12 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { -#if HAVE_SUPERLU +#if (HAVE_SUPERLU || HAVE_UMFPACK) typedef TTAG(StokesTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); #else -#warning "No SuperLU installed. Stokes currently only works with SuperLU." - std::cout << "No SuperLU installed. Stokes currently only works with SuperLU." << std::endl; - return 1; +#warning "You need to have SuperLU or UMFPack installed to run this test." + std::cerr << "You need to have SuperLU or UMFPack installed to run this test\n"; + return 77; #endif } diff --git a/test/freeflow/stokes2c/stokes2ctestproblem.hh b/test/freeflow/stokes2c/stokes2ctestproblem.hh index f741805ad0c6148c3413d836564b6e26356c0b38..a3ae5f3433f6f6e8b44c26ca66576b36364cac54 100644 --- a/test/freeflow/stokes2c/stokes2ctestproblem.hh +++ b/test/freeflow/stokes2c/stokes2ctestproblem.hh @@ -48,15 +48,9 @@ SET_TYPE_PROP(Stokes2cTestProblem, Grid, Dune::YaspGrid<2>); // Set the problem property SET_TYPE_PROP(Stokes2cTestProblem, Problem, Dumux::Stokes2cTestProblem<TypeTag>); -//! Select the fluid system -SET_PROP(BoxStokesnc, FluidSystem) -{ - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef Dumux::FluidSystems::H2OAir<Scalar> type; -}; - -//! Scalar is set to type long double for higher accuracy -//SET_TYPE_PROP(BoxStokes, Scalar, long double); +// Select the fluid system +SET_TYPE_PROP(Stokes2cTestProblem, FluidSystem, + Dumux::FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>); } /*! diff --git a/test/freeflow/stokes2c/test_stokes2c.cc b/test/freeflow/stokes2c/test_stokes2c.cc index 1f198fbd50809cc53d2a29a5a4825924c74db051..3fe68acfb02e8940a9fbaa0e2ab53a8bc39c27a0 100644 --- a/test/freeflow/stokes2c/test_stokes2c.cc +++ b/test/freeflow/stokes2c/test_stokes2c.cc @@ -39,8 +39,8 @@ void usage(const char *progName, const std::string &errorMsg) errorMessageOut += " [options]\n"; errorMessageOut += errorMsg; errorMessageOut += "\n\nThe List of Mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd The end of the simulation. [s] \n" - "\t-TimeManager.DtInitial The initial timestep size. [s] \n" + "\t-TimeManager.TEnd The end of the simulation. [s] \n" + "\t-TimeManager.DtInitial The initial timestep size. [s] \n" "\t-Grid.File The file name of the file containing the grid \n" "\t definition in DGF format\n"; @@ -51,12 +51,12 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { -#if HAVE_SUPERLU +#if (HAVE_SUPERLU || HAVE_UMFPACK) typedef TTAG(Stokes2cTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); #else -#warning "No SuperLU installed. Stokes currently only works with SuperLU." - std::cout << "No SuperLU installed. Stokes currently only works with SuperLU." << std::endl; - return 1; +#warning "You need to have SuperLU or UMFPack installed to run this test." + std::cerr << "You need to have SuperLU or UMFPack installed to run this test\n"; + return 77; #endif } diff --git a/test/freeflow/stokes2cni/stokes2cnitestproblem.hh b/test/freeflow/stokes2cni/stokes2cnitestproblem.hh index f8f2750d35a23be985faf82b8d11ee87b1f3b85b..33b187e6c8f7be5c5af3590a5ed859349e655f2c 100644 --- a/test/freeflow/stokes2cni/stokes2cnitestproblem.hh +++ b/test/freeflow/stokes2cni/stokes2cnitestproblem.hh @@ -52,22 +52,15 @@ SET_TYPE_PROP(Stokes2cniTestProblem, Grid, Dune::YaspGrid<2>); // Set the problem property SET_TYPE_PROP(Stokes2cniTestProblem, Problem, Stokes2cniTestProblem<TypeTag>); -//! Select the fluid system -SET_PROP(Stokes2cniTestProblem, FluidSystem) -{ - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef Dumux::FluidSystems::H2OAir<Scalar> type; -}; - -#if HAVE_UMFPACK -SET_TYPE_PROP(Stokes2cniTestProblem, LinearSolver, UMFPackBackend<TypeTag>); -#endif - -//! Scalar is set to type long double for higher accuracy -//SET_TYPE_PROP(Stokes2cniTestProblem, Scalar, long double); +// Select the fluid system +SET_TYPE_PROP(Stokes2cniTestProblem, FluidSystem, + Dumux::FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>); +// Use Pardiso as linear solver, if available #if HAVE_PARDISO SET_TYPE_PROP(Stokes2cniTestProblem, LinearSolver, PardisoBackend<TypeTag>); +#elif HAVE_UMFPACK +SET_TYPE_PROP(Stokes2cniTestProblem, LinearSolver, UMFPackBackend<TypeTag>); #endif } diff --git a/test/freeflow/stokes2cni/test_stokes2cni.cc b/test/freeflow/stokes2cni/test_stokes2cni.cc index e86b807108f6b889e911293c779e5679617f9420..ec12d6bce313e26593a8e6aad5802fe4075adade 100644 --- a/test/freeflow/stokes2cni/test_stokes2cni.cc +++ b/test/freeflow/stokes2cni/test_stokes2cni.cc @@ -39,8 +39,8 @@ void usage(const char *progName, const std::string &errorMsg) errorMessageOut += " [options]\n"; errorMessageOut += errorMsg; errorMessageOut += "\n\nThe List of Mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd The end of the simulation. [s] \n" - "\t-TimeManager.DtInitial The initial timestep size. [s] \n" + "\t-TimeManager.TEnd The end of the simulation. [s] \n" + "\t-TimeManager.DtInitial The initial timestep size. [s] \n" "\t-Grid.File The file name of the file containing the grid \n" "\t definition in DGF format\n"; @@ -51,12 +51,12 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { -#if HAVE_SUPERLU +#if (HAVE_PARDISO || HAVE_UMFPACK) typedef TTAG(Stokes2cniTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); #else -#warning "No SuperLU installed. Stokes currently only works with SuperLU." - std::cout << "No SuperLU installed. Stokes currently only works with SuperLU." << std::endl; - return 1; +#warning "You need to have Pardiso or UMFPack installed to run this test." + std::cerr << "You need to have Pardiso or UMFPack installed to run this test\n"; + return 77; #endif } diff --git a/test/freeflow/zeroeq/test_zeroeq.cc b/test/freeflow/zeroeq/test_zeroeq.cc index 180c80bcdd9b5750a2af591fb0143d294c4896ed..15f18bae550377599237cb132c37c6695a36ca73 100644 --- a/test/freeflow/zeroeq/test_zeroeq.cc +++ b/test/freeflow/zeroeq/test_zeroeq.cc @@ -56,6 +56,12 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { +#if (HAVE_SUPERLU || HAVE_UMFPACK) typedef TTAG(ZeroEqTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); +#else +#warning "You need to have SuperLU or UMFPack installed to run this test." + std::cerr << "You need to have SuperLU or UMFPack installed to run this test\n"; + return 77; +#endif } diff --git a/test/freeflow/zeroeq/test_zeroeq_channel.cc b/test/freeflow/zeroeq/test_zeroeq_channel.cc index 41ab633685d0b5b822a3b5dce061d6e030ad6bfc..09bff71eddd9acbb501b9fd1d6081a2983c40528 100644 --- a/test/freeflow/zeroeq/test_zeroeq_channel.cc +++ b/test/freeflow/zeroeq/test_zeroeq_channel.cc @@ -57,6 +57,12 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { +#if HAVE_UMFPACK typedef TTAG(ZeroEqChannelTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); +#else +#warning "You need to have UMFPack installed to run this test." + std::cerr << "You need to have UMFPack installed to run this test\n"; + return 77; +#endif } diff --git a/test/freeflow/zeroeq/zeroeqchanneltestproblem.hh b/test/freeflow/zeroeq/zeroeqchanneltestproblem.hh index 30de8649836c939ea77a1250dc5a2741a5785983..84278a81251ff5220a564202f4adc326c8c1018a 100644 --- a/test/freeflow/zeroeq/zeroeqchanneltestproblem.hh +++ b/test/freeflow/zeroeq/zeroeqchanneltestproblem.hh @@ -55,14 +55,10 @@ SET_TYPE_PROP(ZeroEqChannelTestProblem, Grid, Dune::YaspGrid<2>); // Set the problem property SET_TYPE_PROP(ZeroEqChannelTestProblem, Problem, Dumux::ZeroEqChannelTestProblem<TypeTag>); -// Set the fluids -SET_PROP(ZeroEqChannelTestProblem, Fluid) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef Dumux::GasPhase<Scalar, Dumux::Air<Scalar> > type; -}; +// Set the air as the gas phase +SET_TYPE_PROP(ZeroEqChannelTestProblem, Fluid, + Dumux::GasPhase<typename GET_PROP_TYPE(TypeTag, Scalar), + Dumux::Air<typename GET_PROP_TYPE(TypeTag, Scalar)> >); // Disable gravity SET_BOOL_PROP(ZeroEqChannelTestProblem, ProblemEnableGravity, false); @@ -72,6 +68,11 @@ SET_BOOL_PROP(ZeroEqChannelTestProblem, BBoxMaxIsWall, false); // Do not write sub-control volume data SET_SCALAR_PROP(ZeroEqChannelTestProblem, ZeroEqWriteAllSCVData, -1); + +#if HAVE_UMFPACK +// Use UMFPack as linear solver +SET_TYPE_PROP(ZeroEqChannelTestProblem, LinearSolver, UMFPackBackend<TypeTag>); +#endif } /*! diff --git a/test/freeflow/zeroeq/zeroeqtestproblem.hh b/test/freeflow/zeroeq/zeroeqtestproblem.hh index a85845fac78830b190efaff9da214b5a826ad62a..e13159c30c3d769637202151a7a99dd440294916 100644 --- a/test/freeflow/zeroeq/zeroeqtestproblem.hh +++ b/test/freeflow/zeroeq/zeroeqtestproblem.hh @@ -58,14 +58,10 @@ SET_TYPE_PROP(ZeroEqTestProblem, Grid, Dune::YaspGrid<2>); // Set the problem property SET_TYPE_PROP(ZeroEqTestProblem, Problem, Dumux::ZeroEqTestProblem<TypeTag>); -// Set the fluids -SET_PROP(ZeroEqTestProblem, Fluid) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef Dumux::GasPhase<Scalar, Dumux::Air<Scalar> > type; -}; +// Set the air as the gas phase +SET_TYPE_PROP(ZeroEqTestProblem, Fluid, + Dumux::GasPhase<typename GET_PROP_TYPE(TypeTag, Scalar), + Dumux::Air<typename GET_PROP_TYPE(TypeTag, Scalar)> >); // Disable gravity SET_BOOL_PROP(ZeroEqTestProblem, ProblemEnableGravity, false); diff --git a/test/freeflow/zeroeq2c/test_zeroeq2c.cc b/test/freeflow/zeroeq2c/test_zeroeq2c.cc index d9968d30b56fe01fb9533b09168ebfea50f4d2dc..0896870887ca746efef0d743d7fa69a54e4a46ca 100644 --- a/test/freeflow/zeroeq2c/test_zeroeq2c.cc +++ b/test/freeflow/zeroeq2c/test_zeroeq2c.cc @@ -59,6 +59,12 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { +#if (HAVE_SUPERLU || HAVE_UMFPACK) typedef TTAG(ZeroEq2cTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); +#else +#warning "You need to have SuperLU or UMFPack installed to run this test." + std::cerr << "You need to have SuperLU or UMFPack installed to run this test\n"; + return 77; +#endif } diff --git a/test/freeflow/zeroeq2c/zeroeq2ctestproblem.hh b/test/freeflow/zeroeq2c/zeroeq2ctestproblem.hh index 226d58a1b09c37f000f29840ec63ef866de7d13d..12c3e695ee55713c3d6da69aeab87e81b7b01bda 100644 --- a/test/freeflow/zeroeq2c/zeroeq2ctestproblem.hh +++ b/test/freeflow/zeroeq2c/zeroeq2ctestproblem.hh @@ -56,13 +56,8 @@ SET_TYPE_PROP(ZeroEq2cTestProblem, Grid, Dune::YaspGrid<2>); SET_TYPE_PROP(ZeroEq2cTestProblem, Problem, Dumux::ZeroEq2cTestProblem<TypeTag>); // Select the fluid system -SET_PROP(ZeroEq2cTestProblem, FluidSystem) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef Dumux::FluidSystems::H2OAir<Scalar> type; -}; +SET_TYPE_PROP(ZeroEq2cTestProblem, FluidSystem, + Dumux::FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>); // Disable gravity SET_BOOL_PROP(ZeroEq2cTestProblem, ProblemEnableGravity, false); diff --git a/test/freeflow/zeroeq2cni/test_zeroeq2cni.cc b/test/freeflow/zeroeq2cni/test_zeroeq2cni.cc index d53785b98cc08abe68fca9dd3520cc1e2f421895..c5caf316e53a4726d3c97f43747e5ff591c565c5 100644 --- a/test/freeflow/zeroeq2cni/test_zeroeq2cni.cc +++ b/test/freeflow/zeroeq2cni/test_zeroeq2cni.cc @@ -62,6 +62,12 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { +#if (HAVE_SUPERLU || HAVE_UMFPACK) typedef TTAG(ZeroEq2cniTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); +#else +#warning "You need to have SuperLU or UMFPack installed to run this test." + std::cerr << "You need to have SuperLU or UMFPack installed to run this test\n"; + return 77; +#endif } diff --git a/test/freeflow/zeroeq2cni/zeroeq2cnitestproblem.hh b/test/freeflow/zeroeq2cni/zeroeq2cnitestproblem.hh index 678f782b11061e31cf8ba0470fd625fc4dcb2d05..f361151c67b210a7f09e9790707281acb8e56db7 100644 --- a/test/freeflow/zeroeq2cni/zeroeq2cnitestproblem.hh +++ b/test/freeflow/zeroeq2cni/zeroeq2cnitestproblem.hh @@ -56,13 +56,8 @@ SET_TYPE_PROP(ZeroEq2cniTestProblem, Grid, Dune::YaspGrid<2>); SET_TYPE_PROP(ZeroEq2cniTestProblem, Problem, Dumux::ZeroEq2cniTestProblem<TypeTag>); // Select the fluid system -SET_PROP(ZeroEq2cniTestProblem, FluidSystem) -{ -private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -public: - typedef Dumux::FluidSystems::H2OAir<Scalar> type; -}; +SET_TYPE_PROP(ZeroEq2cniTestProblem, FluidSystem, + Dumux::FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>); // Disable gravity SET_BOOL_PROP(ZeroEq2cniTestProblem, ProblemEnableGravity, false);