1138 Commits

Author SHA1 Message Date
69d3348a93 COORDINATES: Do not read zmin/zmax if not 3D.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-29 13:12:17 -03:00
d5625ccb9f SOURCES: Implement resistive source term for MHD.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-29 12:04:55 -03:00
af1b2b28cd EQUATIONS: Add directional indices.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-29 11:32:27 -03:00
e675398b5f OPERATORS: Add divergence() and curl() to public subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-28 19:26:03 -03:00
120f8bd2aa OPERATORS: Implement divergence and curl operators.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-28 19:16:59 -03:00
b4d2055f8b OPERATORS: Add initialization/finalization subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-28 18:21:16 -03:00
9b22d2be7b OPERATORS: Add new module for differential operators.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-28 18:09:35 -03:00
c292b88cbd SOURCES: Implement simple model of viscosity.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-27 17:53:35 -03:00
81bec38a77 EVOLUTION: Move here update_increment() from SCHEMES.
Subroutine update_increment() was using time information which broke the
source term contribution. It has been moved to module EVOLUTION and its
arguments have been simplified.

The time step is now directly taken into account in the time integration
subroutines.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-27 16:29:53 -03:00
176076dce3 SOURCES: Fix gravitational acceleration from a point mass.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-30 14:06:56 -03:00
8ac8248279 SOURCES: Add initial version of source terms module.
This contains only point mass gravitational acceleration so far, as an
example.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-29 18:35:58 -03:00
936331581c EQUATIONS: Correct negative pressure if desired.
If option "fix_positivity" is on, we check if the pressure obtained from
conservative variables is positive. If it is negative, it is replaced by
a value corresponding to the maximum allowed sonic Mach number, provided
by option "msmax".  The new value of pressure and corresponding total
energy is set in all unphysical cells then.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-29 12:45:54 -03:00
7007221d25 INTERPOLATIONS: Option for clipping reconstruction near extrema.
If we set option "clip_extrema" to "on", we turn on the extrema clipping
or in other words, the reconstruction is limited in order to keep left
and right states to lay between their cell centered neighbors.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-29 12:43:22 -03:00
471e8a690a BLOCKS: Add timer for neighbor consistency check.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-28 10:50:41 -03:00
c1d1d54b42 BLOCKS: Rewrite and micro optimize iterate_over_neighbors().
We prepare a set of indices for all faces in the block.  Those indices
point to edges and corners for each face, and are set one during the
first execution.  Then, we simply iterate over faces and call
iterate_over_face() in order to apply subroutine pprocedure to edges and
corners connected to a given face.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-28 10:43:37 -03:00
e06a7edfdd BLOCKS: Check neighbor consistency if DEBUG=Y.
Add subroutines to iterate over all block neighbors and check if they
reference to correct meta blocks.  The neighbor consistency check is
done after initial mesh generation and each time the mesh has been
updated.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-27 21:00:08 -03:00
91a4983660 BOUNDARIES: Fix asymmetries in flux boundary update.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-26 13:36:29 -03:00
9edf7111b5 BLOCKS: Iterate over corners from all edges in 2D iterate_over_neighbors().
In 2D case, if we update corners using only X-edge neighbors, we get
some rare problems with symmetry.  If we additionally use Y-edge
neighbors, to update corners, those problems disappear.  This should be
additionally tested for both, 2D and 3D cases.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-25 12:45:00 -03:00
Grzegorz Kowal
e8c2fac09f IO: Rewrite subroutine read_datablocks_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@gkowal.info>
2014-04-24 15:38:03 -03:00
Grzegorz Kowal
aafbca8203 IO: Reduce local variables in write_attributes_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@gkowal.info>
2014-04-24 13:11:25 -03:00
75eb97125e BLOCKS, MESH, IO: Fix restart with less processes.
The job restart with smaller number of processors than the number of
files didn't work well, since all metablocks of all remaining files
where set to the last process before actually reading the corresponding
data blocks.  This resulted in a crash in redistribute_blocks() due to
pointer not associated.

The fix lets the meta blocks to be restored with the original process
numbers.  While reading files with the indices larger than the index of
the last process, all meta blocks which corresponding data blocks are
stored in the read file, are set to the process number of the reading
process.  After reading data blocks from each file, the blocks are
redistributed.  However, only data blocks belonging to the active
processes are redistributed.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-23 17:33:44 -03:00
962c5fce94 MESH: Remove calling check_mesh() if DEBUG=Y.
Subroutine check_mesh() has been removed.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-23 15:08:58 -03:00
14727d3afb IO: Restore seeds for all cases in read_attributes_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-23 15:02:56 -03:00
64d360ad3d RANDOM: Allow for seed expanding or shrinking in set_seeds().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-23 14:56:23 -03:00
1e6b6f71e2 IO: Rewrite subroutine read_attributes_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-23 14:39:01 -03:00
5180d03f2f IO, MPITOOLS: Spell checking.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-22 09:35:28 -03:00
140daaea04 IO: Rewrite subroutine write_attribute_vector_integer_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 17:03:26 -03:00
a169a55085 IO: Rewrite subroutine read_attribute_vector_integer_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 16:55:14 -03:00
07ca675497 IO: Rewrite subroutine write_attribute_double_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 16:18:11 -03:00
3cd9575685 IO: Rewrite subroutine read_attribute_double_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 16:13:36 -03:00
6e6e4141e0 IO: Rewrite write_attribute_integer_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 16:06:42 -03:00
624ee8be66 IO: Spell corrections in read_attribute_integer_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 15:49:12 -03:00
740fedede9 IO: Rewrite read_attribute_integer_h5().
The attribute, provided by the group identifier to which it is linked
and its name, is opened inside the subroutine
read_attribute_integer_h5().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 15:46:19 -03:00
29c842155f IO: Quit write_attributes_h5() if cannot create group.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 13:13:44 -03:00
b746cd1c7e IO: Rewrite write_attributes_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 12:58:12 -03:00
3132fb8da8 IO: Correct the description of function next_tout().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 11:56:48 -03:00
67a9beaf65 IO: Make the snapshot number continuously increasing.
If we restart a job with a different snapshot interval, the snapshot
number will continue from a different value corresponding to the
simulation time.

The snapshot number shouldn't be related to the current simulation time.
It should be always increasing.  The simulation time is stored as an
attribute, anyway.  This patch makes the snapshot number always
increasing continuously, without any gaps for restarted jobs.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-21 11:49:55 -03:00
f012eefe9f IO: Slightly rewrite write_restart_snapshot().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-19 13:50:44 -03:00
0a81a01242 MESH: Micro optimization in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-17 11:52:06 -03:00
d3a5055cf5 BOUNDARIES: Micro optimization in boundary_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-17 11:44:47 -03:00
b226959097 MESH: Interpolation symmetry in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-17 11:35:15 -03:00
a4805761db BOUNDARIES: Interpolation symmetry in boundary_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-17 11:31:33 -03:00
f85db888ff BOUNDARIES: Replace string boundary types with integer ones.
Now, the boundary type is stored in an integer array instead of string
variables.  This should reduce the comparison time in
boundary_specific().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-09 13:48:05 -03:00
9b7f0232cd PROBLEMS: Make implosion problem symmetric about axes.
Since we use the reflective boundary conditions for this problem, the
initial profile should respect that and also apply reflection at the
boundaries.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-09 11:01:20 -03:00
b528322c63 BOUNDARIES: Apply specific boundaries to primitive variables.
Convert the specific boundaries update to use primitive variables
instead of conservative ones.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-09 10:05:39 -03:00
842f6bdd51 BOUNDARIES: Prolong primitive variables instead of conservative.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-09 09:54:12 -03:00
0876badc16 BOUNDARIES: Restrict primitive variables instead of conservative.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-09 09:49:21 -03:00
10072f5c04 BOUNDARIES: Copy primitive variables instead of conservative.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-09 09:45:59 -03:00
722d623e0b BOUNDARIES: Convert update_corners() to update primitive variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-09 09:40:33 -03:00
125e267f97 BOUNDARIES: Add subroutine to update conservative variables.
This subroutine is called after updating the boundaries of primitive
variables.  It converts those primitive variables to their conservative
representation in all ghost cells.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-09 09:35:15 -03:00