2279 Commits

Author SHA1 Message Date
Grzegorz Kowal
4a86024610 PROBLEM: rewrite the blast problem. 2010-12-02 18:17:29 -02:00
Grzegorz Kowal
91cd15c0de SCHEME: implement the adiabatic HLLD Riemann solver.
- the HLLD approximate solver calculates the numerical fluxes for the
   adiabatic equation of states for the MHD equations;
2010-12-02 17:54:15 -02:00
Grzegorz Kowal
f6c78bb258 SCHEME: implement the isothermal HLLD Riemann solver.
- the HLLD approximate solver calculates the numerical fluxes for the
   isothermal equation of states for the MHD equations;
2010-12-02 12:07:01 -02:00
Grzegorz Kowal
3a1b56860d SCHEME: remove argument 'd' from the Riemann solvers.
- this flag specifies if to return the flux or its spatial derivative;
   this is not used in the GLM-MHD approach;
2010-12-02 10:14:39 -02:00
Grzegorz Kowal
1b995390c5 SCHEME: remove subroutine numerical_flux().
- subroutine numerical_flux() is not used in the GLM-MHD approach, so
   remove it; later, during the implementation of GALERKIN methods, it
   may be reintroduced;
2010-12-02 10:10:40 -02:00
Grzegorz Kowal
c56bd66082 REFINEMENT: cosmetics in check_ref(). 2010-12-02 10:04:17 -02:00
Grzegorz Kowal
dc3fb7ad5a REFINEMENT: rewrite refinement criterion for magnetic field. 2010-12-02 10:02:52 -02:00
Grzegorz Kowal
bb7bffaf9b PROBLEM: rewrite the reconnection problem.
- add parameters for the reconnection problem to the config module;
 - properly initialize the antiparallel magnetic field component and the
   perpendicular component initial perturbation;
2010-12-02 09:54:17 -02:00
Grzegorz Kowal
007c3fbca0 PROBLEM: add the reconnection problem. 2010-12-01 21:08:45 -02:00
Grzegorz Kowal
0a8a66f5cd REFINEMENT: rewrite function check_ref().
- rewrite the function check_ref() using the subroutine to convert the
   conserved variables to primitive ones;
 - if the MHD is used take the gradients of magnetic field components
   into account in determining the refinement indicator;
2010-12-01 15:57:58 -02:00
Grzegorz Kowal
c65688aaf4 EVOLUTION, GLM-MHD: update Psi after all RK substeps.
- the scalar potential is updated after each Runge-Kutta substep now;
2010-12-01 15:23:27 -02:00
Grzegorz Kowal
c08cf9e98b EVOLUTION: remove unused subroutines.
- remove subroutine advance(); this subroutine is good for GALERKIN
   approach; it's gonna be reintroduced during this method
   implementation;
 - remove subroutine update_flux(); this subroutine is called from
   advance() and is not used in the GLM-MHD approach;
 - make GNU Fortran happy bu adding () to the subroutine calls;
2010-12-01 15:14:07 -02:00
Grzegorz Kowal
9c955646b8 BOUNDARY: remove module variables which are not used. 2010-12-01 15:08:29 -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
fe5cade684 GLM-MHD: obtain the states for Bx and Psi.
- in the GLM-MHD set of equations variables Bx and Psi are couples,
   thus find their values and substitute to the left and right states
   before entering the approximate Riemann solver;
2010-12-01 13:27:01 -02:00
Grzegorz Kowal
c220a578b0 SCHEME: move cmax parameter from module 'evolution' to 'scheme'. 2010-12-01 13:13:27 -02:00
Grzegorz Kowal
8dcd7d906f PROBLEM: initialize Psi for the blast problem. 2010-12-01 12:42:17 -02:00
Grzegorz Kowal
db40c6253c SCHEME: fix iteration for reconstruction in HLL.
- fix the index for reconstruction of magnetic field components in the
   subroutine HLL;
2010-12-01 12:39:56 -02:00
Grzegorz Kowal
c55a5972d3 BOUNDARY: perform prolongation for GLM-MHD.
- perform prolongation of the boundaries from blocks at lower level and
   update boundaries of the current block; subroutine bnd_prol();
2010-12-01 12:16:35 -02:00
Grzegorz Kowal
0af8e0747f BOUNDARY: perform restriction for GLM-MHD.
- perform restriction of the variables for GLM-MHD and exchange
   betweent blocks at different levels;
2010-12-01 12:07:35 -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
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