MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / GenerateMatrix

Method GenerateMatrix

comp/facetsurffespace.cpp:210–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209 template <typename FEL, typename MIP, typename MAT>
210 static void GenerateMatrix (const FEL & bfel, const MIP & mip,
211 MAT && mat, LocalHeap & lh)
212 {
213 int facetnr = mip.IP().FacetNr();
214 if (facetnr >= 0)
215 {
216 HeapReset hr(lh);
217
218 const FacetVolumeFiniteElement<D-1> & fel_facet = static_cast<const FacetVolumeFiniteElement<D-1>&> (bfel);
219 auto r = fel_facet.GetFacetDofs(facetnr);
220
221 FlatMatrix<> dshaperef(r.Size(), DIM_ELEMENT, lh);
222 mat.AddSize(DIM_DMAT, bfel.GetNDof()) = 0.0;
223 /*
224 fel_facet.Facet(facetnr).CalcDShape(mip.IP(),
225 mat.Row(0).Range(fel_facet.GetFacetDofs(facetnr)));
226 */
227 fel_facet.Facet(facetnr).CalcDShape(mip.IP(), dshaperef);
228 mat.Cols(r) = Trans(mip.GetJacobianInverse()) * Trans(dshaperef);
229 }
230 else
231 {
232 throw Exception("cannot evaluate facet-fe inside element");
233 }
234 }
235 };
236
237

Callers

nothing calls this directly

Calls 9

FacetMethod · 0.80
TransFunction · 0.50
FacetNrMethod · 0.45
GetFacetDofsMethod · 0.45
SizeMethod · 0.45
GetNDofMethod · 0.45
CalcDShapeMethod · 0.45
ColsMethod · 0.45
GetJacobianInverseMethod · 0.45

Tested by

no test coverage detected