| 1005 | } |
| 1006 | |
| 1007 | int |
| 1008 | LoadPattern::setParameter(const char **argv, int argc, Parameter ¶m) |
| 1009 | { |
| 1010 | if (theSeries == 0) { |
| 1011 | opserr << "set/update/activate parameter is illegaly called in LoadPattern " << endln; |
| 1012 | return 0; |
| 1013 | } |
| 1014 | |
| 1015 | if (argc < 1) |
| 1016 | return -1; |
| 1017 | |
| 1018 | // Nodal load |
| 1019 | if (strncmp(argv[0],"loadAtNode",80) == 0) { |
| 1020 | |
| 1021 | if (argc < 3) |
| 1022 | return -1; |
| 1023 | |
| 1024 | RVisRandomProcessDiscretizer = false; |
| 1025 | |
| 1026 | int nodeNumber = atoi(argv[1]); |
| 1027 | NodalLoad *thePossibleNodalLoad; |
| 1028 | NodalLoad *theNodalLoad = 0; |
| 1029 | NodalLoadIter &theNodalIter = this->getNodalLoads(); |
| 1030 | |
| 1031 | while ((thePossibleNodalLoad = theNodalIter()) != 0) { |
| 1032 | if ( nodeNumber == thePossibleNodalLoad->getNodeTag() ) { |
| 1033 | theNodalLoad = thePossibleNodalLoad; |
| 1034 | } |
| 1035 | } |
| 1036 | |
| 1037 | if (theNodalLoad != 0) |
| 1038 | return theNodalLoad->setParameter(&argv[2], argc-2, param); |
| 1039 | else |
| 1040 | return -1; |
| 1041 | } |
| 1042 | |
| 1043 | else if (strncmp(argv[0],"elementPointLoad",80) == 0 || strncmp(argv[0],"elementLoad",80) == 0) { |
| 1044 | |
| 1045 | if (argc < 3) |
| 1046 | return -1; |
| 1047 | |
| 1048 | RVisRandomProcessDiscretizer = false; |
| 1049 | |
| 1050 | int eleNumber = atoi(argv[1]); |
| 1051 | ElementalLoad *theEleLoad = 0; |
| 1052 | ElementalLoadIter &theEleLoadIter = this->getElementalLoads(); |
| 1053 | while ((theEleLoad = theEleLoadIter()) != 0) { |
| 1054 | int eleTag = theEleLoad->getElementTag(); |
| 1055 | if (eleNumber == eleTag) { |
| 1056 | return theEleLoad->setParameter(&argv[2], argc-2, param); |
| 1057 | } |
| 1058 | } |
| 1059 | |
| 1060 | return -1; |
| 1061 | } |
| 1062 | |
| 1063 | else if (strncmp(argv[0],"randomProcessDiscretizer",80) == 0) { |
| 1064 |
nothing calls this directly
no test coverage detected