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

Method revertToStart

DEVELOPER/core/Domain.cpp:1942–1976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1940}
1941
1942int
1943Domain::revertToStart(void)
1944{
1945 //
1946 // first invoke revertToLastCommit on all nodes and
1947 // elements in the domain
1948 //
1949
1950 Node *nodePtr;
1951 NodeIter &theNodeIter = this->getNodes();
1952 while ((nodePtr = theNodeIter()) != 0)
1953 nodePtr->revertToStart();
1954
1955 Element *elePtr;
1956 ElementIter &theElements = this->getElements();
1957 while ((elePtr = theElements()) != 0) {
1958 elePtr->revertToStart();
1959 }
1960
1961 // ADDED BY TERJE //////////////////////////////////
1962 // invoke 'restart' on all recorders
1963 for (int i=0; i<numRecorders; i++)
1964 if (theRecorders[i] != 0)
1965 theRecorders[i]->restart();
1966 /////////////////////////////////////////////////////
1967
1968 // set the current time and load factor in the domain to last committed
1969 committedTime = 0;
1970 currentTime = 0;
1971 dT = 0.0;
1972 // apply load for the last committed time
1973 this->applyLoad(currentTime);
1974
1975 return this->update();
1976}
1977
1978int
1979Domain::update(void)

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected