Commit b1179347 authored by Ned Coltman's avatar Ned Coltman Committed by Timo Koch
Browse files

[cleanup][multidomain][poromechanics]

parent ba988fbc
dune_symlink_to_source_files(FILES "el1p.input")
dune_symlink_to_source_files(FILES "params.input")
dune_add_test(NAME test_el1p
SOURCES test_el1p.cc
dune_add_test(NAME test_md_poromechanics_el1p
SOURCES main.cc
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/el1p_p_reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/onep-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/el1p_u_reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/poroelastic-00001.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_el1p el1p.input")
--files ${CMAKE_SOURCE_DIR}/test/references/test_md_poromechanics_el1p_1p-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_poromechanics_el1p_onep-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_poromechanics_el1p_poroelastic-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_poromechanics_el1p_poroelastic-00001.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_poromechanics_el1p params.input
-Vtk.OutputName test_md_poromechanics_el1p")
set(CMAKE_BUILD_TYPE Release)
#install sources
install(FILES
1pproblem.hh
1pspatialparams.hh
poroelasticproblem.hh
poroelasticspatialparams.hh
test_el1p.cc
problem_1p.hh
spatialparams_1p.hh
problem_poroelastic.hh
spatialparams_poroelastic.hh
main.cc
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/multidomain/poromechanics/el1p)
......@@ -25,8 +25,8 @@
#include <dune/common/parallel/mpihelper.hh>
#include "1pproblem.hh"
#include "poroelasticproblem.hh"
#include "problem_1p.hh"
#include "problem_poroelastic.hh"
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
......@@ -149,7 +149,7 @@ int main(int argc, char** argv) try
onePGridVariables->init(x[onePId]);
poroMechGridVariables->init(x[poroMechId]);
// intialize the dune vtk writers
// intialize the vtk output module
using OnePVtkOutputModule = Dumux::VtkOutputModule<OnePGridVariables, typename GET_PROP_TYPE(OnePTypeTag, SolutionVector)>;
using PoroMechVtkOutputModule = Dumux::VtkOutputModule<PoroMechGridVariables, typename GET_PROP_TYPE(PoroMechTypeTag, SolutionVector)>;
OnePVtkOutputModule onePVtkWriter(*onePGridVariables, x[onePId], onePProblem->name());
......
......@@ -23,3 +23,6 @@ MaxIterations = 2000
[Component]
SolidDensity = 2700
[Vtk]
OutputName = test_md_poromechanics_el1p
......@@ -36,7 +36,7 @@
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/material/components/constant.hh>
#include "1pspatialparams.hh"
#include "spatialparams_1p.hh"
namespace Dumux {
......@@ -94,9 +94,19 @@ class OnePSubProblem : public PorousMediumFlowProblem<TypeTag>
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
public:
OnePSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "")
OnePSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "OneP")
: ParentType(fvGridGeometry, paramGroup)
{}
{
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
/*!
* \brief The problem name.
*/
const std::string& name() const
{
return problemName_;
}
//! Return the temperature within the domain in [K].
Scalar temperature() const
......@@ -133,6 +143,7 @@ public:
private:
static constexpr Scalar eps_ = 1.0e-6;
std::string problemName_;
};
} //end namespace Dumux
......
......@@ -35,7 +35,7 @@
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/material/components/constant.hh>
#include "poroelasticspatialparams.hh"
#include "spatialparams_poroelastic.hh"
namespace Dumux {
......@@ -94,8 +94,19 @@ class PoroElasticSubProblem : public GeomechanicsFVProblem<TypeTag>
public:
//! The constructor
PoroElasticSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "")
: ParentType(fvGridGeometry, paramGroup) {}
PoroElasticSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "PoroElastic")
: ParentType(fvGridGeometry, paramGroup)
{
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
/*!
* \brief The problem name.
*/
const std::string& name() const
{
return problemName_;
}
//! The temperature in the domain
static constexpr Scalar temperature()
......@@ -176,6 +187,7 @@ public:
private:
std::shared_ptr<const CouplingManager> couplingManagerPtr_;
static constexpr Scalar eps_ = 3e-6;
std::string problemName_;
};
} //end namespace
......
dune_symlink_to_source_files(FILES "el2p.input")
dune_symlink_to_source_files(FILES "params.input")
dune_add_test(NAME test_el2p
SOURCES test_el2p.cc
dune_add_test(NAME test_md_poromechanics_el2p
SOURCES main.cc
CMAKE_GUARD HAVE_UMFPACK
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/el2p_2p_reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/twop-00010.vtu
${CMAKE_SOURCE_DIR}/test/references/el2p_u_reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/poroelastic-00010.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_el2p el2p.input")
--files ${CMAKE_SOURCE_DIR}/test/references/test_md_poromechanics_el2p_2p-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_poromechanics_el2p_twop-00010.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_poromechanics_el2p_poroelastic-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_poromechanics_el2p_poroelastic-00010.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_poromechanics_el2p params.input
-Vtk.OutputName test_md_poromechanics_el2p")
set(CMAKE_BUILD_TYPE Release)
#install sources
install(FILES
2pproblem.hh
2pspatialparams.hh
poroelasticproblem.hh
poroelasticspatialparams.hh
test_el2p.cc
problem_2p.hh
spatialparams_2p.hh
problem_poroelastic.hh
spatialparams_poroelastic.hh
main.cc
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/multidomain/poromechanics/el2p)
......@@ -27,8 +27,8 @@
#include <dune/common/parallel/mpihelper.hh>
#include <dune/common/timer.hh>
#include "2pproblem.hh"
#include "poroelasticproblem.hh"
#include "problem_2p.hh"
#include "problem_poroelastic.hh"
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
......@@ -157,7 +157,7 @@ int main(int argc, char** argv) try
const auto maxDT = getParam<Scalar>("TimeLoop.MaxTimeStepSize");
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// intialize the dune vtk writers
// intialize the vtk output module
using TwoPVtkOutputModule = Dumux::VtkOutputModule<TwoPGridVariables, typename GET_PROP_TYPE(TwoPTypeTag, SolutionVector)>;
using PoroMechVtkOutputModule = Dumux::VtkOutputModule<PoroMechGridVariables, typename GET_PROP_TYPE(PoroMechTypeTag, SolutionVector)>;
TwoPVtkOutputModule twoPVtkWriter(*twoPGridVariables, x[twoPId], twoPProblem->name());
......@@ -166,8 +166,8 @@ int main(int argc, char** argv) try
// add output fields to writers
using TwoPOutputFields = typename GET_PROP_TYPE(TwoPTypeTag, IOFields);
using PoroMechOutputFields = typename GET_PROP_TYPE(PoroMechTypeTag, IOFields);
TwoPOutputFields::init(twoPVtkWriter);
PoroMechOutputFields::init(poroMechVtkWriter);
TwoPOutputFields::initOutputModule(twoPVtkWriter);
PoroMechOutputFields::initOutputModule(poroMechVtkWriter);
// write initial solution
twoPVtkWriter.write(0.0);
......
......@@ -32,3 +32,6 @@ SolidDensity = 2650
[Newton]
TargetSteps = 15
MaxRelativeShift = 1e-6
[Vtk]
OutputName = test_md_poromechanics_el2p
......@@ -35,8 +35,8 @@
#include <dumux/material/fluidsystems/brineco2.hh>
#include "2pspatialparams.hh"
#include "el2pco2tables.hh"
#include "spatialparams_2p.hh"
#include "co2tables_el2p.hh"
namespace Dumux {
......@@ -102,9 +102,19 @@ class TwoPSubProblem : public PorousMediumFlowProblem<TypeTag>
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
public:
TwoPSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "")
TwoPSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "TwoP")
: ParentType(fvGridGeometry, paramGroup)
{}
{
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
/*!
* \brief The problem name.
*/
const std::string& name() const
{
return problemName_;
}
//! Return the temperature within the domain in [K].
Scalar temperature() const
......@@ -158,6 +168,7 @@ public:
private:
static constexpr Scalar eps_ = 1.0e-6;
std::string problemName_;
};
} //end namespace Dumux
......
......@@ -34,8 +34,8 @@
#include <dumux/material/fluidsystems/brineco2.hh>
#include "poroelasticspatialparams.hh"
#include "el2pco2tables.hh"
#include "spatialparams_poroelastic.hh"
#include "co2tables_el2p.hh"
namespace Dumux {
......@@ -98,8 +98,19 @@ class PoroElasticSubProblem : public GeomechanicsFVProblem<TypeTag>
public:
//! The constructor
PoroElasticSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "")
: ParentType(fvGridGeometry, paramGroup) {}
PoroElasticSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "PoroElastic")
: ParentType(fvGridGeometry, paramGroup)
{
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
/*!
* \brief The problem name.
*/
const std::string& name() const
{
return problemName_;
}
//! The temperature in the domain
static constexpr Scalar temperature()
......@@ -191,6 +202,7 @@ public:
private:
std::shared_ptr<const CouplingManager> couplingManagerPtr_;
static constexpr Scalar eps_ = 3e-6;
std::string problemName_;
};
} //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