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

Method GetCoarsenedAMRBox

Common/DataModel/vtkOverlappingAMRMetaData.cxx:915–942  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

913
914//------------------------------------------------------------------------------
915bool vtkOverlappingAMRMetaData::GetCoarsenedAMRBox(
916 unsigned int level, unsigned int id, vtkAMRBox& box)
917{
918 if (level == 0)
919 {
920 vtkErrorMacro("Cannot get AMR box at level 0.");
921 return false;
922 }
923
924 if (this->HasRefinementRatio())
925 {
926 box = this->GetAMRBox(level, id);
927 if (box.IsInvalid())
928 {
929 vtkErrorMacro("Invalid AMR box.");
930 return false;
931 }
932
933 int refinementRatio = this->GetRefinementRatio(level - 1);
934 box.Coarsen(refinementRatio);
935 }
936 else
937 {
938 return false;
939 }
940
941 return true;
942}
943
944//------------------------------------------------------------------------------
945bool vtkOverlappingAMRMetaData::operator==(const vtkOverlappingAMRMetaData& other) const

Callers 1

BlankGridsAtLevelMethod · 0.80

Calls 4

HasRefinementRatioMethod · 0.95
GetAMRBoxMethod · 0.95
GetRefinementRatioMethod · 0.95
CoarsenMethod · 0.80

Tested by

no test coverage detected