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

Method createVel

DEVELOPER/core/Node.cpp:1887–1909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1885
1886
1887int
1888Node::createVel(void)
1889{
1890 vel = new double[2*numberDOF];
1891
1892 if (vel == 0) {
1893 opserr << "WARNING - Node::createVel() ran out of memory for array of size " << 2*numberDOF << endln;
1894 return -1;
1895 }
1896 for (int i=0; i<2*numberDOF; i++)
1897 vel[i] = 0.0;
1898
1899 commitVel = new Vector(&vel[numberDOF], numberDOF);
1900 trialVel = new Vector(vel, numberDOF);
1901
1902 if (commitVel == 0 || trialVel == 0) {
1903 opserr << "WARNING - Node::createVel() %s" <<
1904 "ran out of memory creating Vectors(double *,int) \n";
1905 return -2;
1906 }
1907
1908 return 0;
1909}
1910
1911int
1912Node::createAccel(void)

Callers 5

NodeMethod · 0.95
setTrialVelMethod · 0.95
incrTrialVelMethod · 0.95
recvSelfMethod · 0.95
Node.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected