| 2374 | } |
| 2375 | |
| 2376 | int 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 | |
| 2410 | int OPS_nodeBounds() |
no test coverage detected