46 Commits

Author SHA1 Message Date
Grzegorz Kowal
8076970c22 Update copyright headers with the new email. 2011-05-05 18:37:53 -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
50b44c814e Use eps instead of 0.0 in determining local extrema.
- it seems that when we compare side derivatives for interpolated
   states to zero, there are some problems with symmetry; using a small
   value 'eps' instead of 0.0 solves this problem;
2011-04-26 20:54:02 -03:00
Grzegorz Kowal
3409368815 Prevent from creating local extrema in MP reconstructions. 2011-04-26 09:19:09 -03:00
Grzegorz Kowal
0ff433e16b Rename the code from Godunov-AMR to AMUN. 2011-04-25 13:44:34 -03:00
Grzegorz Kowal
0f863de622 Optimize LimO3 reconstruction. 2011-03-25 01:05:58 -03:00
Grzegorz Kowal
2e4273326f Add minmod4 function and use it in MP interpolation. 2011-03-24 16:15:51 -03:00
Grzegorz Kowal
1841ae56f9 Optimize MP reconstruction methods. 2011-03-23 18:01:16 -03:00
Grzegorz Kowal
2682d37d20 Update the copyright information. 2011-02-27 22:45:54 -03:00
Grzegorz Kowal
0a3d1036e2 BOUNDARIES: improve the divergence free boundary conditions.
- in order to find the boundary value for normal magnetic field
   component we use the divergence free condition, i.e., we need to
   calculate normal direvatived perpendicular components; now we used
   the derivative calculation with the proper limiting in order to keep
   the consistency of the scheme;
 - in the interpolation module the new function has been added returning
   the limited derivative;
2010-12-14 16:11:26 -02:00
Grzegorz Kowal
6d31ce2c4b INTERPOLATION: implement the MP family of reconstruction.
- implement the monotonicity preserving family of reconstruction; the
   implementation covers the 5th, 7th and 9th order spacial MP
   reconstruction;
 - implement two new functions used by the MP reconstructions, minmod()
   and median();
2010-12-07 10:08:30 -02:00
Grzegorz Kowal
ddd516082d INTERPOLATION: implement the LIMO3 reconstruction.
- LIMO3 is the compact 3rd order logarithmic reconstruction by Cada &
   Torrilhon;
2010-12-06 20:54:42 -02:00
Grzegorz Kowal
6489b7031f INTERPOLATION: rewrite subroutine reconstruct(). 2010-12-06 17:05:44 -02:00
Grzegorz Kowal
478de929c1 MAKE: add TVD flag for TVD reconstruction.
- other types of reconstruction may include WENO or MP;
2010-12-06 16:58:00 -02:00
Grzegorz Kowal
91521184cd INTERPOLATION: pass dx to the reconstruction.
- the spacial increment is required by some interpolation methods, so
   pass it to the subroutine reconstruct();
2010-12-06 16:27:49 -02:00
Grzegorz Kowal
41e44779e5 Revert "INTERPOLATION: pass the spacial increment to reconstruct()."
This reverts commit d92ae5d3a62743b66e97c42be4aa5f31ef5993d1.
2010-12-06 16:20:49 -02:00
Grzegorz Kowal
d92ae5d3a6 INTERPOLATION: pass the spacial increment to reconstruct().
- pass the spacial increment to the reconstruction subroutine since
   some interpolation methods require it; in addition, move obtaining
   the spacial interval and its inversion to the subroutine update();
2010-12-06 16:09:09 -02:00
Grzegorz Kowal
7cb4e2f352 INTERPOLATION: rename expand_tvd() to expand(). 2010-12-05 09:56:27 -02:00
Grzegorz Kowal
62f8beccf7 INTERPOLATION: rename expand_1d_tvd() to expand_1d(). 2010-12-05 09:51:21 -02:00
Grzegorz Kowal
9759b514d8 INTERPOLATION: remove subroutines expand() and expand_1d(). 2010-12-05 09:49:39 -02:00
Grzegorz Kowal
ee1fc1b104 INTERPOLATION: add minmod limiter to expand_tvd(); 2010-12-05 09:36:51 -02:00
Grzegorz Kowal
2ddf037117 INTERPOLATION: remove subroutines for staggered mesh.
- remove subroutines magtocen(), expand_mag(), expand_mag_bnd() since
   these subroutines are not used anymore; they are required in the case
   of use of the magnetic field described on the staggered mesh;
2010-12-05 09:02:10 -02:00
Grzegorz Kowal
1245a2161d INTERPOLATION: implement the minmod limiter. 2010-12-05 00:42:58 -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
aab8831bbf Update the copyright info and fix the length of separating lines. 2010-10-13 03:32:10 -03:00
Grzegorz Kowal
057c611d9a Some cosmetics in the interpolation subroutines. 2010-09-18 23:56:07 +02: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
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
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
Grzegorz Kowal
1dd934c606 More micro optimizations in subroutine magtocen(). 2010-03-30 16:11:23 -03:00
Grzegorz Kowal
9a2ce9cd41 Index micro optimizations in bnd_rest() and magtocen().
BOUNDARY CONDITIONS

 - micro optimizations of the indices in bnd_rest();

INTERPOLATION

 - micro optimizations of the indices in magtocen();
2010-03-30 16:07:29 -03:00
Grzegorz Kowal
024ead539f Implement divergence free correction in magtocen() for 3D case.
INTERPOLATION

 - in the subroutine magtocen() implement divergence free correction for
   the three dimensional case;
2010-03-22 16:36:14 -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
f035771f28 Fix divergence free prolongation and boundary conditions.
BOUNDARY CONDITIONS

 - update boundary conditions starting from the block with the maximum
   refinement level and stepping down; this fixes update of the
   boundary conditions in the corners;

INTERPOLATION

 - fix divergence free prolongation of the staggered magnetic field;
2010-03-21 19:05:29 -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
9c861ff96d Use TVD interpolation in boundary update, update mesh before time step.
BOUNDARY CONDITIONS

  - use TVD interpolation for prolongation of the boundary conditions

CONFIGURATION

  - put lower limit for the number of ghost and domain cells

HOST FILES

  - host files should not be included in the revision control

INTERPOLATION

  - define all arrays as REAL, not REAL(KIND=8) since the precision of
    calculations is determined at the compilation stage

  - replace j0 and j1 indices with new more obvious il and ir

MESH

  - update mesh before calculating new time step
2010-03-14 15:40:24 -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
245c4aa52a Use the 1st order TVD prolongation. 2010-02-22 11:47:50 -03:00
Grzegorz Kowal
acd4d8d105 The 'l' and 'u' are handled by the default restriction. 2010-02-14 17:59:10 -02:00
Grzegorz Kowal
25eee11a94 Reorganize interpolation. Set 'm' as default. 2010-02-12 04:13:55 -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
beee9ee2d4 Initial support for the MHD equations.
VARIABLES

 - add indices for the magnetic field components, both face and cell
   centered

SOLVER, MHD

 - add support for the magnetohydrodynamic (MHD) equations to the
   subroutines cons2prim(), prim2cons()

 - add MHD flux and the fastest speed calculation in the subroutine
   fluxspeed()

 - include magnetosonic speed in the calculation of the maximum speed in
   the system required for estimation of the new time step

 - extend the HLL solver in subroutine hll() to support MHD

 - calculate the magnetic field update according to a CT scheme in the
   subroutine update()

INTERPOLATION

 - add subroutine magtocen() to interpolate cell centered magnetic field

EVOLUTION

 - add evolution of the magnetic field components in the evolve_euler()
   and evolve_rk2() time integration subroutines

 - also call the subroutine magtocen() in the right places

BOUNDARY CONDITIONS

 - support for magnetic field boundary update only in the case of blocks
   with the same level so far; later we need to include proper
   restriction and prolongation for the magnetic field to keep its
   divergence equal zero

PROBLEMS, BLAST

 - extend the blast problem to include the initial magnetic field

IO, HDF5

 - write down in a HDF5 file magnetic field components
2009-10-28 00:12:18 -02:00
Grzegorz Kowal
7bc74a39d9 Initial version of refinement/derefinement is working.
It looks like the refining and derefining work more or less, at least
without interrupting the execution. Nevertheless, there are still some
artifacts, like the lack of symmetry after some time or not efficient
derefining of the mesh. This could be cause by the solver, however.

The refinement criterion is computed using pressure now.
2008-12-13 15:08:18 -06:00
Grzegorz Kowal
00e688eb5c Block boundary update implemented.
Now all block update their boundary values from the neighboring blocks.
Blocks of the same level copy their values, but block of different
levels shrink or expand the boundary values from the neighbor,
depending on the level change. In order to complete this I've
implemented subroutines expand and interpolate in the interpolation
module.

By default the boundary conditions are set to periodic. So far only this
type of conditions is supported, but the other types should be easy to
implement.
2008-12-12 16:39:03 -06:00
Grzegorz Kowal
5e611587e1 New module for interpolation.
This new module contains subroutines used to different kind of
interpolation. So far it is implemented only one subroutine used for
reconstruction of the left and right states from center values. This
interpolation has TVD property.
2008-12-08 20:53:29 -06:00