1608 Commits

Author SHA1 Message Date
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
5e102ed9f1 BOUNDARY: update variables for GLM-MHD.
- exchange boundaries for the magnetic field components and scalar
   potential for GLM-MHD;
 - slightly rewrite the subroutine bnd_copy();
2010-12-01 11:48:10 -02:00
Grzegorz Kowal
bee4d07135 GLM-MHD, CONFIG: add parameter alpha_p.
- add a new parameter alpha_p to module 'config' to allow setting it
   from config.in;
2010-12-01 11:24:57 -02:00
Grzegorz Kowal
9eef6af9b4 GLM-MHD: implement Psi decay due to a source term.
- the scalar potential Psi evolution is controlled by a dissipative
   source term; include this update using a simple analytical solution;
2010-12-01 11:20:25 -02:00
Grzegorz Kowal
87b8225b55 GLM-MHD: take into account the maximum speed in update.
- the divergence of B propagates with the maximum speed c_h; take it
   into account while updating the solution for the scalar potential
   Psi;
2010-12-01 10:57:40 -02:00
Grzegorz Kowal
166adf0e64 GLM-MHD: update global solution.
- update the magnetic field components and scalar potential in the
   Euler and RK2 methods, evolve_euler() and evolve_rk2() subroutines,
   respectively;
2010-12-01 10:53:21 -02:00
Grzegorz Kowal
022919c08c DRIVER: update the maximum speed initially.
- call update_maximum_speed() after the problem intialization in order
   to find the initial maximum speed;
2010-12-01 10:43:01 -02:00
Grzegorz Kowal
71d20ced15 EVOLUTION: add subroutine to update the maximum speed.
- make the variable cmax global in the module 'evolution';
 - add a new subroutine update_maximum_speed() which updates the maximum
   speed cmax in the system iterating over all data blocks;
 - use the subroutine update_maximum_speed() in evolve();
2010-12-01 10:39:18 -02:00
Grzegorz Kowal
e58967b9a4 GLM-MHD: copy Psi between primitive and conserved variables.
- update subroutines cons2prim() and prim2cons() to convert the scalar
   potential between primitive and conserved variables;
2010-12-01 10:22:00 -02:00
Grzegorz Kowal
010c49556e GLM-MHD: calculate physical fluxes for B and Psi.
- calculate physical fluxes for the magnetic field components and
   scalar potential in subroutine fluxspeed();
2010-12-01 10:17:10 -02:00
Grzegorz Kowal
4e212d73b9 GLM-MHD: fix the preprocessor flag. 2010-12-01 10:07:06 -02:00
Grzegorz Kowal
6e2e07d9c9 GLM-MHD: update the numerical fluxes in HLL solver.
- reconstruct the states for the magnetic field components and scalar
   potential just like other fluid variables;
 - calculate the numerical fluxes for the magnetic field components and
   scalar potential;
2010-12-01 10:03:00 -02:00
Grzegorz Kowal
0b255858bb GLM_MHD: update magnetic field and potential increment.
- update the magnetic field component and the scalar potential Psi
   increments in the subroutine update();
2010-12-01 09:51:12 -02:00
Grzegorz Kowal
c645fd9ede GLM-MHD: Add variable indices.
- add variable indices for the GLM-MHD equations in the module
   'variables'; the index 'iph' points to the scalar potential defining
   the divergence of magnetic field;
2010-12-01 09:37:50 -02:00
Grzegorz Kowal
ce32d86688 Add new field 'pos' in the meta block structure.
BLOCK STRUCTURE

 - add new field pos in the meta block structure determining the
   position of the current block in the parent block; this might be very
   useful in determining which boundary region should be updated;
 - add new subroutine metablock_set_position() which sets the position
   of the child in the parent block;
2010-12-01 09:31:38 -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
c2e6333aab Simplify subroutine bnd_copy().
BOUNDARY CONDITIONS

 - subroutine bnd_copy() has been rewritten in order to simplify it and
   reduce the number of local variables;
2010-10-13 17:21:43 -03:00
Grzegorz Kowal
3572c44064 Rewrite subroutine bnd_rest();
BOUNDARY CONDITIONS

 - the subroutine bnd_rest() has been rewritten in order to make if more
   clear in understanding and remove necessity of using external
   interpolating subroutines and allocatable arrays;
2010-10-13 17:16:18 -03:00
Grzegorz Kowal
787a2e816c Rewrite the subroutine to update variable boundaries.
BOUNDARY CONDITIONS

 - the main subroutine to update the variable boundaries has been
   rewritten in order to update the boundaries in a proper order;
 - first we update the specific boundaries of blocks which don't have
   neighbors;
 - then we update boundaries between blocks at the same levels; this
   assures that the boundaries of the same levels are not contaminated
   by interpolation from other levels;
 - the last step is updating boundaries between blocks at different
   levels;
 - one step more before the last step might be required; in this step we
   update the corners of blocks which have two neighbors at the higher
   level;
2010-10-13 16:59:40 -03: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
c4c23b57d3 Store the number of dimensions and block resolutions. 2010-10-12 22:40:55 -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
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
8757789042 Add the field 'coord' to meta block structure.
BLOCK STRUCTURE

 - add a new field 'coord' to store block coordinates in the units of
   the effective resolution;
 - add a subroutine metablock_set_coord() to set the block coordinates;
2010-10-11 02:10:47 -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
476e800c93 Clean up the file driver.F90.
- also break long lines so they fit within 80 characters;
2010-10-06 23:11:22 -03:00
Grzegorz Kowal
14c901b8ee Update the copyright information in driver.F90. 2010-10-06 23:03:47 -03:00
Grzegorz Kowal
96ed98a636 Change the boundary subroutines names.
BOUNDARIES

 - change the name of subroutine boundary() to boundary_variables();
 - change the name of subroutine boundary_flux() to boundary_fluxes();
2010-09-19 14:33:57 +02:00
Grzegorz Kowal
47fe94de69 Add a new subroutine to restrict fluxes.
BOUNDARIES

 - add a new subroutine restrict_flux() to restrict the fluxes from
   blocks at higher level to the lower level blocks;
2010-09-19 12:23:02 +02:00
Grzegorz Kowal
5b172cb875 Add a new subroutine to update flux boundaries.
BOUNDARIES

 - add a new subroutine boundary_flux() to update the boundaries of
   the fluxes.
2010-09-19 12:01:52 +02: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
7b48386610 Remove flux calculation from the subroutine update().
SCHEME

 - remove the flux calculation from the subroutine update() and all dependent
   subroutines;
2010-09-19 00:08:20 +02:00
Grzegorz Kowal
057c611d9a Some cosmetics in the interpolation subroutines. 2010-09-18 23:56:07 +02:00
Grzegorz Kowal
db478af9e4 Add new global variables to the configuration.
CONFIGURATION

 - add two new variables which determined the half and the double of
   the ghost cell size (nh and nd, respectively);
 - add a variable to determine the half size of the block (ih, jh, and
   kh);
2010-09-18 11:50:24 +02:00
Grzegorz Kowal
d54b57e1eb Cosmetic change in subroutine allocate_datablock() in blocks.F90. 2010-09-18 11:44:46 +02:00
Grzegorz Kowal
b6dc6095ac Make GNU compiler happy and fix indexing of emf. 2010-09-18 11:42:09 +02:00
Grzegorz Kowal
ed88bc2526 First step of implementation of time advance using new method.
BLOCK STRUCTURE

 - add new array to the data block structure to store the electromotive
   force components; these components are located at the centers of cell
   edges, in this way the CT update of the staggered magnetic field
   component will be easier;

EVOLUTION

 - add new subroutine advance() which performs several steps in order to
   advance the solution in time by one-step update; the substeps are the
   updates of the numerical flux, the flux boundary, the advance in time
   the solution, the updates of mesh structure, and the boundaries of
   conserved variables, and finally the new time step estimation;

 - add new subroutine update_flux() to update the numerical fluxes
   stored in the data blocks;

SCHEME

 - add new subroutine numerical_flux() to calculate fluxes at the proper
   locations;

 - add new logical argument to HLL and HLLC in order to specify if the
   flux should be returned as a numerical flux or its derivative;
2010-07-27 19:26:15 -03:00
Grzegorz Kowal
0b62ce8c35 Update the array of fluxes and send it out of the update.
EVOLUTION

 - add new output argument returning the updated fluxes for each block;

SCHEME

 - update the fluxes from the one dimensional fluxes returned by the
   Riemann solver;
2010-07-26 21:12:40 -03:00
Grzegorz Kowal
a2a7fbf3c4 Add a field for storing fluxes in the blocks.
BLOCK STRUCTURE

 - add a multidimensional array to store the numerical fluxes in the
   block structure; it seems that this is necessary for the boundary
   update, since the fluxes should be synchronized between blocks at
   different levels;
2010-07-26 20:46:45 -03:00
Grzegorz Kowal
f12c32a5af Rewrite the subroutine bnd_prol() to use expand_tvd().
INTERPOLATION

 - add subroutine expand_tvd() to prolongate a multidimensional array
   using the second-order TVD interpolation (subroutine
   expand_1d_tvd());

BOUNDARY CONDITIONS

 - rewrite the subroutine bnd_prol() in order to minimize the size of
   interpolated arrays and use the subroutine expand_tvd();
2010-07-20 15:37:22 -03:00
Grzegorz Kowal
b9dd7d97e8 Remove unnecessary argument from bnd_copy() subroutine.
BOUNDARY CONDITIONS

 - if the blocks are on the same level there is no need for iteration
   over the faces; remove the argument iface from the subroutine
   bnd_copy() since it is not used;
2010-07-20 11:39:23 -03:00
Grzegorz Kowal
ea448122be We don't need to iterate over levels in the boundary update.
BOUNDARY CONDITIONS

 - the boundaries should be updated in the directional manner, i.e.
   first the update of all blocks along the X direction, then along the
   Y direction, and finally along the Z direction; this assures the
   proper boundary zones update;

 - in the boundary update there is no reason for the iteration over the
   levels if the boundary update is happening in the directional manner;
2010-07-20 11:33:24 -03: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
c057d098de Implement magnetic field prolongation with boundary.
INTERPOLATION

 - add subroutine expand_1d_tvd to 1D TVD prolongation;

 - implement magnetic field boundary prolongation with a given boundary;
   this is used for boundary update of magnetic components in a block at
   higher level, where the boundary is updated from the block at lower
   level; the prolongation is divergence free; for now only 2D case is
   implemented;

BOUNDARY CONDITIONS

 - use the boundary prolongation subroutine expand_mag_bnd in the
   updating the magnetic field boundaries in a blocks which neighbors
   are at lower level; this should be ready for 3D too;
2010-07-03 23:37:02 -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