13#ifndef DUMUX_MULTIDOMAIN_EMBEDDED_COUPLINGMANAGER_1D3D_BASE_HH
14#define DUMUX_MULTIDOMAIN_EMBEDDED_COUPLINGMANAGER_1D3D_BASE_HH
32template<
class MDTraits,
class Implementation,
class PSTraits = DefaultPo
intSourceTraits<MDTraits>>
39 using Scalar =
typename MDTraits::Scalar;
40 using SolutionVector =
typename MDTraits::SolutionVector;
42 static constexpr auto bulkIdx =
typename MDTraits::template SubDomain<0>::Index();
43 static constexpr auto lowDimIdx =
typename MDTraits::template SubDomain<1>::Index();
46 template<std::
size_t id>
using SubDomainTypeTag =
typename MDTraits::template SubDomain<id>::TypeTag;
49 template<std::
size_t id>
using GridView =
typename GridGeometry<id>::GridView;
50 template<std::
size_t id>
using Element =
typename GridView<id>::template Codim<0>::Entity;
57 void init(std::shared_ptr<Problem<bulkIdx>> bulkProblem,
58 std::shared_ptr<Problem<lowDimIdx>> lowDimProblem,
59 const SolutionVector&
curSol)
69 lowDimVolumeInBulkElement_.resize(this->
gridView(bulkIdx).size(0));
71 const auto& lowDimGridGeometry = this->
problem(lowDimIdx).gridGeometry();
72 const auto& bulkGridGeometry = this->
problem(bulkIdx).gridGeometry();
75 for (
const auto& is : intersections(this->
glue()))
78 const auto& inside = is.targetEntity(0);
79 const auto intersectionGeometry = is.geometry();
80 const auto lowDimElementIdx = lowDimGridGeometry.elementMapper().index(inside);
83 const auto radius = this->
problem(lowDimIdx).spatialParams().radius(lowDimElementIdx);
84 for (
int outsideIdx = 0; outsideIdx < is.numDomainNeighbors(); ++outsideIdx)
86 const auto& outside = is.domainEntity(outsideIdx);
87 const auto bulkElementIdx = bulkGridGeometry.elementMapper().index(outside);
88 lowDimVolumeInBulkElement_[bulkElementIdx] += intersectionGeometry.volume()*M_PI*
radius*
radius;
102 return this->
problem(lowDimIdx).spatialParams().radius(data.lowDimElementIdx());
109 const auto eIdx = this->
problem(bulkIdx).gridGeometry().elementMapper().index(element);
110 return lowDimVolumeInBulkElement_[eIdx];
117 const auto totalVolume = element.geometry().volume();
125 std::vector<Scalar> lowDimVolumeInBulkElement_;
const Problem< i > & problem(Dune::index_constant< i > domainIdx) const
Return a reference to the sub problem.
Definition: multidomain/couplingmanager.hh:298
Manages the coupling between bulk elements and lower dimensional elements Point sources on each integ...
Definition: couplingmanager1d3dbase.hh:35
Scalar lowDimVolumeFraction(const Element< bulkIdx > &element) const
The volume fraction the lower dimensional domain occupies in the bulk domain element.
Definition: couplingmanager1d3dbase.hh:115
Scalar radius(std::size_t id) const
Methods to be accessed by the subproblems.
Definition: couplingmanager1d3dbase.hh:99
Scalar lowDimVolume(const Element< bulkIdx > &element) const
The volume the lower dimensional domain occupies in the bulk domain element.
Definition: couplingmanager1d3dbase.hh:107
void computeLowDimVolumeFractions()
Compute the low dim volume fraction in the bulk domain cells.
Definition: couplingmanager1d3dbase.hh:66
void init(std::shared_ptr< Problem< bulkIdx > > bulkProblem, std::shared_ptr< Problem< lowDimIdx > > lowDimProblem, const SolutionVector &curSol)
Definition: couplingmanager1d3dbase.hh:57
Manages the coupling between bulk elements and lower dimensional elements Point sources on each integ...
Definition: couplingmanagerbase.hh:71
const GridView< id > & gridView(Dune::index_constant< id > domainIdx) const
Return a reference to the bulk problem.
Definition: couplingmanagerbase.hh:373
auto & curSol(Dune::index_constant< i > domainIdx)
the solution vector of the subproblem
Definition: couplingmanagerbase.hh:421
const GlueType & glue() const
Definition: couplingmanagerbase.hh:680
void init(std::shared_ptr< Problem< bulkIdx > > bulkProblem, std::shared_ptr< Problem< lowDimIdx > > lowDimProblem, const SolutionVector &curSol)
Methods to be accessed by main.
Definition: couplingmanagerbase.hh:134
const std::vector< PointSourceData > & pointSourceData() const
Return reference to point source data vector member.
Definition: couplingmanagerbase.hh:407
Defines all properties used in Dumux.
Coupling manager for low-dimensional domains embedded in the bulk domain. Point sources on each integ...
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Structure to define the index types used for grid and local indices.
Definition: indextraits.hh:26
Helper class to create (named and comparable) tagged types.