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

Method Refine

Common/DataModel/vtkAMRBox.cxx:366–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366void vtkAMRBox::Refine(int r)
367{
368 assert("pre: Input refinement ratio must be >= 1" && (r >= 1));
369 assert("pre: AMR Box instance is invalid" && !this->IsInvalid());
370
371 if (this->Empty())
372 {
373 std::cerr << "WARNING: tried refining an empty AMR box!\n";
374 std::cerr << "FILE:" << __FILE__ << std::endl;
375 std::cerr << "LINE:" << __LINE__ << std::endl;
376 std::cerr.flush();
377 return;
378 }
379 for (int q = 0; q < 3; ++q)
380 {
381 if (!this->EmptyDimension(q))
382 {
383 this->LoCorner[q] = this->LoCorner[q] * r;
384 this->HiCorner[q] = (this->HiCorner[q] + 1) * r - 1;
385 }
386 }
387 assert("post: Refined AMR box should not be empty!" && !this->Empty());
388 assert("post: Refined AMR Box instance is invalid" && !this->IsInvalid());
389}
390
391//------------------------------------------------------------------------------
392bool vtkAMRBox::DoesBoxIntersectAlongDimension(const vtkAMRBox& other, int q) const

Callers 5

SplitXYZFunction · 0.45
SplitFunction · 0.45
ConstructGridFunction · 0.45

Calls 3

assertFunction · 0.50
EmptyMethod · 0.45
flushMethod · 0.45

Tested by 1