This module will be responsible for handling different types of
energy injection, such as turbulence driving or supernova
explosions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
- the new parameter tbfor determines the time when the forcing starts
to be introduced gradually; the parameter tefor determines at what
time the forcing operates with the full power; the transition between
tbfor and tefor is described by sinus function;
- a new module COORDS handles the mesh variables which needed to be
separated from the MESH module since they are used in PROBLEM module,
which is required by MESH module; this created a circular dependency;
by introducing a new COORDS module we removed that problem;
- correct calculating the amplitudes of the forcing components;
micro optimizations of the force initialization;
- correct the evolution of the forcing components so the power input
corresponds exactly to the defined power fpow;
- we don't need all components from a sphere in the Fourier space, only
half components are independent, so reduce it's number;
- correct the amplitude calculation so the proper amount of energy is
injected in the system;
- we moved the calculation of trigonometric functions out of the loop,
and now we calculate the directional sinuses and cosinuses and
calculate the total value using the trigonometric relations; this
speeds up the inverse Fourier transform significantly;
- in the case when kx = ky = 0 and kz <> 0 all components of
directional vectors e1 and e2 become zero; fix this situation by
rotating the system, so e1 lays in the YZ plane instead of XY plane;
- implement subroutine evolve_forcing() which evolves the driving
components in Fourier space during the one hydrodynamic timestep; the
integrated forcing Fourier components are stored in module array
ftab; this complex array will be used to calculate forcing in real
space for each block;
- add a new module FORCING to handle forcing source terms, e.g. for
turbulence driving;
- implement initial versions of init_forcing() and clear_forcing()
subroutines;
- add compilation flag FORCING and use it during compilation process in
makefile;