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

Method ComputeStats

IO/AMR/vtkAMREnzoReader.cxx:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36#include <limits>
37
38VTK_ABI_NAMESPACE_BEGIN
39void vtkAMREnzoReader::ComputeStats(
40 vtkEnzoReaderInternal* internal, std::vector<unsigned int>& numBlocks, double min[3])
41{
42 min[0] = min[1] = min[2] = std::numeric_limits<double>::max();
43 numBlocks.resize(this->Internal->NumberOfLevels, 0);
44
45 for (int i = 0; i < internal->NumberOfBlocks; ++i)
46 {
47 vtkEnzoReaderBlock& theBlock = internal->Blocks[i + 1];
48 double* gridMin = theBlock.MinBounds;
49 min[0] = std::min(gridMin[0], min[0]);
50 min[1] = std::min(gridMin[1], min[1]);
51 min[2] = std::min(gridMin[2], min[2]);
52 numBlocks[theBlock.Level]++;
53 }
54}
55
56//------------------------------------------------------------------------------
57vtkAMREnzoReader::vtkAMREnzoReader()

Callers 1

FillMetaDataMethod · 0.95

Calls 3

maxFunction · 0.50
minFunction · 0.50
resizeMethod · 0.45

Tested by

no test coverage detected