From f2370a73bc89d5f736863ead8e592c830fc9f697 Mon Sep 17 00:00:00 2001
From: Andreas Lauser <and@poware.org>
Date: Wed, 8 Dec 2010 15:54:34 +0000
Subject: [PATCH] box models: do not include PDELab headers if HAVE_DUNE_PDELAB
 is false

now the box problems can be compiled without having any PDELab files around...

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4829 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/boxmodels/common/boxpropertydefaults.hh    |  2 ++
 dumux/boxmodels/common/pdelabboxassembler.hh     |  2 ++
 dumux/boxmodels/common/pdelabboxlocaloperator.hh |  4 ++++
 dumux/common/pdelabpreconditioner.hh             |  1 +
 dumux/nonlinear/newtoncontroller.hh              | 15 +++++++++++++++
 5 files changed, 24 insertions(+)

diff --git a/dumux/boxmodels/common/boxpropertydefaults.hh b/dumux/boxmodels/common/boxpropertydefaults.hh
index 2e708a936c..638e139160 100644
--- a/dumux/boxmodels/common/boxpropertydefaults.hh
+++ b/dumux/boxmodels/common/boxpropertydefaults.hh
@@ -33,9 +33,11 @@
 #include "boxelementvolumevariables.hh"
 #include "boxvolumevariables.hh"
 
+#if HAVE_DUNE_PDELAB
 #include <dune/pdelab/finiteelementmap/p1fem.hh>
 #include <dune/pdelab/finiteelementmap/q1fem.hh>
 #include <dune/pdelab/backend/istlmatrixbackend.hh>
+#endif // HAVE_DUNE_PDELAB
 
 #include <dumux/common/boundarytypes.hh>
 #include <dumux/common/timemanager.hh>
diff --git a/dumux/boxmodels/common/pdelabboxassembler.hh b/dumux/boxmodels/common/pdelabboxassembler.hh
index 5d1d8a023e..2f3cce1dbf 100644
--- a/dumux/boxmodels/common/pdelabboxassembler.hh
+++ b/dumux/boxmodels/common/pdelabboxassembler.hh
@@ -22,7 +22,9 @@
 #ifndef DUMUX_PDELAB_BOX_ASSEMBLER_HH
 #define DUMUX_PDELAB_BOX_ASSEMBLER_HH
 
+#if HAVE_DUNE_PDELAB
 #include "pdelabboxlocaloperator.hh"
+#endif
 
 namespace Dumux {
 namespace PDELab {
diff --git a/dumux/boxmodels/common/pdelabboxlocaloperator.hh b/dumux/boxmodels/common/pdelabboxlocaloperator.hh
index 3f8ad40230..edea6cdd9b 100644
--- a/dumux/boxmodels/common/pdelabboxlocaloperator.hh
+++ b/dumux/boxmodels/common/pdelabboxlocaloperator.hh
@@ -21,6 +21,10 @@
 #ifndef DUMUX_PDELAB_BOX_LOCAL_OPERATOR_HH
 #define DUMUX_PDELAB_BOX_LOCAL_OPERATOR_HH
 
+#if ! HAVE_DUNE_PDELAB
+#error "DUNE-PDELab must be available in order to include this file!"
+#endif
+
 #include<dune/pdelab/localoperator/pattern.hh>
 #include<dune/pdelab/localoperator/flags.hh>
 
diff --git a/dumux/common/pdelabpreconditioner.hh b/dumux/common/pdelabpreconditioner.hh
index c5e60c3110..950ffa89b1 100644
--- a/dumux/common/pdelabpreconditioner.hh
+++ b/dumux/common/pdelabpreconditioner.hh
@@ -23,6 +23,7 @@
 
 #include <dumux/common/pardiso.hh>
 #include <dumux/common/propertysystem.hh>
+
 #include <dune/pdelab/backend/istlsolverbackend.hh>
 
 namespace Dumux {
diff --git a/dumux/nonlinear/newtoncontroller.hh b/dumux/nonlinear/newtoncontroller.hh
index 562fe56139..2350a92c9b 100644
--- a/dumux/nonlinear/newtoncontroller.hh
+++ b/dumux/nonlinear/newtoncontroller.hh
@@ -23,14 +23,29 @@
 #ifndef DUMUX_NEWTON_CONTROLLER_HH
 #define DUMUX_NEWTON_CONTROLLER_HH
 
+#include <dumux/io/vtkmultiwriter.hh>
 #include <dumux/common/exceptions.hh>
 #include <dumux/common/math.hh>
 
 #include <dumux/common/pardiso.hh>
 
 #include <dumux/io/vtkmultiwriter.hh>
+
+#if HAVE_DUNE_PDELAB
+
 #include <dumux/common/pdelabpreconditioner.hh>
 
+#else // ! HAVE_DUNE_PDELAB
+
+#include <dune/istl/overlappingschwarz.hh>
+#include <dune/istl/schwarz.hh>
+#include <dune/istl/preconditioners.hh>
+#include <dune/istl/solvers.hh>
+#include <dune/istl/owneroverlapcopy.hh>
+#include <dune/istl/io.hh>
+
+#endif // HAVE_DUNE_PDELAB
+
 
 namespace Dumux
 {
-- 
GitLab