55 Commits

Author SHA1 Message Date
f659000e8c PROFILE: Remove all custom profiling.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-16 15:22:15 -03:00
40f3e24631 MESH, PROBLEMS: Move procedure pointer to MESH.
This inverts the dependencies allowing for initiating module MESH
from PROBLEMS.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-16 14:02:25 -03:00
1ae3975cd7 MESH: Move REFINEMENT initialization/finalization to MESH.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-16 12:42:38 -03:00
920535030e DOMAINS, MESH: Merge module DOMAINS into MESH.
Module DOMAINS provided only one subroutine to generate the block
structure of the rectangular base domain. This change just moved this
subroutine to module MESH.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-16 11:13:42 -03:00
43e32a755f MESH: Use resize_workspace() in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 20:35:37 -03:00
a381fc0cce MESH: Remove workspace from this module.
Use everywhere the workspace provided by module WORKSPACE.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 22:35:05 -03:00
d5a5c612e0 MESH: Increase the workspace default size.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 12:56:16 -03:00
812bd1b2f9 MESH: Quit, if workspace cannot be increased in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 10:08:49 -03:00
e01285e903 MESH: Export nwork too.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 09:10:54 -03:00
f28803350b MESH: Use workspace in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 08:57:53 -03:00
024fd4b82f MESH: Add a common workspace to be used in various modules.
This workspace removes the necessity of allocating the local subroutine
arrays. It is allocated once in initialize_mesh() and can be used in any
place of the code. By default, the size of this workspace is controlled
by the block dimensions, the number of variables, and the simulation
dimension, but it can be controlled by a parameter 'workspace_size'.

Additionally, there is a logical flag 'work_in_use' exported from this
module to permit the verification if the workspace is currently in use.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 08:07:59 -03:00
d8e0f2954d MESH: Rewrite redistribute_blocks().
This rewrite removes large buffers used by the MPI exchange of data
block arrays between processes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 17:31:50 -03:00
1f7906271a MESH: Rewrite prepare_sibling_derefinement().
This removes the use of extra buffer for MPI block exchange. The
exchange is now a zero-copy operation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 17:08:12 -03:00
52ca353fe4 MESH: Allocate the prolongation array in prolong_block().
The prolongation is not expected to be done very frequently, comparing
to the number of leafs. Therefore, allocate the prolongation array only
when it is required.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 16:39:43 -03:00
c0c549453d MESH: Rewrite prolong_block() in order to reduce its memory usage.
Instead of using a temporary array for all variables, we now reuse the
same array for the prolongation of each variable.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 16:11:10 -03:00
9ecbf83d5f MESH: Make sure again the index nc is not out of the range.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-03 12:32:48 -03:00
01d0549bf5 MESH: Make sure the index nc is no out of the range.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-03 10:32:23 -03:00
d3c0737c8d BOUNDARIES, MESH: Allow to choose prolongation limiter.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-09-21 11:28:23 -03:00
c766bb9059 MESH: Redistribute data blocks after each refinement.
There are situations when one process can suddenly have many data
blocks refined resulting in a significant memory stress before
the new blocks are redistributed among all processes. Just
redistribute data blocks each time the block refinement is
performed to avoid such a situation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-20 17:58:44 -03:00
3817822f6f HELPERS: Move flush_and_sync() to HELPERS.
Use it in mesh statistics.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-18 19:25:49 -03:00
92f5905b6b MESH: Store statistics when the distribution of blocks changes too.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-18 19:07:00 -03:00
047e9af130 MESH: Balance data blocks not only among processes but nodes too.
This change tries to maintain a similar number of data blocks per node,
while balancing them across all processes. This should improve the
memory utilization among nodes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 21:10:17 -03:00
8d167e3895 MESH: Distribute whole block field %uu in redistribute_blocks().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 14:22:16 -03:00
3d45fcca34 BLOCKS: Use %uu instead of %u0, %u1, and %u2.
Block field %uu addopts its size according to the used integration
methods. Use it for all operation insteado of fields %u0, %u1, and %u2.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 14:05:00 -03:00
3d16d5c13d Update copyrights.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-02-04 17:35:04 -03:00
55e6d810d2 BOUNDARIES, MESH: Implement parabolic interpolation for prolongation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-09-01 17:16:18 -03:00
c15378bddd MPITOOLS: Rewrite MPI support using Fortran 2008 interface.
Use procedure interfaces, remove unused variables, etc.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-14 19:40:10 -03:00
4b63c17b07 MESH: Remove unused variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-06 13:23:40 -03:00
7c55b65bd7 DRIVER, MESH, INTEGRALS: Use predefined preprocessor macros.
GNU Fortran and Intel Fortran define preprocessor macros such
__GFORTRAN__ and __INTEL_COMPILER. Just use them.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 11:06:59 -03:00
5f366ab2eb EQUATIONS: Add indicator of positive variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-03-03 10:45:06 -03:00
ad0303d3ba Update copyright.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-03-02 13:18:53 -03:00
055f67c874 MESH: Replace allocatable array with module one in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-03-07 11:12:49 -03:00
7b241c90a8 MESH: Add status argument to prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-03-07 10:51:00 -03:00
cc29921715 MESH: Skip higher levels, if no need for refinement in generate_mesh().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-03-04 22:49:49 -03:00
b13e728819 MESH: Improve printing of the currently generated mesh level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-22 20:17:24 -03:00
bf6847e5fd MESH: Add status argument to refine/derefine_selected_blocks().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-12 11:06:34 -02:00
5a103efcf1 MESH: Add status argument to prepare_sibling_derefinement().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-12 10:50:53 -02:00
e7c546980f MESH: Add status argument to check_data_block_refinement().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-12 10:41:48 -02:00
83f25af24a MESH: Add status argument to update_mesh().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-12 10:31:30 -02:00
5368b60f18 MESH: Add status argument to generate_mesh().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-12 10:22:53 -02:00
e31d2196f9 DOMAINS: Add status argument to setup_domain_*().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-12 09:32:11 -02:00
d7c3d3d48a BLOCKS: Add status argument to derefine_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-12 08:52:00 -02:00
60e002bd3b BLOCKS: Add status argument to refine_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 22:01:18 -02:00
e6faf7dea9 BLOCKS: Remove set_block_dimensions().
Instead, initialize block dimensions through initialize_blocks().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 13:30:02 -02:00
55b8e2f073 BLOCKS: Add status argument to build/wipe_leaf_list().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 12:56:14 -02:00
d205696410 BLOCKS: Add status argument to append/remove_datablock().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 12:42:25 -02:00
5caf3f37cf BLOCKS: Add status argument to allocate/deallocate_datablock().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 12:09:45 -02:00
5e7b0962bc MESH: Update the initialization/finalization status flag.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 09:39:06 -02:00
b3404c186e MESH: Use nb, ne instead of ib, ie, jb, je, kb, ke.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-05 12:52:17 -02:00
e59148c3d9 COORDINATES: Get rid of it, jt, kt, ih, jh, kh.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-05 12:22:43 -02:00