setup_trapped_lambda_grids Subroutine

private subroutine setup_trapped_lambda_grids(lambda_grid, weights)

Uses

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).

Arguments

Type IntentOptional 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 in out as we only set a portion of the grid so may want to keep the rest of the input values.


Contents


Source Code

  subroutine setup_trapped_lambda_grids(lambda_grid, weights)
    use theta_grid, only: ntgrid
    implicit none
    !> The lambda grid points.
    real, dimension(:), intent(in) :: lambda_grid
    !> The integration weights for the lambda grid. Note this is
    !> intent `in out` as we only set a portion of the grid so may
    !> want to keep the rest of the input values.
    real, dimension(-ntgrid:, :), intent(in out) :: weights

    if (new_trap_int) then
       call setup_trapped_lambda_grids_new_trap_int(lambda_grid, weights)
    else
       call setup_trapped_lambda_grids_old_finite_difference(lambda_grid, weights)
    end if

  end subroutine setup_trapped_lambda_grids