MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / addK_Force

Method addK_Force

DEVELOPER/core/FE_Element.cpp:834–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832}
833
834void
835FE_Element::addK_Force(const Vector &disp, double fact)
836{
837 if (myEle != 0) {
838
839 // check for a quick return
840 if (fact == 0.0)
841 return;
842 if (myEle->isSubdomain() == false) {
843 // get the components we need out of the vector
844 // and place in a temporary vector
845 Vector tmp(numDOF);
846 for (int i=0; i<numDOF; i++) {
847 int loc = myID(i);
848 if (loc >= 0)
849 tmp(i) = disp(loc);
850 else
851 tmp(i) = 0.0;
852 }
853
854 if (theResidual->addMatrixVector(1.0, myEle->getTangentStiff(), tmp, fact) < 0){
855 opserr << "WARNING FE_Element::addK_Force() - ";
856 opserr << "- addMatrixVector returned error\n";
857 }
858 }
859 else {
860 opserr << "WARNING FE_Element::addK_Force() - ";
861 opserr << "- this should not be called on a Subdomain!\n";
862 }
863 }
864 else {
865 opserr << "WARNING FE_Element::addK_Force() - no Element *given ";
866 opserr << "- subclasses must provide implementation\n";
867 }
868}
869
870void
871FE_Element::addKg_Force(const Vector &disp, double fact)

Callers

nothing calls this directly

Calls 3

getTangentStiffMethod · 0.80
isSubdomainMethod · 0.45
addMatrixVectorMethod · 0.45

Tested by

no test coverage detected