src/gray_core.f90: cleanup
- add some comments - annotate loops - indent comments - remove trailing whitespace - reduce usage of opaque global variables - use Fortran 90 logical operators - use Fortran 2003 array syntax
This commit is contained in:
parent
6010a9361b
commit
f5ab40f54f
@ -12,7 +12,7 @@ contains
|
|||||||
use gray_params, only : raytracing_parameters
|
use gray_params, only : raytracing_parameters
|
||||||
use const_and_precisions, only : half,two
|
use const_and_precisions, only : half,two
|
||||||
implicit none
|
implicit none
|
||||||
type(raytracing_parameters), intent(in) :: rtrparam
|
type(raytracing_parameters), intent(inout) :: rtrparam
|
||||||
real(wp_), dimension(:,:), intent(out), pointer :: ywork,ypwork, &
|
real(wp_), dimension(:,:), intent(out), pointer :: ywork,ypwork, &
|
||||||
gri,psjki,ppabs,ccci
|
gri,psjki,ppabs,ccci
|
||||||
real(wp_), dimension(:,:,:), intent(out), pointer :: xc,du1,ggri
|
real(wp_), dimension(:,:,:), intent(out), pointer :: xc,du1,ggri
|
||||||
@ -41,6 +41,7 @@ contains
|
|||||||
end if
|
end if
|
||||||
nray = (nrayr-1)*nrayth + 1
|
nray = (nrayr-1)*nrayth + 1
|
||||||
jkray1 = (jray1-2)*nrayth + 2
|
jkray1 = (jray1-2)*nrayth + 2
|
||||||
|
rtrparam%nray = nray
|
||||||
|
|
||||||
if(nrayr>1) then
|
if(nrayr>1) then
|
||||||
twodr2 = two*(rwmax/(nrayr-1))**2
|
twodr2 = two*(rwmax/(nrayr-1))**2
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -51,7 +51,7 @@ module gray_params
|
|||||||
type raytracing_parameters
|
type raytracing_parameters
|
||||||
real(wp_) :: dst ! Integration step size
|
real(wp_) :: dst ! Integration step size
|
||||||
real(wp_) :: rwmax ! Normalized maximum radius of beam power
|
real(wp_) :: rwmax ! Normalized maximum radius of beam power
|
||||||
integer :: nrayr, nrayth ! Radial/angular number of rays
|
integer :: nray, nrayr, nrayth ! Total/radial/angular number of rays
|
||||||
integer :: igrad ! Complex eikonal switch
|
integer :: igrad ! Complex eikonal switch
|
||||||
integer :: nstep ! Max number of integration steps
|
integer :: nstep ! Max number of integration steps
|
||||||
integer :: idst ! Choice of the integration variable
|
integer :: idst ! Choice of the integration variable
|
||||||
|
11
src/main.f90
11
src/main.f90
@ -408,8 +408,7 @@ contains
|
|||||||
use const_and_precisions, only : zero, degree
|
use const_and_precisions, only : zero, degree
|
||||||
use coreprofiles, only : set_prfan, set_prfspl, temp, fzeff
|
use coreprofiles, only : set_prfan, set_prfspl, temp, fzeff
|
||||||
use dispersion, only : expinit
|
use dispersion, only : expinit
|
||||||
use gray_params, only : gray_parameters, print_parameters, &
|
use gray_params, only : gray_parameters, print_parameters
|
||||||
headw, headl
|
|
||||||
use beams, only : launchangles2n, xgygcoeff
|
use beams, only : launchangles2n, xgygcoeff
|
||||||
use magsurf_data, only : flux_average, dealloc_surfvec
|
use magsurf_data, only : flux_average, dealloc_surfvec
|
||||||
use beamdata, only : init_btr, dealloc_beam
|
use beamdata, only : init_btr, dealloc_beam
|
||||||
@ -421,12 +420,12 @@ contains
|
|||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
! subroutine arguments
|
! subroutine arguments
|
||||||
type(gray_parameters), intent(in) :: params
|
type(gray_parameters), intent(inout) :: params
|
||||||
real(wp_), intent(in) :: pabs, icd
|
real(wp_), intent(in) :: pabs, icd
|
||||||
real(wp_), dimension(:), intent(in) :: jphi, jcd, dpdv, currins, pins
|
real(wp_), dimension(:), intent(in) :: jphi, jcd, dpdv, currins, pins
|
||||||
real(wp_), intent(out) :: jphip, dpdvp, rhotj, rhotjava, &
|
real(wp_), intent(out) :: jphip, dpdvp, rhotj, rhotjava, &
|
||||||
rhotp, rhotpav, drhotjava, drhotpav, &
|
rhotp, rhotpav, drhotjava, drhotpav, &
|
||||||
ratjamx,ratjbmx
|
ratjamx, ratjbmx
|
||||||
|
|
||||||
! local variables
|
! local variables
|
||||||
real(wp_) :: ak0, bres, xgcn
|
real(wp_) :: ak0, bres, xgcn
|
||||||
|
Loading…
Reference in New Issue
Block a user