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

Function OPS_basicDeformation

SRC/interpreter/OpenSeesOutputCommands.cpp:3019–3102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3017}
3018
3019int OPS_basicDeformation()
3020{
3021 // make sure at least one other argument to contain type of system
3022 if (OPS_GetNumRemainingInputArgs() < 1) {
3023 opserr << "WARNING want - basicDeformation eleTag? \n";
3024 return -1;
3025 }
3026
3027 //opserr << "basicDeformation: ";
3028 //for (int i = 0; i < argc; i++)
3029 // opserr << argv[i] << ' ' ;
3030 //opserr << endln;
3031
3032 int numdata = 1;
3033 int tag;
3034
3035 if (OPS_GetIntInput(&numdata, &tag) < 0) {
3036 opserr << "WARNING basicDeformation eleTag? - could not read eleTag? \n";
3037 return -1;
3038 }
3039
3040 Domain* theDomain = OPS_GetDomain();
3041 if (theDomain == 0) return -1;
3042
3043 Element *theElement = theDomain->getElement(tag);
3044 if (theElement == 0) {
3045 opserr << "WARNING basicDeformation element with tag " << tag << " not found in domain \n";
3046 return -1;
3047 }
3048
3049 int argcc = 1;
3050 char a[80] = "basicDeformation";
3051 const char *argvv[1];
3052 argvv[0] = a;
3053
3054 DummyStream dummy;
3055
3056 Response *theResponse = theElement->setResponse(argvv, argcc, dummy);
3057
3058 // Try "basicDeformations"
3059 if (theResponse == 0) {
3060 char a[80] = "basicDeformations";
3061 argvv[0] = a;
3062 theResponse = theElement->setResponse(argvv, argcc, dummy);
3063 }
3064
3065 if (theResponse == 0) {
3066 return 0;
3067 }
3068
3069 theResponse->getResponse();
3070 Information &info = theResponse->getInformation();
3071
3072 // Vector
3073 if (info.theVector != 0) {
3074 const Vector &theVec = *(info.theVector);
3075 int nbf = theVec.Size();
3076

Callers 2

Tcl_ops_basicDeformationFunction · 0.85
Py_ops_basicDeformationFunction · 0.85

Calls 8

OPS_GetIntInputFunction · 0.70
OPS_GetDomainFunction · 0.70
OPS_SetDoubleOutputFunction · 0.70
getElementMethod · 0.45
setResponseMethod · 0.45
getResponseMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected