Commit 917bb5cb authored by Andreas Lauser's avatar Andreas Lauser
Browse files

box models: make all tests compile without PDELab

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4827 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent e667ab13
......@@ -141,13 +141,14 @@ private:
{
Scalar lambda = 1.0;
Scalar globDef;
SolutionVector tmp(this->method().model(), 0.0);
SolutionVector tmp(u);
Scalar oldGlobDef = this->method().model().globalResidual(tmp);
int n = 0;
while (true) {
u *= -lambda;
u += uOld;
globDef = this->method().model().globalResidual(tmp);
if (globDef < oldGlobDef || lambda <= 1.0/8) {
......
......@@ -522,7 +522,7 @@ public:
{
typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField;
SolutionVector globalResid(asImp_(), 0.0);
SolutionVector globalResid(u);
asImp_().globalResidual(globalResid, u);
// create the required scalar fields
......
......@@ -137,7 +137,7 @@ private:
{
Scalar lambda = 1.0;
Scalar globDef;
SolutionVector tmp(this->model_(), 0.0);
SolutionVector tmp(u);
Scalar oldGlobDef = this->model_().globalResidual(tmp, uOld);
int n = 0;
......
......@@ -58,6 +58,7 @@ public:
// Set the grid type
SET_TYPE_PROP(OnePTestProblem, Grid, Dune::YaspGrid<3>);
#if HAVE_DUNE_PDELAB
SET_PROP(OnePTestProblem, LocalFEMSpace)
{
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
......@@ -68,6 +69,7 @@ public:
typedef Dune::PDELab::Q1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for cubes
// typedef Dune::PDELab::P1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for simplices
};
#endif // HAVE_DUNE_PDELAB
SET_INT_PROP(OnePTestProblem, NewtonLinearSolverVerbosity, 0);
......
......@@ -56,6 +56,7 @@ SET_PROP(TissueTumorProblem, Grid)
#endif
};
#if HAVE_DUNE_PDELAB
SET_PROP(TissueTumorProblem, LocalFEMSpace)
{
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
......@@ -66,6 +67,8 @@ public:
typedef Dune::PDELab::Q1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for cubes
// typedef Dune::PDELab::P1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for simplices
};
#endif // HAVE_DUNE_PDELAB
// Set the problem property
SET_PROP(TissueTumorProblem, Problem)
......
......@@ -54,6 +54,8 @@ SET_PROP(InjectionProblem, Grid)
typedef Dune::SGrid<2,2> type;
};
#if HAVE_DUNE_PDELAB
SET_PROP(InjectionProblem, LocalFEMSpace)
{
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
......@@ -64,6 +66,7 @@ public:
typedef Dune::PDELab::Q1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for cubes
// typedef Dune::PDELab::P1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for simplices
};
#endif // HAVE_DUNE_PDELAB
// Set the problem property
SET_PROP(InjectionProblem, Problem)
......
......@@ -54,6 +54,7 @@ SET_PROP(WaterAirProblem, Grid)
typedef Dune::YaspGrid<2> type;
};
#if HAVE_DUNE_PDELAB
SET_PROP(WaterAirProblem, LocalFEMSpace)
{
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
......@@ -64,6 +65,7 @@ public:
typedef Dune::PDELab::Q1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for cubes
// typedef Dune::PDELab::P1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for simplices
};
#endif // HAVE_DUNE_PDELAB
// Set the problem property
SET_PROP(WaterAirProblem, Problem)
......
......@@ -63,6 +63,7 @@ SET_PROP(InjectionProblem2PNI, Grid)
#endif
};
#if HAVE_DUNE_PDELAB
SET_PROP(InjectionProblem2PNI, LocalFEMSpace)
{
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
......@@ -73,6 +74,7 @@ public:
typedef Dune::PDELab::Q1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for cubes
// typedef Dune::PDELab::P1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for simplices
};
#endif // HAVE_DUNE_PDELAB
// Set the problem property
SET_PROP(InjectionProblem2PNI, Problem)
......
......@@ -54,6 +54,7 @@ SET_PROP(RichardsLensProblem, Grid) { typedef Dune::SGrid<2, 2> type; };
//SET_TYPE_PROP(RichardsLensProblem, Grid, Dune::YaspGrid<2>);
#endif
#if HAVE_DUNE_PDELAB
// set the local finite element space to be used to calculate the
// gradients in the flux calculation
SET_PROP(RichardsLensProblem, LocalFEMSpace)
......@@ -66,6 +67,7 @@ public:
typedef Dune::PDELab::Q1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for cubes
// typedef Dune::PDELab::P1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for simplices
};
#endif // HAVE_DUNE_PDELAB
// Set the phsical problem to be solved
SET_PROP(RichardsLensProblem, Problem)
......
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