Evaluate the basis for a list of (theta, zeta) positions on all flux surfaces given by s
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n_s |
number of evaluation points |
||
| integer, | intent(in) | :: | n_tz |
number of evaluation points |
||
| real, | intent(in) | :: | s(n_s) |
evaluation points |
||
| real, | intent(in) | :: | thetazeta(2,n_tz) |
evaluation points |
||
| character(len=2), | intent(in) | :: | var |
selection string: which variable to evaluate |
||
| character(len=2), | intent(in) | :: | sel_deriv_s |
selection string: which derivative to evaluate for the spline |
||
| character(len=2), | intent(in) | :: | sel_deriv_f |
selection string: which derivative to evaluate for the fourier series |
||
| real, | intent(out) | :: | result(n_s,n_tz) |
output array |
SUBROUTINE evaluate_base_list_tz(n_s, n_tz, s, thetazeta, var, sel_deriv_s, sel_deriv_f, result) ! MODULES USE MODgvec_base, ONLY: t_base ! INPUT/OUTPUT VARIABLES ------------------------------------------------------------------------------------------------------! INTEGER, INTENT(IN) :: n_s, n_tz !! number of evaluation points REAL, INTENT(IN) :: s(n_s), thetazeta(2,n_tz) !! evaluation points CHARACTER(LEN=2), INTENT(IN) :: var !! selection string: which variable to evaluate CHARACTER(LEN=2), INTENT(IN) :: sel_deriv_s !! selection string: which derivative to evaluate for the spline CHARACTER(LEN=2), INTENT(IN) :: sel_deriv_f !! selection string: which derivative to evaluate for the fourier series REAL, INTENT(OUT) :: result(n_s,n_tz) !! output array ! LOCAL VARIABLES -------------------------------------------------------------------------------------------------------------! INTEGER :: i_s ! loop variables INTEGER :: seli_deriv_s, seli_deriv_f ! integer values for the derivative selection CLASS(t_base), POINTER :: base ! pointer to the base object (X1, X2, LA) REAL, POINTER :: solution_dofs(:,:) ! pointer to the solution dofs (U(0)%X1, U(0)%X2, U(0)%LA) REAL, ALLOCATABLE :: fourier_dofs(:) ! DOFs for the fourier series, calculated from the spline ! CODE ------------------------------------------------------------------------------------------------------------------------! CALL evaluate_base_select(var, sel_deriv_s, sel_deriv_f, base, solution_dofs, seli_deriv_s, seli_deriv_f) ALLOCATE(fourier_dofs(base%f%modes)) !$OMP PARALLEL DO SCHEDULE(STATIC) DEFAULT(SHARED) & !$OMP PRIVATE(i_s,fourier_dofs) DO i_s=1,n_s ! evaluate spline to get the fourier dofs fourier_dofs = base%s%evalDOF2D_s(s(i_s),base%f%modes,seli_deriv_s,solution_dofs) result(i_s,:) = base%f%evalDOF_xn(n_tz, thetazeta, seli_deriv_f, fourier_dofs) END DO !$OMP END PARALLEL DO DEALLOCATE(fourier_dofs) END SUBROUTINE evaluate_base_list_tz