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

Method GenerateMatrix

comp/facetfespace.cpp:315–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313
314 template <typename FEL, typename MIP, typename MAT>
315 static void GenerateMatrix (const FEL & bfel, const MIP & mip,
316 MAT && mat, LocalHeap & lh)
317 {
318 int facetnr = mip.IP().FacetNr();
319 if (facetnr >= 0)
320 {
321 HeapReset hr(lh);
322
323 const FacetVolumeFiniteElement<D> & fel_facet = static_cast<const FacetVolumeFiniteElement<D>&> (bfel);
324 auto r = fel_facet.GetFacetDofs(facetnr);
325
326 FlatMatrix<> dshaperef(r.Size(), DIM_ELEMENT, lh);
327 mat.AddSize(DIM_DMAT, bfel.GetNDof()) = 0.0;
328 /*
329 fel_facet.Facet(facetnr).CalcDShape(mip.IP(),
330 mat.Row(0).Range(fel_facet.GetFacetDofs(facetnr)));
331 */
332 fel_facet.Facet(facetnr).CalcDShape(mip.IP(), dshaperef);
333 mat.Cols(r) = Trans(mip.GetJacobianInverse()) * Trans(dshaperef);
334 }
335 else
336 {
337 throw Exception("cannot evaluate facet-fe inside element");
338 }
339 }
340 };
341
342

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