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

Method GenerateMatrix

comp/Hddf.cpp:685–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683
684 template <typename MIP, typename MAT>
685 static void GenerateMatrix(const FiniteElement &fel,
686 const MIP &mip,
687 MAT &&mat, LocalHeap &lh)
688 {
689 Mat<D, D> jacobian = mip.GetJacobian();
690 Cast(fel).CalcShape(mip.IP(), Trans(mat));
691
692 // Vec<D> n = ElementTopology::GetNormals<D>(mip.GetTransformation().GetElementType())[mip.IP().FacetNr()];
693 // double factor = 1 / L2Norm(Cof(jacobian) * n);
694 double factor = 1.0 / sqr (Det(jacobian));
695
696 for (int i = 0; i < fel.GetNDof(); i++)
697 {
698 FlatMatrix<> shapei = mat.Col(i).AsMatrix(D, D);
699 Mat<D,D> trafo_shapei = factor * jacobian * Mat<D,D>(shapei) * Trans(jacobian);
700 shapei = trafo_shapei;
701 }
702 }
703 };
704
705 class DiffOpIdHDDFacetBND : public DiffOp<DiffOpIdHDDFacetBND>

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected