| 619 | } |
| 620 | |
| 621 | int |
| 622 | IncrementalIntegrator::doMv(const Vector &v, Vector &res) { |
| 623 | |
| 624 | int n = v.Size(); |
| 625 | if (isDiagonal == true) { |
| 626 | for (int i=0; i<n; i++) |
| 627 | res[i] = diagMass[i]*v[i]; |
| 628 | return 0; |
| 629 | } |
| 630 | |
| 631 | res.Zero(); |
| 632 | |
| 633 | // loop over the FE_Elements |
| 634 | FE_Element *elePtr; |
| 635 | FE_EleIter &theEles = theAnalysisModel->getFEs(); |
| 636 | while((elePtr = theEles()) != 0) { |
| 637 | const Vector &b = elePtr->getM_Force(v, 1.0); |
| 638 | res.Assemble(b, elePtr->getID(), 1.0); |
| 639 | } |
| 640 | |
| 641 | // loop over the DOF_Groups |
| 642 | DOF_Group *dofPtr; |
| 643 | DOF_GrpIter &theDofs = theAnalysisModel->getDOFs(); |
| 644 | while ((dofPtr = theDofs()) != 0) { |
| 645 | const Vector &a = dofPtr->getM_Force(v, 1.0); |
| 646 | res.Assemble(a, dofPtr->getID(), 1.0); |
| 647 | } |
| 648 | return 0; |
| 649 | } |
| 650 | |
| 651 | double IncrementalIntegrator::getCFactor(void) |
| 652 | { |
no test coverage detected