89 Commits

Author SHA1 Message Date
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
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
ce57f9710f MAKE: add flag to select spacial reconstruction method.
- add a new makefile flag to select the method of reconstruction;
2010-12-05 00:24:56 -02:00
Grzegorz Kowal
5fc6eb70c4 SCHEME: rewrite the HLLC Riemann solver.
- rewrite the HLLC hydrodynamic Riemann solver;
 - also add more conditions for compilation flags;
2010-12-03 16:29:28 -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
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
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
98849f3369 Prepare code for central differencing scheme for magnetic field. 2010-02-22 12:01:58 -03: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
24da24004f Improve "blast" problem, add initial domain generation.
PROBLEMS

 - implement the blast problem in a similar way to the one implemented
   in GODUNOV code

 - generate initial domain of 2x3 blocks at the lowest level; it should
   be generalized to any dimension of blocks

MESH STRUCTURE

 - add new variable rdims(1:3) specifying dimensions of the initial
   blocks structure at lowest level

 - improve calculation of the effective resolution, and spatial
   increments
2009-09-22 17:30:53 -03:00
Grzegorz Kowal
3c74c9a8ea More work on the block refinement.
The initial block mesh refinement seems to be optimized now. However,
more work in the MPI version is required, e.g. refine blocks on all CPUs
until the number of blocks exceeds some number dependent on the number
of CPUs. From that point refine independently on each CPU.

The initial work on the mesh update has been done too, but the processes
do not exchange block information.
2009-05-18 22:46:19 +02:00
Grzegorz Kowal
c686e301fc Fix boundary update and reduce the next time step over all CPUs.
The boundary conditions finally works when using MPI with arbitrary
number of processors. This is however a dirty hack. Has to be done in a
better way later, since now it may be very tricky to generalize the code
to 3D.

The next time step should be reduced to the minimum value over all
processes. This has been added in subroutine 'evolution' now.

The block structure contains a new field %pos which specifies the
position of the child block in its parent.
2009-01-02 20:18:57 -06:00
Grzegorz Kowal
398ffd385c Prepare subroutine 'boundary' in order to support MPI.
There are several conditions for the boundaries. If the neighbor block
is on the same processor do as usuall. If it lays on a different
processor, prepare it for exchange. After echanging blocks we need to
perform similar update as it would lay on the same processor, i.e. we
need to perform copying, restriction, or prolongation.
2008-12-29 07:36:06 -06:00
Grzegorz Kowal
20837eb739 Divide the initial blocks between processes.
The blocks of initial mesh are now divided between all processes. The
procedure updates also the %cpu field of all neighbors according to the
number of process they are running at.

The subroutine 'deallocate_block' takes care about the plist pointer
now. It also allows for the flexible removal of any block, even from the
middle of the list by updating fields %next and %prev of the previous
and next blocks, respectively.

In addition, we now store the %cpu field of each block in the HDF5 files
too.
2008-12-28 13:09:14 -06:00
Grzegorz Kowal
1f581e9610 Add new module for MPI handling.
A new 'mpitools' module has been added. This module contains subroutines
to initialize, deinitialize and handle MPI communication. This initial
version can now initialize and deinitialize parallelization. It does not
support full parallelization yet.
2008-12-22 14:57:31 -06:00
Grzegorz Kowal
d67f05d650 Add a new module for MPI communication. 2008-12-19 17:33:29 -06:00
Grzegorz Kowal
6fac1d38b2 Reorganization of the block subroutines.
Preparation of the block module for MPI support.
2008-12-18 23:47:58 -06:00
Grzegorz Kowal
1206194deb Add support for the shapes in the domain.
Now, we can define any shape for a given problem inside the domain,
which is not updated during the evolution. This allows for using the
sources of any kind in the problem studies, such as the colliding winds
in the binary stars.
2008-12-18 12:18:36 -06:00
Grzegorz Kowal
f673596f20 Refinement based on density. More cleanups. 2008-12-13 22:41:37 -06:00
Grzegorz Kowal
505339c247 Write primitive variables instead of conservative.
Now we dump primitive variables in the HDF5 files.
2008-12-13 20:33:27 -06: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
936420c599 New module to handle the boundary conditions.
The subroutine 'boundary' sweeps over all leaf blocks. For each block it
sweeps over its neighbors and performs update of the boundaries. This is
an initial version yet, it supports only neighboring blocks of the same
level of refinement.
2008-12-09 20:37:31 -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
Grzegorz Kowal
c48f30bd20 Update sweeps over direction calculating dU.
We compute dFdx contribution along each direction and update total dU.
Apart from that I've added generation of coordinate variables, like dx,
dxi, etc. in the mesh module. The next step is to implement the HLL
solver.
2008-12-08 20:03:01 -06:00
Grzegorz Kowal
8faac24a86 New module 'scheme' for calculating dU increment.
This new module contains subroutines to calculate state vector update
using an approximate Riemann solver. The initial version contains only
a draft subroutine calculating the state vector increment dU.
2008-12-08 19:07:42 -06:00
Grzegorz Kowal
e0f211743b Runge-Kutta 2nd order time integration implemented.
In addition, I've done some fixes to the problem initialization, and I
defined new variables igrids, jgrids, kgrids, which specify the
dimensions of the block.
2008-12-08 16:21:59 -06:00
Grzegorz Kowal
1331044dee More reorganization of the compilation flags.
Now the source file can use some of the values defined in make files,
like NDIMS. The make files, i.e. makefile, make.default, and host files
are simpler and should be easier to manage.
2008-12-08 15:31:35 -06:00
Grzegorz Kowal
e16db21a1a Reorganization of compilation flags. 2008-12-08 13:59:57 -06:00
Grzegorz Kowal
b331a539b5 New module 'evolution' for time integration.
A new module for the time integration has been added. This module
contains a set of subroutines to perform one step time integration of
each leaf block using 2nd order Runge-Kutta method. More methods can be
added later. Time 't', timestep 'dt' and iteration 'n' have been moved
to this module as well.
2008-12-07 18:57:08 -06:00
Grzegorz Kowal
ee3cb39fdc Timers counting the execution times added.
A new module called 'timer' has been added. The purpose of this module
is to handle the execution timers of the program or its subtasks, like
initialization, data writing, evolution, etc.

The final summary of the times spent on different task has been added
as well.
2008-12-07 14:06:04 -06:00
Grzegorz Kowal
5187f4942d We can write some of the block attributes now.
I've implemented storing some of the block attributes in HDF5 files. I
shall complete this by writing down neighbors and children. Then I shall
implement storing data arrays.
2008-12-03 23:36:07 -06:00
Grzegorz Kowal
cd209ba785 Added a new module to handle the data input/output.
Initial implementation of subroutine 'write_data' to store all data.
This subroutine initially will support only HDF5 file format. The
block structure of the file is not decided yet.
2008-11-29 22:22:19 -06:00
Grzegorz Kowal
532cdf7b7e Generation of the initial mesh and problem setup.
Implemented the generation of initial blocks in N-configuration with
proper ataching to the list, pointer, neighbors and bounds
initialization, as well as the initial problem setup. Two new files has
been added: mesh.F90 - hadling the adaptive mesh structure, and
problem.F90 - handling the problem initialization.
2008-11-11 16:12:26 -06:00
Grzegorz Kowal
6b4c4693d7 Added parameters for the number of initial blocks.
The parameters iblocks, jblocks, and kblocks specify the number of
initial blocks along each direction. This creates the base domain for
further refinement.
2008-11-05 22:33:04 -06:00
Grzegorz Kowal
750fe27334 Added initial versions of config and error modules.
Config module takes care of the configuration file 'config.in'. It
reads the file line by line, parsing each line and extracting the name
and value of parameter. Then it substitutes the parameter with a new
value.

Error module handles error, warning and informative messages. So far it
only prints information on the screen.

There is some improvments for comments formating as well.
2008-11-05 22:16:24 -06:00
Grzegorz Kowal
847009aafb Initial implementation of block structure.
Block structure has been implemented. Blocks contain pointers to the next
and previous blocks. This easily allows to create block lists. Two
functions are implemented, one for creating initial structure of blocks
with lists, and the second for destroying all blocks from the list.

File 'blocks.F90' has been added to makefile too.
2008-11-04 21:00:50 -06:00
Grzegorz Kowal
e6ae8fd2b0 Initial commit of Godunov-AMR code.
Initial commit includes driver, make system files, license and default
host configurations.
2008-11-04 13:08:01 -06:00