MCPcopy Create free account
hub / github.com/Kitware/VTK / read

Method read

ThirdParty/xdmf3/vtkxdmf3/XdmfGridCollection.cpp:183–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void
184XdmfGridCollection::read()
185{
186 if (mGridController)
187 {
188 if (shared_ptr<XdmfGridCollection> grid = shared_dynamic_cast<XdmfGridCollection>(mGridController->read()))
189 {
190 // Copy stucture from read grid to this grid
191 while(this->getNumberGridCollections() > 0)
192 {
193 this->removeGridCollection(0);
194 }
195 for (unsigned int i = 0; i < grid->getNumberGridCollections(); ++i)
196 {
197 this->insert(grid->getGridCollection(i));
198 }
199 while(this->getNumberUnstructuredGrids() > 0)
200 {
201 this->removeUnstructuredGrid(0);
202 }
203 for (unsigned int i = 0; i < grid->getNumberUnstructuredGrids(); ++i)
204 {
205 this->insert(grid->getUnstructuredGrid(i));
206 }
207 while(this->getNumberCurvilinearGrids() > 0)
208 {
209 this->removeCurvilinearGrid(0);
210 }
211 for (unsigned int i = 0; i < grid->getNumberCurvilinearGrids(); ++i)
212 {
213 this->insert(grid->getCurvilinearGrid(i));
214 }
215 while(this->getNumberRectilinearGrids() > 0)
216 {
217 this->removeRectilinearGrid(0);
218 }
219 for (unsigned int i = 0; i < grid->getNumberRectilinearGrids(); ++i)
220 {
221 this->insert(grid->getRectilinearGrid(i));
222 }
223 while(this->getNumberRegularGrids() > 0)
224 {
225 this->removeRegularGrid(0);
226 }
227 for (unsigned int i = 0; i < grid->getNumberRegularGrids(); ++i)
228 {
229 this->insert(grid->getRegularGrid(i));
230 }
231 while(this->getNumberAttributes() > 0)
232 {
233 this->removeAttribute(0);
234 }
235 for (unsigned int i = 0; i < grid->getNumberAttributes(); ++i)
236 {
237 this->insert(grid->getAttribute(i));
238 }
239 while(this->getNumberInformations() > 0)
240 {

Callers

nothing calls this directly

Calls 15

insertMethod · 0.95
removeGridCollectionMethod · 0.80
getGridCollectionMethod · 0.80
getUnstructuredGridMethod · 0.80
removeCurvilinearGridMethod · 0.80
getCurvilinearGridMethod · 0.80
removeRectilinearGridMethod · 0.80

Tested by

no test coverage detected