Commit 3aeca4f7 authored by Markus Wolff's avatar Markus Wolff
Browse files

make decoupled 1p test compile again

   - test_diffusion still is in an intermediate state until the remaining
     2p pressure models are moved to new data structure



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7434 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 4d1141de
......@@ -38,7 +38,9 @@
#include <dumux/material/components/unit.hh>
#include <dumux/decoupled/1p/diffusion/diffusionproblem1p.hh>
#include <dumux/decoupled/1p/diffusion/fv/fvpressure1p.hh>
#include <dumux/decoupled/1p/diffusion/fv/fvvelocity1p.hh>
#include <dumux/decoupled/common/fv/fvvelocity.hh>
#include "test_1p_spatialparams.hh"
......@@ -86,7 +88,9 @@ public:
SET_BOOL_PROP(TestProblemOneP, EnableGravity, false);
// Set the model
SET_TYPE_PROP(TestProblemOneP, Model, Dumux::FVVelocity1P<TypeTag>);
SET_TYPE_PROP(TestProblemOneP, Model, Dumux::FVPressure1P<TypeTag>);
SET_TYPE_PROP(TestProblemOneP, PressureModel, Dumux::FVPressure1P<TypeTag>);
SET_TYPE_PROP(TestProblemOneP, Velocity, Dumux::FVVelocity1P<TypeTag>);
//Set the problem
SET_TYPE_PROP(TestProblemOneP, Problem, Dumux::TestProblemOneP<TTAG(TestProblemOneP)>);
......@@ -124,7 +128,7 @@ class TestProblemOneP: public DiffusionProblem1P<TypeTag >
public:
TestProblemOneP(const GridView &gridView, const double delta = 1.0) :
ParentType(gridView), delta_(delta)
ParentType(gridView), delta_(delta), velocity_(*this)
{
this->spatialParameters().setDelta(delta_);
}
......@@ -147,6 +151,12 @@ public:
bool shouldWriteRestartFile() const
{ return false; }
void addOutputVtkFields()
{
velocity_.calculateVelocity();
velocity_.addOutputVtkFields(this->resultWriter());
}
/*!
* \brief Returns the temperature within the domain.
*
......@@ -226,6 +236,7 @@ private:
}
double delta_;
Dumux::FVVelocity<TypeTag> velocity_;
};
} //end namespace
......
......@@ -91,7 +91,6 @@ int main(int argc, char** argv)
fvProblem.setName("fvdiffusion");
timer.reset();
fvProblem.init();
fvProblem.model().calculateVelocity();
double fvTime = timer.elapsed();
fvProblem.writeOutput();
// Dumux::ResultEvaluation fvResult;
......
......@@ -40,7 +40,9 @@
#include <dumux/decoupled/2p/diffusion/fvmpfa/mpfaproperties.hh>
#include <dumux/decoupled/2p/diffusion/diffusionproblem2p.hh>
#include <dumux/decoupled/2p/diffusion/fv/fvpressure2p.hh>
#include <dumux/decoupled/2p/diffusion/fv/fvvelocity2p.hh>
#include <dumux/decoupled/common/fv/fvvelocity.hh>
//#include <dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh>
//#include <dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh>
......@@ -93,8 +95,10 @@ SET_BOOL_PROP(DiffusionTestProblem, EnableGravity, false);
//// set the types for the 2PFA FV method
NEW_TYPE_TAG(FVVelocity2PTestProblem, INHERITS_FROM(DiffusionTestProblem));
SET_TYPE_PROP(FVVelocity2PTestProblem, Model, Dumux::FVVelocity2P<TTAG(FVVelocity2PTestProblem)>);
SET_TYPE_PROP(FVVelocity2PTestProblem, PressureModel, Dumux::FVPressure2P<TTAG(FVVelocity2PTestProblem)>);
SET_TYPE_PROP(FVVelocity2PTestProblem, Model, Dumux::FVPressure2P<TTAG(FVVelocity2PTestProblem)>);
SET_TYPE_PROP(FVVelocity2PTestProblem, Problem, Dumux::TestDiffusionProblem<TTAG(FVVelocity2PTestProblem)>);
SET_TYPE_PROP(FVVelocity2PTestProblem, Velocity, Dumux::FVVelocity2P<TTAG(FVVelocity2PTestProblem)>);
// set the types for the MPFA-O FV method
//NEW_TYPE_TAG(FVMPFAOVelocity2PTestProblem, INHERITS_FROM(DiffusionTestProblem));
......@@ -152,10 +156,13 @@ public:
typedef typename SolutionTypes::PrimaryVariables PrimaryVariables;
TestDiffusionProblem(const GridView &gridView, const double delta = 1.0) :
ParentType(gridView), delta_(delta)
ParentType(gridView), delta_(delta), velocity_(*this)
{
this->variables().primaryVariablesGlobal(pressEqIdx) = 1.0;
this->spatialParameters().setDelta(delta_);
for (int i = 0; i < gridView.size(0); i++)
{
this->variables().cellData(i).setSaturation(wPhaseIdx, 1.0);
}
}
/*!
......@@ -166,6 +173,11 @@ public:
bool shouldWriteRestartFile() const
{ return false; }
void addOutputVtkFields()
{
velocity_.calculateVelocity();
velocity_.addOutputVtkFields(this->resultWriter());
}
/*!
* \brief Returns the temperature within the domain.
*
......@@ -245,6 +257,7 @@ public:
private:
double delta_;
Dumux::FVVelocity<TypeTag> velocity_;
};
} //end namespace
......
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