62 using FeCache = Dune::PQkLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
72 const Element& element,
73 const FVElementGeometry& fvGeometry,
74 const ElementVolumeVariables& elemVolVars,
75 const SubControlVolumeFace& scvf)
77 const auto geometry = element.geometry();
78 const auto& localBasis = fvGeometry.feLocalBasis();
81 std::vector<ShapeValue> shapeVals;
82 const auto ipLocal = geometry.local(scvf.ipGlobal());
83 jacInvT_ = geometry.jacobianInverseTransposed(ipLocal);
84 localBasis.evaluateJacobian(ipLocal, shapeJacobian_);
85 localBasis.evaluateFunction(ipLocal, shapeVals);
88 shapeValues_.resize(fvGeometry.numScv(), 0.0);
89 if (!scvf.isOnFracture())
90 std::copy(shapeVals.begin(), shapeVals.end(), shapeValues_.begin());
93 const auto thisFacetIdx = scvf.facetIndexInElement();
94 for (
const auto& scv: scvs(fvGeometry))
95 if (scv.isOnFracture() && scv.facetIndexInElement() == thisFacetIdx)
96 shapeValues_[scv.indexInElement()] = shapeVals[scv.localDofIndex()];
100 gradN_.resize(fvGeometry.numScv(), GlobalPosition(0.0));
101 if (!scvf.isOnFracture())
103 for (
const auto& scv: scvs(fvGeometry))
104 if (!scv.isOnFracture())
105 jacInvT_.mv(shapeJacobian_[scv.localDofIndex()][0], gradN_[scv.indexInElement()]);
109 const auto thisFacetIdx = scvf.facetIndexInElement();
112 std::vector<unsigned int> facetLocalDofs;
113 for (
const auto& scv : scvs(fvGeometry))
114 if (scv.isOnFracture() && scv.facetIndexInElement() == thisFacetIdx)
115 facetLocalDofs.push_back(scv.localDofIndex());
117 for (
const auto& scv: scvs(fvGeometry))
120 if (scv.isOnFracture() && scv.facetIndexInElement() == thisFacetIdx)
121 jacInvT_.mv(shapeJacobian_[scv.localDofIndex()][0], gradN_[scv.indexInElement()]);
124 else if (!scv.isOnFracture()
125 && std::find( facetLocalDofs.begin(),
126 facetLocalDofs.end(),
127 scv.localDofIndex() ) == facetLocalDofs.end())
129 jacInvT_.mv(shapeJacobian_[scv.localDofIndex()][0], gradN_[scv.indexInElement()]);