193 Commits

Author SHA1 Message Date
25ba130da3 MESH: Guarantee the positivity of positive variables in prolongation.
We use 1D TVD limiter to prolongate blocks, but in 2D or 3D they can
produce negative values of positive variables in the corners. Detect
such situation and limit the derivatives until the whole interpolated
region is positive.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2016-08-12 19:24:31 -03:00
1b8add50eb MESH: Fix block statistics calculation after job restart.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-18 06:55:32 -02:00
f7ef45c559 MESH: Fix indices to fill the borders in restrict_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-08 20:13:43 -03:00
ff9483e95c MESH: Fill the block borders in restrict_block().
Since the borders are undefined, it is better to fill them with the copy
of the last available boundary layers. Even though they will be later
updated by the boundary update, it eliminates the possibilty of
propagating NaNs inside the blocks.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-05 18:59:31 -03:00
408760bf15 INTERPOLATIONS: Make the prolongation limiter independent.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-10 10:05:22 -03:00
1a2a312775 MESH: Correct calculation of the adaptive mesh efficiency.
The efficiency should be large, if the adaptive mesh uses few blocks
comparing to the corresponding uniform mesh. When the number of adaptive
blocks increase, the efficiency should drop.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-01-25 22:01:54 -02:00
cbac66e430 MESH: Use the list of leafs in store_mesh_stats().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-01-13 15:50:05 -02:00
fbedbb21a5 MESH: Regenerate the leaf list after each mesh change.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-01-13 13:13:41 -02:00
81f1c2bbbf COPYRIGHT: Update year to 2015.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-01-06 16:01:36 -02:00
50302b0705 MESH: Use npmax instead of (nprocs - 1).
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-19 14:08:37 -02:00
6c223c2e3b MESH: Increase exponent digit number in mesh statistics.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-09-27 14:07:12 -03:00
7c3a621096 MESH: Redistribute all variable arrays in redistribute_blocks().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-09-17 08:34:47 -03:00
d1e78eb0b7 MESH: Replace pblock with pmeta in some subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-09-13 10:19:25 -03:00
557abc5b82 MESH: Make MPI tag in redistribute_blocks() consistent.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-09-11 20:00:06 -03:00
cd966f764c MESH: Change real variables to double precision.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-08-04 09:03:28 -03:00
1395712472 BLOCKS: Remove all remainings after old %neigh pointers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-24 12:39:40 -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
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
e06a7edfdd BLOCKS: Check neighbor consistency if DEBUG=Y.
Add subroutines to iterate over all block neighbors and check if they
reference to correct meta blocks.  The neighbor consistency check is
done after initial mesh generation and each time the mesh has been
updated.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-27 21:00:08 -03:00
75eb97125e BLOCKS, MESH, IO: Fix restart with less processes.
The job restart with smaller number of processors than the number of
files didn't work well, since all metablocks of all remaining files
where set to the last process before actually reading the corresponding
data blocks.  This resulted in a crash in redistribute_blocks() due to
pointer not associated.

The fix lets the meta blocks to be restored with the original process
numbers.  While reading files with the indices larger than the index of
the last process, all meta blocks which corresponding data blocks are
stored in the read file, are set to the process number of the reading
process.  After reading data blocks from each file, the blocks are
redistributed.  However, only data blocks belonging to the active
processes are redistributed.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-23 17:33:44 -03:00
962c5fce94 MESH: Remove calling check_mesh() if DEBUG=Y.
Subroutine check_mesh() has been removed.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-23 15:08:58 -03:00
0a81a01242 MESH: Micro optimization in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-17 11:52:06 -03:00
b226959097 MESH: Interpolation symmetry in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-17 11:35:15 -03:00
4bbd84147f BLOCKS: Rewrite neighbor selection for refinement.
In this patch we make a general subroutine iterating over all neighbors
iterate_over_neighbors() which takes as arguments a pointer to the block
which neighbors are evaluated and pointer to subroutine which should be
called with each neighbor. So far two such subroutines are used, one to
select the proper refinement flag, and another to select the neighbor
for update.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-02-07 10:25:53 -02:00
4e7b5def3e COORDINATES, MESH: Remove effres.
The mesh coefficients are calculated in a bit different way in
store_mesh_stats().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-29 14:58:35 -02:00
c2656c9b6a BLOCKS: Field %coords mean global coordinates at the block level.
If we take the whole domain and divide it between blocks of the size
corresponding to the current lever, the field %coords identifies the
position of the current block in the domain.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-29 14:00:42 -02:00
d182934fcf BLOCKS: Rename meta block field %cpu to %process.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-16 19:20:41 -02:00
3ec7bdf232 BLOCKS, MESH: Remove checking the meta block structure.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-16 19:01:41 -02:00
b2dbb01cd8 BLOCKS: Rename datablock_set_dims() to set_block_dimensions().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-16 17:58:28 -02:00
2ad980142b ERROR: Rewrite module a bit and the way messages are printed.
Subroutine print_error() does not stop the execution anymore.  This
should be controlled by the code.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-10 11:27:39 -02:00
a366a9cede MESH: Send primitive variables in redistribute_blocks() too.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-08 15:51:31 -02:00
39e80d3e55 MESH: Fix coverage and efficiency factors calculation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-07 21:59:13 -02:00
9307817387 MESH: Change timer descriptions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-03 12:44:21 -02:00
788d328f7a Update years in copyright information.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-02 11:52:59 -02:00
7a4e402c8a BLOCKS, IO, MESH: Rename nchild to nchildren.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-27 17:58:40 -02:00
acb7eb812d MESH, REFINEMENT: Use statement formatting.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-27 17:41:04 -02:00
053e72ead4 MESH: Rewrite check_mesh().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-27 15:17:27 -02:00
24b644aa6a MESH: Rewrite prolong_block() and restrict_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-27 15:14:31 -02:00
c1db19d55f MESH: Rewrite update_mesh().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-27 15:11:03 -02:00
c6c1ed97ed MESH: Relocate store_mesh_stats() in the module.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-27 13:17:25 -02:00
081eeee471 MESH: Add module subroutines profiling.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-27 13:15:17 -02:00
c877cc6b7c MESH: Rewrite redistribute_blocks().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-27 08:02:07 -02:00
758c712991 MESH: Rewrite initialization and statistics.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-26 19:51:26 -02:00