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

Method createDisp

DEVELOPER/core/Node.cpp:1858–1884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1856// values and the Vector objects for the committed and trial quantaties.
1857
1858int
1859Node::createDisp(void)
1860{
1861 // trial , committed, incr = (committed-trial)
1862 disp = new double[4*numberDOF];
1863
1864 if (disp == 0) {
1865 opserr << "WARNING - Node::createDisp() ran out of memory for array of size " << 2*numberDOF << endln;
1866
1867 return -1;
1868 }
1869 for (int i=0; i<4*numberDOF; i++)
1870 disp[i] = 0.0;
1871
1872 commitDisp = new Vector(&disp[numberDOF], numberDOF);
1873 trialDisp = new Vector(disp, numberDOF);
1874 incrDisp = new Vector(&disp[2*numberDOF], numberDOF);
1875 incrDeltaDisp = new Vector(&disp[3*numberDOF], numberDOF);
1876
1877 if (commitDisp == 0 || trialDisp == 0 || incrDisp == 0 || incrDeltaDisp == 0) {
1878 opserr << "WARNING - Node::createDisp() " <<
1879 "ran out of memory creating Vectors(double *,int)";
1880 return -2;
1881 }
1882
1883 return 0;
1884}
1885
1886
1887int

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