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

Method createDisp

SRC/domain/node/Node.cpp:1814–1840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1812// values and the Vector objects for the committed and trial quantities.
1813
1814int
1815Node::createDisp(void)
1816{
1817 // trial , committed, incr = (committed-trial)
1818 disp = new double[4*numberDOF];
1819
1820 if (disp == 0) {
1821 opserr << "WARNING - Node::createDisp() ran out of memory for array of size " << 2*numberDOF << endln;
1822
1823 return -1;
1824 }
1825 for (int i=0; i<4*numberDOF; i++)
1826 disp[i] = 0.0;
1827
1828 commitDisp = new Vector(&disp[numberDOF], numberDOF);
1829 trialDisp = new Vector(disp, numberDOF);
1830 incrDisp = new Vector(&disp[2*numberDOF], numberDOF);
1831 incrDeltaDisp = new Vector(&disp[3*numberDOF], numberDOF);
1832
1833 if (commitDisp == 0 || trialDisp == 0 || incrDisp == 0 || incrDeltaDisp == 0) {
1834 opserr << "WARNING - Node::createDisp() " <<
1835 "ran out of memory creating Vectors(double *,int)";
1836 return -2;
1837 }
1838
1839 return 0;
1840}
1841
1842
1843int

Callers 5

NodeMethod · 0.95
setTrialDispMethod · 0.95
incrTrialDispMethod · 0.95
recvSelfMethod · 0.95
Node.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected