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

Method revertToLastCommit

DEVELOPER/core/Domain.cpp:1914–1940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1912}
1913
1914int
1915Domain::revertToLastCommit(void)
1916{
1917 //
1918 // first invoke revertToLastCommit on all nodes and elements in the domain
1919 //
1920
1921 Node *nodePtr;
1922 NodeIter &theNodeIter = this->getNodes();
1923 while ((nodePtr = theNodeIter()) != 0)
1924 nodePtr->revertToLastCommit();
1925
1926 Element *elePtr;
1927 ElementIter &theElemIter = this->getElements();
1928 while ((elePtr = theElemIter()) != 0) {
1929 elePtr->revertToLastCommit();
1930 }
1931
1932 // set the current time and load factor in the domain to last committed
1933 currentTime = committedTime;
1934 dT = 0.0;
1935
1936 // apply load for the last committed time
1937 this->applyLoad(currentTime);
1938
1939 return this->update();
1940}
1941
1942int
1943Domain::revertToStart(void)

Callers

nothing calls this directly

Calls 4

applyLoadMethod · 0.95
updateMethod · 0.95
getNodesMethod · 0.80
getElementsMethod · 0.45

Tested by

no test coverage detected