GBS
basic_mod Module Reference

Data Types

interface  gbs_allocate
 
interface  gbs_allocate_cuda
 
interface  allocate_managed_memory
 
interface  allocate_cuda_memory
 
interface  allocate_device_memory
 

Functions/Subroutines

subroutine daytim (str)
 Print date and time. More...
 
subroutine timera (cntrl, str, eltime)
 Timer routine. More...
 
subroutine gbs_allocate_i1 (a, is1, ie1)
 Wrapper routine to allocate and initialize 1D double array. More...
 
subroutine gbs_allocate_i2 (a, is1, ie1, is2, ie2)
 Wrapper routine to allocate and initialize 2D integer array. More...
 
subroutine gbs_allocate_p1 (a, is1, ie1)
 
subroutine gbs_allocate_p2 (a, is1, ie1, is2, ie2)
 Wrapper routine to allocate and initialize 2D double array. More...
 
subroutine gbs_allocate_p3 (a, is1, ie1, is2, ie2, is3, ie3)
 Wrapper routine to allocate and initialize 3D double array. More...
 
subroutine gbs_allocate_p4 (a, is1, ie1, is2, ie2, is3, ie3, is4, ie4)
 Wrapper routine to allocate and initialize 4D double array. More...
 
subroutine gbs_allocate_cuda_dp4 (a, is1, ie1, is2, ie2, is3, ie3, is4, ie4)
 
subroutine gbs_allocate_cuda_dp3 (a, is1, ie1, is2, ie2, is3, ie3)
 
subroutine gbs_allocate_cuda_dp2 (a, is1, ie1, is2, ie2)
 
subroutine gbs_allocate_cuda_dp1 (a, is1, ie1)
 

Variables

type(tmpienvmpi_env
 Structure containing all the MPI environments. More...
 
type(tfileinput_file
 Structure containing the input file information. More...
 
type(tinputenvinput
 Structure containing all the input namelists. More...
 
real(dp) time = 0.0_dp
 Current simulation time (Init from restart file) More...
 
real(dp) remaining_time
 Remaining time in the simulation. More...
 
integer, private ierr
 Flag for MPI error. More...
 
integer corresponding_rank
 Corresponding rank in the other communicator (plasma/neutrals) More...
 
integer jobnum = 0
 Job number. More...
 
integer stepp = 0
 Plasma calculation step of this run. More...
 
integer stepn = 0
 Neutrals calculation step of this run. More...
 
integer cstepp = 0
 Current stepP number (Init from restart file) More...
 
logical nlend = .false.
 Signal end of run. More...
 
logical nlforcediag = .false.
 Signal end of run. More...
 
logical nlcrash = .false.
 Signal crash of run. More...
 
integer iframe2d
 number of 2d datasets More...
 
integer iframe3d
 number of 3d datasets More...
 
logical parallel_neutrals
 Do neutrals in parallel to the plasma. More...
 
integer, dimension(:), pointer dspx2d
 
integer, dimension(:), pointer rcx2d
 
integer, dimension(:), pointer dspx1d
 
integer, dimension(:), pointer rcx1d
 
integer, dimension(:), pointer dspy2d
 
integer, dimension(:), pointer rcy2d
 
integer, dimension(:), pointer dspy1d
 
integer, dimension(:), pointer rcy1d
 
integer, parameter lu_debug = 93
 File used for debug purposes. More...
 
integer, parameter lu_stop = 91
 stop file, see subroutine TESEND More...
 
integer, parameter lu_job = 92
 myjob file More...
 
integer, parameter lu_eq = 94
 External equilibrium file. More...
 
integer lu_neu = 95
 File for neutrals stdout. More...
 
logical ltimer =.false.
 
integer starttimer =2
 
integer stoptimer =30
 

Function/Subroutine Documentation

◆ daytim()

subroutine basic_mod::daytim ( character(len=*), intent(in)  str)

Print date and time.

◆ gbs_allocate_cuda_dp1()

subroutine basic_mod::gbs_allocate_cuda_dp1 ( real(dp), dimension(:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1 
)

◆ gbs_allocate_cuda_dp2()

subroutine basic_mod::gbs_allocate_cuda_dp2 ( real(dp), dimension(:,:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1,
integer, intent(in)  is2,
integer, intent(in)  ie2 
)

◆ gbs_allocate_cuda_dp3()

subroutine basic_mod::gbs_allocate_cuda_dp3 ( real(dp), dimension(:,:,:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1,
integer, intent(in)  is2,
integer, intent(in)  ie2,
integer, intent(in)  is3,
integer, intent(in)  ie3 
)

◆ gbs_allocate_cuda_dp4()

subroutine basic_mod::gbs_allocate_cuda_dp4 ( real(dp), dimension(:,:,:,:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1,
integer, intent(in)  is2,
integer, intent(in)  ie2,
integer, intent(in)  is3,
integer, intent(in)  ie3,
integer, intent(in)  is4,
integer, intent(in)  ie4 
)
Parameters
[in,out]aInput array
[in]ie4Starting and ending indices

◆ gbs_allocate_i1()

subroutine basic_mod::gbs_allocate_i1 ( integer, dimension(:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1 
)

Wrapper routine to allocate and initialize 1D double array.

Wrapper routine to allocate and initialize 1D integer array

Parameters
[in,out]aInput array
[in]ie1Starting and ending indices

◆ gbs_allocate_i2()

subroutine basic_mod::gbs_allocate_i2 ( integer, dimension(:,:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1,
integer, intent(in)  is2,
integer, intent(in)  ie2 
)

Wrapper routine to allocate and initialize 2D integer array.

Parameters
[in,out]aInput array
[in]ie2Starting and ending indices

◆ gbs_allocate_p1()

subroutine basic_mod::gbs_allocate_p1 ( real(dp), dimension(:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1 
)
Parameters
[in,out]aInput array
[in]ie1Starting and ending indices

◆ gbs_allocate_p2()

subroutine basic_mod::gbs_allocate_p2 ( real(dp), dimension(:,:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1,
integer, intent(in)  is2,
integer, intent(in)  ie2 
)

Wrapper routine to allocate and initialize 2D double array.

Parameters
[in,out]aInput array
[in]ie2Starting and ending indices

◆ gbs_allocate_p3()

subroutine basic_mod::gbs_allocate_p3 ( real(dp), dimension(:,:,:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1,
integer, intent(in)  is2,
integer, intent(in)  ie2,
integer, intent(in)  is3,
integer, intent(in)  ie3 
)

Wrapper routine to allocate and initialize 3D double array.

Parameters
[in,out]aInput array
[in]ie3Starting and ending indices

◆ gbs_allocate_p4()

subroutine basic_mod::gbs_allocate_p4 ( real(dp), dimension(:,:,:,:), intent(inout), pointer  a,
integer, intent(in)  is1,
integer, intent(in)  ie1,
integer, intent(in)  is2,
integer, intent(in)  ie2,
integer, intent(in)  is3,
integer, intent(in)  ie3,
integer, intent(in)  is4,
integer, intent(in)  ie4 
)

Wrapper routine to allocate and initialize 4D double array.

Parameters
[in,out]aInput array
[in]ie4Starting and ending indices

◆ timera()

subroutine basic_mod::timera ( integer, intent(in)  cntrl,
character(len=*), intent(in)  str,
real(dp), intent(out), optional  eltime 
)

Timer routine.

Note
This routine can only be called from the plasma communicator to avoid timings that are artificially reduced by calls from the neutral communicator.
Todo:
Find a better solution for the timers which includes also the neutrals
Parameters
[in]cntrlControl flag (0 = initialize, 1 = update timings)
[in]strName of the timer
[out]eltimeTiming
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ corresponding_rank

integer basic_mod::corresponding_rank

Corresponding rank in the other communicator (plasma/neutrals)

◆ cstepp

integer basic_mod::cstepp = 0

Current stepP number (Init from restart file)

◆ dspx1d

integer, dimension(:), pointer basic_mod::dspx1d

◆ dspx2d

integer, dimension(:), pointer basic_mod::dspx2d

◆ dspy1d

integer, dimension(:), pointer basic_mod::dspy1d

◆ dspy2d

integer, dimension(:), pointer basic_mod::dspy2d

◆ ierr

integer, private basic_mod::ierr
private

Flag for MPI error.

◆ iframe2d

integer basic_mod::iframe2d

number of 2d datasets

◆ iframe3d

integer basic_mod::iframe3d

number of 3d datasets

◆ input

type(tinputenv) basic_mod::input

Structure containing all the input namelists.

Refactor:
to be moved in the correct place

◆ input_file

type(tfile) basic_mod::input_file

Structure containing the input file information.

Refactor:
to be moved in the correct place

◆ jobnum

integer basic_mod::jobnum = 0

Job number.

◆ ltimer

logical basic_mod::ltimer =.false.

◆ lu_debug

integer, parameter basic_mod::lu_debug = 93

File used for debug purposes.

◆ lu_eq

integer, parameter basic_mod::lu_eq = 94

External equilibrium file.

◆ lu_job

integer, parameter basic_mod::lu_job = 92

myjob file

◆ lu_neu

integer basic_mod::lu_neu = 95

File for neutrals stdout.

◆ lu_stop

integer, parameter basic_mod::lu_stop = 91

stop file, see subroutine TESEND

◆ mpi_env

type(tmpienv) basic_mod::mpi_env

Structure containing all the MPI environments.

Refactor:
to be moved in the correct place

◆ nlcrash

logical basic_mod::nlcrash = .false.

Signal crash of run.

◆ nlend

logical basic_mod::nlend = .false.

Signal end of run.

◆ nlforcediag

logical basic_mod::nlforcediag = .false.

Signal end of run.

◆ parallel_neutrals

logical basic_mod::parallel_neutrals

Do neutrals in parallel to the plasma.

◆ rcx1d

integer, dimension(:), pointer basic_mod::rcx1d

◆ rcx2d

integer, dimension(:), pointer basic_mod::rcx2d

◆ rcy1d

integer, dimension(:), pointer basic_mod::rcy1d

◆ rcy2d

integer, dimension(:), pointer basic_mod::rcy2d

◆ remaining_time

real(dp) basic_mod::remaining_time

Remaining time in the simulation.

◆ starttimer

integer basic_mod::starttimer =2

◆ stepn

integer basic_mod::stepn = 0

Neutrals calculation step of this run.

◆ stepp

integer basic_mod::stepp = 0

Plasma calculation step of this run.

◆ stoptimer

integer basic_mod::stoptimer =30

◆ time

real(dp) basic_mod::time = 0.0_dp

Current simulation time (Init from restart file)