25#ifndef DUMUX_MULTIDOMAIN_EMBEDDED_COUPLINGMANAGER_1D3D_LINE_HH
26#define DUMUX_MULTIDOMAIN_EMBEDDED_COUPLINGMANAGER_1D3D_LINE_HH
40 static std::string
name() {
return "line"; }
47template<
class MDTraits,
class CouplingMode>
48class Embedded1d3dCouplingManager;
58template<
class MDTraits>
65 using Scalar =
typename MDTraits::Scalar;
66 using SolutionVector =
typename MDTraits::SolutionVector;
68 static constexpr auto bulkIdx =
typename MDTraits::template SubDomain<0>::Index();
69 static constexpr auto lowDimIdx =
typename MDTraits::template SubDomain<1>::Index();
72 template<std::
size_t id>
using SubDomainTypeTag =
typename MDTraits::template SubDomain<id>::TypeTag;
75 template<std::
size_t id>
using GridView =
typename GridGeometry<id>::GridView;
76 template<std::
size_t id>
using Element =
typename GridView<id>::template Codim<0>::Entity;
82 using ParentType::ParentType;
84 void init(std::shared_ptr<Problem<bulkIdx>> bulkProblem,
85 std::shared_ptr<Problem<lowDimIdx>> lowDimProblem,
86 const SolutionVector&
curSol)
96 lowDimVolumeInBulkElement_.resize(this->
gridView(bulkIdx).size(0));
98 const auto& lowDimGridGeometry = this->
problem(lowDimIdx).gridGeometry();
99 const auto& bulkGridGeometry = this->
problem(bulkIdx).gridGeometry();
102 for (
const auto& is : intersections(this->
glue()))
105 const auto& inside = is.targetEntity(0);
106 const auto intersectionGeometry = is.geometry();
107 const auto lowDimElementIdx = lowDimGridGeometry.elementMapper().index(inside);
110 const auto radius = this->
problem(lowDimIdx).spatialParams().radius(lowDimElementIdx);
111 for (
int outsideIdx = 0; outsideIdx < is.numDomainNeighbors(); ++outsideIdx)
113 const auto& outside = is.domainEntity(outsideIdx);
114 const auto bulkElementIdx = bulkGridGeometry.elementMapper().index(outside);
115 lowDimVolumeInBulkElement_[bulkElementIdx] += intersectionGeometry.volume()*M_PI*
radius*
radius;
129 return this->
problem(lowDimIdx).spatialParams().radius(data.lowDimElementIdx());
136 const auto eIdx = this->
problem(bulkIdx).gridGeometry().elementMapper().index(element);
137 return lowDimVolumeInBulkElement_[eIdx];
144 const auto totalVolume = element.geometry().volume();
152 std::vector<Scalar> lowDimVolumeInBulkElement_;
Coupling manager for low-dimensional domains embedded in the bulk domain. Point sources on each integ...
Helper class to create (named and comparable) tagged types.
Defines the index types used for grid and local indices.
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:150
Definition couplingmanager1d3d_average.hh:46
constexpr Line line
Definition couplingmanager1d3d_line.hh:43
Struture to define the index types used for grid and local indices.
Definition indextraits.hh:38
Property to specify the type of a problem which has to be solved.
Definition common/properties.hh:57
Definition common/properties.hh:98
Helper class to create (named and comparable) tagged types Tags any given type. The tagged type is eq...
Definition tag.hh:42
const Problem< i > & problem(Dune::index_constant< i > domainIdx) const
Definition multidomain/couplingmanager.hh:264
SolutionVector & curSol()
Definition multidomain/couplingmanager.hh:278
Manages the coupling between bulk elements and lower dimensional elements Point sources on each integ...
Definition couplingmanager1d3d.hh:36
Definition couplingmanager1d3d_line.hh:39
static std::string name()
Definition couplingmanager1d3d_line.hh:40
Scalar lowDimVolume(const Element< bulkIdx > &element) const
The volume the lower dimensional domain occupies in the bulk domain element.
Definition couplingmanager1d3d_line.hh:134
void computeLowDimVolumeFractions()
Compute the low dim volume fraction in the bulk domain cells.
Definition couplingmanager1d3d_line.hh:93
Scalar radius(std::size_t id) const
Methods to be accessed by the subproblems.
Definition couplingmanager1d3d_line.hh:126
void init(std::shared_ptr< Problem< bulkIdx > > bulkProblem, std::shared_ptr< Problem< lowDimIdx > > lowDimProblem, const SolutionVector &curSol)
Definition couplingmanager1d3d_line.hh:84
static constexpr Embedded1d3dCouplingMode::Line couplingMode
Definition couplingmanager1d3d_line.hh:80
Scalar lowDimVolumeFraction(const Element< bulkIdx > &element) const
The volume fraction the lower dimensional domain occupies in the bulk domain element.
Definition couplingmanager1d3d_line.hh:142
EmbeddedCouplingManagerBase(std::shared_ptr< const GridGeometry< bulkIdx > > bulkGridGeometry, std::shared_ptr< const GridGeometry< lowDimIdx > > lowDimGridGeometry)
Definition couplingmanagerbase.hh:130
const GridView< id > & gridView(Dune::index_constant< id > domainIdx) const
Definition couplingmanagerbase.hh:380
const PointSourceData & pointSourceData(std::size_t id) const
Definition couplingmanagerbase.hh:375
const GlueType & glue() const
Definition couplingmanagerbase.hh:510
void init(std::shared_ptr< Problem< bulkIdx > > bulkProblem, std::shared_ptr< Problem< lowDimIdx > > lowDimProblem, const SolutionVector &curSol)
Definition couplingmanagerbase.hh:141
Declares all properties used in Dumux.