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

Method SetNumberOfGrids

Filters/Geometry/vtkStructuredAMRGridConnectivity.cxx:198–217  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

196
197//------------------------------------------------------------------------------
198void vtkStructuredAMRGridConnectivity::SetNumberOfGrids(unsigned int N)
199{
200 if (N == 0)
201 {
202 vtkErrorMacro("Number of grids cannot be 0.");
203 return;
204 }
205 this->NumberOfGrids = N;
206 this->AllocateUserRegisterDataStructures();
207
208 this->GridExtents.resize(6 * N);
209 this->GridLevels.resize(N);
210 this->Neighbors.resize(N);
211 this->BlockTopology.resize(N);
212
213 if (!this->HasConstantRefinementRatio())
214 {
215 this->RefinementRatios.resize(this->NumberOfLevels, -1);
216 }
217}
218
219//------------------------------------------------------------------------------
220void vtkStructuredAMRGridConnectivity::SetBlockTopology(int gridID)

Callers 2

InitializeMethod · 0.95
EstablishNeighborsMethod · 0.45

Calls 3

resizeMethod · 0.45

Tested by

no test coverage detected