Assembles element-matrix for bilinear forms having the structure, e.g. linear elasticity.
void BDBIntegrator :: AssembleElementMatrix (const FiniteElement & fel, const ElementTransformation & eltrans, DenseMatrix & elmat, LocalHeap * locheap) const { int ndof, dim, dimd, i; double det; void * heapp; ndof = fel.GetNDof (); // number of dofs dim = GetDimension (); // space dimensions dimd = GetDimensionD (); // dimension of D matrix elmat.SetSize (ndof * dim); elmat.SetScalar (0); DenseMatrix partelmat (locheap, ndof * dim); DenseMatrix bmat (locheap, dimd, ndof * dim); DenseMatrix dbmat (locheap, dimd, ndof * dim); DenseMatrix dmat (locheap, dimd); int order = 2 * (fel.Order()); const IntegrationRule & ir = intrules->SelectIntegrationRule (fel.ElementType(), order); for (i = 1; i <= ir.GetNIP(); i++) { if (locheap) heapp = locheap->GetPointer(); SpecificIntegrationPoint sip (ir, i, eltrans, locheap); GenerateBMatrix (fel, sip, bmat, locheap); GenerateDMatrix (fel, sip, dmat); Mult (dmat, bmat, dbmat); CalcAtB (bmat, dbmat, partelmat); det = fabs (sip.GetJacobiDet()); elmat.Add (det * sip.IP().Weight(), partelmat); if (locheap) locheap->CleanUp (heapp); } }
Alphabetic index Hierarchy of classes