79 Commits

Author SHA1 Message Date
Grzegorz Kowal
740236958c Add new subroutine read_restart_params_h5().
- this subroutine reads the number of processors and the maximum level
   from the first restart file; these two parameters are required
   before restoring the data for a job restart if we want to restart it
   with a different number of processors or with a different maximum
   level;
2011-05-13 16:04:04 -03:00
Grzegorz Kowal
0fc7717100 Move coordinate variables from MESH to new COORDS module.
- a new module COORDS handles the mesh variables which needed to be
   separated from the MESH module since they are used in PROBLEM module,
   which is required by MESH module; this created a circular dependency;
   by introducing a new COORDS module we removed that problem;
2011-05-11 15:32:01 -03:00
Grzegorz Kowal
81ba4935d2 Allow to restart job with more CPUs than the restart files.
- now, if we want to restart a job and use more processors than we used
   while creating restart files, all processors read and recreate meta
   block structure, but only N previously used processors will read data
   block; as soon as the job is restarted, we call redistribute_blocks()
   in order to get equal number of data blocks on each processor;
2011-05-10 17:15:33 -03:00
Grzegorz Kowal
75c01885a3 If a block doesn't have parent, do not set its pointer.
- if we are restarting a job and recreating the meta block structure,
   do not associate the parent pointer of blocks which do not have
   parents;
2011-05-10 16:01:31 -03:00
Grzegorz Kowal
862bbd264f Add more subroutines to set block fields.
- new subroutines to set ID, cpu, refine, config, etc. have been added
   to the BLOCK module;

 - use new subroutines in read_metablocks_h5();
2011-05-06 09:17:01 -03:00
Grzegorz Kowal
5bdc20c7db Fix bug introduced in 027f115394450c93b9317aa078f8c7ff7c3b3836.
- the problem was demonstrating in the way that after restart the
   number of leafs was set to zero; this was because while recreating
   the meta blocks structure we set nleafs directly instead of using
   metablock_set_leaf(); after using this subroutine we don't need to
   to set nleafs anymore, and the restart continues properly;
2011-05-06 08:50:16 -03:00
Grzegorz Kowal
8076970c22 Update copyright headers with the new email. 2011-05-05 18:37:53 -03:00
Grzegorz Kowal
027f115394 Reorganize module BLOCKS.
- reorganize order of subroutines and separate them between groups for
   meta and data blocks, refinement, and private functions and
   subroutines;

 - change the copyright header; update to new email address;

 - make all module pointers, variables, and subroutines private and
   allow only for subset of them to be public;

 - improve the description of block structures;

 - add several functions to return module variables such as the number
   of meta and data blocks, the number of leafs, the last id, etc.;

 - update several subroutines from other modules which required some of
   the BLOCK module variables;
2011-05-05 18:25:24 -03:00
Grzegorz Kowal
f590f85b72 Move the level resolution array to MESH module.
- the level resolution array 'res' has been moved to mesh module, where
   it should belong; due to this it needs to be provided as an argument
   to subroutines in BLOCK and PROBLEM modules which use it;

 - the level resolution array stores block resolutions in each
   directions, so it is now a two dimensional array, with the dimensions
   corresponding to the number of levels and number of dimensions;

 - update subroutine write_coordinates_h5() to store the level
   resolution array properly;
2011-05-05 16:51:35 -03:00
Grzegorz Kowal
cdb37a405b Start/stop timers from the inside of I/O subroutines. 2011-05-02 23:19:46 -03:00
Grzegorz Kowal
b713da4376 Allow for data file with index 0 as the initial state. 2011-05-02 22:07:52 -03:00
Grzegorz Kowal
50c455fb42 Move data and restart file counter to IO module.
- now the file counters for data and restart files are separated and
   moved to the IO module;

 - the number of arguments to the IO subroutines is reduced to the
   necessary minimum;
2011-05-02 21:54:32 -03:00
Grzegorz Kowal
c0f5d5316b Store and restore cmax.
- the maximum speed in the system 'cmax' is not only used to calculate
   the time step, but also to propagate and diffuse the wave of B
   divergence in the MHD case; therefore we need to store it in the
   attributes of restart files, and then restore it in order to keep
   consistency in the problem evolution;
2011-05-02 11:41:08 -03:00
Grzegorz Kowal
fc32225dc1 Change the license to GNU General Public License, version 2. 2011-04-29 11:21:30 -03:00
Grzegorz Kowal
0ff433e16b Rename the code from Godunov-AMR to AMUN. 2011-04-25 13:44:34 -03:00
Grzegorz Kowal
de2be2f4dd Recalculate block coordinates after changing maxlev. 2011-04-24 20:36:13 -03:00
Grzegorz Kowal
6bb85024d5 Restore random generator seeds during job restart.
- implement new subroutine read_attribute_vector_integer_h5() to read
   an integer vector attribute;
2011-04-24 09:42:27 -03:00
Grzegorz Kowal
042a520be7 Store random number generator seed in HDF5 files.
- the number of seeds and seed values must be stored in the restart
   file in order to restart a job properly and guarantee unchanged
   generation of random numbers after restart;
2011-04-24 09:02:35 -03:00
Grzegorz Kowal
a60b17998d Store position of meta block in restart files, as well. 2011-04-23 23:31:06 -03:00
Grzegorz Kowal
e25bc4f573 Merge branch 'master' into 'job_restart'.
Conflicts:
	src/driver.F90
2011-04-23 21:56:57 -03:00
Grzegorz Kowal
4e500af7b3 Store refinenemt flags in the coordinate group of HDF5 file.
- this helps to debug the refinement/derefinement process;
2011-04-22 10:41:22 -03:00
Grzegorz Kowal
3df814ab8a Store evolution parameters in the restart files. 2011-04-15 00:09:50 +02:00
Grzegorz Kowal
1e7dec177c Restore metablock structure during job restart. 2011-04-14 16:14:03 +02:00
Grzegorz Kowal
8348f9ca64 Restore all datablocks for job restart. 2011-04-14 15:01:17 +02:00
Grzegorz Kowal
75e31649fc Add block_array array to store pointers to restored blocks. 2011-04-14 14:34:51 +02:00
Grzegorz Kowal
2ea08c6205 Store the block dimensions as a global attribute. 2011-04-14 12:46:38 +02:00
Grzegorz Kowal
342858f12b Allocate all datablocks in read_attributes_h5(). 2011-04-14 10:26:43 +02:00
Grzegorz Kowal
a617de78ba Allocate all metablocks in read_attribute_h5(). 2011-04-14 00:37:41 +02:00
Grzegorz Kowal
9b8f30b222 Read global attributes in read_data_h5(). 2011-04-13 18:55:55 +02:00
Grzegorz Kowal
2bf24510d2 Implement opening and closing files in read_data_hdf5(). 2011-04-12 18:30:39 +02:00
Grzegorz Kowal
33881a02bc Add checking if restart file exists and is in HDF5 format. 2011-04-11 17:03:06 +02:00
Grzegorz Kowal
5d8efdcdb3 Add and call the initial subroutine to restore data from HDF5 file. 2011-04-11 16:27:08 +02:00
Grzegorz Kowal
a0f7d5118f Introduce the compression of the HDF5 output files. 2011-03-26 13:31:52 -03:00
Grzegorz Kowal
2682d37d20 Update the copyright information. 2011-02-27 22:45:54 -03:00
Grzegorz Kowal
cd995dd076 IO: don't store fluxes.
- fluxes will be removed from the data block structure so don't store
   them;
2010-12-14 10:33:32 -02:00
Grzegorz Kowal
9061068b5a IO: correct wording in some comments. 2010-12-14 10:31:23 -02:00
Grzegorz Kowal
5b74c7d4cb IO: store data objects only if available on CPU.
- the data blocks should be stored in the appropriate group only if
   they are allocated on the current processors;
2010-12-14 10:29:49 -02:00
Grzegorz Kowal
1b43ae0a81 IO: fix compilation for HYDRO (wrong directives). 2010-12-06 17:06:58 -02:00
Grzegorz Kowal
d1796377ea IO: clean up code after removal of indices icx, icy, icz. 2010-12-05 09:30:15 -02:00
Grzegorz Kowal
f6554f6849 IO: remove FLUXCT part from module IO. 2010-12-05 09:21:40 -02:00
Grzegorz Kowal
f611650456 IO, GLM-MHD: store the potential Psi in HDF5 file.
- add storing the scalar potential Psi in the HDF5 files;
2010-12-01 11:55:16 -02:00
Grzegorz Kowal
226c2a3fe9 Move variable indices to new module 'variables'.
VARIABLES

 - create new module 'variables' which stores references to variable
   indices; we gonna store dofferent objects related to variables in
   this module;
2010-12-01 09:25:30 -02:00
Grzegorz Kowal
c72b862db4 Rename variable nblocks to mblocks.
BLOCK STRUCTURE

 - the global variable nblocks tells how many metablocks are allocated,
   thus its name is changed to mblocks;
 - remove unnecessary checking of the list allocation;
2010-12-01 09:23:03 -02:00
Grzegorz Kowal
c4c23b57d3 Store the number of dimensions and block resolutions. 2010-10-12 22:40:55 -03:00
Grzegorz Kowal
992c790988 Store the block coordinates in the output file.
IO

 - the coordinates of the block measured in the units of effective
   resolution are stored now in the output files in the group
   'coordinates';
2010-10-11 21:55:23 -03:00
Grzegorz Kowal
a8dd14def4 Heavy reawrite of the I/O module.
IO

 - the subroutine write_data() is now a wrapper subroutine which call
   the subroutine writing in a supported file format; the file format is
   chosen at the time of compilation;
 - the subroutine write_data_h5() is a new subroutine taking care of
   initialization and storage data in the HDF5 format; depending on the
   file type it calls subroutines to create specific groups and store
   the right data;
 - new subroutines write_atrributes_h5(), write_coordinates_h5(),
   write_variables_h(), write_variables_full_h5(),
   write_metablocks_h5(), write_datablocks_h5(), and number of other
   supporting subroutines to store all data in the proper format for job
   restart, vizualization, and debugging;

MAKE

 - add option to enable/disable HDF5 file compression;
2010-10-11 01:39:15 -03:00
Grzegorz Kowal
76a6b98f69 Add a wrapper subroutine to write data.
IO

 - add a wrapper subroutine write_data() to write data; this subroutines
   chooses the right subroutine depending on the requested format; it
   also choses the data format, i.e. HDF5 at the present time (other
   formats can be added later);
 - rename subroutine write_data() to write_data_primitive_h5();
 - format long lines so they fit within 80 columns;
2010-10-09 20:37:23 -03:00
Grzegorz Kowal
7ff6e0fb7a Update the copyright info in io.F90.
- also correct the separating lines;
2010-10-09 19:54:07 -03:00
Grzegorz Kowal
4dea14df91 Fix compilation when EOS=ISO.
IO

 - obtain indices ipr and ien only when we use adiabatic equation of
   state;

PROBLEM

 - obtain indices ien and ipr only when EOS=ADI;
 - in the case of isothermal EOS define initial star as an increase of
   density instead of pressure;
 - in checking the refirement criterion use only density gradient when
   EOS=ISO;

SCHEME

 - obtain indices ipr and ien only when we use adiabatic EOS;
 - in function maxspeed() obtain parameter csnd2 in the case of
   isothermal equation of state;
2010-03-30 23:23:49 -03:00
Grzegorz Kowal
03f00b65d5 Add subroutine divergence() and use it in I/O.
INTERPOLATION

 - add a new subroutine divergence() calculating the divergence of a
   vector field;

IO

 - utilize a new subroutine divergence() in calculation of the
   divergence of staggered magnetic field;
2010-03-30 17:44:48 -03:00