FIXME : Add documentation
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real, | private, | dimension (:), allocatable | :: | xx | |||
real, | private, | dimension (:,:), allocatable | :: | wlerr | |||
real, | private, | dimension (:,:,:), allocatable | :: | werr | |||
real, | private, | dimension (:,:,:), allocatable | :: | wlterr | |||
real, | private, | dimension (:,:,:), allocatable | :: | wlmod | |||
real, | private, | dimension (:,:,:), allocatable | :: | wtmod | |||
real, | private, | dimension (:,:,:), allocatable | :: | wmod | |||
real, | private, | dimension (:,:,:), allocatable | :: | lpe | |||
real, | private, | dimension (:,:), allocatable, save | :: | lpl | |||
real, | private, | dimension (:,:,:,:), allocatable, save | :: | lpt | |||
real, | public, | dimension (:), allocatable | :: | energy_maxw | |||
real, | public, | dimension (:), allocatable | :: | w_maxw | |||
real, | public, | dimension (:), allocatable | :: | speed_maxw | |||
real, | public, | dimension (:,:), allocatable | :: | energy | |||
real, | public, | dimension (:,:), allocatable | :: | w | |||
real, | public, | dimension (:,:), allocatable | :: | speed | |||
real, | public, | dimension (:), allocatable | :: | al | |||
real, | public, | dimension (:,:), allocatable | :: | wl | |||
real, | public, | dimension (:,:), allocatable | :: | wxi | |||
integer, | public, | dimension (:), allocatable | :: | jend | |||
logical, | public, | dimension (:,:), allocatable | :: | forbid | |||
logical, | public, | dimension (:,:), allocatable | :: | is_ttp | |||
logical, | public, | dimension (:,:), allocatable | :: | is_bounce_point | |||
logical, | public, | dimension (:), allocatable | :: | can_be_ttp | |||
real, | public, | dimension (:,:), allocatable | :: | xi | |||
integer, | public, | dimension (:,:), allocatable | :: | ixi_to_il | |||
integer, | public, | dimension (:,:), allocatable | :: | ixi_to_isgn | |||
integer, | public, | dimension (2) | :: | sgn | |||
integer, | public | :: | wdim | ||||
complex, | private, | dimension (:,:), allocatable | :: | integration_work | |||
logical, | private | :: | exist | ||||
integer, | private | :: | ngauss | ||||
integer, | private | :: | npassing | ||||
integer, | public | :: | negrid | ||||
integer, | private | :: | nesuper | ||||
integer, | public | :: | nesub | ||||
real, | private | :: | bouncefuzz | ||||
real, | public | :: | vcut | ||||
logical, | private | :: | genquad | ||||
integer, | public | :: | nlambda | ||||
integer, | public | :: | ng2 | ||||
integer, | public | :: | lmax | ||||
integer, | public | :: | nxi | ||||
logical, | private | :: | test | = | .false. | ||
logical, | private | :: | trapped_particles | = | .true. | ||
logical, | public | :: | new_trap_int | = | .false. | ||
logical, | private | :: | new_trap_int_split | = | .false. | ||
logical, | private | :: | radau_gauss_grid | = | .true. | ||
logical, | private | :: | split_passing_region | = | .false. | ||
logical, | private | :: | slintinit | = | .false. | ||
logical, | private | :: | lintinit | = | .false. | ||
logical, | private | :: | eintinit | = | .false. | ||
logical, | private | :: | initialized | = | .false. | ||
logical, | private | :: | leinit | = | .false. | ||
logical, | private | :: | gfinit | = | .false. | ||
logical, | private | :: | lzinit | = | .false. | ||
logical, | private | :: | einit | = | .false. | ||
logical, | private | :: | init_weights_init | = | .false. | ||
logical, | public | :: | trapped_wfb | ||||
logical, | public | :: | passing_wfb | ||||
logical, | public | :: | mixed_wfb | ||||
integer, | private | :: | wfbbc_option_switch | ||||
integer, | private, | parameter | :: | wfbbc_option_mixed | = | 1 | |
integer, | private, | parameter | :: | wfbbc_option_passing | = | 2 | |
integer, | private, | parameter | :: | wfbbc_option_trapped | = | 3 | |
integer, | private | :: | nmax | = | 500 | ||
real, | private | :: | wgt_fac | = | 10.0 | ||
type(redist_type), | public, | save | :: | lambda_map | |||
type(redist_type), | public, | save | :: | energy_map | |||
type(redist_type), | public, | save | :: | g2le | |||
type(redist_type), | public, | save | :: | g2gf | |||
integer, | private, | dimension(:), allocatable | :: | recvcnts_intspec | |||
integer, | private, | dimension(:), allocatable | :: | displs_intspec | |||
integer, | private | :: | sz_intspec | ||||
integer, | private | :: | local_rank_intspec | ||||
type(le_grids_config_type), | private | :: | le_grids_config |
FIXME : Add documentation
returns results to PE 0 [or to all processors if 'all' is present in input arg list] NOTE: Takes f = f(x, y, z, sigma, lambda, E, species) and returns int f, where the integral is over all velocity space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
complex, | intent(out), | dimension (-ntgrid:,:,:,:) | :: | total | ||
logical, | intent(in), | optional | :: | all | ||
logical, | intent(in), | optional | :: | full_arr |
Takes f = f(theta, sigma ; x, y, z, lambda, E, species) and returns int f, where the integral is over all velocity space returns results to PE 0 [or to all processors if 'all' is present in input arg list]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(out), | dimension (-ntgrid:,:,:,:) | :: | total | ||
logical, | intent(in), | optional | :: | all | ||
logical, | intent(in), | optional | :: | full_arr |
Perform an integral over velocity space whilst in the LE_LAYOUT in which we have ensured that all of velocity space is local. As such we don't need any calls to MPI reduction routines. Note that this means the processors for different distributed spatial points (x,y) don't know the results at other points.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(le_layout_type), | intent(in) | :: | lo | |||
complex, | intent(in), | dimension (:,:,lo%llim_proc:) | :: | g | ||
complex, | intent(out), | dimension (lo%llim_proc:) | :: | total |
FIXME : Add documentation
returns results to PE 0 [or to all processors if 'all' is present in input arg list] NOTE: Takes f = f(y, z, sigma, lambda, E, species) and returns int f, where the integral is over all velocity space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,p_lo%llim_proc:) | :: | g | ||
real, | intent(out), | dimension (-ntgrid:,:,:) | :: | total | ||
integer, | intent(in), | optional | :: | all |
Integrate_species on subcommunicator with gather Falls back to original method if not using xyblock sub comm
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(inout), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (0:,:,:) | :: | total | ||
logical, | intent(in), | optional | :: | nogath | ||
logical, | intent(in), | optional | :: | gf_lo |
Integrate species using gf_lo data format assuming that gf has already been gathered prior to being passed to this routine. Currently this routine isn't being used as the functionality has been directly added to getan_nogath in dist_fn.
AJ
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(-ntgrid:ntgrid,2,nspec,negrid,nlambda,gf_lo%llim_proc:gf_lo%ulim_alloc) | :: | gf | ||
real, | intent(inout), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (-ntgrid:ntgrid,gf_lo%ntheta0,gf_lo%naky) | :: | total |
FIXME : Add documentation
returns results to PE 0 [or to all processors if 'all' is present in input arg list] NOTE: Takes f = f(x, y, z, sigma, lambda, E, species) and returns int f, where the integral is over x-y space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
complex, | intent(out), | dimension (-ntgrid:,:,:,:,:) | :: | total | ||
integer, | intent(in), | optional | :: | all |
FIXME : Add documentation
returns results to PE 0 [or to all processors if 'all' is present in input arg list] NOTE: Takes f = f(x, y, z, sigma, lambda, E, species) and returns int f, where the integral is over x-y space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(out), | dimension (-ntgrid:,:,:,:,:) | :: | total | ||
integer, | intent(in), | optional | :: | all |
Returns Gn = Hn / sqrt(2^n n!) / pi^(1/4), where Hn are the hermite polynomials i.e. int dx Gm * Gn exp(-x^2) = 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (:) | :: | xptsdum | ||
real, | intent(out), | dimension (:,0:) | :: | hpdum |
Returns Gn = Hn / sqrt(2^n n!) / pi^(1/4), where Hn are the hermite polynomials i.e. int dx Gm * Gn exp(-x^2) = 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,:,:) | :: | xptsdum | ||
real, | intent(out), | dimension (-ntgrid:,:,:,:,0:) | :: | hpdum |
Used to represent the input configuration of le_grids
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | exist | = | .false. |
Does the related namelist exist in the target input file? |
|
integer, | public | :: | index | = | 0 |
Used to hold the specific index of numbered namelists |
|
logical, | public | :: | skip_read | = | .false. |
Do we want to skip the read step in init? |
|
logical, | public | :: | skip_broadcast | = | .false. |
Do we want to skip the broadcast step in init? |
|
real, | public | :: | bouncefuzz | = | 10*epsilon(0.0) |
Acts as a small tolerance in deciding if a particular pitch
angle is forbidden at a particular theta grid point. Rather
than considering particles to be forbidden if |
|
logical, | public | :: | genquad | = | .false. |
If true use generalised quadrature scheme for velocity integrals and energy grid. See G. Wilkie thesis. |
|
integer, | public | :: | negrid | = | -10 |
Sets the number of energy grid points to use. If specified
then overrides values of |
|
integer, | public | :: | nesub | = | 8 |
Sets the number of energy grid points below the cutoff. |
|
integer, | public | :: | nesuper | = | 2 |
Sets the number of energy grid points above the cutoff. |
|
logical, | public | :: | new_trap_int | = | .false. |
If |
|
logical, | public | :: | new_trap_int_split | = | .false. |
If |
|
integer, | public | :: | npassing | = | -1 |
The number of untrapped pitch-angles moving in one direction along field line. |
|
integer, | public | :: | ngauss | = | 5 |
The number of untrapped pitch-angles moving in one direction
along field line is |
|
integer, | public | :: | nmax | = | 500 |
Influences the minimum number of grid points in an integration subinterval used in calculating the integration grid weights. When using high ntheta with new_trap_int active it is possible that numerical instability can arise. Dropping nmax < ntheta can sometimes help in such situations. |
|
logical, | public | :: | radau_gauss_grid | = | .true. |
The default lambda grid is now gauss-radau, for passing particles up to and including the passing-trapped boundary (wfb). The grid gives finite weight to the class of particles which bounce at theta = +/- pi (wfb) in the passing integral Note that the old gauss-legendre is used in the case that trapped_particles =.false. |
|
logical, | public | :: | split_passing_region | = | .false. |
If true then we split the passing region into two separate regions for the purpose of choosing the integration weights. The split point is determined automatically by an attempt to minimise the passing weights error. |
|
logical, | public | :: | test | = | .false. |
If |
|
logical, | public | :: | trapped_particles | = | .true. |
If set to |
|
real, | public | :: | vcut | = | 2.5 |
No. of standard deviations from the standard Maxwellian beyond which the distribution function will be set to 0. |
|
character(len=20), | public | :: | wfbbc_option | = | 'default' |
Set boundary condition for WFB in the linear/parallel solve: |
|
real, | public | :: | wgt_fac | = | 10.0 |
Influences the maximum integration weight allowed. |
Returns true if there are trapped particles on the current pitch angle grid.
Returns true if the passed pitch angle grid point is considered trapped.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | il |
Returns true if the passed pitch angle grid point is considered passing.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | il |
Returns true if the passed pitch angle grid point is considered the wfb.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | il |
Returns true if the passed theta grid index, ig, is a lower bounce point for the passed pitch angle index, il.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ig | |||
integer, | intent(in) | :: | il |
Returns true if the passed theta grid index, ig, is a upper bounce point for the passed pitch angle index, il.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ig | |||
integer, | intent(in) | :: | il |
Returns probabilist's Hermite polynomials, He_n(x)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
real, | intent(in) | :: | x |
Determine if the passed species, ky and lambda indicies correspond to a passing hybrid electron point which should be skipped.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | is | |||
integer, | intent(in) | :: | ik | |||
integer, | intent(in) | :: | il |
Gets the default name for this namelist
Gets the default requires index for this namelist
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | unit |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(le_grids_config_type), | intent(in), | optional | :: | le_grid_config_in |
FIXME : Add documentation
FIXME : Add documentation
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(le_grids_config_type), | intent(in), | optional | :: | le_grid_config_in |
FIXME : Add documentation
Calculates energy grid and (untrapped) pitch angle weights for integrals which drop a point from the energy/lambda dimensions. These are only used for estimating the velocity space error in [[dist_fn::get_verr]] as a part of the adaptive collisionality algorithm.
The get_weights subroutine determines how to divide up the integral into subintervals and how many grid points should be in each subinterval
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | maxpts_in | |||
real, | intent(in) | :: | llim | |||
real, | intent(in) | :: | ulim | |||
real, | intent(in), | dimension (:) | :: | nodes | ||
real, | intent(out), | dimension (:) | :: | wgts | ||
integer, | intent(out) | :: | ndiv | |||
integer, | intent(out) | :: | divmax | |||
logical, | intent(out) | :: | err_flag |
Used by get_weights to find the Lagrange quadrature weights for the given grid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | llim | |||
real, | intent(in) | :: | ulim | |||
real, | intent(in), | dimension (:) | :: | nodes | ||
real, | intent(inout), | dimension (:) | :: | wgts |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(inout), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (-ntgrid:,:,:) | :: | total |
Integrate species on xy subcommunicator - NO GATHER
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(inout), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (-ntgrid:,:,:) | :: | total |
Integrate species using gf_lo data format
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(inout), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (-ntgrid:ntgrid,gf_lo%ntheta0,gf_lo%naky) | :: | total |
Integrate species using gf_lo data format assuming that gf has already been gathered prior to being passed to this routine. Currently this routine isn't being used as the functionality has been directly added to getan_nogath in dist_fn.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(-ntgrid:ntgrid,2,nspec,negrid,nlambda,gf_lo%llim_proc:gf_lo%ulim_alloc) | :: | gf | ||
real, | intent(inout), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (-ntgrid:ntgrid,gf_lo%ntheta0,gf_lo%naky) | :: | total |
Integrate_species on subcommunicator with gather Falls back to original method if not using xyblock sub comm
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(inout), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (0:,:,:) | :: | total | ||
logical, | intent(in), | optional | :: | nogath | ||
logical, | intent(in), | optional | :: | gf_lo |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
complex, | intent(out), | dimension (0:,-ntgrid:,:,:,:) | :: | tote | ||
complex, | intent(out), | dimension (0:,-ntgrid:,:,:,:) | :: | totl | ||
complex, | intent(out), | optional, | dimension (0:,-ntgrid:,:,:,:) | :: | tott |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | llim | |||
real, | intent(in) | :: | ulim | |||
real, | intent(in), | dimension (:) | :: | xptsdum | ||
real, | intent(out), | dimension (:,0:) | :: | lpdum |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
complex, | intent(out), | dimension (-ntgrid:,:,:,:) | :: | total | ||
logical, | intent(in), | optional | :: | all | ||
logical, | intent(in), | optional | :: | full_arr |
Takes f = f(theta, sigma ; x, y, z, lambda, E, species) and returns int f, where the integral is over all velocity space returns results to PE 0 [or to all processors if 'all' is present in input arg list]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(out), | dimension (-ntgrid:,:,:,:) | :: | total | ||
logical, | intent(in), | optional | :: | all | ||
logical, | intent(in), | optional | :: | full_arr |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,p_lo%llim_proc:) | :: | g | ||
real, | intent(out), | dimension (-ntgrid:,:,:) | :: | total | ||
integer, | intent(in), | optional | :: | all |
Perform an integral over velocity space whilst in the LE_LAYOUT in which we have ensured that all of velocity space is local. As such we don't need any calls to MPI reduction routines. Note that this means the processors for different distributed spatial points (x,y) don't know the results at other points.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(le_layout_type), | intent(in) | :: | lo | |||
complex, | intent(in), | dimension (:,:,lo%llim_proc:) | :: | g | ||
complex, | intent(out), | dimension (lo%llim_proc:) | :: | total |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (p_lo%llim_proc:) | :: | g | ||
integer, | intent(in) | :: | ig | |||
complex, | intent(out), | dimension (:) | :: | total | ||
integer, | intent(in), | optional | :: | all |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(in), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (-ntgrid:,:,:,:) | :: | total |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(in), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (-ntgrid:,:,:,:) | :: | total |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(in), | dimension (:) | :: | weights | ||
complex, | intent(out), | dimension (-ntgrid:,:,:,:) | :: | total |
FIXME : Add documentation
Calculate estimates of the velocity space integration errors and report to screen / specified unit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | optional | :: | unit_in |
Sets up the pitch angle grid and associated data. Does so by calling other routines. A summary of the actions is below.
Determines the location of lambda (al) grid points in the passing domain and the associated integrations weights.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(inout), | dimension(:) | :: | lambda_grid |
The lambda grid points. Note this is intent |
|
real, | intent(inout), | dimension(-ntgrid:, :) | :: | weights |
The integration weights for the lambda grid. This is intent |
Try to find the optimal way to split the passing lambda grid into two regions in order to minimise the error on the integration weights. The approach taken is trial and error -- we try a number of predetermined splits, spline the error over the trials and then evaluate the spline on a high resolution grid to determine an approximate minmium.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(out) | :: | optimal_split | |||
integer, | intent(out) | :: | optimal_points | |||
logical, | intent(in), | optional | :: | use_max_error | ||
integer, | intent(in), | optional | :: | noptimal_points |
Determines the lambda grid point integration weights in the trapped domain using either new or old (default) methods, determined by [[le_grids_knobs::new_trap_int]] with new=high-order interp, old=finite difference).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:) | :: | lambda_grid |
The lambda grid points. |
|
real, | intent(inout), | dimension(-ntgrid:, :) | :: | weights |
The integration weights for the lambda grid. Note this is
intent |
Determine trapped pitch angle weights using "new" polynomial interpolation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:) | :: | lambda_grid |
The lambda grid points. |
|
real, | intent(inout), | dimension(-ntgrid:, :) | :: | weights |
The integration weights for the lambda grid. Note this is
intent |
Find the trapped pitch angle weights using an old (finite-difference) integration scheme
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:) | :: | lambda_grid |
The lambda grid points. |
|
real, | intent(inout), | dimension(-ntgrid:, :) | :: | weights |
The integration weights for the lambda grid. Note this is
intent |
Routine for getting the weights used in estimating the error on trapped particle integrals as a part of trap_error
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:) | :: | yb | ||
real, | intent(in) | :: | llim | |||
real, | intent(in) | :: | ulim | |||
integer, | intent(in) | :: | npts | |||
real, | intent(inout), | dimension(:, :) | :: | wberr |
Determine which lambda grid points are forbidden at each theta/bmag value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(out), | dimension(-ntgrid:, :) | :: | forbid |
Determine which theta grid points correspond to bounce points for each pitch angle.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(out), | dimension(-ntgrid:, :) | :: | bounce_points |
Determine which lambda grid point bounces at this theta/bmag value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out), | dimension(-ntgrid:) | :: | jend |
Determine which lambda grid point is totally trapped at this theta grid point.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(out), | dimension(nlambda) | :: | can_be_ttp_flag | ||
logical, | intent(out), | dimension(-ntgrid:ntgrid, nlambda) | :: | is_ttp_value |
FIXME : Add documentation
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
complex, | intent(out), | dimension (-ntgrid:,:,:,:,:) | :: | total | ||
integer, | intent(in), | optional | :: | all |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(out), | dimension (-ntgrid:,:,:,:,:) | :: | total | ||
integer, | intent(in), | optional | :: | all |
Calculates and returns toroidal momentum flux as a function of vpar and theta
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,:,:,:) | :: | f | ||
real, | intent(out), | dimension (-ntgrid:,:,:) | :: | vflx | ||
logical, | intent(in), | optional | :: | dealloc |
Returns Gn = Hn / sqrt(2^n n!) / pi^(1/4), where Hn are the hermite polynomials i.e. int dx Gm * Gn exp(-x^2) = 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,:,:) | :: | xptsdum | ||
real, | intent(out), | dimension (-ntgrid:,:,:,:,0:) | :: | hpdum |
Returns Gn = Hn / sqrt(2^n n!) / pi^(1/4), where Hn are the hermite polynomials i.e. int dx Gm * Gn exp(-x^2) = 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (:) | :: | xptsdum | ||
real, | intent(out), | dimension (:,0:) | :: | hpdum |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | use_lz_layout | |||
logical, | intent(in) | :: | use_e_layout | |||
logical, | intent(in) | :: | use_le_layout | |||
logical, | intent(in) | :: | test |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | test |
Construct a redistribute for g_lo -> le_lo
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(g_layout_type), | intent(in) | :: | g_lo | |||
type(le_layout_type), | intent(in) | :: | le_lo | |||
type(redist_type), | intent(inout) | :: | g2le |
Constructs the redistribute mapping from the global g_lo data decomposition to the le_lo decomposition.
FIXME : Add documentation
Construct the redistribute for g_lo -> gf_lo
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(g_layout_type), | intent(in) | :: | g_lo | |||
type(gf_layout_type), | intent(in) | :: | gf_lo | |||
type(redist_type), | intent(inout) | :: | g2gf |
Setup the module level g2gf instance describing the transformation from global g_lo to global gf_lo.
FIXME : Add documentation
Computes the redistribute mapping from the g_lo data decomposition to the lz_lo decomposition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(g_layout_type), | intent(in) | :: | g_lo | |||
type(lz_layout_type), | intent(in) | :: | lz_lo | |||
type(redist_type), | intent(inout) | :: | lambda_map |
Computes the redistribute mapping from the global g_lo data decomposition to the global lz_lo decomposition
Constructs the redistribute mapping from a g_lo data decomposition to an e_lo decomposition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(g_layout_type), | intent(in) | :: | g_lo | |||
type(e_layout_type), | intent(in) | :: | e_lo | |||
type(redist_type), | intent(inout) | :: | energy_map |
Constructs the redistribute mapping from the global g_lo data decomposition to the global e_lo decomposition
FIXME : Add documentation
Deallocate the weights used to provide error estimates
Set the module level config type Will abort if the module has already been initialised to avoid inconsistencies.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(le_grids_config_type), | intent(in), | optional | :: | le_grids_config_in |
Reads in the le_grids_knobs namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(le_grids_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(le_grids_config_type), | intent(in) | :: | self | |||
integer, | intent(in), | optional | :: | unit |
Resets the config object to the initial empty state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(le_grids_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(le_grids_config_type), | intent(inout) | :: | self |