gray/src
Michele Guerini Rocco cc889bb5a0
use the logger everywhere
This converts the last remaining warnings to use the logging system.
Also drops `catand` and replace it with the intrinsic `atan`, which
supports complex as well as real numbers.

Note: before 3eab989d the `catand` function was actually incorrent!
The definition of arctan(z) can be obtained starting from the identity

  d/dz arctan(z) = 1/(1 + z²) = ½ [1/(1 + iz) + 1/(1 - iz)],

integrating and using the definition log(z) = ∫₁^z dz/z,

  arctan(z) = -i/2 [log(1 + iz) - log(1 - iz)].

If log is the principal branch, log(z) = log|z| + i arg(z), then

  arctan(z) = -i/2 log(w) = 1/2 arg(w) -i/2 log|w|

where w = (1 + iz)/(1 - iz). Finally, the real part is

  Re arctan(z) = 1/2 atan2(2Re(z), 1 - |z|²).

The term -|z|² is missing from the `catand` definition of GRAY,
but is present in the original Fortran 77 code from [SLATEC]:
it has probably been lost in the translation.

[SLATEC]: https://people.math.sc.edu/Burkardt/f_src/slatec/slatec.f90
2023-04-12 23:45:49 +02:00
..
beamdata.f90 src/gray_core.f90: cleanup 2022-05-22 01:02:19 +02:00
beams.f90 src/beams.f90: document read_beam{0,1} formats 2023-04-12 23:44:38 +02:00
conical.f90 src: use the logging system everywhere 2022-05-11 01:15:04 +02:00
const_and_precisions.f90 src/const_and_precisions.f90: clean up 2021-12-15 02:30:56 +01:00
coreprofiles.f90 src/coreprofiles: make psnbnd fully automatic 2022-05-22 04:06:21 +02:00
dierckx.f90 nocommon branch merged back into trunk 2015-11-18 16:34:33 +00:00
dispersion.f90 src/dispersion.f90: cleanup 2023-04-12 23:45:49 +02:00
eccd.f90 use the logger everywhere 2023-04-12 23:45:49 +02:00
eierf.f90 nocommon branch merged back into trunk 2015-11-18 16:34:33 +00:00
equilibrium.f90 convert remaining subroutines to derived types 2022-05-22 01:18:08 +02:00
errcodes.f90 trunk: added multiple passes calculation; added multipass module; graycore/gray_main: subroutine rewritten; equilibrium/read_equil_an: limiter coordinates read from equilibrium file for ipass>1; err_codes/check_err: istop=1 only for alpha<0; pec/pec_tab: fixed index assignements in loops; polarization/pol_limit: fixed ext,eyt normalization 2019-03-26 14:21:22 +00:00
gray_cli.f90 Replace str_index function with intrinsic index 2022-11-14 16:57:57 +00:00
gray_core.f90 use the logger everywhere 2023-04-12 23:45:49 +02:00
gray_jetto1beam.f90 Add missing iprof parameter initialization in GRAY/JINTRAC interface 2022-10-04 18:43:13 +02:00
gray_params.f90 src/gray_params.f90: remove unused variable 2023-04-12 23:44:37 +02:00
gray_params.sh add INI configuration file 2022-05-22 01:02:19 +02:00
ini_parser.f90 Replace str_index function with intrinsic index 2022-11-14 16:57:57 +00:00
limiter.f90 src: use derived type arguments (work in progress) 2022-05-11 01:15:01 +02:00
logger.f90 src/logger.f90: init 2022-05-11 01:15:04 +02:00
magsurf_data.f90 use the logger everywhere 2023-04-12 23:45:49 +02:00
main.f90 Fix the summation mode + temporary fix for file unit numbers 2022-11-24 23:37:29 +01:00
math.f90 use the logger everywhere 2023-04-12 23:45:49 +02:00
minpack.f90 nocommon branch merged back into trunk 2015-11-18 16:34:33 +00:00
multipass.f90 src/dispersion.f90: cleanup 2023-04-12 23:45:49 +02:00
numint.f90 nocommon branch merged back into trunk 2015-11-18 16:34:33 +00:00
pec.f90 src: remove unused parameters 2022-05-11 01:15:02 +02:00
polarization.f90 src/dispersion.f90: cleanup 2023-04-12 23:45:49 +02:00
quadpack.f90 nocommon branch merged back into trunk 2015-11-18 16:34:33 +00:00
reflections.f90 src: use hypot and norm2 when possible 2022-05-11 01:15:04 +02:00
simplespline.f90 nocommon branch merged back into trunk 2015-11-18 16:34:33 +00:00
units.f90 Close open units on exit to flush the buffer 2022-05-11 01:15:05 +02:00
utils.f90 src/gray_params.f90: improve handling of absolute paths 2022-05-11 01:15:06 +02:00