The generation of dx, dy, dz for each level didn't include the base
grid, i.e. they were 2 times larger. Now it is fixed. Also plenty of
minor corrections in different places.
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.
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.
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.
The function to calculate the maximum speed in the block has been added.
This function is used to determine the maximum speed globally, which is
next used to estimate the next time step.
A new parameter to control the time interval between writing data has
been added. Also the condition to check if data should be written has
been added in the main loop.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.