2291 Commits

Author SHA1 Message Date
b2a7bd08b6 EVOLUTION: Consider dte only for methods with error control.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-19 13:16:31 -03:00
8ec801228c EVOLUTION: Fix formatting once again.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-19 13:03:40 -03:00
d8bd7eb800 EVOLUTION: Fix formatting.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-19 13:02:14 -03:00
30215029d4 EVOLUTION: Be explicit about the method with error control.
Do not show the parameters controlling the integration errors if the
method do not control this error.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-19 12:58:57 -03:00
74693bd7ed Merge branch 'memory_usage_reduction' 2021-07-18 19:49:33 -03:00
548b7a456d Revert "IO: Do not read non-existing data blocks during job restart."
This reverts commit 2a2ab474800cf3653081eb214bb9102528f18e5e.
2021-07-18 19:49:26 -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
7ba3d7ae37 DRIVER: Print message on received signal to error unit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-16 11:33:49 -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
19e89c4dd2 MPITOOLS: Add maximum rank of the node.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 17:25:32 -03:00
b933c444df MPITOOLS: Determine the number of nodes, processes per node, and local rank.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 17:22:00 -03:00
6532c998fb IO: Implement restoring from version 2.0 of AmunXML restart snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 12:57:34 -03:00
3b44444211 IO: Implement storing the version 2.0 of AmunXML restart snapshots.
This version avoids allocation of big arrays to store the array fields
of data blocks. Fields with primitive and conservative variables are
stores separately for each block.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 12:06:48 -03:00
d78b827f37 BOUNDARIES: Fix compilation with MPI=off.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-13 10:58:42 -03:00
2a2ab47480 IO: Do not read non-existing data blocks during job restart.
If the number of blocks is smaller than the number of processes, the
last processes have no data block associated. Therefore, do not try to
read data blocks on such processes during the job restart.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-13 08:59:51 -03:00
339d8e3ca4 BOUNDARIES: Simplify 2D and 3D cases in boundary_fluxes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-12 22:10:06 -03:00
b455ddaa6b BOUNDARIES: Add support for passive scalars to boundary_fluxes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-12 16:26:01 -03:00
02a516aa6d BOUNDARIES: Fix missing indices in boundary_fluxes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-11 12:30:44 -03:00
1836f733c7 BLOCKS: Remove field %f from data block structure.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-11 01:28:12 -03:00
580e1b832e BOUNDARIES: Rewrite bondary_fluxes() to update dU.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-11 01:26:15 -03:00
2509cf3d5a BLOCKS, EVOLUTION: Add block interface fluxes and update them.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 19:25:44 -03:00
0a03dd6f2f EVOLUTION: Separate dU update from the intermitate state update.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 18:52:55 -03:00
8c46b83626 EVOLUTION: Call update_flux() in update_increment().
Remove update_fluxes().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 18:26:52 -03:00
c4a0d1df09 BLOCKS, EVOLUTION: Make dU to be blocks field and use it.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 17:51:28 -03:00
9b5e809ca9 IO: Make sure only available block's %uu fields are re/stored.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 14:31:15 -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
3b954802a5 BLOCKS, DRIVER: Pass the number of registers to BLOCKS.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 12:47:01 -03:00
a5d7bc6aff DRIVER: Initialize EVOLUTION before BLOCKS.
This is required for the number of memory registers to be ready for
using in module BLOCKS.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 12:41:42 -03:00
b5540ed58d EVOLUTION: Add variable for required number of registers.
The number of registers indicates how many memory copies of the
conserved variables are required to perform the integration using a
selected method.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 12:24:20 -03:00
cb7a9fce7b HASH: Remove unused seed, simplify initialization of lane(1).
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-06-03 16:26:02 -03:00
0315941dd9 PYTHON: Bounds of blocks always assume 3 dimensions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-06-03 16:22:21 -03:00
be7e0ea5f2 PYTHON: Add faster block interpolation using ndimage.zoom.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-05-26 18:18:09 -03:00
b350ecdedd PYTHON: Add direction derivatives of velocity and magnetic field.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-30 10:10:49 -03:00
3b14ea26d0 PYTHON: Fix AmunXML.dataset_vtk().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-19 18:38:04 -03:00
2a30d3d6d1 PYTHON: Add reading vectors of velocity and magnetic field to AmunXML.
Add these vector to dataset() and to dataset_to_vtk() of AmunXML.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-19 18:30:56 -03:00
ec16bdff05 IO: Fix restart from XML format when nghosts becomes smaller.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-18 17:26:52 -03:00
e51da1c696 IO: Restart correctly from XML format for different nghosts.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-18 16:59:57 -03:00
3c1e8a521a PYTHON: Rewrite octree classes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 19:15:14 -03:00
a22ce343ce PYTHON: Fix VTK file names in amun_dataset_vtk().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 10:37:48 -03:00
b274a3636d PYTHON: Add compression level to subroutines to convert to VTK files.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 09:50:18 -03:00
5a75d7e08c PYTHON: Use getItemsFromLevel() in amun_dataset_vtk().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 09:42:40 -03:00
500d001d4d PYTHON: Fix spelling in AmunXML.dataset_to_vtk().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 09:29:57 -03:00
4f1042586b PYTHON: Remove unused functions from octree.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 09:19:34 -03:00
1698246f26 PYTHON: Improve formatting of the VTK filename in AmunXML.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 09:18:15 -03:00
315c3207d0 PYTHON: Use getItemsFromLevel() to iterate over level items in AmunXML.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 09:09:37 -03:00
1147923801 PYTHON: Calculate the correct index position of OcNode.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 09:05:24 -03:00
59714a7bda PYTHON: Add index position at the current level to octree nodes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 08:58:01 -03:00
e4ae2ce194 PYTHON: Add octree's function to return a list of items from a given level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-16 08:53:50 -03:00