This subroutine scans over all leafs and update their face boundaries
prolongating lower level neighbors to higher level blocks.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine scans over all leafs and update their face boundaries
restricting higher level neighbors to lower level ones.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine scans over all leafs and update their face boundaries if
both blocks lay on the same level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine extracts the face region from the domain of input
variable array by prolongating it to output array.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine extracts the face region from the domain of input
variable array by restricting it to output array.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine extracts the face region from the domain of input
variable array by copying it to output array.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This update of 2D neighbor' pointers for derefined block iterates
over corners instead of updating each neighbor's pointer
explicitely. It updates both, edge and corner neighbor pointers
of connected neighbors at once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This update of 2D neighbor pointers for derefined block iterates over
corners instead of updating each neighbor pointer explicitely. It
updates both, edge and corner neighbor pointers at once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This update of 2D neighbor' pointers iterates over corners instead
of updating each neighbor's pointer explicitely. It updates both,
edge and corner neighbor pointers of connected neighbors at once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This update of 2D neighbor pointers iterates over corners instead of
updating each neighbor pointer explicitely. It updates both, edge and
corner neighbor pointers at once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If we refine a block, and the neighbor lays at the same level of the
parent, do not assign the child's interior corner pointer. Those
pointers are null then.
This is not a problem for corner boundary update, since this corner
is updated in boundaries_edge_prolong, therefore all corners of the
finer blocks are fully consisten with their neighbors.
This also removes unnecessary condition check in
boundaries_corner_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine scans over all leaf blocks and their edge neighbor
pointers and updates edge boundary regions from neighbors at lower
levels.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine takes the variable array of the neighbor, prolongs
it and extracts the edge region corresponding to the edge position.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines scans over all leaf blocks and their edge neighbor
pointers and updates edge boundary regions from neighbors at higher
level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines takes the variable array of the neighbor, restricts
it and extracts the edge region corresponding to the edge position.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines scans over all leaf blocks and their edge neighbor
pointers and updates edge boundary regions from neighbor at lower
level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
We copy just the half of the edge in block_edge_copy(), since another
half is updated from a different corner.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines takes the variable array of the neighbor and extracts
the edge region corresponding to the edge position.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines scans over all leaf blocks and their corner neighbor
pointers and updates corner boundary regions from neighbor at lower
level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines takes the variable array of the lower level neighbor,
prolongates it and extracts the corner region corresponding to the
corner position.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines scans over all leaf blocks and their corner neighbor
pointers and updates corner boundary regions from neighbor at higher
level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines takes the variable array of the higher level neighbor,
restricts it and extracts the corner region corresponding to the corner
position.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines scans over all leaf blocks and their corner neighbor
pointers and updates corner boundary regions between blocks at the same
refinement level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines takes the variable array of the neighbor and extracts
the corner region corresponding to the corner position.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This field stores the location of the corner neighbour pointer and is
used in determining which face, edge or corner we are referring to when
we perform MPI boundary update.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
In generate_mesh() after creating the base structure of the blocks, we
associate their neighbor pointers (faces, edges, and corners) with the
proper neighbors.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
During the derefinement process, we first update the face, edge, and
corner neighbor pointer of the parent block. When this step is done, we
update the corresponsing pointers of the neighbors.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
In order to avoid inconsistencies in the face, edge and corner neighbor
pointer update in refine_block(), like updating the neighbour's pointer
in the middle while it might be still needed in another pointer update,
separate the children and neighbor pointers update.
First, update the face, edge and corner neighbor pointers for the newly
created children only, and when this step is done, update the neighbor'
face, edge and corner pointers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If we refine the lowest block, which neighbor fields point to itself,
we should point them to the proper children. Include this case in
refine_block() for 2D.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit updated the child edge and corner pointers in refine_block()
for 2D case. It updates corresponding neighbor edge and corner pointers
as well.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
The fields of the meta block structure pointing to face, edge and corner
neighbors have new interpretation now. In face and edge fields, first 2
or 3 indices (for 2D and 3D, respectively) describe the corner
coordinates to which the considered face or edge is linked. Then the
last index describe of the direction of the normal to the block face, or
in other words on which plane of the corner the face border plane is
considered, in the case of face neighbor. In the case of the edge
neighbour, the last pointer describe the direction along which the edge
is positioned.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>