These factors aren't necessary, since the block coordinate is calculate
with respecto the all blocks at given level. Therefore, even if we
change the maximum refinement level during job restart, these coordinate
do not change.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If we restart a job from a run with different maximum refinement level,
toplev parameter is set from a restart file and coordinate variables are
recreated. Setting toplev to maxlev all the time fails in recreating
correct coordinate variables and results in crashes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This change allows the code to be compiled with the PGI compilers, and
at the same time does not affect the compilation with the GNU compilers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Give more control over the unphysical cell correction by allowing to
specify the minimum number of physical cells to perform averaging
(parameter "npavg") and the maximum distance to be considered from the
corrected cell (parameter "ngavg").
These two parameters allow to avoid averaging of extended unphysical
regions from two physical points.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If there are no enough physical neighbors, the cell cannot be corrected
and the code simply stops. Allow the code to continue the execution in
such a case by simply correcting the unphysical cells by replacing the
negative values of positive variables with a lower bounds, dmin and
pmin, for density and pressure, respectively.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
In case an interpolated cell, which should be positive, is zero or negative,
and the sum of derivatives is zero as well, the correction of
derivatives can enter into an infinite loop. It shouldn't normally
happen, since such a situation is unphysical.
Avoid the infinite loop and print a warning about encountered problems.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Unphysical cells can appear due to various reasons, e.g conservative to
primitive variable conversion in recently created block after mesh
refinements. Such unphysical cells can be immediately propagated to
neighbor blocks through boundary update, blocks which have not been
marked as recently updated. In such situation, the unphysical cells are
not corrected in these neighbors.
This change fixes this by marking all neighbors of blocks created in the
mesh update to be verified for unphysical cells too.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
File 'makedeps' is now generated automatically if it does not exist or
any of source files has been modified.
Improve the cleaning of compilation files. Only files created during the
compilation are removed. Also if the OBJDIR is empty, it is removed as
well.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Get rid of 'grep' and use only 'awk', 'sort' and 'uniq'. All should be
available in any linux system.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>