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

Method addKg_Force

DEVELOPER/core/FE_Element.cpp:870–904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

868}
869
870void
871FE_Element::addKg_Force(const Vector &disp, double fact)
872{
873 if (myEle != 0) {
874
875 // check for a quick return
876 if (fact == 0.0)
877 return;
878 if (myEle->isSubdomain() == false) {
879 // get the components we need out of the vector
880 // and place in a temporary vector
881 Vector tmp(numDOF);
882 for (int i=0; i<numDOF; i++) {
883 int loc = myID(i);
884 if (loc >= 0)
885 tmp(i) = disp(loc);
886 else
887 tmp(i) = 0.0;
888 }
889
890 if (theResidual->addMatrixVector(1.0, myEle->getGeometricTangentStiff(), tmp, fact) < 0){
891 opserr << "WARNING FE_Element::addKg_Force() - ";
892 opserr << "- addMatrixVector returned error\n";
893 }
894 }
895 else {
896 opserr << "WARNING FE_Element::addKg_Force() - ";
897 opserr << "- this should not be called on a Subdomain!\n";
898 }
899 }
900 else {
901 opserr << "WARNING FE_Element::addKg_Force() - no Element *given ";
902 opserr << "- subclasses must provide implementation\n";
903 }
904}
905
906
907void

Callers

nothing calls this directly

Calls 2

isSubdomainMethod · 0.45
addMatrixVectorMethod · 0.45

Tested by

no test coverage detected