| 84 | |
| 85 | |
| 86 | int |
| 87 | FORMStorage::getVariable(const char *variable, Information &theInfo) |
| 88 | { |
| 89 | if (strcmp(variable,"alphaFORM") == 0) { |
| 90 | if (alpha != 0) { |
| 91 | theInfo.theType = VectorType; |
| 92 | theInfo.setVector(*alpha); |
| 93 | } |
| 94 | else |
| 95 | return -1; |
| 96 | } |
| 97 | |
| 98 | else if (strcmp(variable,"gradientUFORM") == 0) { |
| 99 | if (gradientU != 0) { |
| 100 | theInfo.theType = VectorType; |
| 101 | theInfo.setVector(*gradientU); |
| 102 | } |
| 103 | else |
| 104 | return -1; |
| 105 | } |
| 106 | |
| 107 | else if (strcmp(variable,"gradientXFORM") == 0) { |
| 108 | if (gradientX != 0) { |
| 109 | theInfo.theType = VectorType; |
| 110 | theInfo.setVector(*gradientX); |
| 111 | } |
| 112 | else |
| 113 | return -1; |
| 114 | } |
| 115 | |
| 116 | else if (strcmp(variable,"betaFORM") == 0) { |
| 117 | theInfo.theType = DoubleType; |
| 118 | theInfo.setVector(beta); |
| 119 | } |
| 120 | |
| 121 | else { |
| 122 | opserr << "FORMStorage:: unknown variable " << variable << |
| 123 | " in getVariable()" << endln; |
| 124 | } |
| 125 | |
| 126 | return 0; |
| 127 | } |