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

Method IsBlockWithinBounds

Filters/AMR/vtkAMRResampleFilter.cxx:1157–1176  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1155
1156//------------------------------------------------------------------------------
1157bool vtkAMRResampleFilter::IsBlockWithinBounds(double* grd)
1158{
1159 assert("pre: Input AMR grid is nullptr" && (grd != nullptr));
1160
1161 for (unsigned int block = 0; block < this->ROI->GetNumberOfBlocks(); ++block)
1162 {
1163 if (this->IsRegionMine(block))
1164 {
1165 vtkUniformGrid* blk = vtkUniformGrid::SafeDownCast(this->ROI->GetBlock(block));
1166 assert("pre: block is nullptr" && (blk != nullptr));
1167
1168 if (this->GridsIntersect(grd, blk->GetBounds()))
1169 {
1170 return true;
1171 }
1172 } // END if region is mine
1173 } // END for all blocks
1174
1175 return false;
1176}
1177
1178//------------------------------------------------------------------------------
1179int vtkAMRResampleFilter::GetRegionProcessId(int regionIdx)

Callers 1

Calls 6

IsRegionMineMethod · 0.95
GridsIntersectMethod · 0.95
GetBlockMethod · 0.80
assertFunction · 0.50
GetNumberOfBlocksMethod · 0.45
GetBoundsMethod · 0.45

Tested by

no test coverage detected