2085 Commits

Author SHA1 Message Date
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
9b946cb209 Added two subroutines to convert between variables.
Two subroutines, cons2prim and prim2cons, to convert between
conservative and primitive variables have been added.

New parameters, gammam1 and gammam1i have been added to the
configuration file. Both are derivation of gamma, first is gamma-1, the
secons 1/(gamma-1).
2008-12-08 20:38:46 -06:00
Grzegorz Kowal
b3eaa7b37e Subroutine to calculate fluxes and speeds implemented.
This subroutine calculates fluxes and speeds for hydrodynamic case only.
Adiabatic and isothermal equations of state are supported. I also added
new parameters, gamma and csnd to the config module.
2008-12-08 20:29:13 -06:00
Grzegorz Kowal
7be60a6788 Implement HLL flux approximation.
The most general HLL flux approximation has been implemented.
2008-12-08 20:16:37 -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
3f7aa0fbca Reorganize variable indices. 2008-12-08 15:36:58 -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
b8d3c791a1 Store all variables in one array U.
One array U, which is a field in the BLOCK structure, stores all
variables. The number of variables is determined by the nvars parameter.
To access each variable we use variable index now, like idn, imx, imy,
mz, ien, etc.
2008-12-08 12:14:13 -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
a92ea21deb Add main loop and parameters to control execution time.
I've added the main loop in driver.F90. Also, I've added parameters
nmax, tmax, and dtini to be read from the configuration file.
2008-12-07 15:14:18 -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
e75cc33c1f Replaced pointer pfirst with plist. Improved formatting.
I replaced the pointer 'pfirst' pointing to the first element of the
list of blocks with 'plist'. I improved formatting of the informations
printed during the initial mesh generation.
2008-12-07 12:56:00 -06:00
Grzegorz Kowal
4ed091a899 Clean up a couple of lines. 2008-12-06 23:54:19 -06:00
Grzegorz Kowal
937f96aee2 The initial refinement completed.
I've added 'Z' configuration of the refined block, completed 'N', 'C',
'D', and 'U' configurations. Implemented pointers to the neighbors
correctly. Finally, I've implemented correct initial geometry
generation, by selection of the blocks to refine, their neightbors if of
the lower level, and finally performing the actual refinement.
2008-12-06 20:11:36 -06:00
Grzegorz Kowal
6abf81e77e Add neighbors pointers.
Neighbors pointers allow for quick access to the neighbors. It means
that we don't need to waste CPU time for searching neighbors by IDs.
2008-12-05 15:13:16 -06:00
Grzegorz Kowal
ae7b169f7a Problem initialization for refined blocks implemented.
Now, after refining a block, an initialization of children blocks is
performed, as well as the refinement checking.
2008-12-05 14:43:43 -06:00
Grzegorz Kowal
12bbf872c8 Reset the refinement flag while allocating a block. 2008-12-05 14:24:01 -06:00
Grzegorz Kowal
8c9877094f Set refinement level of refined blocks. 2008-12-05 14:22:02 -06:00
Grzegorz Kowal
603092368f Remove commented out junk. 2008-12-05 14:19:23 -06:00
Grzegorz Kowal
1cd5504a5a Use pointer array to specify children.
Usage of IDs to find children requires additional work, i.e. looking
through all blocks and comparing their IDs. Instead of IDs we use an
array of pointer for instantenous selection of children.
2008-12-05 14:13:21 -06:00
Grzegorz Kowal
00690ce344 Block refinement implemented.
Subroutine to refine a selected block has been implemented. This
subroutine creates 4 new blocks, and inserts them before the parent
block. It fills all block arguments like parent, neighbors, leaf flags,
bounds, next and previous pointers, etc.
2008-12-05 14:04:12 -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
71625fd0bb Add more 'to-do' in io.F90. 2008-11-30 13:50:13 -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
301619e296 Added a subroutine to check refinement criterion.
A new subroutine 'check_ref' to check the refinement criterion has been
added. I've added also a structure of the initial refinement of the
mesh.
2008-11-29 22:19:02 -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
5c2d0c00c9 New subroutines to allocate/deallocate a block.
The new subroutines take care of allocating and deallocating the space
for one block. Allocation uses dimensions provided by configuration
file. The block dimensions and number of ghost cells have been added to
config.F90 as well.
2008-11-07 00:10:09 -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
46c6605a3e Add initialization of fields for the first created block.
Initialization of fields like id, level, parent, children, neighbors for
the first created block has been added.
2008-11-05 21:07:03 -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