70 const Element& element,
71 const FVElementGeometry& fvGeometry,
72 const ElementVolumeVariables& elemVolVars,
73 const SubControlVolumeFace& scvf)
75 const auto geometry = element.geometry();
76 const auto& localBasis = fvGeometry.feLocalBasis();
79 std::vector<ShapeValue> shapeVals;
80 const auto ipLocal = geometry.local(scvf.ipGlobal());
81 jacInvT_ = geometry.jacobianInverseTransposed(ipLocal);
82 localBasis.evaluateJacobian(ipLocal, shapeJacobian_);
83 localBasis.evaluateFunction(ipLocal, shapeVals);
86 shapeValues_.resize(fvGeometry.numScv(), 0.0);
87 if (!scvf.isOnFracture())
88 std::copy(shapeVals.begin(), shapeVals.end(), shapeValues_.begin());
91 const auto thisFacetIdx = scvf.facetIndexInElement();
92 for (
const auto& scv: scvs(fvGeometry))
93 if (scv.isOnFracture() && scv.facetIndexInElement() == thisFacetIdx)
94 shapeValues_[scv.indexInElement()] = shapeVals[scv.localDofIndex()];
98 gradN_.resize(fvGeometry.numScv(), GlobalPosition(0.0));
99 if (!scvf.isOnFracture())
101 for (
const auto& scv: scvs(fvGeometry))
102 if (!scv.isOnFracture())
103 jacInvT_.mv(shapeJacobian_[scv.localDofIndex()][0], gradN_[scv.indexInElement()]);
107 const auto thisFacetIdx = scvf.facetIndexInElement();
110 std::vector<unsigned int> facetLocalDofs;
111 for (
const auto& scv : scvs(fvGeometry))
112 if (scv.isOnFracture() && scv.facetIndexInElement() == thisFacetIdx)
113 facetLocalDofs.push_back(scv.localDofIndex());
115 for (
const auto& scv: scvs(fvGeometry))
118 if (scv.isOnFracture() && scv.facetIndexInElement() == thisFacetIdx)
119 jacInvT_.mv(shapeJacobian_[scv.localDofIndex()][0], gradN_[scv.indexInElement()]);
122 else if (!scv.isOnFracture()
123 && std::find( facetLocalDofs.begin(),
124 facetLocalDofs.end(),
125 scv.localDofIndex() ) == facetLocalDofs.end())
127 jacInvT_.mv(shapeJacobian_[scv.localDofIndex()][0], gradN_[scv.indexInElement()]);