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

[Cleanup][Multidomain][Facet] rename facet multidomain tests

parent 70f5cc15
dune_symlink_to_source_files(FILES "grids" "facetcoupling_1p1p.input" "convergencetest.py")
dune_symlink_to_source_files(FILES "grids" "params.input" "convergencetest.py")
# executable for tpfa tests
add_executable(test_facetcoupling_tpfa_1p1p EXCLUDE_FROM_ALL test_facetcoupling_fv_1p1p.cc)
target_compile_definitions(test_facetcoupling_tpfa_1p1p PUBLIC BULKTYPETAG=OnePBulkTpfa LOWDIMTYPETAG=OnePLowDimTpfa)
# exectuable for box tests
add_executable(test_facetcoupling_box_1p1p EXCLUDE_FROM_ALL test_facetcoupling_fv_1p1p.cc)
target_compile_definitions(test_facetcoupling_box_1p1p PUBLIC BULKTYPETAG=OnePBulkBox LOWDIMTYPETAG=OnePLowDimBox)
dune_add_test(NAME test_facet_1p1p_tpfa_convergence
dune_add_test(NAME test_md_facet_1p1p_tpfa_convergence
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND AND gmsh_FOUND AND HAVE_UMFPACK )"
TARGET test_facetcoupling_tpfa_1p1p
SOURCES main.cc
COMPILE_DEFINITIONS BULKTYPETAG=OnePBulkTpfa LOWDIMTYPETAG=OnePLowDimTpfa
COMMAND ./convergencetest.py
CMD_ARGS test_facetcoupling_tpfa_1p1p 1e-4)
CMD_ARGS test_md_facet_1p1p_tpfa_convergence 1e-4)
dune_add_test(NAME test_facet_1p1p_box_convergence
dune_add_test(NAME test_md_facet_1p1p_box_convergence
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND AND gmsh_FOUND AND HAVE_UMFPACK )"
TARGET test_facetcoupling_box_1p1p
SOURCES main.cc
COMPILE_DEFINITIONS BULKTYPETAG=OnePBulkBox LOWDIMTYPETAG=OnePLowDimBox
COMMAND ./convergencetest.py
CMD_ARGS test_facetcoupling_box_1p1p 1e-4)
set(CMAKE_BUILD_TYPE Release)
CMD_ARGS test_md_facet_1p1p_box_convergence 1e-4 )
#install sources
install(FILES
test_facetcoupling_fv_1p1p.cc
bulkProblem.hh
lowdimproblem.hh
main.cc
problem_bulk.hh
problem_lowdim.hh
spatialparams.hh
convergencetest.py
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/multidomain/facet/1p_1p/analytical)
......@@ -50,7 +50,8 @@ for permIndex in range(0, len(k)):
tmpGeoFile.close()
subprocess.call(['gmsh', '-2', 'grids/tmp.geo'])
subprocess.call(['./' + execName, 'facetcoupling_1p1p.input',
subprocess.call(['./' + execName, 'params.input',
'-Vtk.OutputName', execName,
'-Grid.File', 'grids/tmp.msh',
'-Grid.NumElemsPerSide', str(int(cells)),
'-LowDim.SpatialParams.Permeability', str(k[permIndex]),
......
......@@ -28,8 +28,8 @@
#include <dune/common/parallel/mpihelper.hh>
#include <dune/geometry/quadraturerules.hh>
#include "bulkproblem.hh"
#include "lowdimproblem.hh"
#include "problem_bulk.hh"
#include "problem_lowdim.hh"
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
......@@ -266,7 +266,7 @@ int main(int argc, char** argv) try
bulkGridVariables->init(x[bulkId]);
lowDimGridVariables->init(x[lowDimId]);
// intialize the vtk output module
// intialize the vtk output modulell
const auto bulkDM = BulkFVGridGeometry::discMethod == DiscretizationMethod::box ? Dune::VTK::nonconforming : Dune::VTK::conforming;
using BulkSolutionVector = std::decay_t<decltype(x[bulkId])>;
using LowDimSolutionVector = std::decay_t<decltype(x[lowDimId])>;
......
......@@ -8,12 +8,12 @@ NumElemsPerSide = 25
File = ./grids/hybridgrid.msh
[Bulk]
Problem.Name = 1p_1p_bulk
SpatialParams.Permeability = 1
Problem.Name = bulk
[LowDim]
SpatialParams.Permeability = 1e4
Problem.Name = 1p_1p_lowdim
Problem.Name = lowdim
[L2Error]
QuadratureOrder = 1
......@@ -23,3 +23,6 @@ NumericDifference.BaseEpsilon = 1e10
[Output]
EnableVTK = false # do not write .vtk files per default
[Vtk]
OutputName = test_md_facet_1p1p
......@@ -95,11 +95,21 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
public:
OnePBulkProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<typename ParentType::SpatialParams> spatialParams,
const std::string& paramGroup = "")
const std::string& paramGroup = "Bulk")
: ParentType(fvGridGeometry, spatialParams, paramGroup)
, lowDimPermeability_(getParam<Scalar>("LowDim.SpatialParams.Permeability"))
, aperture_(getParam<Scalar>("Problem.FractureAperture"))
{}
{
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
/*!
* \brief The problem name.
*/
const std::string& name() const
{
return problemName_;
}
//! Specifies the type of boundary condition at a given position
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
......@@ -191,6 +201,7 @@ private:
std::shared_ptr<CouplingManager> couplingManagerPtr_;
Scalar lowDimPermeability_;
Scalar aperture_;
std::string problemName_;
};
} // end namespace Dumux
......
......@@ -95,10 +95,20 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
public:
OnePLowDimProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<typename ParentType::SpatialParams> spatialParams,
const std::string& paramGroup = "")
const std::string& paramGroup = "LowDim")
: ParentType(fvGridGeometry, spatialParams, paramGroup)
, aperture_(getParam<Scalar>("Problem.FractureAperture"))
{}
{
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
/*!
* \brief The problem name.
*/
const std::string& name() const
{
return problemName_;
}
//! Specifies the type of boundary condition at a given position
BoundaryTypes boundaryTypesAtPos(const GlobalPosition& globalPos) const
......@@ -159,6 +169,7 @@ public:
private:
std::shared_ptr<CouplingManager> couplingManagerPtr_;
Scalar aperture_;
std::string problemName_;
};
} // end namespace Dumux
......
dune_symlink_to_source_files(FILES "grids" "facetcoupling_1p1p_threedomain.input")
dune_symlink_to_source_files(FILES "grids" "params.input")
dune_add_test(NAME test_facetcoupling_tpfa_1p1p_threedomain
SOURCES test_facetcoupling_tpfa_1p1p_threedomain.cc
dune_add_test(NAME test_md_facet_1p1p_threedomain_tpfa
SOURCES main.cc
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/facetcoupling_1p1p_threedomain_bulk.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_1p_1p_bulk-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/facetcoupling_1p1p_threedomain_facet.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_1p_1p_facet-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/facetcoupling_1p1p_threedomain_edge.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_1p_1p_edge-00001.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/test_facetcoupling_tpfa_1p1p_threedomain facetcoupling_1p1p_threedomain.input")
--files ${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_threedomain_tpfa_bulk-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_threedomain_tpfa_bulk-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_threedomain_tpfa_facet-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_threedomain_tpfa_facet-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_threedomain_tpfa_edge-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_threedomain_tpfa_edge-00001.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_threedomain_tpfa params.input
-Vtk.OutputName test_md_facet_1p1p_threedomain_tpfa")
set(CMAKE_BUILD_TYPE Release)
#install sources
install(FILES
test_facetcoupling_tpfa_1p1p_threedomain.cc
bulkProblem.hh
facetproblem.hh
edgeproblem.hh
main.cc
problem_bulk.hh
problem_facet.hh
problem_edge.hh
spatialparams.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/multidomain/facet/1p_1p/threedomain)
......@@ -32,9 +32,9 @@
#include <dumux/common/dumuxmessage.hh>
#include <dumux/common/defaultusagemessage.hh>
#include "bulkproblem.hh"
#include "facetproblem.hh"
#include "edgeproblem.hh"
#include "problem_bulk.hh"
#include "problem_facet.hh"
#include "problem_edge.hh"
#include <dumux/assembly/diffmethod.hh>
......@@ -178,8 +178,10 @@ int main(int argc, char** argv) try
using BulkSolutionVector = std::decay_t<decltype(x[bulkId])>;
using FacetSolutionVector = std::decay_t<decltype(x[facetId])>;
using EdgeSolutionVector = std::decay_t<decltype(x[edgeId])>;
// intialize the vtk output module
VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, x[bulkId], bulkProblem->name());
VtkOutputModule<FacetGridVariables, FacetSolutionVector> facetVtkWriter(*facetGridVariables, x[facetId], facetProblem->name());
VtkOutputModule<FacetGridVariables, FacetSolutionVector> facetVtkWriter(*facetGridVariables, x[facetId], facetProblem->name());
VtkOutputModule<EdgeGridVariables, EdgeSolutionVector> edgeVtkWriter(*edgeGridVariables, x[edgeId], edgeProblem->name());
// Add model specific output fields
......
......@@ -5,7 +5,7 @@ EnableGravity = false
File = ./grids/grid.msh
[Bulk]
Problem.Name = test_1p_1p_bulk
Problem.Name = bulk
SpatialParams.Permeability = 1
FacetCoupling.Xi = 1.0
......@@ -14,11 +14,14 @@ Aperture = 1e-2
[Facet]
SpatialParams.Permeability = 1e3
Problem.Name = test_1p_1p_facet
Problem.Name = facet
Problem.Aperture = 1e-2
FacetCoupling.Xi = 1.0
[Edge]
SpatialParams.Permeability = 1e5
Problem.Name = test_1p_1p_edge
Problem.Name = edge
Problem.Aperture = 1e-3
[Vtk]
OutputName = test_md_facet_1p1p_threedomain_tpfa
......@@ -96,9 +96,19 @@ public:
//! The constructor
OnePBulkProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<typename ParentType::SpatialParams> spatialParams,
const std::string& paramGroup = "")
const std::string& paramGroup = "Bulk")
: ParentType(fvGridGeometry, spatialParams, 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_;
}
//! Specifies the kind of boundary condition on a given boundary position.
BoundaryTypes boundaryTypesAtPos(const GlobalPosition& globalPos) const
......@@ -152,6 +162,7 @@ public:
{ couplingManagerPtr_ = cm; }
private:
std::string problemName_;
std::shared_ptr<CouplingManager> couplingManagerPtr_;
};
......
......@@ -100,11 +100,20 @@ public:
//! The constructor
OnePEdgeProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<typename ParentType::SpatialParams> spatialParams,
const std::string& paramGroup = "")
const std::string& paramGroup = "Edge")
: ParentType(fvGridGeometry, spatialParams, paramGroup)
{
const auto a = getParam<Scalar>("Extrusion.Aperture");
exFactor_ = a*a;
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
/*!
* \brief The problem name.
*/
const std::string& name() const
{
return problemName_;
}
//!Specifies the type of boundary condition on a boundary position
......@@ -152,6 +161,7 @@ public:
private:
Scalar exFactor_;
std::string problemName_;
std::shared_ptr<CouplingManager> couplingManagerPtr_;
};
......
......@@ -100,10 +100,20 @@ public:
//! The constructor
OnePFacetProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<typename ParentType::SpatialParams> spatialParams,
const std::string& paramGroup = "")
const std::string& paramGroup = "Facet")
: ParentType(fvGridGeometry, spatialParams, paramGroup)
, aperture_(getParam<Scalar>("Extrusion.Aperture"))
{}
{
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
/*!
* \brief The problem name.
*/
const std::string& name() const
{
return problemName_;
}
//! Specifies the kind of boundary condition at a boundary position
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
......@@ -165,6 +175,7 @@ public:
private:
Scalar aperture_;
std::string problemName_;
std::shared_ptr<CouplingManager> couplingManagerPtr_;
};
......
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