uniform_fields_p Subroutine

public subroutine uniform_fields_p(pchunk, F, B_X, B_Y, B_Z, E_X, E_Y, E_Z)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: pchunk

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,:) =


Called by

proc~~uniform_fields_p~~CalledByGraph proc~uniform_fields_p uniform_fields_p proc~fo_init FO_init proc~fo_init->proc~uniform_fields_p proc~adv_foeqn_top adv_FOeqn_top proc~adv_foeqn_top->proc~uniform_fields_p program~main main program~main->proc~fo_init program~main->proc~adv_foeqn_top

Contents

Source Code


Source Code

  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