| 3102 | } |
| 3103 | |
| 3104 | int OPS_basicForce() |
| 3105 | { |
| 3106 | // make sure at least one other argument to contain type of system |
| 3107 | if (OPS_GetNumRemainingInputArgs() < 1) { |
| 3108 | opserr << "WARNING want - basicForce eleTag? \n"; |
| 3109 | return -1; |
| 3110 | } |
| 3111 | |
| 3112 | //opserr << "basicForce: "; |
| 3113 | //for (int i = 0; i < argc; i++) |
| 3114 | // opserr << argv[i] << ' ' ; |
| 3115 | //opserr << endln; |
| 3116 | |
| 3117 | int numdata = 1; |
| 3118 | int tag; |
| 3119 | |
| 3120 | if (OPS_GetIntInput(&numdata, &tag) < 0) { |
| 3121 | opserr << "WARNING basicForce eleTag? - could not read eleTag? \n"; |
| 3122 | return -1; |
| 3123 | } |
| 3124 | |
| 3125 | Domain* theDomain = OPS_GetDomain(); |
| 3126 | if (theDomain == 0) return -1; |
| 3127 | |
| 3128 | Element *theElement = theDomain->getElement(tag); |
| 3129 | if (theElement == 0) { |
| 3130 | opserr << "WARNING basicForce element with tag " << tag << " not found in domain \n"; |
| 3131 | return -1; |
| 3132 | } |
| 3133 | |
| 3134 | int argcc = 1; |
| 3135 | char a[80] = "basicForce"; |
| 3136 | const char *argvv[1]; |
| 3137 | argvv[0] = a; |
| 3138 | |
| 3139 | DummyStream dummy; |
| 3140 | |
| 3141 | Response *theResponse = theElement->setResponse(argvv, argcc, dummy); |
| 3142 | |
| 3143 | // Try "basicForces" |
| 3144 | if (theResponse == 0) { |
| 3145 | char a[80] = "basicForces"; |
| 3146 | argvv[0] = a; |
| 3147 | theResponse = theElement->setResponse(argvv, argcc, dummy); |
| 3148 | } |
| 3149 | |
| 3150 | if (theResponse == 0) { |
| 3151 | return 0; |
| 3152 | } |
| 3153 | |
| 3154 | theResponse->getResponse(); |
| 3155 | Information &info = theResponse->getInformation(); |
| 3156 | |
| 3157 | // Vector |
| 3158 | if (info.theVector != 0) { |
| 3159 | const Vector &theVec = *(info.theVector); |
| 3160 | int nbf = theVec.Size(); |
| 3161 |
no test coverage detected