| 6603 | |
| 6604 | template <class SCAL> |
| 6605 | void S_BilinearForm<SCAL> :: ApplyLinearizedMatrixAdd1 (SCAL val, |
| 6606 | const BaseVector & lin, |
| 6607 | const BaseVector & x, |
| 6608 | BaseVector & y, LocalHeap & lh) const |
| 6609 | { |
| 6610 | if (!MixedSpaces()) |
| 6611 | |
| 6612 | { |
| 6613 | Array<int> dnums; |
| 6614 | |
| 6615 | int ne = ma->GetNE(); |
| 6616 | int dim = GetFESpace()->GetDimension(); |
| 6617 | //LocalHeap lh (2000000, "biform-ApplyLinearized"); |
| 6618 | |
| 6619 | bool hasbound = false; |
| 6620 | bool hasinner = false; |
| 6621 | |
| 6622 | for (int j = 0; j < NumIntegrators(); j++) |
| 6623 | { |
| 6624 | const BilinearFormIntegrator & bfi = *GetIntegrator(j); |
| 6625 | if (bfi.BoundaryForm()) |
| 6626 | hasbound = true; |
| 6627 | else |
| 6628 | hasinner = true; |
| 6629 | } |
| 6630 | |
| 6631 | |
| 6632 | if (hasinner) |
| 6633 | for (int i = 0; i < ne; i++) |
| 6634 | { |
| 6635 | HeapReset hr(lh); |
| 6636 | ElementId ei(VOL, i); |
| 6637 | const FiniteElement & fel = fespace->GetFE (ei, lh); |
| 6638 | ElementTransformation & eltrans = ma->GetTrafo (ei, lh); |
| 6639 | fespace->GetDofNrs (ei, dnums); |
| 6640 | |
| 6641 | FlatVector<SCAL> elveclin (dnums.Size() * dim, lh); |
| 6642 | FlatVector<SCAL> elvecx (dnums.Size() * dim, lh); |
| 6643 | FlatVector<SCAL> elvecy (dnums.Size() * dim, lh); |
| 6644 | |
| 6645 | lin.GetIndirect (dnums, elveclin); |
| 6646 | fespace->TransformVec (ei, elveclin, TRANSFORM_SOL); |
| 6647 | |
| 6648 | x.GetIndirect (dnums, elvecx); |
| 6649 | fespace->TransformVec (ei, elvecx, TRANSFORM_SOL); |
| 6650 | |
| 6651 | for (int j = 0; j < NumIntegrators(); j++) |
| 6652 | { |
| 6653 | const BilinearFormIntegrator & bfi = *parts[j]; |
| 6654 | |
| 6655 | if (bfi.BoundaryForm()) continue; |
| 6656 | if (!bfi.DefinedOn (ma->GetElIndex (ei))) continue; |
| 6657 | if (!bfi.DefinedOnElement(ei.Nr())) continue; |
| 6658 | |
| 6659 | bfi.ApplyLinearizedElementMatrix (fel, eltrans, elveclin, elvecx, elvecy, lh); |
| 6660 | |
| 6661 | fespace->TransformVec (ei, elvecy, TRANSFORM_RHS); |
| 6662 |
nothing calls this directly
no test coverage detected