| 420 | } |
| 421 | |
| 422 | int |
| 423 | OPS_NDTest() |
| 424 | { |
| 425 | static bool initDone = false; |
| 426 | if (initDone == false) { |
| 427 | setUpFunctions(); |
| 428 | initDone = true; |
| 429 | } |
| 430 | |
| 431 | // Identify what specific command of Patch we're calling |
| 432 | if (OPS_GetNumRemainingInputArgs() < 1) { |
| 433 | opserr << "WARNING too few arguments: NDTest cmd? \n"; |
| 434 | opserr << " available commands: SetStrain|CommitState|GetStrain|GetStress \n"; |
| 435 | return -1; |
| 436 | } |
| 437 | |
| 438 | const char* type = OPS_GetString(); |
| 439 | |
| 440 | OPS_ParsingFunctionMap::const_iterator iter = functionMap.find(type); |
| 441 | if (iter == functionMap.end()) { |
| 442 | opserr << "WARNING NDTest type " << type << " is unknown\n"; |
| 443 | return -1; |
| 444 | } |
| 445 | |
| 446 | // Call the function |
| 447 | (*iter->second)(); |
| 448 | |
| 449 | return 0; |
| 450 | |
| 451 | } |
no test coverage detected