From 84efa910ae79e8e17d80c857f3d8e5c88e60fe96 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Thu, 25 Mar 2010 13:02:05 +0000 Subject: [PATCH] change namespace from Dune to Dumux and fix a few compilation issues I tried to catch most stuff, but occationally Dune:: prefix is required for stuff which is provided by DUNE and sometimes the Dune:: prefix needs to be changed to Dumux:: for stuff which is part of DuMuX --- examples/tutorial_decoupled.cc | 20 ++++++++++---------- examples/tutorialproblem_coupled.hh | 14 +++++++------- examples/tutorialproblem_decoupled.hh | 10 +++++----- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/examples/tutorial_decoupled.cc b/examples/tutorial_decoupled.cc index ec21ca2c1..07197ec37 100644 --- a/examples/tutorial_decoupled.cc +++ b/examples/tutorial_decoupled.cc @@ -52,31 +52,31 @@ int main(int argc, char** argv) // define fluid and solid properties and constitutive relationships - Dune::Water wettingfluid; /*@\label{tutorial-decoupled:water}@*/ - Dune::LowViscosityOil nonwettingfluid; /*@\label{tutorial-decoupled:oil}@*/ - Dune::TutorialSoil soil; /*@\label{tutorial-decoupled:soil}@*/ - Dune::TwoPhaseRelations materialLaw(soil, wettingfluid, nonwettingfluid);/*@\label{tutorial-decoupled:twophaserelations}@*/ + Dumux::Water wettingfluid; /*@\label{tutorial-decoupled:water}@*/ + Dumux::LowViscosityOil nonwettingfluid; /*@\label{tutorial-decoupled:oil}@*/ + Dumux::TutorialSoil soil; /*@\label{tutorial-decoupled:soil}@*/ + Dumux::TwoPhaseRelations materialLaw(soil, wettingfluid, nonwettingfluid);/*@\label{tutorial-decoupled:twophaserelations}@*/ // create object containing the variables - typedef Dune::VariableClass VariableClass; + typedef Dumux::VariableClass VariableClass; VariableClass variables(gridView); //choose kind of two-phase model. Default: pw, Sw, vtotal - struct Dune::DefineModel modelDef; + struct Dumux::DefineModel modelDef; // modelDef.pressureType = modelDef.pressureW; // modelDef.saturationType = modelDef.saturationW; // modelDef.velocityType = modelDef.velocityTotal; // create object including the problem definition - typedef Dune::TutorialProblemDecoupled Problem; + typedef Dumux::TutorialProblemDecoupled Problem; Problem problem(variables, wettingfluid, nonwettingfluid, soil, materialLaw,L, H); /*@\label{tutorial-decoupled:problem}@*/ // create object including the discretisation of the pressure equation - typedef Dune::FVVelocity2P Diffusion; + typedef Dumux::FVVelocity2P Diffusion; Diffusion diffusion(gridView, problem, modelDef); /*@\label{tutorial-decoupled:diffusion}@*/ // create object including the space discretisation of the saturation equation - typedef Dune::FVSaturation2P Transport; + typedef Dumux::FVSaturation2P Transport; Transport transport(gridView, problem, modelDef); /*@\label{tutorial-decoupled:transport}@*/ // some parameters used in the IMPES-object @@ -96,7 +96,7 @@ int main(int argc, char** argv) double cFLFactor = 0.9; // security factor for the Courant-Friedrichs-Lewy-Criterion // create TimeLoop-object - Dune::TimeLoop timeloop(gridView, tStart, tEnd, fileName, modulo, cFLFactor); /*@\label{tutorial-decoupled:timeloop}@*/ + Dumux::TimeLoop timeloop(gridView, tStart, tEnd, fileName, modulo, cFLFactor); /*@\label{tutorial-decoupled:timeloop}@*/ Dune::Timer timer; timer.reset(); diff --git a/examples/tutorialproblem_coupled.hh b/examples/tutorialproblem_coupled.hh index 71311c8f7..67beade7d 100644 --- a/examples/tutorialproblem_coupled.hh +++ b/examples/tutorialproblem_coupled.hh @@ -14,8 +14,8 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -#ifndef DUNE_TUTORIALPROBLEM_COUPLED_HH -#define DUNE_TUTORIALPROBLEM_COUPLED_HH +#ifndef DUMUX_TUTORIALPROBLEM_COUPLED_HH +#define DUMUX_TUTORIALPROBLEM_COUPLED_HH // fluid properties #include @@ -31,7 +31,7 @@ // the soil to be used #include "tutorialsoil_coupled.hh" -namespace Dune +namespace Dumux { // forward declaration of the problem class @@ -46,7 +46,7 @@ NEW_TYPE_TAG(TutorialProblemCoupled, INHERITS_FROM(BoxTwoP)); /*@\label{tutorial // Set the "Problem" property SET_PROP(TutorialProblemCoupled, Problem) /*@\label{tutorial-coupled:set-problem}@*/ { - typedef Dune::TutorialProblemCoupled type; + typedef Dumux::TutorialProblemCoupled type; }; // Set the grid @@ -70,8 +70,8 @@ SET_PROP(TutorialProblemCoupled, Grid) /*@\label{tutorial-coupled:set-grid}@*/ }; // Set the wetting and non-wetting phases -SET_TYPE_PROP(TutorialProblemCoupled, WettingPhase, Dune::Water); /*@\label{tutorial-coupled:set-wetting}@*/ -SET_TYPE_PROP(TutorialProblemCoupled, NonwettingPhase, Dune::LowViscosityOil);/*@\label{tutorial-coupled:set-nonwetting}@*/ +SET_TYPE_PROP(TutorialProblemCoupled, WettingPhase, Dumux::Water); /*@\label{tutorial-coupled:set-wetting}@*/ +SET_TYPE_PROP(TutorialProblemCoupled, NonwettingPhase, Dumux::LowViscosityOil);/*@\label{tutorial-coupled:set-nonwetting}@*/ // Set the soil properties SET_PROP(TutorialProblemCoupled, Soil) /*@\label{tutorial-coupled:set-soil}@*/ @@ -81,7 +81,7 @@ private: typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; public: - typedef Dune::TutorialSoil type; + typedef Dumux::TutorialSoil type; }; // Disable gravity diff --git a/examples/tutorialproblem_decoupled.hh b/examples/tutorialproblem_decoupled.hh index 8a82de575..ac559a901 100644 --- a/examples/tutorialproblem_decoupled.hh +++ b/examples/tutorialproblem_decoupled.hh @@ -18,7 +18,7 @@ #include "dumux/fractionalflow/fractionalflowproblem.hh" -namespace Dune +namespace Dumux { /** \todo Please doc me! */ @@ -38,7 +38,7 @@ template class TutorialProble public: TutorialProblemDecoupled(VariableClass& variables, Fluid& wettingphase, Fluid& nonwettingphase, Matrix2p& soil, TwoPhaseRelations& materialLaw = *(new TwoPhaseRelations), - const FieldVector Left = 0, const FieldVector Right = 0) + const Dune::FieldVector Left = 0, const Dune::FieldVector Right = 0) : FractionalFlowProblem(variables, wettingphase, nonwettingphase, soil, materialLaw), Left_(Left[0]), Right_(Right[0]), eps_(1e-8) {} @@ -72,10 +72,10 @@ public: { if (globalPos[0]> (Right_ - eps_) || globalPos[0] < eps_) { - return Dune::BoundaryConditions::dirichlet; + return Dumux::BoundaryConditions::dirichlet; } // all other boundaries - return Dune::BoundaryConditions::neumann; + return Dumux::BoundaryConditions::neumann; } // function returning the Dirichlet boundary condition for the solution @@ -115,7 +115,7 @@ public: // function returning the initial saturation // depending on the position within the domain Scalar initSat (const GlobalPosition& globalPos, const Element& e, /*@\label{tutorial-decoupled:initsat}@*/ - const FieldVector& xi) const + const Dune::FieldVector& xi) const { return 0.0; }