template<class MDTraits>
class Dumux::Embedded1d3dCouplingManager< MDTraits, Embedded1d3dCouplingMode::Projection >
Manages the coupling between bulk elements and lower dimensional elements.
The method is described in detail in the article "Projection-based resolved interface mixed-dimension method for embedded tubular network systems" by Timo Koch (2021) available at https://arxiv.org/abs/2106.06358
The network is represented as a line segment network. The bulk domain explicitly resolves the wall of the tube network (e.g. blood vessel wall, outer root wall), so this generally requires an unstructured grid. The coupling term coupling the PDEs on the network and in the bulk domain is integrated over the coupling surface and each integration point couples to quantities evaluated at the closest point on the graph. There is a unique mapping from every point on the virtual tube surface to the tube centerline, therefore this coupling is determined by mapping to the closest point on the virtual surface and then evaluating the 1D quantity on the mapped centerline point. (The inverse mapping may be non-unique.)
The original paper also includes an algorithm for computing exact intersection for the surface quadrature in case of simple straight vessels. However, as a comparison in the paper shows that the suggested approximate quadrature is exact enough (configured by parameter MixedDimension.Projection.SimplexIntegrationRefine specifying the number of (adaptive local) virtual refinements of a surface facet for integration), only the approximate general purpose algorithm is included in this implementation. Only one quadrature point will be added for each surface element and coupled 1D dof including all contribution evaluated by local refinement. That means the virtual refinement doesn't increase the number of integration points and additionally is also optimized by using local adaptive refinement only in the places where the index mapping to the 1D degree of freedom is still multivalent.
Coupling sources are implement in terms of point sources at quadrature points to make it easy to reuse code written for other 1D-3D coupling manager modes.
This algorithm can be configured by several parameters (although this is usually not necessary as there are sensible defaults):
- MixedDimension.Projection.SimplexIntegrationRefine number of virtual refinement steps to determine coupled surface area
- MixedDimension.Projection.EnableIntersectionOutput set to true to enable debug VTK output for intersections
- MixedDimension.Projection.EstimateNumberOfPointSources provide an estimate for the expected number of coupling points for memory allocation
- MixedDimension.Projection.CoupledRadiusFactor threshold distance in which to search for coupled elements (specified as multiple of radius, default 0.1)
- MixedDimension.Projection.CoupledAngleFactor angle threshold in which to search for coupled elements (angle in radians from surface normal vector, default 0.3)
- MixedDimension.Projection.ConsiderFacesWithinBoundingBoxCoupled determines if all 3D boundary facets within the mesh bounding box should be considered as coupling faces
- MixedDimension.Projection.CoupledBoundingBoxShrinkingFactor if ConsiderFacesWithinBoundingBoxCoupled=true shrink the bounding box in all directions by this factor
|
void | init (std::shared_ptr< Problem< bulkIdx > > bulkProblem, std::shared_ptr< Problem< lowDimIdx > > lowDimProblem, const SolutionVector &curSol) |
|
void | computePointSourceData (std::size_t order=1, bool verbose=false) |
|
Scalar | radius (std::size_t id) const |
| Methods to be accessed by the subproblems. More...
|
|
const std::vector< int > & | bulkElementMarker () const |
| Marker that is non-zero for bulk elements that are coupled. More...
|
|
const std::vector< int > & | bulkVertexMarker () const |
| Marker that is non-zero for bulk vertices that belong to coupled surface facets. More...
|
|
const std::vector< Scalar > & | localAreaFactor () const |
|
void | updateAfterGridAdaption (std::shared_ptr< const GridGeometry< bulkIdx > > bulkGridGeometry, std::shared_ptr< const GridGeometry< lowDimIdx > > lowDimGridGeometry) |
| call this after grid adaption More...
|
|
void | init (std::shared_ptr< Problem< bulkIdx > > bulkProblem, std::shared_ptr< Problem< lowDimIdx > > lowDimProblem, const SolutionVector &curSol) |
| Methods to be accessed by main. More...
|
|
const CouplingStencil< j > & | couplingStencil (Dune::index_constant< i > domainI, const Element< i > &element, Dune::index_constant< j > domainJ) const |
| Methods to be accessed by the assembly. More...
|
|
decltype(auto) | evalCouplingResidual (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) |
| evaluates the element residual of a coupled element of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j More...
|
|
const PointSourceData & | pointSourceData (std::size_t id) const |
| Methods to be accessed by the subproblems. More...
|
|
const std::vector< PointSourceData > & | pointSourceData () const |
| Return reference to point source data vector member. More...
|
|
const GridView< id > & | gridView (Dune::index_constant< id > domainIdx) const |
| Return a reference to the bulk problem. More...
|
|
PrimaryVariables< bulkIdx > | bulkPriVars (std::size_t id) const |
| Return data for a bulk point source with the identifier id. More...
|
|
PrimaryVariables< lowDimIdx > | lowDimPriVars (std::size_t id) const |
| Return data for a low dim point source with the identifier id. More...
|
|
Scalar | averageDistance (std::size_t id) const |
| return the average distance to the coupled bulk cell center More...
|
|
const std::vector< PointSource< bulkIdx > > & | bulkPointSources () const |
| Return reference to bulk point sources. More...
|
|
const std::vector< PointSource< lowDimIdx > > & | lowDimPointSources () const |
| Return reference to low dim point sources. More...
|
|
const std::vector< PointSource< i > > & | pointSources (Dune::index_constant< i > dom) const |
| Return the point source if domain i. More...
|
|
const CouplingStencils< i > & | couplingStencils (Dune::index_constant< i > dom) const |
| Return reference to bulk coupling stencil member of domain i. More...
|
|
const CouplingStencil< i > & | emptyStencil (Dune::index_constant< i > dom) const |
| Return a reference to an empty stencil. More...
|
|
auto & | curSol (Dune::index_constant< i > domainIdx) |
| the solution vector of the subproblem More...
|
|
const auto & | curSol (Dune::index_constant< i > domainIdx) const |
| the solution vector of the subproblem More...
|
|
void | computeColorsForAssembly () |
| Compute colors for multithreaded assembly. More...
|
|
void | assembleMultithreaded (Dune::index_constant< i > domainId, AssembleElementFunc &&assembleElement) const |
| Execute assembly kernel in parallel. More...
|
|
const CouplingStencil< bulkIdx > & | extendedSourceStencil (std::size_t eIdx) const |
| Extended source stencil (for the bulk domain) More...
|
|
|
void | extendJacobianPattern (Dune::index_constant< id > domainI, JacobianPattern &pattern) const |
| extend the jacobian pattern of the diagonal block of domain i by those entries that are not already in the uncoupled pattern More...
|
|
|
decltype(auto) | evalCouplingResidual (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) const |
| evaluates the element residual of a coupled element of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j More...
|
|
void | bindCouplingContext (Dune::index_constant< i > domainI, const Element< i > &elementI, const Assembler &assembler) |
| prepares all data and variables that are necessary to evaluate the residual of the element of domain i More...
|
|
void | updateCouplingContext (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ, const PrimaryVariables< j > &priVarsJ, int pvIdxJ) |
| updates all data and variables that are necessary to evaluate the residual of the element of domain i this is called whenever one of the primary variables that the element residual depends on changes in domain j More...
|
|
void | updateCoupledVariables (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, UpdatableElementVolVars &elemVolVars, UpdatableFluxVarCache &elemFluxVarsCache) |
| update variables of domain i that depend on variables in domain j after the coupling context has been updated More...
|
|
void | updateSolution (const SolutionVector &curSol) |
| Updates the entire solution vector, e.g. before assembly or after grid adaption Overload might want to overload function if the solution vector is stored outside this class to make sure updates don't happen more than once. More...
|
|
void | evalAdditionalDomainDerivatives (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, const typename LocalAssemblerI::LocalResidual::ElementResidualVector &origResiduals, JacobianMatrixDiagBlock &A, GridVariables &gridVariables) |
| evaluate additional derivatives of the element residual of a domain with respect to dofs in the same domain that are not in the regular stencil (see CouplingManager::extendJacobianPattern) More...
|
|
decltype(auto) | numericEpsilon (Dune::index_constant< i >, const std::string ¶mGroup) const |
| return the numeric epsilon used for deflecting primary variables of coupled domain i More...
|
|
void | setSubProblems (const std::tuple< std::shared_ptr< SubProblems >... > &problems) |
| set the pointers to the sub problems More...
|
|
void | setSubProblem (std::shared_ptr< SubProblem > problem, Dune::index_constant< i > domainIdx) |
| set a pointer to one of the sub problems More...
|
|
const Problem< i > & | problem (Dune::index_constant< i > domainIdx) const |
| Return a reference to the sub problem. More...
|
|
void | attachSolution (SolutionVectorStorage &curSol) |
| Attach a solution vector stored outside of this class. More...
|
|