bsg_operators_m Module

Contains special operators that work with the BSG



Interfaces

interface

  • public module subroutine initialize(this, mesh, num_blocks, interp_order)

    Initializes the BSG operators type

    Arguments

    Type IntentOptional Attributes Name
    class(bsg_operators_t), intent(inout) :: this

    Instance of the type

    type(mesh_5d_t), intent(in), target :: mesh

    Mesh instance

    integer, intent(in) :: num_blocks

    Number of blocks

    integer, intent(in), optional :: interp_order

    Interpolation order

interface

  • public module subroutine initialize_vp_pointers(this, block_number, ptr_from_mesh, ptr_accessor)

    Initializes the velocity space grid pointer accessors

    Arguments

    Type IntentOptional Attributes Name
    class(bsg_operators_t), intent(inout) :: this

    Instance of the type

    integer, intent(in) :: block_number

    Block number

    real(kind=GP), intent(in), dimension(:), target :: ptr_from_mesh

    Pointer from mesh

    type(vspace_bsg_t), intent(inout), dimension(:), pointer :: ptr_accessor

    Pointer accessor

interface

  • public module subroutine interpolate_dist(this, nb_point, nb_neigh, i_neigh, k, l, f_in, lb1, lb2, lb3, f_interp)

    Updates the distribution function value of neighbor points through interpolation

    Arguments

    Type IntentOptional Attributes Name
    class(bsg_operators_t), intent(inout) :: this

    Instance of type

    integer, intent(in) :: nb_point

    Block number of RZ point

    integer, intent(in) :: nb_neigh

    Block number of neighbor point

    integer, intent(in) :: i_neigh

    Neighbor point index

    integer, intent(in) :: k

    Index for phi dimension of the dist function

    integer, intent(in) :: l

    Index for vp dimension of the dist function

    real(kind=GP), intent(in), dimension(lb1:,lb2:,lb3:) :: f_in

    Input distribution function

    integer, intent(in) :: lb1

    Lower bound of RZ dimension

    integer, intent(in) :: lb2

    Lower bound of phi dimension

    integer, intent(in) :: lb3

    Lower bound of vp dimension

    real(kind=GP), intent(inout) :: f_interp

    Final interpolated value

interface

  • public module subroutine dot_product_bsg(this, coeff, points_neigh, lb1, lb2, lb3, f_in, nb_point, k, l, f_dot)

    Performs the dot product for neighbors situated in different blocks

    Arguments

    Type IntentOptional Attributes Name
    class(bsg_operators_t), intent(inout) :: this

    Instance of the type

    real(kind=GP), intent(in), dimension(:) :: coeff

    Coefficient vector

    integer, intent(in), dimension(:) :: points_neigh

    Indices i of RZ dimension of all neighbor points

    integer, intent(in) :: lb1

    Lower bound of RZ dimension

    integer, intent(in) :: lb2

    Lower bound of phi dimension

    integer, intent(in) :: lb3

    Lower bound of vp dimension

    real(kind=GP), intent(in), dimension(lb1:,lb2:,lb3:) :: f_in

    Input distribution function

    integer, intent(in) :: nb_point

    Block number of RZ point

    integer, intent(in) :: k

    Index for phi dimension of the dist function

    integer, intent(in) :: l

    Index for vp dimension of the dist function

    real(kind=GP), intent(out) :: f_dot

    Final dot product value


Derived Types

type, public ::  bsg_operators_t

Derived type for all BSG defined operators

Type-Bound Procedures

procedure, public :: initialize
procedure, public :: interpolate_dist
procedure, public :: dot_product_bsg
procedure, public :: get_local_start_idx_pointer
procedure, public :: get_local_end_idx_pointer
procedure, public :: get_is_internal_pointer
procedure, public :: get_vp_pointer
procedure, public :: get_vpw_pointer
procedure, public :: get_vp_delta_pointer
procedure, public :: get_prefac_vp_pointer
procedure, public :: is_initialized

Functions

public function get_vp_pointer(this) result(ptr)

Returns a pointer to the vp array

Arguments

Type IntentOptional Attributes Name
class(bsg_operators_t), intent(inout), target :: this

Instance of the type

Return Value type(vspace_bsg_t), contiguous, pointer, dimension(:)

public function get_vpw_pointer(this) result(ptr)

Returns a pointer to the vpw array

Arguments

Type IntentOptional Attributes Name
class(bsg_operators_t), intent(inout), target :: this

Instance of the type

Return Value type(vspace_bsg_t), contiguous, pointer, dimension(:)

public function get_local_start_idx_pointer(this) result(ptr)

Returns a pointer to the local start index array

Arguments

Type IntentOptional Attributes Name
class(bsg_operators_t), intent(inout), target :: this

Instance of the type

Return Value integer, contiguous, dimension(:,:,:), pointer

public function get_local_end_idx_pointer(this) result(ptr)

Returns a pointer to the local end index array

Arguments

Type IntentOptional Attributes Name
class(bsg_operators_t), intent(inout), target :: this

Instance of the type

Return Value integer, contiguous, dimension(:,:,:), pointer

public function get_is_internal_pointer(this) result(ptr)

Arguments

Type IntentOptional Attributes Name
class(bsg_operators_t), intent(inout), target :: this

Instance of the type

Return Value logical, contiguous, dimension(:,:,:), pointer

public function get_vp_delta_pointer(this) result(ptr)

Arguments

Type IntentOptional Attributes Name
class(bsg_operators_t), intent(inout), target :: this

Instance of the type

Return Value real(kind=GP), contiguous, dimension(:), pointer

public function get_prefac_vp_pointer(this) result(ptr)

Arguments

Type IntentOptional Attributes Name
class(bsg_operators_t), intent(inout), target :: this

Instance of the type

Return Value real(kind=GP), contiguous, dimension(:), pointer

public pure function is_initialized(this)

Arguments

Type IntentOptional Attributes Name
class(bsg_operators_t), intent(in) :: this

Instance of the type

Return Value logical