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

Method setLengthUnit

SRC/utility/SimulationInformation.cpp:194–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194int
195SimulationInformation::setLengthUnit(const char *name)
196{
197 // check for valid i/p
198 if (name == 0)
199 return -1;
200
201 // delete the old
202 if (lengthUnit != 0)
203 delete [] lengthUnit;
204
205 // create new space & copy string
206 lengthUnit = new char[strlen(name)+1];
207 if (lengthUnit == 0)
208 return -1;
209 strcpy(lengthUnit, name);
210
211 return 0;
212}
213
214int
215SimulationInformation::setForceUnit(const char *name)

Callers 2

OPS_defaultUnitsFunction · 0.45
defaultUnitsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected