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

Function OPS_eleType

SRC/interpreter/OpenSeesOutputCommands.cpp:2159–2192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2157}
2158
2159int OPS_eleType()
2160{
2161 if (OPS_GetNumRemainingInputArgs() < 1) {
2162 opserr << "WARNING want - eleType eleTag?\n";
2163 return -1;
2164 }
2165
2166 int tag;
2167 int numdata = 1;
2168
2169 if (OPS_GetIntInput(&numdata, &tag) < 0) {
2170 opserr << "WARNING eleType eleTag? \n";
2171 return -1;
2172 }
2173
2174 Domain* theDomain = OPS_GetDomain();
2175 if (theDomain == 0) return -1;
2176
2177 char buffer[80];
2178 Element *theElement = theDomain->getElement(tag);
2179 if (theElement == 0) {
2180 opserr << "WARNING eleType ele " << tag << " not found" << endln;
2181 return -1;
2182 }
2183 const char* type = theElement->getClassType();
2184 sprintf(buffer, "%s", type);
2185
2186 if (OPS_SetString(buffer) < 0) {
2187 opserr << "WARNING failed to set eleType\n";
2188 return -1;
2189 }
2190
2191 return 0;
2192}
2193
2194int OPS_eleNodes()
2195{

Callers 2

Tcl_ops_eleTypeFunction · 0.85
Py_ops_eleTypeFunction · 0.85

Calls 6

OPS_GetIntInputFunction · 0.70
OPS_GetDomainFunction · 0.70
OPS_SetStringFunction · 0.70
getElementMethod · 0.45
getClassTypeMethod · 0.45

Tested by

no test coverage detected