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

Method GenerateMatrix

comp/l2hofespace.cpp:3275–3288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3273
3274 template <typename FEL, typename MIP, typename MAT>
3275 static void GenerateMatrix (const FEL & fel, const MIP & mip,
3276 MAT && mat, LocalHeap & lh)
3277 {
3278 auto & bfel = static_cast<const VectorFiniteElement&> (fel);
3279 auto & feli = static_cast<const BaseScalarFiniteElement&> (bfel[0]);
3280
3281 int ndofi = feli.GetNDof();
3282 FlatMatrix<> grad (ndofi, DIM_SPC, lh);
3283 feli.CalcDShape(mip.IP(), grad);
3284 double idet = 1.0/mip.GetJacobiDet();
3285
3286 for (int k = 0; k < DIM_SPC; k++)
3287 mat.Row(0).Range(k*ndofi, (k+1)*ndofi) = idet * grad.Col(k);
3288 }
3289
3290
3291 static void GenerateMatrixSIMDIR (const FiniteElement & bfel,

Callers

nothing calls this directly

Calls 6

GetNDofMethod · 0.45
CalcDShapeMethod · 0.45
GetJacobiDetMethod · 0.45
RangeMethod · 0.45
RowMethod · 0.45
ColMethod · 0.45

Tested by

no test coverage detected