initialization_support_procedures Submodule

Contains the implementations of various initialization support routines


Uses


Subroutines

subroutine addVarToListFromJSON(varList, jsonCont, mpiCont, isDerivedList, varName)

Add variable to variable list based on varName

Arguments

Type IntentOptional Attributes Name
type(VariableList), intent(inout) :: varList
type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController

logical, intent(in) :: isDerivedList
character(len=*), intent(in) :: varName

Module Subroutines

module subroutine initVarListFromJSON(varList, jsonCont, mpiCont, isDerivedList)

Initialize variable list based on variable data from a JSON file. If isDerivedList = .true. the list is initialized based on derived list data, otherwise it uses the implicit list.

Arguments

Type IntentOptional Attributes Name
type(VariableList), intent(inout) :: varList
type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController

logical, intent(in), optional :: isDerivedList

module subroutine initGridFromJSON(gridObj, jsonCont, mpiCont, lengthNorm)

Initialize grid object based on data from a JSON file.

Arguments

Type IntentOptional Attributes Name
type(Grid), intent(inout) :: gridObj
type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController

real(kind=rk), intent(in), optional :: lengthNorm

Length normalization if the supplied grid is in meters, defaults to 1

module subroutine initPartFromJSON(partObj, gridObj, jsonCont, mpiCont)

Initialize simple partition object based on data from a JSON file and grid object

Arguments

Type IntentOptional Attributes Name
type(Partition), intent(inout) :: partObj
type(Grid), intent(in) :: gridObj

Grid object used to get numX and numH

type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController

module subroutine initGeometryFromJSON(geometryObj, gridObj, jsonCont, mpiCont)

Initialize geometry object based on data from a JSON file and grid object

Arguments

Type IntentOptional Attributes Name
type(Geometry), intent(inout) :: geometryObj
type(Grid), intent(in) :: gridObj

Grid object used to infer cell widths for consistency

type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController

module subroutine initPETScContFromJSON(petscCont, indexingObj, jsonCont, mpiCont)

Initialize PETSc controller object based on data from a JSON file and indexing object

Arguments

Type IntentOptional Attributes Name
type(PETScController), intent(inout) :: petscCont
type(Indexing), intent(in) :: indexingObj
type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController and to initialize PETSc

module subroutine initHDF5ContFromJSON(hdf5Cont, varCont, jsonCont, mpiCont)

Initialize HDF5 controller object based on data from a JSON file and variable container object

Arguments

Type IntentOptional Attributes Name
type(HDF5Controller), intent(inout) :: hdf5Cont
type(VariableContainer), intent(in) :: varCont
type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController and to initialize PETSc

module subroutine initVarContFromJSON(varCont, indexingObj, partObj, textbookObj, jsonCont, mpiCont)

Initialize variable container based on variable data from a JSON file.

Arguments

Type IntentOptional Attributes Name
type(VariableContainer), intent(inout) :: varCont
type(Indexing), intent(in) :: indexingObj

Indexing object used in variable container initialization

type(Partition), intent(in) :: partObj

Partition object used in variable container initialization

type(Textbook), intent(in) :: textbookObj

Textbook object used to retrieve derivation rules for variable container

type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController

module subroutine initStandardTextbook(textbookObj, gridObj, geometryObj, partObj, vSpaceObj, normObj, speciesListObj, varList, jsonCont, mpiCont)

Initialize standard textbook object based on grid, geometry, partition, species, and normalization data as well as a JSON file. Assumes that the velocity grid is normalized to electron thermal speed. The textbook includes (passed variables are in appearance order unless otherwise specified):

Read more…

Arguments

Type IntentOptional Attributes Name
type(Textbook), intent(inout) :: textbookObj
type(Grid), intent(in) :: gridObj
type(Geometry), intent(in) :: geometryObj
type(Partition), intent(in) :: partObj
type(VSpace), intent(in) :: vSpaceObj
class(Normalization), intent(in) :: normObj
type(SpeciesList), intent(in) :: speciesListObj
type(VariableList), intent(in) :: varList
type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController

module subroutine initStandardIntegrator(integratorObj, varCont, indexingObj, jsonCont, mpiCont)

Initialize standard integrator based on data from a JSON file. The standard integrator is a composit integrator containing either RK or BDE integrators.

Arguments

Type IntentOptional Attributes Name
type(CompositeIntegrator), intent(inout) :: integratorObj
type(VariableContainer), intent(in) :: varCont
type(Indexing), intent(in) :: indexingObj

Indexing object used in BDE integrator initialization

type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController

module subroutine initStandardSignals(signalCollectionObj)

Initialize signal collection with commonly used signals and their names. The signals are: 1. constant signal 2. hat signal 3. cut sine signal

Arguments

Type IntentOptional Attributes Name
type(SignalCollection), intent(inout) :: signalCollectionObj

module subroutine setDistHarmonic(dist, h, xArr, vArr)

Set the h-th harmonic of distribution function variable dist to xArr*vArr at corresponding x, and v coordinates. vArr should be either rank 1 or 2, and if it is rank 2 it should be size(numV,size(xArr))

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(inout), dimension(:) :: dist
integer(kind=ik), intent(in) :: h
real(kind=rk), intent(in), dimension(:) :: xArr
real(kind=rk), intent(in), dimension(..) :: vArr