Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params | |||
type(FIELDS), | intent(in) | :: | F | |||
real(kind=rp), | intent(in), | DIMENSION(params%pchunk) | :: | Y_R | ||
real(kind=rp), | intent(in), | DIMENSION(params%pchunk) | :: | Y_PHI | ||
real(kind=rp), | intent(in), | DIMENSION(params%pchunk) | :: | Y_Z | ||
real(kind=rp), | intent(inout), | DIMENSION(params%pchunk) | :: | E_PHI |
subroutine add_interp_SCE_p(params,F,Y_R,Y_PHI,Y_Z,E_PHI)
TYPE(KORC_PARAMS), INTENT(IN) :: params
TYPE(FIELDS), INTENT(IN) :: F
REAL(rp), DIMENSION(params%pchunk), INTENT(IN) :: Y_R,Y_PHI,Y_Z
REAL(rp), DIMENSION(params%pchunk), INTENT(INOUT) :: E_PHI
REAL(rp),DIMENSION(params%pchunk) :: rm,E_SC_PHI
REAL(rp) :: R0,Z0
INTEGER :: cc,pchunk
pchunk=params%pchunk
R0=F%Ro
Z0=F%Zo
!$OMP SIMD
do cc=1_idef,pchunk
rm(cc)=sqrt((Y_R(cc)-R0)*(Y_R(cc)-R0)+(Y_Z(cc)-Z0)*(Y_Z(cc)-Z0))
end do
!$OMP END SIMD
call EZspline_interp(efield_SC1d%PHI,pchunk, rm, E_SC_PHI, ezerr)
call EZspline_error(ezerr)
!$OMP SIMD
do cc=1_idef,pchunk
E_PHI(cc)=E_PHI(cc)+E_SC_PHI(cc)
end do
!$OMP END SIMD
end subroutine add_interp_SCE_p