| 84 | const std::string XdmfGridCollection::ItemTag = "Grid"; |
| 85 | |
| 86 | void |
| 87 | XdmfGridCollection::copyGrid(shared_ptr<XdmfGrid> sourceGrid) |
| 88 | { |
| 89 | XdmfGrid::copyGrid(sourceGrid); |
| 90 | if (shared_ptr<XdmfGridCollection> classedGrid = shared_dynamic_cast<XdmfGridCollection>(sourceGrid)) |
| 91 | { |
| 92 | // Copy stucture from read grid to this grid |
| 93 | while (this->getNumberGridCollections() > 0) |
| 94 | { |
| 95 | this->removeGridCollection(0); |
| 96 | } |
| 97 | for (unsigned int i = 0; i < classedGrid->getNumberGridCollections(); ++i) |
| 98 | { |
| 99 | this->insert(classedGrid->getGridCollection(i)); |
| 100 | } |
| 101 | while (this->getNumberCurvilinearGrids() > 0) |
| 102 | { |
| 103 | this->removeCurvilinearGrid(0); |
| 104 | } |
| 105 | for (unsigned int i = 0; i < classedGrid->getNumberCurvilinearGrids(); ++i) |
| 106 | { |
| 107 | this->insert(classedGrid->getCurvilinearGrid(i)); |
| 108 | } |
| 109 | while (this->getNumberGraphs() > 0) |
| 110 | { |
| 111 | this->removeGraph(0); |
| 112 | } |
| 113 | for (unsigned int i = 0; i < classedGrid->getNumberGraphs(); ++i) |
| 114 | { |
| 115 | this->insert(classedGrid->getGraph(i)); |
| 116 | } |
| 117 | while (this->getNumberRectilinearGrids() > 0) |
| 118 | { |
| 119 | this->removeRectilinearGrid(0); |
| 120 | } |
| 121 | for (unsigned int i = 0; i < classedGrid->getNumberRectilinearGrids(); ++i) |
| 122 | { |
| 123 | this->insert(classedGrid->getRectilinearGrid(i)); |
| 124 | } |
| 125 | while (this->getNumberRegularGrids() > 0) |
| 126 | { |
| 127 | this->removeRegularGrid(0); |
| 128 | } |
| 129 | for (unsigned int i = 0; i < classedGrid->getNumberRegularGrids(); ++i) |
| 130 | { |
| 131 | this->insert(classedGrid->getRegularGrid(i)); |
| 132 | } |
| 133 | while (this->getNumberUnstructuredGrids() > 0) |
| 134 | { |
| 135 | this->removeUnstructuredGrid(0); |
| 136 | } |
| 137 | for (unsigned int i = 0; i < classedGrid->getNumberUnstructuredGrids(); ++i) |
| 138 | { |
| 139 | this->insert(classedGrid->getUnstructuredGrid(i)); |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 |
nothing calls this directly
no test coverage detected