Michele Guerini Rocco
e81308d048
add option to set parameters from the command-line
2022-05-11 01:15:07 +02:00
Michele Guerini Rocco
3e49247d15
src/main.f90: fix typo
2022-05-11 01:15:06 +02:00
9a6063389e
Add wave frequency to parameters stored in file headers
2022-05-11 01:15:06 +02:00
efd4fc51e5
src/gray_params.f90: improve handling of absolute paths
2022-05-11 01:15:06 +02:00
d3a87e1044
Close open units on exit to flush the buffer
2022-05-11 01:15:05 +02:00
Michele Guerini Rocco
a30cd09e8e
src/math.f90: use the intrinsic gamma function
...
- remove the `gamm` function
- rewrite `fact` in terms of `gamma`
2022-05-11 01:15:05 +02:00
Michele Guerini Rocco
98599b2b7d
src/dispersion.f90: compute factorials incrementally
2022-05-11 01:15:05 +02:00
Michele Guerini Rocco
91a2e6cf07
src: implement toggling of output units
...
This actually implements the --units option
2022-05-11 01:15:04 +02:00
Michele Guerini Rocco
96359bc3fd
src: use hypot and norm2 when possible
2022-05-11 01:15:04 +02:00
Michele Guerini Rocco
18c1126d28
src/gray_params.f90: improve print_parameters
...
- add all missing parameters (not *data*)
- use shorter formatting
2022-05-11 01:15:04 +02:00
Michele Guerini Rocco
add59dbdda
src: use the logging system everywhere
2022-05-11 01:15:04 +02:00
Michele Guerini Rocco
f2f41ec023
src/logger.f90: init
...
This change adds a minimal logging system. The log messages carry a
timestamp in μs, the identifier of the emitter (fortran module +
procedure) and a log level. For simplicity the format is hardcoded.
2022-05-11 01:15:04 +02:00
Michele Guerini Rocco
ed0917aa8c
src/conical.f90: eliminate dead code
...
Use the intrinsic functions when possible (bessel_j0, bessel_j1) and
remove other unused functions.
2022-05-11 01:15:03 +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
01a6f9145c
initial gray CLI work
...
This lays down the basis for the gray command-line interface.
All options works but currently --units and -v/-q have no effect.
2022-05-11 01:15:02 +02:00
Michele Guerini Rocco
2bee7be103
src/graycore.f90 -> src/gray_core.f90
...
Rename for consistency with other modules.
2022-05-11 01:15:02 +02:00
Michele Guerini Rocco
d18e05353a
src: remove unused parameters
2022-05-11 01:15:02 +02:00
Michele Guerini Rocco
7818ac731c
src/gray_jetto1beamf90: update for graycore changes
2022-05-11 01:15:01 +02:00
Michele Guerini Rocco
f56e1cbc05
src/coreprofiles.f90: use derived types
2022-05-11 01:15:01 +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
Michele Guerini Rocco
4f867bad14
src/magsurf_data.f90: fix memory leak
2022-05-11 01:15:01 +02:00
Michele Guerini Rocco
b1694bc575
src/pec.f90: fix uninitialised memory use
...
If the condition `sccsa > zero` is not met, ratj{a,b}mx remain
unitialised and print_finals may write them to fort.7.
2022-05-11 01:15:00 +02:00
Michele Guerini Rocco
861a723ebc
src/equilibrium.f90: fix mixed tab/spaces
2022-05-11 01:14:59 +02:00
Michele Guerini Rocco
bfbd479d20
src/const_and_precisions.f90: clean up
...
- formatting
- remove commented out constants
- remove constants not used anywhere in GRAY
2021-12-15 02:30:56 +01:00
Michele Guerini Rocco
693af2a763
merge graysum and gray
...
Note that graysum, now as sum_mode, still doesn't support multipass.
2021-12-15 02:30:55 +01:00
Michele Guerini Rocco
37ee881024
src/gray-externals.f90: remove
...
Apparently, this module only constains old unused routines.
2021-12-15 02:30:54 +01:00
Michele Guerini Rocco
1648a7878a
src/gray_params.f90: handle file not found error
2021-12-15 02:30:53 +01:00
Michele Guerini Rocco
023facac6b
src/gray_params.f90: formatting
2021-12-15 02:30:52 +01:00
Michele Guerini Rocco
cb873fbcf6
src/multipass.f90: fix file mode
2021-12-15 02:30:50 +01:00
4bb3841049
Modified test in density extrapolation at boundary
2020-03-06 10:48:12 +00:00
6892646623
updated makefile, added manpage, fixed few print statements
2019-12-09 14:49:37 +00:00
Daniele Micheletti
7609640347
trunk/graycore: fix to coupling calculation for on-screen print
2019-03-28 11:33:43 +00:00
Daniele Micheletti
f600108884
trunk/graycore: minor fixes
2019-03-28 09:50:28 +00:00
Daniele Micheletti
27f1793f14
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
Daniele Micheletti
2c46d3327e
trunk/beams: fix to alpha0 value if outside table range in read_beam1
2018-09-26 12:58:54 +00:00
9fcc54804f
added re-normalization of Pins and Currins in spec subroutine
2017-09-19 16:32:53 +00:00
d8fc72dd3e
re-added routines to sum profiles (removed by mistake in rev 176)
2017-09-13 09:31:30 +00:00
0b3ea8991e
added further output prints to fort.4
2017-09-12 19:37:06 +00:00
d92335c476
added routines to sum profiles from multiple runs
2017-06-27 14:30:07 +00:00
Daniele Micheletti
5b44c46e70
trunk/dispersion: added npra2 re-initialization if convergence fails
2017-06-21 09:16:10 +00:00
4f0cc7fb47
fixed wrong psi assignment if input profiles are given vs rhot. Added comment for ieccd flag in gray_params.data
2017-02-10 14:14:53 +00:00
526870458f
fixed rhot print in central ray output (fort.4)
2017-02-10 10:41:24 +00:00
Daniela Farina
e2fac977ab
fixed check for N// > 1 (bis)
2017-02-01 11:32:27 +00:00
Daniela Farina
72b682229c
fixed check for N// > 1
2017-02-01 11:06:09 +00:00
4a2b5fc638
added missing allocation for simple limiter (when it is not read from eqdsk)
2016-12-19 16:38:07 +00:00
0f2ff9a5a7
fix: missing allocation for profiles given vs rhot
2016-11-29 08:45:18 +00:00
Daniele Micheletti
feaa736c0e
fixed e330 calculation in dispersion module (trunk)
2016-06-09 07:41:23 +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
d7b09b92a2
added file headers with input parameters
2016-04-27 14:37:57 +00:00
a5199b1b24
some additional output prints (2D maps and Bcart, Ncart along central ray)
2016-02-12 16:49:00 +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
88740ab232
Fixed computation of warm Nperp for low density
2016-01-25 11:37:17 +00:00
7654679ae1
fixed error code for bad warm Nperp
2015-12-04 15:47:05 +00:00
1cd0503476
fixed compilation for JETTO
2015-11-25 15:53:22 +00:00
59617c7a06
gray/jetto interface reverted to F77 (removed use of modules), adding an intermediate F90 subroutine handling the reading of parameters/beams files. pec_init now uses optional input rho grid
2015-11-24 16:36:20 +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
68e8217ff3
* reduced arrays required for dI/ds,dP/ds integration
...
* new module for error handling
* input parameters collected in a single file
* fixed uninitialized pabs,icd
2015-11-19 18:20:58 +00:00
Daniela Farina
f3fb3962d1
updated prfile subr, added comments and minor changes in ic_gb
2015-11-19 17:44:17 +00:00
ce10204479
nocommon branch merged back into trunk
2015-11-18 16:34:33 +00:00
Daniela Farina
9eb901015e
corrected a bug in fwork for dbgr and in ic_gb for ypwrk0
2015-11-04 10:21:50 +00:00
Daniela Farina
75b77b01c1
frhotor_eq now is a function of rhop
2015-06-09 17:09:53 +00:00
a0275d8691
corrected merge errors in trunk. branch new-refl integrated in trunk and removed
2015-05-21 14:29:16 +00:00
c38f57b640
branch new-equinum reintegrated in trunk
2015-05-21 14:14:38 +00:00
Daniela Farina
94ed9ea51e
new equinum and equian merged in branch new-equinum. branch new-equian removed
2015-05-21 13:23:26 +00:00
6b3a4a807d
changed dimension of ext eyt polarization arrays to avoid out of bounds error. to be checked.
2015-05-21 09:09:16 +00:00
1df304f221
few fixes in pec plus other minor changes
2015-02-18 16:17:21 +00:00
608d63acfe
fixed few out of bounds checks. added imx (dispersion) read from gray.data
2015-01-23 15:08:41 +00:00
94212dba99
added few missing dummy values in case of zero absorption
2015-01-09 15:05:20 +00:00
Daniela Farina
61f31fce7f
corrected interpolation bug and updated outputs
2015-01-08 15:49:38 +00:00
Daniela Farina
3a798e9f4a
added ipol option and computation of polarization parameters at all steps, added case imx negative to disable convergence in dispersion
2014-12-22 15:30:17 +00:00
8e593fdb1a
corrected detection of turning point for rays missing inner wall
2014-10-14 14:14:31 +00:00
8f06be1281
fixed the computation of beam polarization at launch (used if the beam hits the wall before crossing the plasma)
2014-08-25 13:40:44 +00:00
d5a7ec1f80
Syntax errors in branch new-refl fixed.
2014-08-23 10:19:56 +00:00
cb55af3857
corrected psi grid leading dimension in JINTRAC interface. Committed new branch for updated wall reflection algorithm.
2014-08-23 09:57:40 +00:00
2309e974c7
fix to initialisation in reflections module propagated to other branches
2014-06-10 14:03:41 +00:00
469c37e098
rbmin, rbmax were not properly set when boundary description was absent
2014-06-10 08:17:35 +00:00
Daniela Farina
fb2729f9b7
corrected expression for gaussian dpdvp
2014-03-13 17:40:33 +00:00
Daniela Farina
3b5e756a28
changed size nbb for equilibrium boundary, added print of Jcd/Jphi ratio for ASTRA and JINTRAC Jcd definitions
2014-02-25 16:43:24 +00:00
Daniela Farina
31317c257e
modified character length of input filenames from 24 to 255
2014-02-24 13:32:40 +00:00
0d971665aa
corrected current sign assignment, more output in units 6,7
2014-02-04 12:38:10 +00:00
1a60867b5b
pec subroutine: new algorithm to compute Jphi
2014-01-27 15:38:17 +00:00
Daniela Farina
d21f9b12f4
print in fort.33 also for tau>taucr; changed test for Npl>1 in after_onestep
2013-11-27 14:27:02 +00:00
1779cb2be4
corrected dimensions of spline coefficients cc01,cc10 for psi derivatives
2013-10-11 15:07:29 +00:00
e76c036ba2
corrected re-normalization of poloidal flux after spline fitting
2013-09-20 13:35:45 +00:00
748f2af7c8
corrected print of dispersion relation conservation; added iwarm=4 case; increased radial resolution of flux averaged quantities
2013-09-20 13:16:18 +00:00
d3888d4099
changed handling of counters for plasma entrance and wall reflection
2013-09-20 09:53:56 +00:00
1cc09021c0
corrected error in print of resonance radius for analytical equilibrium
2013-05-16 09:27:25 +00:00
a93b56495c
added check in ic_gb for the case Nx0t=Ny0t=0
2013-04-17 15:59:34 +00:00
9f445e5cd1
removed duplicate print in projxyzt
2013-04-11 14:00:26 +00:00
912e9e1ec3
corrected initial conditions in ic_gb
2013-04-11 13:43:23 +00:00
b83b6f0f5b
added missing save in common for ddr11 variable
2013-02-21 09:48:15 +00:00
9fd9bf5f9c
added missing file
2012-12-03 15:51:46 +00:00
8c9273d684
added reflection on limiter with arbitrary R,z shape
2012-11-28 18:33:02 +00:00
cd249d8afa
changed lines exceeding 72 char length
2012-11-28 09:45:21 +00:00
f224e65579
updated various parameters names
2012-11-27 16:47:24 +00:00
a877014f79
added index_rt to fort.33 (ray trajectories) output
2012-11-15 14:52:31 +00:00
824ff92f9a
added check in vacuum_rt if plasma is not hit after reflection on the inner wall
2012-11-14 16:28:51 +00:00
Daniela Farina
b4d877f6a3
Modified Jcd outputs to be consistent with JINTRAC
2012-10-10 14:43:17 +00:00
c78d88c7a8
corrected check on exit from plasma
2012-08-29 16:34:47 +00:00
1b037fa88a
added check (z only) to avoid absorption outside the plasma boundary
2012-08-29 16:22:02 +00:00
Daniela Farina
6c4682fb56
restored old contour_psi routine. Added check on regrid output
2012-08-28 14:01:09 +00:00
Daniela Farina
b7c4630657
GRAY.f bugs fixed to avoid NaN when rays do not enter into plasma
...
GRAY.f "ad-hoc" fix in subroutine contour_psi, that MUST be checked
2012-07-13 16:24:03 +00:00
Daniela Farina
6153060056
modified header of file 7
2012-07-10 12:22:00 +00:00
Daniela Farina
4b578fb56a
small bugs fixed, initialized a few variables
2012-07-10 10:42:14 +00:00
ee2832a2d7
output files revised
2012-06-29 13:53:20 +00:00
Daniela Farina
5985462447
Modified outputs
2012-06-26 12:34:50 +00:00
Daniela Farina
bc37131ad4
Current version copied in trunk
2012-06-21 12:38:29 +00:00