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

Method addKg_Force

SRC/analysis/fe_ele/FE_Element.cpp:873–907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

formEleResidualMethod · 0.45

Calls 3

isActiveMethod · 0.45
isSubdomainMethod · 0.45
addMatrixVectorMethod · 0.45

Tested by

no test coverage detected