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

Method getVariable

SRC/reliability/domain/storage/FORMStorage.cpp:86–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85
86int
87FORMStorage::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}

Callers 1

getStorageMethod · 0.45

Calls 1

setVectorMethod · 0.45

Tested by

no test coverage detected