1155 Commits

Author SHA1 Message Date
85f72fe1e0 BLOCKS: Don't set interior corner pointers if neighbor at lower level.
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>
2014-07-15 19:03:53 -03:00
518f12b19e BOUNDARIES: Call boundaries_edge_prolong() in boundary_variables().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-15 13:26:31 -03:00
65cb4e747d BOUNDARIES: Add subroutine boundaries_edge_prolong().
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>
2014-07-15 13:25:32 -03:00
62e7235a3a BOUNDARIES: Implement block_edge_prolong().
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>
2014-07-15 13:24:30 -03:00
89df65f754 BOUNDARIES: Call boundaries_edge_restrict() in boundary_variables().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-15 12:50:01 -03:00
3ef963eda4 BOUNDARIES: Add subroutine boundaries_edge_restrict().
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>
2014-07-15 12:48:52 -03:00
110c29a487 BOUNDARIES: Implement block_edge_restrict().
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>
2014-07-15 12:38:54 -03:00
d2130c5cc6 BOUNDARIES: Call boundaries_edge_copy() in boundary_variables().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-15 12:29:26 -03:00
59f7ab45f0 BOUNDARIES: Add subroutine boundaries_edge_copy().
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>
2014-07-15 12:27:53 -03:00
18abac9639 BOUNDARIES: Copy half of edge in block_edge_copy().
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>
2014-07-15 12:23:56 -03:00
6dcf96f4ab BOUNDARIES: Implement block_edge_copy().
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>
2014-07-15 11:45:52 -03:00
309eb2aad2 BOUNDARIES: Call boundaries_corner_prolong() in boundary_variables().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-15 11:36:17 -03:00
9254b5997a BOUNDARIES: Add subroutine boundaries_corner_prolong().
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>
2014-07-15 11:35:18 -03:00
8eb5a1aaff BOUNDARIES: Implement block_corner_prolong().
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>
2014-07-15 11:17:47 -03:00
b1fa32f8ba BOUNDARIES: Call boundaries_corner_restrict() in boundary_variables().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-15 11:11:25 -03:00
268a5378cc BOUNDARIES: Add subroutine boundaries_corner_restrict().
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>
2014-07-15 11:08:54 -03:00
637d318c0e BOUNDARIES: Implement block_corner_restrict().
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>
2014-07-15 10:53:09 -03:00
188be54d63 BOUNDARIES: Call boundaries_corner_copy() in boundary_variables().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-15 08:31:48 -03:00
56ab5b246d BOUNDARIES: Add subroutine boundaries_corner_copy().
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>
2014-07-15 08:29:04 -03:00
6c7c6c60b2 BOUNDARIES: Implement block_corner_copy().
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>
2014-07-15 08:06:25 -03:00
93321a283f BLOCKS: Add %corner field to block_info structure.
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>
2014-07-15 07:30:54 -03:00
9cb8f52725 DOMAINS: Associate face, edge and corner pointers in generate_mesh().
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>
2014-07-15 07:27:25 -03:00
d238a6ef45 BLOCKS: Update neighbors' pointer in derefine_block() in 2D.
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>
2014-07-15 07:24:10 -03:00
c74e63162c BLOCKS: Separate children and neighbor pointer update in refine_block().
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>
2014-07-15 07:15:18 -03:00
0159374c88 Merge branch 'master' into rewrite_neighbor_pointers 2014-07-14 13:26:29 -03:00
9d2b829179 EVOLUTION: Add check for NaNs in variables if DEBUG=Y.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-14 13:25:30 -03:00
ac4c7742db BLOCKS: Update face neighbor pointers in refine_block() in 3D case.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-13 09:17:05 -03:00
1abca59d6a BLOCKS: Update edge and corner pointers in derefine_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-07 17:11:54 -03:00
09ddc6cb00 BLOCKS: Correct neighbor pointers in refine_block() for 2D case.
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>
2014-07-07 16:48:44 -03:00
6ae36d29d9 BLOCKS: Update edge and corner pointers in refine_block() for 2D.
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>
2014-07-07 12:46:39 -03:00
9e7b0b3e9d BLOCKS: Change the meaning of indices in neighbor pointers.
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>
2014-07-06 20:09:45 -03:00
1b3eb9c933 BLOCKS: Nullify new neighbor fields in deallocate_metablock().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-05 13:50:48 -03:00
5262f29e3a BLOCKS: Nullify new neighbor fields in allocate_metablock().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-05 13:45:55 -03:00
37d3fd0d87 BLOCKS: Add face, edge and corner neighbor fields to meta block structure.
This commit extends the meta block structure by fields in which we store
pointers to face, edge and corner neighbors.

In the current implementation the boundary update is only done for block
faces, meaning that the corners are not properly updated between the blocks
on different levels. This, of course, can create unexpected problems,
like improper interpolation in the ghost zones, resulting in NaNs there.

The fields for neighbor pointers should allow for a quick access to neighbors
for full, properly done, boundary update.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-05 13:22:16 -03:00
f816303472 MESH: Remove unnecessary import in generate_mesh().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 16:51:13 -03:00
62d413303c MESH: Spell check in recently added subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 16:42:45 -03:00
64a483cb91 MESH: Spell checking in update_mesh().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 16:39:00 -03:00
153cc89980 MESH: Remove unused variables from update_mesh().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 16:34:28 -03:00
1821c485d5 MESH: Move block prolongation to refine_selected_blocks().
The actual block prolongation has been moved from update_mesh() to a
separate one called refine_selected_blocks().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 16:27:00 -03:00
6f9de6e6c5 MESH: Move block restriction to derefine_selected_blocks().
The actual block restriction has been moved from update_mesh() to
a separate one called derefine_selected_blocks().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 16:14:36 -03:00
c3d456e5b5 BLOCKS: Fix metablock_set_leaf() and metablock_unset_leaf().
Update the leaf state and counter nleafs in metablock_set_leaf() and
metablock_unset_leaf() only if they really change the state.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 15:28:25 -03:00
2b27685b41 BLOCKS: Update the number of leafs in remove_metablock().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 15:23:36 -03:00
2093a206bb BLOCKS: Move mblocks update to append_metablock(), remove_metablock(), etc.
Similarily to dblocks, mblocks should count the number of allocated meta
block which are stored in the meta block list, therefore it should be
updated in append_metablock(), remove_metablock(), insert_metablock_*(),
etc.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 15:17:41 -03:00
d38e543a82 BLOCKS: Move dblocks update to append_datablock() and remove_datablock().
The data block counter dblocks shouldn't be update in
allocate_datablock() and deallocate_datablock(), since these subroutines
can be used to allocate temporary data blocks. Instead, the counter
dblocks should count only allocated data blocks which are stored in the
list_data data block list.

Therefore, move the update of dblocks to append_datablock() and
remove_datablock().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 15:09:28 -03:00
fe60e70e57 MESH: Move child processing from update_mesh() to prepare_sibling_derefinement().
After checking refinement flags and process neighbors, we need to check
if all siblings of blocks which were selected for derefinement, are
eligible for derefinement too, i.e. lay at the same level, and are also
selected for derefinement. After this step, we bring all siblings to the
same processor, so the derefinement can be done efficiently.

In this commit, the above step is moved from update_mesh() to
prepare_sibling_derefinement().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 13:03:24 -03:00
83c1a5da1e MESH: Move the second part of update_mesh() to update_neighbor_refinement().
The second part of update_mesh(), in which we update neighbor refinement
flags, has been moved to a new subroutine update_neighbor_refinement().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 10:33:10 -03:00
b12335528a MESH: Move part of update_mesh() to check_data_block_refinement().
The first part of update_mesh(), where we check and update the
refinement flags, has been moved to a new private subroutine
check_data_block_refinement().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 10:10:29 -03:00
ee9f32d7dd PROBLEMS: Fix compilation after last commit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-23 09:49:13 -03:00
3f34888b6a PROBLEM: Improve integration at surface in 3D blast problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-21 19:59:15 -03:00
a375cb12c5 PROBLEMS: Fix parameters in the Kelvin-Helmholtz setup file.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-11 23:08:47 -03:00