Commit Graph

19 Commits

Author SHA1 Message Date
Michele Guerini Rocco
03443f1195
src/beams.f90: add option to not change iox in read_beam2
The file format parsed by read_beam2 also includes the polarisation,
unlike those of read_beam0 and read_beam1.
When running gray standalone, however, we expect the mode to be set by
`antenna.iox` in gray.ini, not by the beam file.
2024-11-04 12:00:17 +01:00
Michele Guerini Rocco
86d5b5a672
src/gray_core: refactor ic_gb 2024-11-03 09:19:22 +01:00
Michele Guerini Rocco
d5c81268de
src/utils.f90: clean up
- Replace the `get_free_unit` subroutine with the built-in
  `newutin` option of the `open` statement.

- Replace `locatex` with just `locate` + an index offset.

- Replace `inside` with `contour%contains`.

- Merge `vmaxmin` and `vmaxmini` into a single subroutine
  with optional arguments.

- Remove unused `range2rect`, `bubble`.
2024-11-03 09:19:21 +01:00
Michele Guerini Rocco
38a8edd439
doc: reorganize example input files 2024-02-16 00:38:43 +01:00
Michele Guerini Rocco
73bd010458
remove unnecessary implicit statements
Only a single `implicit none` at the start of each module is required.
2024-02-09 11:16:18 +01:00
86ff5ecb06
improve inside and move it to utils.f90
This slightly improves the performance of inside.
For a ~100 points contour the instructions cost is reduced by ~5%.
2024-02-09 11:16:18 +01:00
526195ca94 Fix input files documentation 2023-09-22 15:55:29 +02:00
Michele Guerini Rocco
7ed76959d4
call exit on errors only in main 2023-09-14 11:26:56 +02:00
Michele Guerini Rocco
b1accf0ae3
simplify handling of splines
This adds a new `splines` module which implements a high-level interface
for creating and evaluating splines and rewrite almost all modules to
use it. Also, notably:

1. both `simplespline` and DIERCKX splines can now used with a uniform
   interface

2. most complexity due to handling working space arrays is gone

3. memory management has been significantly simplified too
2023-04-12 23:45:49 +02:00
Michele Guerini Rocco
69308901ee
src/beams.f90: document read_beam{0,1} formats 2023-04-12 23:44:38 +02:00
Michele Guerini Rocco
add59dbdda
src: use the logging system everywhere 2022-05-11 01:15:04 +02:00
Michele Guerini Rocco
ef1617713f
src: simplify handling of free units
This changes the behavior of `get_free_unit` to simplify the handling of
optional unit numbers.
2022-05-11 01:15:03 +02:00
Michele Guerini Rocco
d18e05353a
src: remove unused parameters 2022-05-11 01:15:02 +02:00
Michele Guerini Rocco
948a512254
src: use derived type arguments (work in progress)
This change structures the arguments of most functions, in particular
gray_main, into well-defined categories using derived types.

All types are defined in the gray_params.f90 (location subject to
change) and are organised as follows:

  gray_parameters (statically allocated data)
  ├── antenna_parameters
  ├── ecrh_cd_parameters
  ├── equilibrium_parameters
  ├── misc_parameters
  ├── output_parameters
  ├── profiles_parameters
  └── raytracing_parameters

  gray_data - inputs of gray_main (dynamically-allocated arrays)
  ├── equilibrium_data
  └── profiles_data

  gray_results - outputs of gray_main (dynamically-allocated arrays)
2022-05-11 01:15:01 +02:00
Daniele Micheletti
2c46d3327e trunk/beams: fix to alpha0 value if outside table range in read_beam1 2018-09-26 12:58:54 +00:00
Daniele Micheletti
bede98b0ae fixed incompatibilities with allocatable arrays (pgf90 compiler, JETTO); fixed input/output scaling (gray/jetto interface); fixed error in read_beams2 for small beam tables 2016-06-01 13:49:35 +00:00
Daniele Micheletti
33f9dd6130 fixed bug in read_beams2 to correctly locate the position of a point outside the beam grid 2016-02-09 11:18:47 +00:00
46e36a5792 re-added missing output files, file units specified in dedicated module, added option iequil=3 for partially filled psi(R,z) grid on input: required for integration in JETTO 2015-11-23 17:55:27 +00:00
ce10204479 nocommon branch merged back into trunk 2015-11-18 16:34:33 +00:00