192 Commits

Author SHA1 Message Date
Grzegorz Kowal
fc8bef3a83 Rewrite big part of update_mesh(). 2011-04-23 17:29:20 -03:00
Grzegorz Kowal
ae9112e1f6 Add subroutine check_metablock() to check individual meta blocks. 2011-04-21 14:13:25 -03:00
Grzegorz Kowal
0177811f55 Check subroutine check_mesh() to debug refinement.
- subroutine check_mesh() verifies, before and after the mesh update,
   if the meta blocks pointer fields point to correct blocks;
2011-04-21 08:39:31 -03:00
Grzegorz Kowal
c24e09fedc Move coordinate variables generation to another subroutine. 2011-04-15 00:46:19 +02:00
Grzegorz Kowal
aa80869645 Move generation if the level resolutions to init_blocks(). 2011-04-15 00:25:22 +02:00
Grzegorz Kowal
a617de78ba Allocate all metablocks in read_attribute_h5(). 2011-04-14 00:37:41 +02:00
Grzegorz Kowal
9b46eb5c61 Move init_blocks() to the driver. 2011-04-14 00:19:45 +02:00
Grzegorz Kowal
f07457e084 Reorganize printed informations, parameters and timings. 2011-03-10 15:22:10 -03:00
Grzegorz Kowal
6e928be724 MESH: add an array to store volume elements for all levels. 2011-03-02 15:01:08 -03:00
Grzegorz Kowal
2682d37d20 Update the copyright information. 2011-02-27 22:45:54 -03:00
Grzegorz Kowal
d97799cd50 Make GNU Fortran happy. 2011-02-27 13:49:26 -03:00
Grzegorz Kowal
ab7e1c5143 MESH: improve printed info about the block structure. 2011-02-16 12:08:50 -02:00
Grzegorz Kowal
e2e404ad94 MESH: restrict magnetic field not only when GLM. 2010-12-14 16:34:51 -02:00
Grzegorz Kowal
a359f3949a MESH: improve autobalancing for block distribution.
- improve the algorithm for autobalancing for more equal data block
   distribution;
2010-12-14 11:19:11 -02:00
Grzegorz Kowal
ebec9cfa81 MESH: update the coordinate variables preparation. 2010-12-08 20:09:41 -02:00
Grzegorz Kowal
cb7b8b3b8b MESH: fix obtaining the child position. 2010-12-05 10:19:32 -02:00
Grzegorz Kowal
635a330016 MESH: use field pos in restrict_block(). 2010-12-05 10:16:17 -02:00
Grzegorz Kowal
1f21ec2097 MESH: use field pos in prolong_block(). 2010-12-05 10:14:57 -02:00
Grzegorz Kowal
7cb4e2f352 INTERPOLATION: rename expand_tvd() to expand(). 2010-12-05 09:56:27 -02:00
Grzegorz Kowal
8fa4cdf4c7 MESH: use expand_tvd() in prolong_block(). 2010-12-05 09:46:16 -02:00
Grzegorz Kowal
523198433d MESH: remove part for FLUXCT. 2010-12-05 09:18:07 -02:00
Grzegorz Kowal
4eb6c1ab2b MESH: remove FIELDCD and FLUXCT parts. 2010-12-05 09:12:47 -02:00
Grzegorz Kowal
72d15710c7 MESH, GLM-MHD: prolongate proper variables during refinement.
- in subroutine prolong_block() prolongate the magnetic field
   components and scalar potential during the block refinements if the
   GLM-MHD equations are used;
2010-12-01 13:54:46 -02:00
Grzegorz Kowal
9e2f69c745 MESH, GLM-MHD: restrict proper variables during derefinement.
- in subroutine restrict_block() restrict the magnetic field components
   and scalar potential during the derefinement if GLM-MHD equations are
   used;
2010-12-01 13:45:54 -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
aab8831bbf Update the copyright info and fix the length of separating lines. 2010-10-13 03:32:10 -03:00
Grzegorz Kowal
c182e08352 Set the initial coordinates and calculate them during the refinement. 2010-10-11 22:46:07 -03:00
Grzegorz Kowal
1d56dc6266 Rewrite the subroutine restrict_block(). 2010-09-19 11:49:21 +02:00
Grzegorz Kowal
d4e6f7d0ee Use a pointer to the data structure in prolong_block(). 2010-09-19 11:46:00 +02:00
Grzegorz Kowal
8ae2964b4f Do not allow for the derefinement in the lowest level. 2010-09-19 11:38:55 +02:00
Grzegorz Kowal
b6dc6095ac Make GNU compiler happy and fix indexing of emf. 2010-09-18 11:42:09 +02:00
Grzegorz Kowal
26e103ce86 Rewrite subroutine restrict_block.
MESH

 - subroutine restrict_block has been rewritten to use one big array for
   storage variables from all children and them restricting this array
   and putting resulted variables in a new data block;
2010-07-04 01:15:34 -03:00
Grzegorz Kowal
81c241a76a Remove argument ng from all restriction subroutines.
BOUNDARY CONDITIONS

 - remove the third argument from all calls of the subroutine shrink();

INTERPOLATION

 - remove ng argument from subroutines shrink() and shrink_1d();
 - small fixes to subroutine magtocen() in the divergence free
   correction calculation;

MESH

 - fix index calculation and remove the third argument from calling the
   subroutine shrink();
2010-03-22 02:17:44 -03:00
Grzegorz Kowal
aa1a0867bd Implement divergence-free reconstruction. Rewrite bnd_prol().
BOUNDARY CONDITIONS

 - rewrite subroutine bnd_prol() and use expand_mag() in it;

 - fix some index calculations in bnd_rest();

INTERPOLATION

 - implement new subroutine expand_mag() performing divergence-free
   prolongation of the staggered magnetic field;

 - implement divergence-free correction in interpolation of cell
   centered magnetic field in subroutine magtocen();

MESH

 - use new subroutine expand_mag() in block prolongation;
2010-03-21 11:54:54 -03:00
Grzegorz Kowal
6a2b6f6fbb Implement boundary conditions for staggered magnetic field.
BOUNDARY CONDITIONS

  - rewrite bnd_copy() so first the indices are prepared and then there
    is one call to fill out the destination array; include the lower
    index change for staggered magnetic field components;

  - in the subroutine bnd_rest() implement correct restriction of the
    staggered magnetic field components; take into account the change
    of the lower index;

  - in the subroutine bnd_prol() implement correct prolongation of the
    staggered magnetic field components; take into account the change of
    the lowe index;

  - by default use 2 ghost cell and the restriction and expansion to
    prevent errors resulting from interpolation;

CONFIGURATION

  - enforce a lower limit for number of ghost zones to 6 when MHD=Y and
    4 otherwise

INTERPOLATION

  - remove unnecessary interpolation methods

  - limit 'c' interpolation to the second order only

MESH

  - implement divergence-free prolongation and restriction for the
    staggered magnetic field components in the block refinement and
    derefinement
2010-03-08 19:09:49 -03:00
Grzegorz Kowal
88761c9622 Implement FLUXCT integration of the induction equation.
SCHEME

  - implement Flux-CT scheme for the staggered magnetic field
    integration;

BLOCK STRUCTURE

  - use more space efficient storage of the variables, which means
    storing only staggered components of magnetic field; cell-centered
    components are calculated only when necessary;

EVOLUTION

  - remove loops in the field updates; operations are performed on the
    arrays;

BOUNDARY CONDITIONS

  - remove loops in the bnd_copy; operations are calculated on the whole
    array now;

INTERPOLATION

  - subroutine magtocen() has been rewritten to avoid problems with the
    array allocation; now as an argument we enter the array of all
    variables; subroutine uses indices for the face-centered and
    cell-centered magnetic field components internally;

MAKE

  - add flag defining Flux-CT scheme;

PROBLEM

  - use predefined array variables instead of allocated;
2010-02-28 18:35:57 -03:00
Grzegorz Kowal
cab66e8fc3 Implement FIELD-CD scheme for magnetic field evolution. 2010-02-22 16:21:20 -03:00
Grzegorz Kowal
98849f3369 Prepare code for central differencing scheme for magnetic field. 2010-02-22 12:01:58 -03:00
Grzegorz Kowal
245c4aa52a Use the 1st order TVD prolongation. 2010-02-22 11:47:50 -03:00
Grzegorz Kowal
6b88835994 Update cell-centered magnetic field in prolongation/restriction.
MESH:

 After restriction/prolongation of the face-centered magnetic field we
need to interpolate also cell-centered field components.
2010-02-14 17:54:51 -02:00
Grzegorz Kowal
bbf998e4a0 Boundaries, interpolation, indices.
Rewritten boundaries allow for a proper handling boundaries between
blocks at different refinement levels. Prolongation and restriction of
the boundaries are improved now.

Rewritten interpolation for prolongation and restriction.

References to the variable indices are assigned more properly.
2010-02-11 23:30:46 -02:00
Grzegorz Kowal
dd8af20c86 Refine the first level if there is only one block.
MESH REFINEMENT, INITIAL GEOMETRY

 - if there is only one block and it is set not to be refined, refine it
   anyway to catch situations when the initial resolution is too small
   for the problem initiation
2009-09-29 16:17:10 -03:00
Grzegorz Kowal
35fb0cac4f There is no need for importing the block_data structure. 2009-09-29 15:37:31 -03:00
Grzegorz Kowal
671985874f Improve block prolongation and add support for 3D.
MESH STRUCTURE, REFINEMENT

 - subroutine prolong_block() has been completely rewritten; now it
   supports 2D and 3D boxes, and the calculation of bounds for the
   expanded array is automated now
2009-09-29 15:32:58 -03:00
Grzegorz Kowal
1fdf2b72ae Improve block restriction and add support for 3D.
MESH STRUCTURE, DEREFINEMENT

 - subroutine restrict_block() has been completely rewritten; now it
   supports 2D and 3D boxes, and the calculation of bounds for
   source and destination arrays is automated
2009-09-29 15:12:19 -03:00
Grzegorz Kowal
4953cfbe22 Fix dimensions of the neigh field. Use better vars naming.
FIXES

 - the field neigh of meta blocks structure must use ndims, nsides, and
   nfaces variables

BLOCK STRUCTURE

 - use pmeta and pdata names for ponters to meta and data blocks,
   respectively; this helps reading the code

HOSTS

 - turn on DEBUG
2009-09-26 14:27:47 -03:00
Grzegorz Kowal
5074834673 Implement MPI auto balancing.
MESH STRUCTURE, MPI

 - implement auto balancing, which resends the blocks to the neighboring
   processors in order to keep the same number of data blocks on each
   processor
2009-09-26 01:51:44 -03:00
Grzegorz Kowal
03568cd974 Fix the initial balancing of the blocks.
MESH STRUCTURE, MPI

 - correct the initial division of the geometry, so each process is
   attached to the same number of blocks; blocks at the top level are
   allowed to be attached to different processors even if they are
   children of the same block
2009-09-26 00:39:41 -03:00
Grzegorz Kowal
ee413ffee6 After moving derefined blocks, set their cpu flags. 2009-09-26 00:14:23 -03:00