121 Commits

Author SHA1 Message Date
Grzegorz Kowal
2719b0b451 Merge branch 'master' into mpi
Conflicts:

	src/mesh.F90
2008-12-22 16:08:51 -06:00
Grzegorz Kowal
0626f616cb Add problem specific domain initialization.
The domain initialization is performed in the problem.F90 now. This will
allow a user to initialize his own domain according to the defined
problem. Since the initialization in problem-dependent we don't need the
subroutine allocate_blocks anymore.
2008-12-22 15:34:02 -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
e0213bcca5 Change type of the field 'child' to blockref. 2008-12-19 17:24:36 -06:00
Grzegorz Kowal
f64bbd7e5e Use field neigh to assign and refer to neighbors.
We use the field 'neigh' instead of the field 'pneigh'. The field
'neigh' is of the type of 'blockref' which simplifies the reference to
the neighbors blocks when using MPI. Each reference contains two fields:
cpu and id. In MPI version we cannot use pointers stored in pneigh, but
using blockref structures we can refer to the blocks belonging to other
processors.
2008-12-19 16:36:07 -06:00
Grzegorz Kowal
c977c610ff Introduce new type of block reference by cpu and id.
The new type 'blockref' is a reference to a block by two integer
numbers, the first points to the cpu that block is running, and the
second one is the block identificator.
2008-12-19 00:19:44 -06:00
Grzegorz Kowal
1aa75ac2ef Change the leaf field of the block to be logical.
This change should speed up a bit the conditions, since it is faster
than the character comparisons.
2008-12-19 00:02:05 -06:00
Grzegorz Kowal
a9c9cef27e Cosmetic changes to the block pointer type definition. 2008-12-18 22:51:08 -06:00
Grzegorz Kowal
f673596f20 Refinement based on density. More cleanups. 2008-12-13 22:41:37 -06:00
Grzegorz Kowal
b39673bf85 Fixed generation of dx, dy, and dz.
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.
2008-12-13 21:05:51 -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
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
6d38fe6476 Added CFL condition and calculation of the new time step.
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.
2008-12-09 14:51:33 -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
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
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
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
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