| 1880 | } |
| 1881 | |
| 1882 | int |
| 1883 | Domain::commit(void) |
| 1884 | { |
| 1885 | // |
| 1886 | // first invoke commit on all nodes and elements in the domain |
| 1887 | // |
| 1888 | Node *nodePtr; |
| 1889 | NodeIter &theNodeIter = this->getNodes(); |
| 1890 | while ((nodePtr = theNodeIter()) != 0) { |
| 1891 | nodePtr->commitState(); |
| 1892 | } |
| 1893 | |
| 1894 | Element *elePtr; |
| 1895 | ElementIter &theElemIter = this->getElements(); |
| 1896 | while ((elePtr = theElemIter()) != 0) { |
| 1897 | elePtr->commitState(); |
| 1898 | } |
| 1899 | |
| 1900 | // set the new committed time in the domain |
| 1901 | committedTime = currentTime; |
| 1902 | dT = 0.0; |
| 1903 | |
| 1904 | // invoke record on all recorders |
| 1905 | for (int i=0; i<numRecorders; i++) |
| 1906 | if (theRecorders[i] != 0) |
| 1907 | theRecorders[i]->record(commitTag, currentTime); |
| 1908 | |
| 1909 | // update the commitTag |
| 1910 | commitTag++; |
| 1911 | return 0; |
| 1912 | } |
| 1913 | |
| 1914 | int |
| 1915 | Domain::revertToLastCommit(void) |
no test coverage detected