We are working with double precision, so this subroutine should return a
real value with double precision too.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
In 2D we don't have face neighbor pointers, so we have to use edge
neighbor pointers to find those which are not associated, so we can
apply specific boundary conditions. This fixes the calculation of
the edge neighbor direction.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This is 5th order compact reconstruction using implicit solver and
characterized by 10 time smaller errors comparing to explicit 5th order
WENO reconstruction.
Several methods to calculate stencil weights have been added too.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
We need to nullify parent's neighbor pointers after finishing its
refinement process, otherwise they can point to unallocated blocks
causing the failure of job restart.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Now we calculate the refinement criterion over a region which is larger
than the block domain by one cell. It should allow to detect incoming
gradients earlier and result in gradents entering the already
refined block.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This debuggin fuctions checks face, edge, and corner pointers and check
the corresponding pointers of the pointed neighbors, if they are
consistent, i.e. if they point to each other.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
All subroutines which use %neigh field of meta block have been removed,
since the new format using %faces, %edges, and %corners is completed.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This patch rewrites two subroutines boundary_fluxes() and related
block_update_flux() in order to use new pointers (faces in 3D and edges
in 2D). It also signficantly simplifies block_update_flux() comparing to
previous version correct_flux().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
All neighbor pointers, face, edge, and corners are properly
restored from restart files during job restart.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
All neighbor pointers, face, edge, and corners are stored in restart
files in group 'metablocks'.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine scans over all leafs and update their face boundaries
prolongating lower level neighbors to higher level blocks.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine scans over all leafs and update their face boundaries
restricting higher level neighbors to lower level ones.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine scans over all leafs and update their face boundaries if
both blocks lay on the same level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine extracts the face region from the domain of input
variable array by prolongating it to output array.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine extracts the face region from the domain of input
variable array by restricting it to output array.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine extracts the face region from the domain of input
variable array by copying it to output array.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This update of 2D neighbor' pointers for derefined block iterates
over corners instead of updating each neighbor's pointer
explicitely. It updates both, edge and corner neighbor pointers
of connected neighbors at once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This update of 2D neighbor pointers for derefined block iterates over
corners instead of updating each neighbor pointer explicitely. It
updates both, edge and corner neighbor pointers at once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This update of 2D neighbor' pointers iterates over corners instead
of updating each neighbor's pointer explicitely. It updates both,
edge and corner neighbor pointers of connected neighbors at once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This update of 2D neighbor pointers iterates over corners instead of
updating each neighbor pointer explicitely. It updates both, edge and
corner neighbor pointers at once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If we refine a block, and the neighbor lays at the same level of the
parent, do not assign the child's interior corner pointer. Those
pointers are null then.
This is not a problem for corner boundary update, since this corner
is updated in boundaries_edge_prolong, therefore all corners of the
finer blocks are fully consisten with their neighbors.
This also removes unnecessary condition check in
boundaries_corner_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine scans over all leaf blocks and their edge neighbor
pointers and updates edge boundary regions from neighbors at lower
levels.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine takes the variable array of the neighbor, prolongs
it and extracts the edge region corresponding to the edge position.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines scans over all leaf blocks and their edge neighbor
pointers and updates edge boundary regions from neighbors at higher
level.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutines takes the variable array of the neighbor, restricts
it and extracts the edge region corresponding to the edge position.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>