| 364 | } |
| 365 | |
| 366 | void 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 | //------------------------------------------------------------------------------ |
| 392 | bool vtkAMRBox::DoesBoxIntersectAlongDimension(const vtkAMRBox& other, int q) const |