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_two_grid_cart Module Reference

Description

initialization of 1d two grid cartesian mesh from namelist

Author
Michel Mehrenberger


Partly generated from mesh_1d_two_grid_cart.gnml file

integer(kind=i32) num_cells 32
real(kind=f64) eta_min -6._f64
real(kind=f64) eta_max 6._f64
real(kind=f64) eta_in_min 0._f64
real(kind=f64) eta_in_max 1._f64
real(kind=f64) density_out_min 1._f64
real(kind=f64) density_in 1._f64
real(kind=f64) density_out_max 1._f64

and num4.clone file

_1
_2
_3
_4

Default parameters correspond to namelist

&mesh_1d_two_grid_cart
num_cells = 32
eta_min = -6.
eta_max = 6.
eta_in_min = 0.
eta_in_max = 1.
density_out_min = 1.
density_in = 1.
density_out_max = 1.
/

and clones as

&mesh_1d_two_grid_cart_1
num_cells_1 = 32
eta_min_1 = -6.
eta_max_1 = 6.
eta_in_min_1 = 0.
eta_in_max_1 = 1.
density_out_min_1 = 1.
density_in_1 = 1.
density_out_max_1 = 1.
/

...

&mesh_1d_two_grid_cart_4
num_cells_4 = 32
eta_min_4 = -6.
eta_max_4 = 6.
eta_in_min_4 = 0.
eta_in_max_4 = 1.
density_out_min_4 = 1.
density_in_4 = 1.
density_out_max_4 = 1.
/

Examples of calls of interface (generic)

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

Possibilities for namelists variables

num_cells : integer >= 3
eta_min : real
eta_max : real > eta_min
eta_min_in : real > eta_min
eta_max_in : real > eta_min_in and < eta_max
density_out_min : 1. for the moment
density_in : real >= 1.
density_out_max : 1. for the moment

The 1d mesh is [eta_min,eta_max] discretized in num_cells cells but not necessarily in a uniform way.
There is a refined zone [eta_min_in,eta_max_in] with density density_in
Examples of calls of interface (specific):

  1. Allocation and initialization of real(kind=f64), pointer :: array(:) according to choice read from namelist mesh_1d_two_grid_cart in filename
    call sll_o_nml_mesh_1d_two_grid_cart(filename,array)
  2. Same, but read this time, from namelist mesh_1d_two_grid_cart_1.
    call sll_o_nml_mesh_1d_two_grid_cart(filename,array,clone="_1")

Derived types and interfaces

type  sll_t_nml_mesh_1d_two_grid_cart
 
interface  sll_o_nml_mesh_1d_two_grid_cart
 

Functions/Subroutines

subroutine s_nml_mesh_1d_two_grid_cart_array (filename, array, clone, proc_id)
 create 1d array from namelist More...
 
subroutine s_nml_mesh_1d_two_grid_cart_print (filename, clone, proc_id)
 print namelist info More...
 

Function/Subroutine Documentation

◆ s_nml_mesh_1d_two_grid_cart_array()

subroutine sll_m_nml_mesh_1d_two_grid_cart::s_nml_mesh_1d_two_grid_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
[in]filenamenamelist file input
[out]arrayoutput array
[in]cloneoptional choice of clone
[in]proc_idoptional id of proc

Definition at line 187 of file sll_m_nml_mesh_1d_two_grid_cart.F90.

◆ s_nml_mesh_1d_two_grid_cart_print()

subroutine sll_m_nml_mesh_1d_two_grid_cart::s_nml_mesh_1d_two_grid_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
[in]filenamenamelist file input
[in]cloneoptional choice of clone
[in]proc_idoptional id of proc

Definition at line 233 of file sll_m_nml_mesh_1d_two_grid_cart.F90.

    Report Typos and Errors