This guarantees that the very edges or corners are always physical and
minimizes their influence on the variable evolution in the ghost zones.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This is just in case we would like to use interpolation to reconstruct
the full domain resolution.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
In this patch we make a general subroutine iterating over all neighbors
iterate_over_neighbors() which takes as arguments a pointer to the block
which neighbors are evaluated and pointer to subroutine which should be
called with each neighbor. So far two such subroutines are used, one to
select the proper refinement flag, and another to select the neighbor
for update.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
We take the maximum error along each direction instead of calculating
the norm sqrt(ex*ex+ey*ey+ez*ez). This solves the symmetry problems
with some of the reconstructions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
The meta block field %refine is 4 byte integer. Make the value returned
by check_refinement_criterion() of the same type.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Those arrays are prepared only at the first execution and then stored in
memory, therefore there is no need to preparing them each time
refine_block() is called. This removes also one 'select which' condition
check.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If we take the whole domain and divide it between blocks of the size
corresponding to the current lever, the field %coords identifies the
position of the current block in the domain.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Now, the selective update after refinement/derefinement process is on.
Before checking the refinement and update the mesh, We set all blocks to
not be updated. Then, only blocks which are refined or derefined
including all their neighbors, are set to be updated. This reduces the
repeated work, i.e. boundary update and variable conversion, on blocks
which didn't actually change.
After the mesh refinement, boundary and variable update, we mark all
blocks to be updated, so the regular temporal integration process works.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This patch marks all refined or derefined blocks to be updated. All
their face, edge, and corner neighbors are marked for update as well, in
order to keep the boundary consistency.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
When contact dicontinuity wave is not present (Sm=0), all components are
continuous, therefore the flux can be average from outern states.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine marks or unmarks all blocks on the meta block list to be
updated depending on the input argument.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>