Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | pchunk | NoteSubroutine that returns the value of a uniform magnetic field. This subroutine is used only when the simulation is ran for a 'UNIFORM' plasma. As a convention, in a uniform plasma we set . |
||
type(FIELDS), | intent(in) | :: | F | An instance of the KORC derived type FIELDS. |
||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | B_X | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | B_Y | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | B_Z | ||
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | E_X | Magnetic field components in Cartesian coordinates; B(1,:) = , B(2,:) = , B(3,:) = |
|
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | E_Y | Magnetic field components in Cartesian coordinates; B(1,:) = , B(2,:) = , B(3,:) = |
|
real(kind=rp), | intent(out), | DIMENSION(pchunk) | :: | E_Z | Magnetic field components in Cartesian coordinates; B(1,:) = , B(2,:) = , B(3,:) = |
subroutine uniform_fields_p(pchunk,F,B_X,B_Y,B_Z,E_X,E_Y,E_Z)
INTEGER, INTENT(IN) :: pchunk
!! @note Subroutine that returns the value of a uniform magnetic
!! field. @endnote
!! This subroutine is used only when the simulation is ran for a
!! 'UNIFORM' plasma. As a convention, in a uniform plasma we
!! set \(\mathbf{B} = B_0 \hat{x}\).
TYPE(FIELDS), INTENT(IN) :: F
!! An instance of the KORC derived type FIELDS.
REAL(rp),DIMENSION(pchunk), INTENT(OUT) :: B_X,B_Y,B_Z
REAL(rp),DIMENSION(pchunk), INTENT(OUT) :: E_X,E_Y,E_Z
!! Magnetic field components in Cartesian coordinates;
!! B(1,:) = \(B_x\), B(2,:) = \(B_y\), B(3,:) = \(B_z\)
integer(ip) :: cc
!$OMP SIMD
do cc=1_idef,pchunk
B_X(cc) = F%Bo
B_Y(cc) = 0._rp
B_Z(cc) = 0._rp
E_X(cc) = F%Eo
E_Y(cc) = 0._rp
E_Z(cc) = 0._rp
end do
!$OMP END SIMD
end subroutine uniform_fields_p