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

Function OPS_setNodePressure

SRC/interpreter/OpenSeesOutputCommands.cpp:2376–2407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2374}
2375
2376int OPS_setNodePressure()
2377{
2378 if (OPS_GetNumRemainingInputArgs() < 2) {
2379 opserr << "WARNING: want - setNodePressure nodeTag? Pressure?\n";
2380 return -1;
2381 }
2382
2383 int tag;
2384 int numdata = 1;
2385
2386 if (OPS_GetIntInput(&numdata, &tag) < 0) {
2387 opserr << "WARNING: setNodePressure invalid tag\n";
2388 return -1;
2389 }
2390
2391 Domain* theDomain = OPS_GetDomain();
2392 if (theDomain == 0) return -1;
2393
2394 double pressure = 0.0;
2395
2396 if (OPS_GetDoubleInput(&numdata, &pressure) < 0) {
2397 opserr << "WARNING: setNodePressure invalid pressure\n";
2398 return -1;
2399 }
2400
2401 Pressure_Constraint* thePC = theDomain->getPressure_Constraint(tag);
2402 if(thePC != 0) {
2403 thePC->setPressure(pressure);
2404 }
2405
2406 return 0;
2407}
2408
2409
2410int OPS_nodeBounds()

Callers 1

Py_ops_setNodePressureFunction · 0.85

Calls 6

OPS_GetIntInputFunction · 0.70
OPS_GetDomainFunction · 0.70
OPS_GetDoubleInputFunction · 0.70
setPressureMethod · 0.45

Tested by

no test coverage detected