Transform a function from the GVEC angles q(s,theta,zeta) to new angles q(s,theta,zeta*) by using interpolation in angular direction (fourier transform) and spline interpolation in radial direction (at s_IP points of output base) the interpolation points are given by thetazeta_IP, which are the angle positions of an equidistant interpolation grid in PEST/Boozer angles
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_base), | intent(in) | :: | q_base_in | |||
| real(kind=wp), | intent(in) | :: | q_in(1:q_base_in%s%nBase,1:q_base_in%f%modes) | |||
| character(len=*), | intent(in) | :: | q_name | |||
| class(t_base), | intent(in) | :: | q_base_out | |||
| real(kind=wp), | intent(inout) | :: | q_out(q_base_out%s%nBase,1:q_base_out%f%modes) | |||
| real(kind=wp), | intent(in) | :: | thetazeta_IP(2,q_base_out%f%mn_IP,q_base_out%s%nBase) |
SUBROUTINE Transform_Angles_3d(q_base_in,q_in,q_name,q_base_out,q_out,thetazeta_IP) ! MODULES USE MODgvec_Globals,ONLY: UNIT_stdOut,Progressbar USE MODgvec_base ,ONLY: t_base IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES CLASS(t_Base),INTENT(IN) :: q_base_in !< basis of function f REAL(wp) ,INTENT(IN) :: q_in(1:q_base_in%s%nBase,1:q_base_in%f%modes) !< coefficients of f CHARACTER(LEN=*),INTENT(IN):: q_name CLASS(t_base),INTENT(IN) :: q_base_out !< new fourier basis of function q in new angles, defined mn_max,mn_nyq REAL(wp) ,INTENT(IN) :: thetazeta_IP(2,q_base_out%f%mn_IP,q_base_out%s%nBase) !< theta zeta evaluation points corresponding to equispaced integration points in boozer/pest angles !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES REAL(wp) ,INTENT(INOUT) :: q_out(q_base_out%s%nBase,1:q_base_out%f%modes) !< spline/fourier coefficients of q in new angles !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES INTEGER :: nBase,irho,mn_IP,mn_max(2),mn_nyq(2) REAL(wp) :: spos REAL(wp) :: q_in_s(1:q_base_in%f%modes),q_IP(q_base_out%f%mn_IP) REAL(wp) :: q_m(q_base_out%f%modes,q_base_out%s%nBase) !output fourier on radial interpolations !=================================================================================================================================== mn_max(1:2) =q_base_out%f%mn_max mn_nyq(1:2) =q_base_out%f%mn_nyq SWRITE(UNIT_StdOut,'(A,I4,3(A,2I6))')'TRANSFORM '//TRIM(q_name)//' TO NEW ANGLE COORDINATES, nfp=',q_base_in%f%nfp, & ', mn_max_in=',q_base_in%f%mn_max,', mn_max_out=',mn_max,', mn_int=',mn_nyq __PERFON('transform_angles') !total number of integration points mn_IP = q_base_out%f%mn_IP nBase = q_base_out%s%nBase CALL ProgressBar(0,nBase)!init DO irho=1,nBase spos=q_base_out%s%s_IP(irho) !interpolation points for q_in !evaluate q_in at spos q_in_s(:) = q_base_in%s%evalDOF2D_s(spos,q_base_in%f%modes, 0,q_in(:,:)) q_IP = q_base_in%f%evalDOF_xn(mn_IP,thetazeta_IP(:,:,irho),0, q_in_s(:)) q_m(:,irho)= q_base_out%f%initDOF(q_IP(:)) CALL ProgressBar(irho,nBase) END DO !is CALL to_spline_with_BC(q_base_out,q_m,q_out) SWRITE(UNIT_StdOut,'(A)') '...DONE.' __PERFOFF('transform_angles') END SUBROUTINE Transform_Angles_3d