mus_deriveElectricField Subroutine

private recursive subroutine mus_deriveElectricField(fun, varsys, stencil, iLevel, posInState, pdf, res, nVals)

Calculate the electric_field of a given pre-collision pdfs i.e fetch_pdf_now

The interface has to comply to the abstract interface mus_derive_fromPDF.


class(tem_varSys_op_type), intent(in) :: fun

description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

type(tem_varSys_type), intent(in) :: varsys

the variable system to obtain the variable from.

type(tem_stencilHeader_type), intent(in) :: stencil

fluid stencil defintion

integer, intent(in) :: iLevel

current Level

integer, intent(in) :: posInState(:)

Position of element in levelwise state array

real(kind=rk), intent(in) :: pdf(:)

pdf array contains pre-collision using FETCH and nNow

real(kind=rk), intent(out) :: res(:)


integer, intent(in) :: nVals

nVals to get


proc~~mus_deriveelectricfield~~CallsGraph proc~mus_deriveelectricfield mus_deriveElectricField proc~convprepost convPrePost proc~mus_deriveelectricfield->proc~convprepost



integer, private :: iVal
integer, private :: iComp
type(mus_varSys_data_type), private, pointer:: fPtr
type(mus_scheme_type), private, pointer:: scheme
integer, private :: nCompPDF
real(kind=rk), private :: pot
real(kind=rk), private :: electric_prefactor
real(kind=rk), private :: electric_field(3)
real(kind=rk), private, allocatable:: pdfTmp(:)
real(kind=rk), private :: omega