12#ifndef ARCANE_CARTESIANMESH_AMRPATCHPOSITION_H
13#define ARCANE_CARTESIANMESH_AMRPATCHPOSITION_H
17#include "arcane/cartesianmesh/CartesianMeshGlobal.h"
18#include "arcane/utils/Vector3.h"
321 Int32 m_overlap_layer_size;
AMRPatchPosition patchUp(Integer dim, Int32 higher_level, Int32 overlap_layer_size_top_level) const
Method to create an AMRPatchPosition for the higher level.
bool isInWithOverlap(CartCoord x, CartCoord y, CartCoord z) const
Method to know if a cell at position x,y,z is included in this patch with overlap layer.
CartCoord3 minPointWithOverlap() const
Method to retrieve the min position of the enclosing box including the overlap cell layer.
AMRPatchPosition patchDown(Integer dim, Int32 higher_level, Int32 overlap_layer_size_top_level) const
Method to create an AMRPatchPosition for the lower level.
bool isIn(CartCoord x, CartCoord y, CartCoord z) const
Method to know if a cell at position x,y,z is included in this patch.
bool canBeFusion(const AMRPatchPosition &other_patch) const
Method to know if our patch can be merged with other_patch.
static Int32 computeOverlapLayerSize(Int32 level, Int32 higher_level, Int32 overlap_layer_size_top_level)
Method to calculate the number of overlap cell layers for a given level.
bool fusion(AMRPatchPosition &other_patch)
Method to merge other_patch with ours.
CartCoord3 minPoint() const
Method to retrieve the min position of the enclosing box.
void setMinPoint(CartCoord3 min_point)
Method to set the min position of the enclosing box.
CartCoord3 length() const
Method to know the size of the patch (in number of cells per direction).
AMRPatchPosition()
Constructor for a null position. A null position is defined by a level = -2.
void setLevel(Int32 level)
Method to set the patch level.
bool isNull() const
Method to know if the patch is null.
CartCoord3 maxPointWithOverlap() const
Method to retrieve the max position of the enclosing box including the overlap cell layer.
CartCoord3 maxPoint() const
Method to retrieve the max position of the enclosing box.
bool haveIntersection(const AMRPatchPosition &other) const
Method to know if our patch is in contact with other.
Int64 nbCells() const
Method to know the number of cells in the patch according to its position.
Int32 overlapLayerSize() const
Method to retrieve the number of overlap cell layers of the patch.
void setOverlapLayerSize(Int32 layer_size)
Method to set the number of overlap cell layers of the patch.
Int32 level() const
Method to retrieve the patch level.
std::pair< AMRPatchPosition, AMRPatchPosition > cut(CartCoord cut_point, Integer dim) const
Method to cut the patch into two patches according to a cut point.
void setMaxPoint(CartCoord3 max_point)
Method to set the max position of the enclosing box.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 CartCoord
Represents a coordinate of an element in the Cartesian grid (in X or Y or Z).
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
std::int32_t Int32
Signed integer type of 32 bits.
Int32x3 CartCoord3
Represents the 3D coordinates of an element in the Cartesian grid {x, y, z}.