Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | pchunk | |||
type(FIELDS), | intent(in) | :: | F | |||
real(kind=rp), | intent(in), | DIMENSION(pchunk) | :: | Y_R | ||
real(kind=rp), | intent(in), | DIMENSION(pchunk) | :: | Y_PHI | ||
real(kind=rp), | intent(in), | DIMENSION(pchunk) | :: | Y_Z | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | B_R | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | B_PHI | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | B_Z | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | E_R | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | E_PHI | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | E_Z | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | curlB_R | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | curlB_PHI | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | curlB_Z | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | gradB_R | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | gradB_PHI | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | gradB_Z | ||
integer(kind=is), | intent(inout), | DIMENSION(pchunk) | :: | flag_cache |
subroutine interp_fields_p(pchunk,F,Y_R,Y_PHI,Y_Z,B_R,B_PHI,B_Z,E_R,E_PHI,E_Z, &
curlb_R,curlb_PHI,curlb_Z,gradB_R,gradB_PHI,gradB_Z,flag_cache)
INTEGER, INTENT(IN) :: pchunk
TYPE(FIELDS), INTENT(IN) :: F
REAL(rp),DIMENSION(pchunk),INTENT(IN) :: Y_R,Y_PHI,Y_Z
REAL(rp),DIMENSION(pchunk),INTENT(OUT) :: B_R,B_PHI,B_Z
REAL(rp),DIMENSION(pchunk),INTENT(OUT) :: gradB_R,gradB_PHI,gradB_Z
REAL(rp),DIMENSION(pchunk),INTENT(OUT) :: curlB_R,curlB_PHI,curlB_Z
REAL(rp),DIMENSION(pchunk),INTENT(OUT) :: E_R,E_PHI,E_Z
INTEGER(is),DIMENSION(pchunk),INTENT(INOUT) :: flag_cache
!write(output_unit_write,*) Y_R,Y_Z,flag_cache
call check_if_in_fields_domain_p(pchunk,F,Y_R,Y_PHI,Y_Z,flag_cache)
call EZspline_interp(bfield_2d%R,bfield_2d%PHI,bfield_2d%Z,efield_2d%R, &
efield_2d%PHI,efield_2d%Z,gradB_2d%R,gradB_2d%PHI,gradB_2d%Z, &
curlb_2d%R,curlb_2d%PHI,curlb_2d%Z,pchunk,Y_R,Y_Z,B_R,B_PHI,B_Z, &
E_R,E_PHI,E_Z,gradB_R,gradB_PHI,gradB_Z,curlb_R,curlb_PHI,curlb_Z, &
ezerr)
call EZspline_error(ezerr)
end subroutine interp_fields_p