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

Function sectionDeformation

SRC/tcl/commands.cpp:8180–8247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8178}
8179
8180int
8181sectionDeformation(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
8182{
8183 // make sure at least one other argument to contain type of system
8184 if (argc < 4) {
8185 opserr <<"WARNING want - sectionDeformation eleTag? secNum? dof? \n";
8186 return TCL_ERROR;
8187 }
8188
8189 //opserr << "sectionDeformation: ";
8190 //for (int i = 0; i < argc; i++)
8191 // opserr << argv[i] << ' ' ;
8192 //opserr << endln;
8193
8194 int tag, secNum, dof;
8195
8196 if (Tcl_GetInt(interp, argv[1], &tag) != TCL_OK) {
8197 opserr << "WARNING sectionDeformation eleTag? secNum? dof? - could not read eleTag? \n";
8198 return TCL_ERROR;
8199 }
8200 if (Tcl_GetInt(interp, argv[2], &secNum) != TCL_OK) {
8201 opserr << "WARNING sectionDeformation eleTag? secNum? dof? - could not read secNum? \n";
8202 return TCL_ERROR;
8203 }
8204 if (Tcl_GetInt(interp, argv[3], &dof) != TCL_OK) {
8205 opserr << "WARNING sectionDeformation eleTag? secNum? dof? - could not read dof? \n";
8206 return TCL_ERROR;
8207 }
8208
8209 Element *theElement = theDomain.getElement(tag);
8210 if (theElement == 0) {
8211 opserr << "WARNING sectionDeformation element with tag " << tag << " not found in domain \n";
8212 return TCL_ERROR;
8213 }
8214
8215 int argcc = 3;
8216 char a[80] = "section";
8217 char b[80];
8218 sprintf(b, "%d", secNum);
8219 char c[80] = "deformation";
8220 const char *argvv[3];
8221 argvv[0] = a;
8222 argvv[1] = b;
8223 argvv[2] = c;
8224
8225 DummyStream dummy;
8226
8227 Response *theResponse = theElement->setResponse(argvv, argcc, dummy);
8228 if (theResponse == 0) {
8229 char buffer[] = "0.0";
8230 Tcl_SetResult(interp, buffer, TCL_VOLATILE);
8231 return TCL_OK;
8232 }
8233
8234 theResponse->getResponse();
8235 Information &info = theResponse->getInformation();
8236
8237 const Vector &theVec = *(info.theVector);

Callers 2

setSectionDeformationMethod · 0.50
setSectionDeformationMethod · 0.50

Calls 3

getElementMethod · 0.45
setResponseMethod · 0.45
getResponseMethod · 0.45

Tested by

no test coverage detected