Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
Derived types and interfaces | Functions/Subroutines
sll_m_nml_mesh_1d_unif_cart Module Reference

Description

initialization of 1d uniform cartesian mesh from namelist

Author
Michel Mehrenberger


Partly generated from mesh_1d_unif_cart.gnml file

integer(kind=i32) num_cells 32
real(kind=f64) eta_min 0._f64
real(kind=f64) eta_max 1._f64

and num4.clone file

_1
_2
_3
_4

Default parameters correspond to namelist

&mesh_1d_unif_cart
num_cells = 32
eta_min = 0.
eta_max = 1.
/

and clones as

&mesh_1d_unif_cart_1
num_cells_1 = 32
eta_min_1 = 0.
eta_max_1 = 1.
/

...

&mesh_1d_unif_cart_4
num_cells_4 = 32
eta_min_4 = 0.
eta_max_4 = 1.
/

Examples of calls of interface (generic)

!print namelist info
call sll_o_nml_mesh_1d_unif_cart( &
filename, &
proc_id=sll_f_get_collective_rank(sll_v_world_collective))

Possibilities for namelists variables

num_cells : integer >= 1
eta_min : real
eta_max : real > eta_min

The 1d mesh is [eta_min,eta_max] discretized in num_cells cells
Examples of calls of interface (specific):

  1. Allocation and initialization of real(kind=f64), pointer :: array(:) according to choice read from namelist mesh_1d_unif_cart in filename
    call sll_o_nml_mesh_1d_unif_cart(filename,array)
    The output array is of size num_cells+1 with
    array(i) = eta_min+(i-1)*(eta_max-eta_min), i=1,num_cells+1
  2. Same, but read this time, from namelist mesh_1d_unif_cart_1.
    call sll_o_nml_mesh_1d_unif_cart(filename,array,clone="_1")
  3. Allocation and initialization of type(sll_t_cartesian_mesh_1d), pointer :: mesh according to choice read from namelist mesh_1d_unif_cart in filename
    call sll_o_nml_mesh_1d_unif_cart(filename,mesh)
  4. Same, but read this time, from namelist mesh_1d_unif_cart_1.
    call sll_o_nml_mesh_1d_unif_cart(filename,mesh,clone="_1")

Derived types and interfaces

type  sll_t_nml_mesh_1d_unif_cart
 
interface  sll_o_nml_mesh_1d_unif_cart
 

Functions/Subroutines

subroutine s_nml_mesh_1d_unif_cart_array (filename, array, clone, proc_id)
 create 1d array from namelist More...
 
subroutine s_nml_mesh_1d_unif_cart_mesh (filename, mesh, clone, proc_id)
 create 1d (uniform) cartesian mesh from namelist More...
 
subroutine s_nml_mesh_1d_unif_cart_print (filename, clone, proc_id)
 print namelist info More...
 

Function/Subroutine Documentation

◆ s_nml_mesh_1d_unif_cart_array()

subroutine sll_m_nml_mesh_1d_unif_cart::s_nml_mesh_1d_unif_cart_array ( character(len=*), intent(in)  filename,
real(kind=f64), dimension(:), intent(out), pointer  array,
character(len=*), intent(in), optional  clone,
integer(kind=i32), intent(in), optional  proc_id 
)
private

create 1d array from namelist

Parameters
filenamenamelist file input
arrayoutput array
cloneoptional choice of clone

Definition at line 172 of file sll_m_nml_mesh_1d_unif_cart.F90.

◆ s_nml_mesh_1d_unif_cart_mesh()

subroutine sll_m_nml_mesh_1d_unif_cart::s_nml_mesh_1d_unif_cart_mesh ( character(len=*), intent(in)  filename,
type(sll_t_cartesian_mesh_1d), intent(out), pointer  mesh,
character(len=*), intent(in), optional  clone,
integer(kind=i32), intent(in), optional  proc_id 
)
private

create 1d (uniform) cartesian mesh from namelist

Parameters
filenamenamelist file input
meshoutput mesh
cloneoptional choice of clone

Definition at line 210 of file sll_m_nml_mesh_1d_unif_cart.F90.

◆ s_nml_mesh_1d_unif_cart_print()

subroutine sll_m_nml_mesh_1d_unif_cart::s_nml_mesh_1d_unif_cart_print ( character(len=*), intent(in)  filename,
character(len=*), intent(in), optional  clone,
integer(kind=i32), intent(in), optional  proc_id 
)
private

print namelist info

Parameters
filenamenamelist file input
cloneoptional choice of clone
proc_idoptional id of proc

Definition at line 249 of file sll_m_nml_mesh_1d_unif_cart.F90.

    Report Typos and Errors