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

Method GenerateMatrix

comp/Hddf.cpp:724–736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722
723 template <typename MIP, typename MAT>
724 static void GenerateMatrix(const FiniteElement &fel,
725 const MIP &mip,
726 MAT &&mat, LocalHeap &lh)
727 {
728 Mat<3, 3> jacobian = mip.GetJacobian();
729 Cast(fel).CalcShape(mip.IP(), Trans(mat) /* , jacobian*/);
730 for (int i = 0; i < fel.GetNDof(); i++)
731 {
732 FlatMatrix<> shapei(3, 3, &mat(0, i)); // &mat(i, 0)
733 Mat<3, 3> trafo_shapei = Cof(mip.GetJacobian()) * Mat<3, 3>(shapei) * Trans(mip.GetJacobian()); // Mat<3, 3> trafo_shapei = (1 / mip.GetJacobiDet()) * mip.GetJacobianInverse() * shapei * mip.GetJacobian(); // check if this is correct
734 shapei = trafo_shapei;
735 }
736 }
737 };
738
739

Callers

nothing calls this directly

Calls 4

GetJacobianMethod · 0.80
TransFunction · 0.50
CalcShapeMethod · 0.45
GetNDofMethod · 0.45

Tested by

no test coverage detected