Commit c732cd95 authored by Timo Koch's avatar Timo Koch
Browse files

[1p][test] Port rest of the 1p tests to new main file structure

parent e8cc3221
......@@ -46,7 +46,7 @@ namespace Properties
{
NEW_TYPE_TAG(OnePNIConductionProblem, INHERITS_FROM(OnePNI));
NEW_TYPE_TAG(OnePNIConductionBoxProblem, INHERITS_FROM(BoxModel, OnePNIConductionProblem));
NEW_TYPE_TAG(OnePNIConductionCCProblem, INHERITS_FROM(CCTpfaModel, OnePNIConductionProblem));
NEW_TYPE_TAG(OnePNIConductionCCTpfaProblem, INHERITS_FROM(CCTpfaModel, OnePNIConductionProblem));
NEW_TYPE_TAG(OnePNIConductionCCMpfaProblem, INHERITS_FROM(CCMpfaModel, OnePNIConductionProblem));
// Set the grid type
......@@ -101,6 +101,9 @@ class OnePNIConductionProblem : public PorousMediumFlowProblem<TypeTag>
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using IapwsH2O = H2O<Scalar>;
// copy some indices for convenience
using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
......@@ -109,9 +112,6 @@ class OnePNIConductionProblem : public PorousMediumFlowProblem<TypeTag>
dimWorld = GridView::dimensionworld
};
enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) };
enum { dofCodim = isBox ? dimWorld : 0 };
enum {
// indices of the primary variables
pressureIdx = Indices::pressureIdx,
......@@ -134,21 +134,25 @@ public:
FluidSystem::init();
name_ = getParam<std::string>("Problem.Name");
outputInterval_ = getParam<int>("Problem.OutputInterval");
temperatureHigh_ = 300.0;
time_ = 0.0;
temperatureExact_.resize(fvGridGeometry->numDofs());
}
/*!
* \brief Adds additional VTK output data to the VTKWriter. Function is called by the output module on every write.
*/
const std::vector<Scalar>& computeExactTemperatureSolution(Scalar time)
//! get the analytical temperature
const std::vector<Scalar>& getExactTemperature()
{
return temperatureExact_;
}
//! udpate the analytical temperature
void updateExactTemperature(const SolutionVector& curSol, Scalar time)
{
const auto someElement = *(elements(this->gridView()).begin());
const ElementSolution someElemSol(someElement, this->model().curSol(), this->fvGridGeometry());
const auto initSol = initial_();
const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
const auto someInitSol = initialAtPos(someElement.geometry().center());
auto fvGeometry = localView(this->model().fvGridGeometry());
auto fvGeometry = localView(this->fvGridGeometry());
fvGeometry.bindElement(someElement);
const auto someScv = *(scvs(fvGeometry).begin());
......@@ -157,7 +161,7 @@ public:
const auto porosity = this->spatialParams().porosity(someElement, someScv, someElemSol);
const auto densityW = volVars.density();
const auto heatCapacityW = FluidSystem::heatCapacity(volVars.fluidState(), 0);
const auto heatCapacityW = IapwsH2O::liquidHeatCapacity(someInitSol[temperatureIdx], someInitSol[pressureIdx]);
const auto densityS = this->spatialParams().solidDensity(someElement, someScv, someElemSol);
const auto heatCapacityS = this->spatialParams().solidHeatCapacity(someElement, someScv, someElemSol);
const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity);
......@@ -165,20 +169,20 @@ public:
someElement, fvGeometry, someScv);
using std::max;
time = max(time, 1e-10);
for (const auto& element : elements(this->fvGeometry().gridView()))
for (const auto& element : elements(this->fvGridGeometry().gridView()))
{
auto fvGeometry = localView(this->fvGridGeometry());
fvGeometry.bindElement(element);
for (auto&& scv : scvs(fvGeometry))
{
const auto globalIdx = scv.dofIndex();
const auto& globalPos = scv.dofPosition();
using std::erf; using std::sqrt;
exactTemperature_[globalIdx] = temperatureHigh_ + (initSol[temperatureIdx] - temperatureHigh_)
auto globalIdx = scv.dofIndex();
const auto& globalPos = scv.dofPosition();
using std::erf;
using std::sqrt;
temperatureExact_[globalIdx] = temperatureHigh_ + (someInitSol[temperatureIdx] - temperatureHigh_)
*erf(0.5*sqrt(globalPos[0]*globalPos[0]*storage/time/effectiveThermalConductivity));
}
}
}
......@@ -276,8 +280,7 @@ private:
Scalar temperatureHigh_;
static constexpr Scalar eps_ = 1e-6;
std::string name_;
int outputInterval_;
std::vector<Scalar> exactTemperature_;
std::vector<Scalar> temperatureExact_;
};
} //end namespace Dumux
......
......@@ -46,7 +46,7 @@ namespace Properties
NEW_TYPE_TAG(OnePNIConvectionProblem, INHERITS_FROM(OnePNI));
NEW_TYPE_TAG(OnePNIConvectionBoxProblem, INHERITS_FROM(BoxModel, OnePNIConvectionProblem));
NEW_TYPE_TAG(OnePNIConvectionCCProblem, INHERITS_FROM(CCTpfaModel, OnePNIConvectionProblem));
NEW_TYPE_TAG(OnePNIConvectionCCTpfaProblem, INHERITS_FROM(CCTpfaModel, OnePNIConvectionProblem));
NEW_TYPE_TAG(OnePNIConvectionCCMpfaProblem, INHERITS_FROM(CCMpfaModel, OnePNIConvectionProblem));
// Set the grid type
......@@ -102,11 +102,11 @@ class OnePNIConvectionProblem : public PorousMediumFlowProblem<TypeTag>
using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager);
using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel);
using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
using VtkOutputModule = typename GET_PROP_TYPE(TypeTag, VtkOutputModule);
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using IapwsH2O = H2O<Scalar>;
// copy some indices for convenience
......@@ -116,9 +116,6 @@ class OnePNIConvectionProblem : public PorousMediumFlowProblem<TypeTag>
dimWorld = GridView::dimensionworld
};
enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) };
enum { dofCodim = isBox ? dimWorld : 0 };
enum {
// indices of the primary variables
pressureIdx = Indices::pressureIdx,
......@@ -143,46 +140,41 @@ public:
//initialize fluid system
FluidSystem::init();
std::string name = getParam<std::string>("Problem.Name");
outputInterval_ = getParam<int>("Problem.OutputInterval");
name_ = getParam<std::string>("Problem.Name");
darcyVelocity_ = getParam<Scalar>("Problem.DarcyVelocity");
temperatureHigh_ = 291.0;
temperatureLow_ = 290.0;
pressureHigh_ = 2e5;
pressureLow_ = 1e5;
}
temperatureExact_.resize(this->fvGridGeometry().numDofs());
}
bool shouldWriteOutput() const
//! Get exact temperature vector for output
const std::vector<Scalar>& getExactTemperature()
{
return
this->timeManager().timeStepIndex() == 0 ||
this->timeManager().timeStepIndex() % outputInterval_ == 0 ||
this->timeManager().episodeWillBeFinished() ||
this->timeManager().willBeFinished();
return temperatureExact_;
}
/*!
* \brief Adds additional VTK output data to the VTKWriter. Function is called by the output module on every write.
*/
void addVtkOutputFields(VtkOutputModule& outputModule) const
//! udpate the analytical temperature
void updateExactTemperature(const SolutionVector& curSol, Scalar time)
{
auto& temperatureExact = outputModule.createScalarField("temperatureExact", dofCodim);
const auto someElement = *(elements(this->fvGridGeometry().gridView()).begin());
const auto someElement = *(elements(this->gridView()).begin());
const auto someElemSol = this->model().elementSolution(someElement, this->model().curSol());
ElementSolutionVector someElemSol(someElement, curSol, this->fvGridGeometry());
const auto someInitSol = initialAtPos(someElement.geometry().center());
auto someFvGeometry = localView(this->model().fvGridGeometry());
someFvGeometry.bindElement(someElement);
const auto someScv = *(scvs(someFvGeometry).begin());
auto fvGeometry = localView(this->fvGridGeometry());
fvGeometry.bindElement(someElement);
const auto someScv = *(scvs(fvGeometry).begin());
VolumeVariables volVars;
volVars.update(someElemSol, *this, someElement, someScv);
const auto porosity = this->spatialParams().porosity(someElement, someScv, someElemSol);
const auto densityW = volVars.density();
const auto heatCapacityW = FluidSystem::heatCapacity(volVars.fluidState(), 0);
const auto heatCapacityW = IapwsH2O::liquidHeatCapacity(someInitSol[temperatureIdx], someInitSol[pressureIdx]);
const auto storageW = densityW*heatCapacityW*porosity;
const auto densityS = this->spatialParams().solidDensity(someElement, someScv, someElemSol);
const auto heatCapacityS = this->spatialParams().solidHeatCapacity(someElement, someScv, someElemSol);
......@@ -190,19 +182,19 @@ public:
std::cout << "storage: " << storageTotal << '\n';
using std::max;
const Scalar time = max(this->timeManager().time() + this->timeManager().timeStepSize(), 1e-10);
time = max(time, 1e-10);
const Scalar retardedFrontVelocity = darcyVelocity_*storageW/storageTotal/porosity;
std::cout << "retarded velocity: " << retardedFrontVelocity << '\n';
for (const auto& element : elements(this->gridView()))
for (const auto& element : elements(this->fvGridGeometry().gridView()))
{
auto fvGeometry = localView(this->model().fvGridGeometry());
auto fvGeometry = localView(this->fvGridGeometry());
fvGeometry.bindElement(element);
for (auto&& scv : scvs(fvGeometry))
{
auto dofIdxGlobal = scv.dofIndex();
auto dofPosition = scv.dofPosition();
temperatureExact[dofIdxGlobal] = (dofPosition[0] < retardedFrontVelocity*time) ? temperatureHigh_ : temperatureLow_;
temperatureExact_[dofIdxGlobal] = (dofPosition[0] < retardedFrontVelocity*time) ? temperatureHigh_ : temperatureLow_;
}
}
}
......@@ -304,17 +296,6 @@ public:
*/
// \{
/*!
* \brief Return the sources within the domain.
*
* \param values Stores the source values, acts as return value
* \param globalPos The global position
*/
PrimaryVariables sourceAtPos(const GlobalPosition &globalPos) const
{
return PrimaryVariables(0);
}
/*!
* \brief Evaluate the initial value for a control volume.
*
......@@ -348,7 +329,7 @@ private:
Scalar darcyVelocity_;
static constexpr Scalar eps_ = 1e-6;
std::string name_;
int outputInterval_;
std::vector<Scalar> temperatureExact_;
};
} //end namespace Dumux
......
......@@ -39,10 +39,6 @@ namespace Properties
{
// The spatial parameters TypeTag
NEW_TYPE_TAG(OnePTestSpatialParams);
// Set properties of the porous medium
NEW_PROP_TAG(SpatialParamsRandomField);
SET_BOOL_PROP(OnePTestSpatialParams, SpatialParamsRandomField, false);
}
/*!
......@@ -62,7 +58,6 @@ class OnePTestSpatialParams : public ImplicitSpatialParamsOneP<TypeTag>
using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using IndexSet = typename GridView::IndexSet;
using ScalarVector = std::vector<Scalar>;
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
enum {
......@@ -82,12 +77,12 @@ public:
randomPermeability_(problem.fvGridGeometry().gridView().size(dim), 0.0),
indexSet_(problem.fvGridGeometry().gridView().indexSet())
{
randomField_ = getParam<bool>("SpatialParams.RandomField");
randomField_ = getParam<bool>("SpatialParams.RandomField", false);
permeability_ = getParam<Scalar>("SpatialParams.Permeability");
if(!randomField_)
permeabilityLens_ = getParam<Scalar>("SpatialParams.PermeabilityLens");
else
initRandomField(problem.fvGridGeometry().gridView());
initRandomField(problem.fvGridGeometry());
lensLowerLeft_ = getParam<GlobalPosition>("SpatialParams.LensLowerLeft");
lensUpperRight_ = getParam<GlobalPosition>("SpatialParams.LensUpperRight");
......@@ -128,32 +123,32 @@ public:
*
* \param gridView The GridView used by the problem
*/
void initRandomField(const GridView& gridView)
void initRandomField(const FVGridGeometry& gg)
{
const auto& gridView = gg.gridView();
const auto& elementMapper = gg.elementMapper();
const auto gStatControlFile = getParam<std::string>("Gstat.ControlFile");
const auto gStatInputFile = getParam<std::string>("Gstat.InputFile");
const auto outputFilePrefix = getParam<std::string>("Gstat.OutputFilePrefix");
// create random permeability object
GstatRandomField<GridView, Scalar> randomPermeabilityField(gridView);
using RandomField = GstatRandomField<GridView, Scalar>;
RandomField randomPermeabilityField(gridView, elementMapper);
randomPermeabilityField.create(gStatControlFile,
gStatInputFile,
outputFilePrefix + ".dat",
GstatRandomField<GridView, Scalar>::FieldType::log10,
RandomField::FieldType::log10,
true);
randomPermeability_.resize(gridView.size(dim), 0.0);
// copy vector from the temporary gstat object
for (const auto& element : elements(gridView))
{
auto index = indexSet_.index(element.template subEntity<dim> (/*scvIdx=*/0));
randomPermeability_[index] = randomPermeabilityField.data(element);
}
// output the random field to vtk
randomPermeabilityField.writeVtk(outputFilePrefix, "absolute permeability");
randomPermeability_ = randomPermeabilityField.data();
}
//! get the permeability field for output
const std::vector<Scalar>& getPermField() const
{ return randomPermeability_; }
private:
bool isInLens_(const GlobalPosition &globalPos) const
{
......@@ -169,7 +164,7 @@ private:
GlobalPosition lensUpperRight_;
Scalar permeability_, permeabilityLens_;
ScalarVector randomPermeability_;
std::vector<Scalar> randomPermeability_;
const IndexSet& indexSet_;
static constexpr Scalar eps_ = 1.5e-7;
......
......@@ -36,87 +36,116 @@ dune_add_test(NAME test_1pbox
--command "${CMAKE_CURRENT_BINARY_DIR}/test_1pbox test_1pfv.input -Problem.Name 1ptestbox")
# a gstat test (becaue it's a random permeability field we can't test against a reference solution)
dune_add_test(SOURCES test_1pwithgstat.cc
COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfaProblem)
#
# # non-isothermal tests
# add_dumux_test(test_box1pniconduction test_box1pniconduction test_box1pniconduction.cc
# python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconduction-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/box1pniconduction-00006.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_box1pniconduction"
# --zeroThreshold {"velocity_H2O":1e-8})
#
# add_dumux_test(test_box1pniconvection test_box1pniconvection test_box1pniconvection.cc
# python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconvection-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/box1pniconvection-00010.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_box1pniconvection"
# --zeroThreshold {"velocity":1e-15})
#
# add_dumux_test(test_cc1pniconduction test_cc1pniconduction test_cc1pniconduction.cc
# python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/1pniccconduction-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/cc1pniconduction-00006.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_cc1pniconduction"
# --zeroThreshold {"velocity":1e-8})
#
# add_dumux_test(test_cc1pniconvection test_cc1pniconvection test_cc1pniconvection.cc
# python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/1pniccconvection-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/cc1pniconvection-00010.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_cc1pniconvection")
#
# add_dumux_test(test_ccmpfa1pniconduction test_ccmpfa1pniconduction test_ccmpfa1pniconduction.cc
# python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/ccmpfa1pniconduction-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/ccmpfa1pniconduction-00006.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_ccmpfa1pniconduction")
#
# add_dumux_test(test_ccmpfa1pniconvection test_ccmpfa1pniconvection test_ccmpfa1pniconvection.cc
# python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/ccmpfa1pniconvection-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/ccmpfa1pniconvection-00010.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_ccmpfa1pniconvection")
dune_add_test(NAME test_1pwithgstat
SOURCES test_1pfv.cc
COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfaProblem
CMAKE_GUARD HAVE_GSTAT)
# non-isothermal tests
dune_add_test(NAME test_1pnibox_conduction
SOURCES test_1pnifv.cc
COMPILE_DEFINITIONS TYPETAG=OnePNIConductionBoxProblem
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconduction-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/1pnibox_conduction-00006.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnibox_conduction test_1pnifv_conduction.input -Problem.Name 1pnibox_conduction"
--zeroThreshold {"velocity_H2O":1e-8})
dune_add_test(NAME test_1pnibox_convection
SOURCES test_1pnifv.cc
COMPILE_DEFINITIONS TYPETAG=OnePNIConvectionBoxProblem
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconvection-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/1pnibox_convection-00010.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnibox_convection test_1pnifv_convection.input -Problem.Name 1pnibox_convection"
--zeroThreshold {"velocity":1e-15})
dune_add_test(NAME test_1pnicctpfa_conduction
SOURCES test_1pnifv.cc
COMPILE_DEFINITIONS TYPETAG=OnePNIConductionCCTpfaProblem
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/1pniccconduction-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/1pnicctpfa_conduction-00006.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnicctpfa_conduction test_1pnifv_conduction.input -Problem.Name 1pnicctpfa_conduction"
--zeroThreshold {"velocity":1e-8})
dune_add_test(NAME test_1pnicctpfa_convection
SOURCES test_1pnifv.cc
COMPILE_DEFINITIONS TYPETAG=OnePNIConvectionCCTpfaProblem
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/1pniccconvection-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/1pnicctpfa_convection-00010.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnicctpfa_convection test_1pnifv_convection.input -Problem.Name 1pnicctpfa_convection")
# TODO: Implement interaction volume handle?
# dune_add_test(NAME test_1pniccmpfa_conduction
# SOURCES test_1pnifv.cc
# COMPILE_DEFINITIONS TYPETAG=OnePNIConductionCCMpfaProblem
# COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# CMD_ARGS --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/ccmpfa1pniconduction-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/1pniccmpfa_conduction-00006.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pniccmpfa_conduction test_1pnifv_conduction.input -Problem.Name 1pniccmpfa_conduction")
#
# dim < dimWorld tests with foamgrid
# dune_add_test(NAME test_1pniccmpfa_convection
# SOURCES test_1pnifv.cc
# COMPILE_DEFINITIONS TYPETAG=OnePNIConvectionCCMpfaProblem
# COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# CMD_ARGS --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/ccmpfa1pniconvection-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/1pniccmpfa_convection-00010.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pniccmpfa_convection test_1pnifv_convection.input -Problem.Name 1pniccmpfa_convection")
# dim < dimWorld tests with Dune::Foamgrid<1,3>
dune_add_test(NAME test_1pcctpfa_network1d3d
SOURCES test_1pfv_network1d3d.cc
COMPILE_DEFINITIONS TYPETAG=TubesTestCCTpfaProblem
COMMAND ./tubesconvergencetest.py test_1pcctpfa_network1d3d test_1pfv_network1d3d.input -Problem.Name test_1pcctpfa_network1d3d)
CMAKE_GUARD dune-foamgrid_FOUND
COMMAND ./tubesconvergencetest.py
CMD_ARGS test_1pcctpfa_network1d3d test_1pfv_network1d3d.input -Problem.Name test_1pcctpfa_network1d3d)
dune_add_test(NAME test_1pbox_network1d3d
SOURCES test_1pfv_network1d3d.cc
COMPILE_DEFINITIONS TYPETAG=TubesTestBoxProblem
COMMAND ./tubesconvergencetest.py test_1pbox_network1d3d test_1pfv_network1d3d.input -Problem.Name test_1pbox_network1d3d)
CMAKE_GUARD dune-foamgrid_FOUND
COMMAND ./tubesconvergencetest.py
CMD_ARGS test_1pbox_network1d3d test_1pfv_network1d3d.input -Problem.Name test_1pbox_network1d3d)
# dune_add_test(SOURCES test_box1pnetwork1d3d.cc
# NAME test_box1pnetwork1d3d
# COMMAND ./tubesconvergencetest.py test_box1pnetwork1d3d)
#
# add_dumux_test(test_box1pfracture2d3d test_box1pfracture2d3d test_box1pfracture2d3d.cc
# python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/1pboxfracture2d3d-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/1pboxfracture2d3d-00001.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_box1pfracture2d3d")
#
# dune_add_test(SOURCES test_cc1pnetwork1d3d.cc
# NAME test_cc1pnetwork1d3d
# COMMAND ./tubesconvergencetest.py test_cc1pnetwork1d3d)
#
# add_dumux_test(test_cc1pfracture2d3d test_cc1pfracture2d3d test_cc1pfracture2d3d.cc
# python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/1pccfracture2d3d-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/1pccfracture2d3d-00001.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_cc1pfracture2d3d")
# dim < dimWorld tests with Dune::Foamgrid<2,3>
dune_add_test(NAME test_1pbox_fracture2d3d
SOURCES test_1pfv_fracture2d3d.cc
COMPILE_DEFINITIONS TYPETAG=FractureBoxProblem
CMAKE_GUARD dune-foamgrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/1pboxfracture2d3d-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/1pbox_fracture2d3d-00001.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_1pbox_fracture2d3d test_1pfv_fracture2d3d.input -Problem.Name 1pbox_fracture2d3d")
dune_add_test(NAME test_1pcctpfa_fracture2d3d
SOURCES test_1pfv_fracture2d3d.cc
COMPILE_DEFINITIONS TYPETAG=FractureCCTpfaProblem
CMAKE_GUARD dune-foamgrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/1pccfracture2d3d-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/1pcctpfa_fracture2d3d-00001.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_1pcctpfa_fracture2d3d test_1pfv_fracture2d3d.input -Problem.Name 1pcctpfa_fracture2d3d")
# TODO: Fix this test mpfa 2d3d!
# dune_add_test(NAME test_1pccmpfa_fracture2d3d
# SOURCES test_1pfv_fracture2d3d.cc
# COMPILE_DEFINITIONS TYPETAG=FractureCCMpfaProblem
# CMAKE_GUARD dune-foamgrid_FOUND
# COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
# CMD_ARGS --script fuzzy
# --files ${CMAKE_SOURCE_DIR}/test/references/1pccfracture2d3d-reference.vtu
# ${CMAKE_CURRENT_BINARY_DIR}/1pccmpfa_fracture2d3d-00001.vtu
# --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pccmpfa_fracture2d3d test_1pfv_fracture2d3d.input -Problem.Name 1pccmpfa_fracture2d3d")
#install sources
install(FILES
......@@ -129,18 +158,8 @@ fractureproblem.hh
fracturespatialparams.hh
tubesproblem.hh
tubesspatialparams.hh
test_box1pfracture2d3d.cc
test_box1pnetwork1d3d.cc
test_box1p.cc
test_box1pniconduction.cc
test_box1pniconvection.cc
test_box1pwithamg.cc
test_cc1pfracture2d3d.cc
test_cc1pnetwork1d3d.cc
test_cc1p.cc
test_cc1pniconduction.cc
test_cc1pniconvection.cc
test_cc1pwithamg.cc
test_ccmpfa1pniconduction.cc
test_ccmpfa1pniconvection.cc
test_1pfv.cc
test_1pnifv.cc
test_1pfv_fracture2d3d.cc
test_1pfv_network1d3d.cc
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/implicit/1p)
......@@ -16,4 +16,3 @@ LensUpperRight = 0.8 0.8
Permeability = 1e-10 # [m^2]
PermeabilityLens = 1e-12 # [m^2]
RandomField = false
......@@ -45,13 +45,13 @@ namespace Properties
{
NEW_TYPE_TAG(FractureProblem, INHERITS_FROM(OneP, FractureSpatialParams));
NEW_TYPE_TAG(FractureBoxProblem, INHERITS_FROM(BoxModel, FractureProblem));
NEW_TYPE_TAG(FractureCCProblem, INHERITS_FROM(CCTpfaModel, FractureProblem));
NEW_TYPE_TAG(FractureCCTpfaProblem, INHERITS_FROM(CCTpfaModel, FractureProblem));
NEW_TYPE_TAG(FractureCCMpfaProblem, INHERITS_FROM(CCMpfaModel, FractureProblem));
//! Enable caching (more memory, but faster runtime)
SET_BOOL_PROP(FractureCCProblem, EnableFVGridGeometryCache, true);
SET_BOOL_PROP(FractureCCProblem, EnableGlobalVolumeVariablesCache, true);
SET_BOOL_PROP(FractureCCProblem, EnableGlobalFluxVariablesCache, true);
SET_BOOL_PROP(FractureProblem, EnableFVGridGeometryCache, true);
SET_BOOL_PROP(FractureProblem, EnableGlobalVolumeVariablesCache, true);
SET_BOOL_PROP(FractureProblem, EnableGlobalFluxVariablesCache, true);
#if HAVE_DUNE_FOAMGRID
SET_TYPE_PROP(FractureProblem, Grid, Dune::FoamGrid<2, 3>);
......
......@@ -25,9 +25,10 @@
#ifndef DUMUX_1P_SINGULARITY_PROBLEM_HH
#define DUMUX_1P_SINGULARITY_PROBLEM_HH
#include <dumux/implicit/cellcentered/tpfa/properties.hh>
#include <dumux/discretization/cellcentered/tpfa/properties.hh>
#include <dumux/discretization/box/properties.hh>