Commit 529f0571 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[test][facet][1p] add test producing linear profile with jump

this jump should be independent of the choice for xi, which is why
here we test if for different values of xi the same reference solution
is obtained.
parent f0116e97
add_subdirectory(analytical)
add_subdirectory(linearprofile)
add_subdirectory(threedomain)
dune_symlink_to_source_files(FILES "grids" "params.input")
add_executable(test_md_facet_1p1p_linearprofile_tpfa EXCLUDE_FROM_ALL main.cc)
target_compile_definitions(test_md_facet_1p1p_linearprofile_tpfa
PUBLIC BULKTYPETAG=OnePBulkTpfa
LOWDIMTYPETAG=OnePLowDimTpfa
LOWDIMGRIDTYPE=Dune::FoamGrid<1,2>
BULKGRIDTYPE=Dune::ALUGrid<2,2,Dune::cube,Dune::nonconforming>)
add_executable(test_md_facet_1p1p_linearprofile_surface_tpfa EXCLUDE_FROM_ALL main.cc)
target_compile_definitions(test_md_facet_1p1p_linearprofile_surface_tpfa
PUBLIC BULKTYPETAG=OnePBulkTpfa
LOWDIMTYPETAG=OnePLowDimTpfa
LOWDIMGRIDTYPE=Dune::FoamGrid<1,3>
BULKGRIDTYPE=Dune::ALUGrid<2,3,Dune::cube,Dune::nonconforming>)
dune_add_test(NAME test_md_facet_1p1p_linearprofile_xi1_tpfa
LABELS multidomain
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
TARGET test_md_facet_1p1p_linearprofile_tpfa
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_linearprofile_tpfa_bulk-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_xi1_tpfa_bulk-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_linearprofile_tpfa_lowdim-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_xi1_tpfa_lowdim-00001.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_tpfa params.input")
dune_add_test(NAME test_md_facet_1p1p_linearprofile_xi066_tpfa
LABELS multidomain
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
TARGET test_md_facet_1p1p_linearprofile_tpfa
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_linearprofile_tpfa_bulk-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_xi066_tpfa_bulk-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_linearprofile_tpfa_lowdim-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_xi066_tpfa_lowdim-00001.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_tpfa params.input \
-FacetCoupling.Xi 0.66 \
-Vtk.OutputName test_md_facet_1p1p_linearprofile_xi066_tpfa")
dune_add_test(NAME test_md_facet_1p1p_linearprofile_surface_xi1_tpfa
LABELS multidomain
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
TARGET test_md_facet_1p1p_linearprofile_surface_tpfa
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_linearprofile_surface_tpfa_bulk-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_surface_xi1_tpfa_bulk-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_linearprofile_surface_tpfa_lowdim-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_surface_xi1_tpfa_lowdim-00001.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_surface_tpfa params.input \
-Vtk.OutputName test_md_facet_1p1p_linearprofile_surface_xi1_tpfa")
dune_add_test(NAME test_md_facet_1p1p_linearprofile_surface_xi066_tpfa
LABELS multidomain
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
TARGET test_md_facet_1p1p_linearprofile_surface_tpfa
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_linearprofile_surface_tpfa_bulk-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_surface_xi066_tpfa_bulk-00001.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_1p1p_linearprofile_surface_tpfa_lowdim-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_surface_xi066_tpfa_lowdim-00001.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_1p1p_linearprofile_surface_tpfa params.input \
-FacetCoupling.Xi 0.66 \
-Vtk.OutputName test_md_facet_1p1p_linearprofile_surface_xi066_tpfa")
set(CMAKE_BUILD_TYPE Release)
#install sources
install(FILES
main.cc
problem_bulk.hh
problem_lowdim.hh
spatialparams.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/multidomain/facet/1p_1p/linearprofile)
// domain measures
xmax = 3.0;
ymax = 1.0;
// use zmax != 0 to produce a surface grid
zmax = 0.0;
// discretization specifics
numCellsX = 120;
numCellsY = 40;
Point(1) = {0.0, 0.0, 0.0};
Point(2) = {xmax/2.0, 0.0, zmax/2.0};
Point(3) = {xmax, 0.0, zmax};
Point(4) = {xmax, ymax, zmax};
Point(5) = {xmax/2.0,ymax, zmax/2.0};
Point(6) = {0.0, ymax, 0.0};
Line(1) = {1, 2}; Transfinite Line{1} = numCellsX/2;
Line(2) = {2, 3}; Transfinite Line{2} = numCellsX/2;
Line(3) = {3, 4}; Transfinite Line{3} = numCellsY;
Line(4) = {4, 5}; Transfinite Line{4} = numCellsX/2;
Line(5) = {5, 6}; Transfinite Line{5} = numCellsX/2;
Line(6) = {6, 1}; Transfinite Line{6} = numCellsY;
Line(7) = {2, 5}; Transfinite Line{7} = numCellsY;
Line Loop(1) = {1, 7, 5, 6};
Line Loop(2) = {2, 3, 4, -7};
Plane Surface(1) = {1};
Plane Surface(2) = {2};
Physical Line(1) = {7};
Physical Surface(1) = {1, 2};
Transfinite Surface "*";
Recombine Surface "*";
This diff is collapsed.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \brief test for the one-phase facet coupling model
*/
#include <config.h>
#include <iostream>
#include <dune/common/parallel/mpihelper.hh>
#include "problem_bulk.hh"
#include "problem_lowdim.hh"
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/dumuxmessage.hh>
#include <dumux/common/defaultusagemessage.hh>
#include <dumux/assembly/diffmethod.hh>
#include <dumux/linear/seqsolverbackend.hh>
#include <dumux/multidomain/newtonsolver.hh>
#include <dumux/multidomain/fvassembler.hh>
#include <dumux/multidomain/traits.hh>
#include <dumux/multidomain/facet/gridmanager.hh>
#include <dumux/multidomain/facet/couplingmapper.hh>
#include <dumux/multidomain/facet/couplingmanager.hh>
#include <dumux/io/vtkoutputmodule.hh>
// obtain/define some types to be used below in the property definitions and in main
template< class BulkTypeTag, class LowDimTypeTag >
class TestTraits
{
using BulkFVGridGeometry = typename GET_PROP_TYPE(BulkTypeTag, FVGridGeometry);
using LowDimFVGridGeometry = typename GET_PROP_TYPE(LowDimTypeTag, FVGridGeometry);
public:
using MDTraits = Dumux::MultiDomainTraits<BulkTypeTag, LowDimTypeTag>;
using CouplingMapper = Dumux::FacetCouplingMapper<BulkFVGridGeometry, LowDimFVGridGeometry>;
using CouplingManager = Dumux::FacetCouplingManager<MDTraits, CouplingMapper>;
};
namespace Dumux {
namespace Properties {
// set cm property in the sub-problems
using TpfaTraits = TestTraits<TTAG(OnePBulkTpfa), TTAG(OnePLowDimTpfa)>;
SET_TYPE_PROP(OnePBulkTpfa, CouplingManager, typename TpfaTraits::CouplingManager);
SET_TYPE_PROP(OnePLowDimTpfa, CouplingManager, typename TpfaTraits::CouplingManager);
} // end namespace Properties
} // end namespace Dumux
// main program
int main(int argc, char** argv) try
{
using namespace Dumux;
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
// initialize MPI, finalize is done automatically on exit
const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv);
// print dumux start message
if (mpiHelper.rank() == 0)
DumuxMessage::print(/*firstCall=*/true);
// initialize parameter tree
Parameters::init(argc, argv);
//////////////////////////////////////////////////////
// try to create the grids (from the given grid file)
//////////////////////////////////////////////////////
using BulkProblemTypeTag = TTAG(BULKTYPETAG);
using LowDimProblemTypeTag = TTAG(LOWDIMTYPETAG);
using BulkGrid = typename GET_PROP_TYPE(BulkProblemTypeTag, Grid);
using LowDimGrid = typename GET_PROP_TYPE(LowDimProblemTypeTag, Grid);
using GridManager = FacetCouplingGridManager<BulkGrid, LowDimGrid>;
GridManager gridManager;
gridManager.init();
gridManager.loadBalance();
////////////////////////////////////////////////////////////
// run stationary, non-linear problem on this grid
////////////////////////////////////////////////////////////
// we compute on the leaf grid views
const auto& bulkGridView = gridManager.template grid<0>().leafGridView();
const auto& lowDimGridView = gridManager.template grid<1>().leafGridView();
// create the finite volume grid geometries
using BulkFVGridGeometry = typename GET_PROP_TYPE(BulkProblemTypeTag, FVGridGeometry);
using LowDimFVGridGeometry = typename GET_PROP_TYPE(LowDimProblemTypeTag, FVGridGeometry);
auto bulkFvGridGeometry = std::make_shared<BulkFVGridGeometry>(bulkGridView);
auto lowDimFvGridGeometry = std::make_shared<LowDimFVGridGeometry>(lowDimGridView);
bulkFvGridGeometry->update();
lowDimFvGridGeometry->update();
// the coupling mapper
using TestTraits = TestTraits<BulkProblemTypeTag, LowDimProblemTypeTag>;
auto couplingMapper = std::make_shared<typename TestTraits::CouplingMapper>();
couplingMapper->update(*bulkFvGridGeometry, *lowDimFvGridGeometry, gridManager.getEmbeddings());
// the coupling manager
using CouplingManager = typename TestTraits::CouplingManager;
auto couplingManager = std::make_shared<CouplingManager>();
// the problems (boundary conditions)
using BulkProblem = typename GET_PROP_TYPE(BulkProblemTypeTag, Problem);
using LowDimProblem = typename GET_PROP_TYPE(LowDimProblemTypeTag, Problem);
auto bulkSpatialParams = std::make_shared<typename BulkProblem::SpatialParams>(bulkFvGridGeometry, "Bulk");
auto bulkProblem = std::make_shared<BulkProblem>(bulkFvGridGeometry, bulkSpatialParams, couplingManager, "Bulk");
auto lowDimSpatialParams = std::make_shared<typename LowDimProblem::SpatialParams>(lowDimFvGridGeometry, "LowDim");
auto lowDimProblem = std::make_shared<LowDimProblem>(lowDimFvGridGeometry, lowDimSpatialParams, couplingManager, "LowDim");
// the solution vector
using MDTraits = typename TestTraits::MDTraits;
using SolutionVector = typename MDTraits::SolutionVector;
SolutionVector x;
static const auto bulkId = typename MDTraits::template SubDomain<0>::Index();
static const auto lowDimId = typename MDTraits::template SubDomain<1>::Index();
x[bulkId].resize(bulkFvGridGeometry->numDofs());
x[lowDimId].resize(lowDimFvGridGeometry->numDofs());
bulkProblem->applyInitialSolution(x[bulkId]);
lowDimProblem->applyInitialSolution(x[lowDimId]);
// initialize coupling manager
couplingManager->init(bulkProblem, lowDimProblem, couplingMapper, x);
// the grid variables
using BulkGridVariables = typename GET_PROP_TYPE(BulkProblemTypeTag, GridVariables);
using LowDimGridVariables = typename GET_PROP_TYPE(LowDimProblemTypeTag, GridVariables);
auto bulkGridVariables = std::make_shared<BulkGridVariables>(bulkProblem, bulkFvGridGeometry);
auto lowDimGridVariables = std::make_shared<LowDimGridVariables>(lowDimProblem, lowDimFvGridGeometry);
bulkGridVariables->init(x[bulkId]);
lowDimGridVariables->init(x[lowDimId]);
// intialize the vtk output module
using BulkSolutionVector = std::decay_t<decltype(x[bulkId])>;
using LowDimSolutionVector = std::decay_t<decltype(x[lowDimId])>;
VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, x[bulkId], bulkProblem->name(), "Bulk");
VtkOutputModule<LowDimGridVariables, LowDimSolutionVector> lowDimVtkWriter(*lowDimGridVariables, x[lowDimId], lowDimProblem->name(), "LowDim");
// container for the output of the exact solutions
std::vector<typename GET_PROP_TYPE(BulkProblemTypeTag, Scalar)> bulkExact;
std::vector<typename GET_PROP_TYPE(LowDimProblemTypeTag, Scalar)> lowDimExact;
// Add model specific output fields
using BulkIOFields = typename GET_PROP_TYPE(BulkProblemTypeTag, IOFields);
using LowDimIOFields = typename GET_PROP_TYPE(LowDimProblemTypeTag, IOFields);
BulkIOFields::initOutputModule(bulkVtkWriter);
LowDimIOFields::initOutputModule(lowDimVtkWriter);
// write initial solution
bulkVtkWriter.write(0.0);
lowDimVtkWriter.write(0.0);
// the assembler
using Assembler = MultiDomainFVAssembler<MDTraits, CouplingManager, DiffMethod::numeric, /*implicit?*/true>;
auto assembler = std::make_shared<Assembler>( std::make_tuple(bulkProblem, lowDimProblem),
std::make_tuple(bulkFvGridGeometry, lowDimFvGridGeometry),
std::make_tuple(bulkGridVariables, lowDimGridVariables),
couplingManager);
// the linear solver
using LinearSolver = ILU0BiCGSTABBackend;
auto linearSolver = std::make_shared<LinearSolver>();
// the non-linear solver
using NewtonSolver = Dumux::MultiDomainNewtonSolver<Assembler, LinearSolver, CouplingManager>;
auto newtonSolver = std::make_shared<NewtonSolver>(assembler, linearSolver, couplingManager);
// linearize & solve
newtonSolver->solve(x);
// update grid variables for output
bulkGridVariables->update(x[bulkId]);
lowDimGridVariables->update(x[lowDimId]);
// write vtk output
bulkVtkWriter.write(1.0);
lowDimVtkWriter.write(1.0);
////////////////////////////////////////////////////////////
// finalize, print dumux message to say goodbye
////////////////////////////////////////////////////////////
if (mpiHelper.rank() == 0)
DumuxMessage::print(/*firstCall=*/false);
return 0;
}
catch (Dumux::ParameterException &e)
{
std::cerr << std::endl << e << " ---> Abort!" << std::endl;
return 1;
}
catch (Dune::DGFException & e)
{
std::cerr << "DGF exception thrown (" << e <<
"). Most likely, the DGF file name is wrong "
"or the DGF file is corrupted, "
"e.g. missing hash at end of file or wrong number (dimensions) of entries."
<< " ---> Abort!" << std::endl;
return 2;
}
catch (Dune::Exception &e)
{
std::cerr << "Dune reported error: " << e << " ---> Abort!" << std::endl;
return 3;
}
catch (...)
{
std::cerr << "Unknown exception thrown! ---> Abort!" << std::endl;
return 4;
}
[Problem]
EnableGravity = false
FractureAperture = 1e-3
[Grid]
File = ./grids/linear.msh
[Bulk]
Problem.Name = bulk
SpatialParams.Permeability = 1
[LowDim]
Problem.Name = lowdim
SpatialParams.Permeability = 1e-4
[FacetCoupling]
Xi = 1.0
[Assembly]
NumericDifference.BaseEpsilon = 1e10
[Vtk]
OutputName = test_md_facet_1p1p_linearprofile_xi1_tpfa
[Component]
LiquidDensity = 1.0
LiquidKinematicViscosity = 1.0
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup MultiDomain
* \ingroup FacetCoupling
* \brief The problem for the bulk domain in the single-phase facet coupling test
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
#include <dune/alugrid/grid.hh>
#include <dumux/material/components/constant.hh>
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/multidomain/facet/box/properties.hh>
#include <dumux/multidomain/facet/cellcentered/tpfa/properties.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/porousmediumflow/1p/model.hh>
#include "spatialparams.hh"
// default for the bulk grid type
#ifndef BULKGRIDTYPE
#define BULKGRIDTYPE Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>
#endif
namespace Dumux {
// forward declarations
template<class TypeTag> class OnePBulkProblem;
namespace Properties {
// create the type tag nodes
NEW_TYPE_TAG(OnePBulk, INHERITS_FROM(OneP));
NEW_TYPE_TAG(OnePBulkTpfa, INHERITS_FROM(OnePBulk, CCTpfaFacetCouplingModel));
// Set the grid type
SET_TYPE_PROP(OnePBulk, Grid, BULKGRIDTYPE);
// Set the problem type
SET_TYPE_PROP(OnePBulk, Problem, OnePBulkProblem<TypeTag>);
// set the spatial params
SET_TYPE_PROP(OnePBulk, SpatialParams, OnePSpatialParams< typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar) >);
// the fluid system
SET_PROP(OnePBulk, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
public:
using type = FluidSystems::OnePLiquid< Scalar, Components::Constant<1, Scalar> >;
};
} // end namespace Properties
/*!
* \ingroup OnePTests
* \brief Test problem for the incompressible one-phase model
* with coupling across the bulk grid facets
*/
template<class TypeTag>
class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables);
using PrimaryVariables = typename GridVariables::PrimaryVariables;
using Scalar = typename GridVariables::Scalar;
using FVGridGeometry = typename GridVariables::GridGeometry;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolume = typename FVGridGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVGridGeometry::SubControlVolumeFace;
using GridView = typename FVGridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager);
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
public:
OnePBulkProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<typename ParentType::SpatialParams> spatialParams,
std::shared_ptr<CouplingManager> couplingManager,
const std::string& paramGroup = "")
: ParentType(fvGridGeometry, spatialParams, paramGroup)
, couplingManagerPtr_(couplingManager)
{
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" +
getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
//! 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
{
BoundaryTypes values;
values.setAllNeumann();
if (globalPos[0] < 1e-6 || globalPos[0] > this->fvGridGeometry().bBoxMax()[0] - 1e-6)
values.setAllDirichlet();
return values;
}
//! Specifies the type of interior boundary condition at a given position
BoundaryTypes interiorBoundaryTypes(const Element& element, const SubControlVolumeFace& scvf) const
{
BoundaryTypes values;
values.setAllNeumann();
return values;
}
//! Evaluate the source term at a given position
NumEqVector sourceAtPos(const GlobalPosition& globalPos) const
{ return NumEqVector(0.0); }
//! evaluates the Dirichlet boundary condition for a given position
PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const
{ return initialAtPos(globalPos); }
//! evaluates the Neumann boundary condition for a boundary segment
template<class ElementVolumeVariables>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolumeFace& scvf) const
{ return NumEqVector(0.0); }
//! evaluate the initial conditions
PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const
{ return PrimaryVariables(1.0 + globalPos[0]/this->fvGridGeometry().bBoxMax()[0]); }
//! returns the temperature in \f$\mathrm{[K]}\f$ in the domain
Scalar temperature() const
{ return 283.15; /*10°*/ }
//! returns reference to the coupling manager.
const CouplingManager& couplingManager() const
{ return *couplingManagerPtr_; }
private:
std::shared_ptr<CouplingManager> couplingManagerPtr_;
std::string problemName_;
};
} // end namespace Dumux
#endif
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup MultiDomain
* \ingroup FacetCoupling
* \brief The problem for the lower-dimensional domain in the single-phase facet coupling test
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
#include <dune/foamgrid/foamgrid.hh>
#include <dumux/material/components/constant.hh>