The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
oft_native_cvector Type Referenceabstract

Detailed Description

Native complex vector class.

Used for implementing global vector operations in OFT

Inheritance diagram for oft_native_cvector:
Inheritance graph
[legend]

Public Member Functions

generic add (self, gamma, alpha, a, beta, b)
 Add vectors.
 
generic add (self, gamma, alpha, a, beta, b)
 Add vectors.
 
procedure(cvec_add_cvec), deferred add_complex (self, gamma, alpha, a, beta, b)
 
procedure add_complex (self, gamma, alpha, a, beta, b)
 Add vectors.
 
procedure(cvec_add_vec), deferred add_real (self, gamma, alpha, a, beta, b)
 
procedure add_real (self, gamma, alpha, a, beta, b)
 Add vectors.
 
procedure delete (self)
 Delete vector.
 
procedure delete (self)
 Delete vector.
 
generic dot (self, a)
 Dot product with a second vector.
 
generic dot (self, a)
 Dot product with a second vector.
 
procedure(cvec_dot_cvec), deferred dot_complex (self, a)
 
procedure dot_complex (self, a)
 Dot product with a vector.
 
procedure(cvec_dot_vec), deferred dot_real (self, a)
 
procedure dot_real (self, a)
 Dot product with a vector.
 
procedure(cvec_get_local), deferred get_local (self, array, iblock)
 Get local portion of vector.
 
procedure get_local (self, array, iblock)
 Get local portion of field.
 
procedure(cvec_get_slice), deferred get_slice (self, array, iblock)
 Get locally-owned portion of vector.
 
procedure get_slice (self, array, iblock)
 Get owned portion of field.
 
generic mdot (self, a, n)
 Dot product with a set of vectors.
 
generic mdot (self, a, n)
 Dot product with a set of vectors.
 
procedure(cvec_mdot_cvec), deferred mdot_complex (self, a, n)
 
procedure mdot_complex (self, a, n)
 Dot product with an array of vectors.
 
procedure(cvec_mdot_vec), deferred mdot_real (self, a, n)
 
procedure mdot_real (self, a, n)
 Dot product with an array of vectors.
 
generic mult (self, a, div_flag)
 Multiply vectors element by element.
 
generic mult (self, a, div_flag)
 Multiply vectors element by element.
 
procedure(cvec_mult_cvec), deferred mult_complex (self, a, div_flag)
 
procedure mult_complex (self, a, div_flag)
 Elementwise multiplication with another vector.
 
procedure(cvec_mult_vec), deferred mult_real (self, a, div_flag)
 
procedure mult_real (self, a, div_flag)
 Elementwise multiplication with another vector.
 
generic new (self, new)
 Create a new vector as a bare copy.
 
generic new (self, new)
 Create a new vector as a bare copy.
 
procedure(cvec_new_cvec), deferred new_complex (self, new)
 
procedure new_complex (self, new)
 Create a new vector as a bare copy of self
 
procedure(cvec_new_vec), deferred new_real (self, new)
 
procedure new_real (self, new)
 Create a new vector as a bare copy of self
 
procedure(cvec_norm), deferred norm (self, itype)
 Norm of vector.
 
procedure norm (self, itype)
 Norm of field.
 
procedure(cvec_restore_local), deferred restore_local (self, array, iblock, add, wait)
 Restore local portion of vector.
 
procedure restore_local (self, array, iblock, add, wait)
 Restore local portion of field.
 
procedure(cvec_restore_slice), deferred restore_slice (self, array, iblock, wait)
 Restore locally-owned portion of vector.
 
procedure restore_slice (self, array, iblock, wait)
 Restore owned portion of field.
 
procedure(cvec_scale), deferred scale (self, alpha)
 Scale vector by a scalar.
 
procedure scale (self, alpha)
 Scale vector by a scalar.
 
procedure(cvec_set), deferred set (self, alpha, iblock, random)
 Set all elements to a scalar.
 
procedure set (self, alpha, iblock, random)
 Set all elements to a scalar.
 
procedure(cvec_stitch), deferred stitch (self, up_method)
 Perform global sitching.
 
procedure stitch (self, up_method)
 Perform global stitching.
 
procedure(cvec_sum), deferred sum (self)
 Sum reduction over vector.
 
procedure sum (self)
 Sum reduction over vector.
 

Public Attributes

complex(c8), dimension(:), pointer, contiguous local_tmp => NULL()
 Local value cache.
 
type(oft_map), dimension(:), pointer map => NULL()
 Block mapping.
 
integer(i4n = -1
 Local size of vector.
 
integer(i4nblocks = 1
 Number of blocks.
 
integer(i8ng = -1
 Gobal size of vector.
 
integer(i4nslice = -1
 Number of locally-owned values.
 
type(oft_seam), pointer stitch_info => NULL()
 Seam information.
 
complex(c8), dimension(:), pointer, contiguous v => NULL()
 Vector values.
 

Member Function/Subroutine Documentation

◆ add() [1/2]

generic add ( class(oft_cvector), intent(inout)  self,
complex(c8), intent(in)  gamma,
complex(c8), intent(in)  alpha,
class(oft_cvector), intent(inout), target  a,
complex(c8), intent(in), optional  beta,
class(oft_cvector), intent(inout), optional, target  b 
)
inherited

Add vectors.

Parameters
[in,out]selfVector object
[in]gammaScale of source vector
[in]alphaScale of first vector
[in,out]aFirst vector to add
[in]betaScale of second vector (optional)
[in,out]bSecond vector to add (optional)

◆ add() [2/2]

generic add ( class(oft_cvector), intent(inout)  self,
complex(c8), intent(in)  gamma,
complex(c8), intent(in)  alpha,
class(oft_vector), intent(inout), target  a,
complex(c8), intent(in), optional  beta,
class(oft_vector), intent(inout), optional, target  b 
)
inherited

Add vectors.

Parameters
[in,out]selfVector object
[in]gammaScale of source vector
[in]alphaScale of first vector
[in,out]aFirst vector to add
[in]betaScale of second vector (optional)
[in,out]bSecond vector to add (optional)

◆ add_complex() [1/2]

procedure(cvec_add_cvec), deferred add_complex ( class(oft_cvector), intent(inout)  self,
complex(c8), intent(in)  gamma,
complex(c8), intent(in)  alpha,
class(oft_cvector), intent(inout), target  a,
complex(c8), intent(in), optional  beta,
class(oft_cvector), intent(inout), optional, target  b 
)
pure virtualinherited
Parameters
[in,out]selfVector object
[in]gammaScale of source vector
[in]alphaScale of first vector
[in,out]aFirst vector to add
[in]betaScale of second vector (optional)
[in,out]bSecond vector to add (optional)

◆ add_complex() [2/2]

procedure add_complex ( class(oft_native_cvector), intent(inout)  self,
complex(c8), intent(in)  gamma,
complex(c8), intent(in)  alpha,
class(oft_cvector), intent(inout), target  a,
complex(c8), intent(in), optional  beta,
class(oft_cvector), intent(inout), optional, target  b 
)

Add vectors.

self = \( \gamma \) self + \( \alpha \) a + \( \beta \) b

Parameters
[in,out]selfVector object
[in]gammaScale of source vector
[in]alphaScale of first vector
[in,out]aFirst vector to add
[in]betaScale of second vector (optional)
[in,out]bSecond vector to add (optional)

◆ add_real() [1/2]

procedure(cvec_add_vec), deferred add_real ( class(oft_cvector), intent(inout)  self,
complex(c8), intent(in)  gamma,
complex(c8), intent(in)  alpha,
class(oft_vector), intent(inout), target  a,
complex(c8), intent(in), optional  beta,
class(oft_vector), intent(inout), optional, target  b 
)
pure virtualinherited
Parameters
[in,out]selfVector object
[in]gammaScale of source vector
[in]alphaScale of first vector
[in,out]aFirst vector to add
[in]betaScale of second vector (optional)
[in,out]bSecond vector to add (optional)

◆ add_real() [2/2]

procedure add_real ( class(oft_native_cvector), intent(inout)  self,
complex(c8), intent(in)  gamma,
complex(c8), intent(in)  alpha,
class(oft_vector), intent(inout), target  a,
complex(c8), intent(in), optional  beta,
class(oft_vector), intent(inout), optional, target  b 
)

Add vectors.

self = \( \gamma \) self + \( \alpha \) a + \( \beta \) b

Parameters
[in,out]selfVector object
[in]gammaScale of source vector
[in]alphaScale of first vector
[in,out]aFirst vector to add
[in]betaScale of second vector (optional)
[in,out]bSecond vector to add (optional)

◆ delete() [1/2]

procedure delete ( class(oft_cvector), intent(inout)  self)
inherited

Delete vector.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized vectors

◆ delete() [2/2]

procedure delete ( class(oft_native_cvector), intent(inout)  self)

Delete vector.

Parameters
[in,out]selfVector object

◆ dot() [1/2]

generic dot ( class(oft_cvector), intent(inout)  self,
class(oft_cvector), intent(inout), target  a 
)
inherited

Dot product with a second vector.

Parameters
[in,out]selfVector object
[in,out]aSecond vector for dot product

◆ dot() [2/2]

generic dot ( class(oft_cvector), intent(inout)  self,
class(oft_vector), intent(inout), target  a 
)
inherited

Dot product with a second vector.

Parameters
[in,out]selfVector object
[in,out]aSecond vector for dot product

◆ dot_complex() [1/2]

procedure(cvec_dot_cvec), deferred dot_complex ( class(oft_cvector), intent(inout)  self,
class(oft_cvector), intent(inout), target  a 
)
pure virtualinherited
Parameters
[in,out]selfVector object
[in,out]aSecond vector for dot product

◆ dot_complex() [2/2]

procedure dot_complex ( class(oft_native_cvector), intent(inout)  self,
class(oft_cvector), intent(inout), target  a 
)

Dot product with a vector.

Parameters
[in,out]selfVector object
[in,out]aSecond vector for dot product
Returns
\( \sum_i self_i a_i \)

◆ dot_real() [1/2]

procedure(cvec_dot_vec), deferred dot_real ( class(oft_cvector), intent(inout)  self,
class(oft_vector), intent(inout), target  a 
)
pure virtualinherited
Parameters
[in,out]selfVector object
[in,out]aSecond vector for dot product

◆ dot_real() [2/2]

procedure dot_real ( class(oft_native_cvector), intent(inout)  self,
class(oft_vector), intent(inout), target  a 
)

Dot product with a vector.

Parameters
[in,out]selfVector object
[in,out]aSecond vector for dot product
Returns
\( \sum_i self_i a_i \)

◆ get_local() [1/2]

procedure(cvec_get_local), deferred get_local ( class(oft_cvector), intent(inout)  self,
complex(c8), dimension(:), intent(inout), pointer  array,
integer(i4), intent(in), optional  iblock 
)
pure virtualinherited

Get local portion of vector.

Parameters
[in,out]selfVector object
[in,out]arrayLocal values
[in]iblockSub-block to retrieve

◆ get_local() [2/2]

procedure get_local ( class(oft_native_cvector), intent(inout)  self,
complex(c8), dimension(:), intent(inout), pointer  array,
integer(i4), intent(in), optional  iblock 
)

Get local portion of field.

Parameters
[in,out]selfVector object
[in,out]arrayLocal values
[in]iblockSub-block to retrieve

◆ get_slice() [1/2]

procedure(cvec_get_slice), deferred get_slice ( class(oft_cvector), intent(inout)  self,
complex(c8), dimension(:), intent(inout), pointer  array,
integer(i4), intent(in), optional  iblock 
)
pure virtualinherited

Get locally-owned portion of vector.

Parameters
[in,out]selfVector object
[in,out]arraySlice values
[in]iblockSub-block to retrieve

◆ get_slice() [2/2]

procedure get_slice ( class(oft_native_cvector), intent(inout)  self,
complex(c8), dimension(:), intent(inout), pointer  array,
integer(i4), intent(in), optional  iblock 
)

Get owned portion of field.

Parameters
[in,out]selfVector object
[in,out]arraySlice values
[in]iblockSub-block to retrieve

◆ mdot() [1/2]

generic mdot ( class(oft_cvector), intent(inout)  self,
type(oft_vector_ptr), dimension(n), intent(inout)  a,
integer(i4), intent(in)  n 
)
inherited

Dot product with a set of vectors.

Parameters
[in,out]selfVector object
[in,out]aArray of vectors for dot product [n]
[in]nLength of vector array
Returns
\( \sum_i self_i a(j)_i \)

◆ mdot() [2/2]

generic mdot ( class(oft_cvector), intent(inout)  self,
type(oft_cvector_ptr), dimension(n), intent(inout)  a,
integer(i4), intent(in)  n 
)
inherited

Dot product with a set of vectors.

Parameters
[in,out]selfVector object
[in,out]aArray of vectors for dot product [n]
[in]nLength of vector array
Returns
\( \sum_i self_i a(j)_i \)

◆ mdot_complex() [1/2]

procedure(cvec_mdot_cvec), deferred mdot_complex ( class(oft_cvector), intent(inout)  self,
type(oft_cvector_ptr), dimension(n), intent(inout)  a,
integer(i4), intent(in)  n 
)
pure virtualinherited
Parameters
[in,out]selfVector object
[in,out]aArray of vectors for dot product [n]
[in]nLength of vector array
Returns
\( \sum_i self_i a(j)_i \)

◆ mdot_complex() [2/2]

procedure mdot_complex ( class(oft_native_cvector), intent(inout)  self,
type(oft_cvector_ptr), dimension(n), intent(inout)  a,
integer(i4), intent(in)  n 
)

Dot product with an array of vectors.

Parameters
[in,out]selfVector object
[in,out]aArray of vectors for dot product [n]
[in]nLength of vector array
Returns
\( \sum_i self_i a(j)_i \)

◆ mdot_real() [1/2]

procedure(cvec_mdot_vec), deferred mdot_real ( class(oft_cvector), intent(inout)  self,
type(oft_vector_ptr), dimension(n), intent(inout)  a,
integer(i4), intent(in)  n 
)
pure virtualinherited
Parameters
[in,out]selfVector object
[in,out]aArray of vectors for dot product [n]
[in]nLength of vector array
Returns
\( \sum_i self_i a(j)_i \)

◆ mdot_real() [2/2]

procedure mdot_real ( class(oft_native_cvector), intent(inout)  self,
type(oft_vector_ptr), dimension(n), intent(inout)  a,
integer(i4), intent(in)  n 
)

Dot product with an array of vectors.

Parameters
[in,out]selfVector object
[in,out]aArray of vectors for dot product [n]
[in]nLength of vector array
Returns
\( \sum_i self_i a(j)_i \)

◆ mult() [1/2]

generic mult ( class(oft_cvector), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
logical, intent(in), optional  div_flag 
)
inherited

Multiply vectors element by element.

Parameters
[in,out]selfVector object
[in,out]avector for multiplication
[in]div_flagDivide instead of multiply?

◆ mult() [2/2]

generic mult ( class(oft_cvector), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
logical, intent(in), optional  div_flag 
)
inherited

Multiply vectors element by element.

Parameters
[in,out]selfVector object
[in,out]avector for multiplication
[in]div_flagDivide instead of multiply?

◆ mult_complex() [1/2]

procedure(cvec_mult_cvec), deferred mult_complex ( class(oft_cvector), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
logical, intent(in), optional  div_flag 
)
pure virtualinherited
Parameters
[in,out]selfVector object
[in,out]avector for multiplication
[in]div_flagDivide instead of multiply?

◆ mult_complex() [2/2]

procedure mult_complex ( class(oft_native_cvector), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
logical, intent(in), optional  div_flag 
)

Elementwise multiplication with another vector.

\( self_i = self_i * a_i \)

Parameters
[in,out]selfVector object
[in,out]avector for multiplication
[in]div_flagDivide instead of multiply?

◆ mult_real() [1/2]

procedure(cvec_mult_vec), deferred mult_real ( class(oft_cvector), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
logical, intent(in), optional  div_flag 
)
pure virtualinherited
Parameters
[in,out]selfVector object
[in,out]avector for multiplication
[in]div_flagDivide instead of multiply?

◆ mult_real() [2/2]

procedure mult_real ( class(oft_native_cvector), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
logical, intent(in), optional  div_flag 
)

Elementwise multiplication with another vector.

\( self_i = self_i * a_i \)

Parameters
[in,out]selfVector object
[in,out]avector for multiplication
[in]div_flagDivide instead of multiply?

◆ new() [1/2]

generic new ( class(oft_cvector), intent(in)  self,
class(oft_cvector), intent(out), pointer  new 
)
inherited

Create a new vector as a bare copy.

Parameters
[in]selfVector object
[out]newNew vector

◆ new() [2/2]

generic new ( class(oft_cvector), intent(in)  self,
class(oft_vector), intent(out), pointer  new 
)
inherited

Create a new vector as a bare copy.

Parameters
[in]selfVector object
[out]newNew vector

◆ new_complex() [1/2]

procedure(cvec_new_cvec), deferred new_complex ( class(oft_cvector), intent(in)  self,
class(oft_cvector), intent(out), pointer  new 
)
pure virtualinherited
Parameters
[in]selfVector object
[out]newNew vector

◆ new_complex() [2/2]

procedure new_complex ( class(oft_native_cvector), intent(in)  self,
class(oft_cvector), intent(out), pointer  new 
)

Create a new vector as a bare copy of self

Parameters
[in]selfVector object
[out]newNew vector

◆ new_real() [1/2]

procedure(cvec_new_vec), deferred new_real ( class(oft_cvector), intent(in)  self,
class(oft_vector), intent(out), pointer  new 
)
pure virtualinherited
Parameters
[in]selfVector object
[out]newNew vector

◆ new_real() [2/2]

procedure new_real ( class(oft_native_cvector), intent(in)  self,
class(oft_vector), intent(out), pointer  new 
)

Create a new vector as a bare copy of self

Parameters
[in]selfVector object
[out]newNew vector

◆ norm() [1/2]

procedure(cvec_norm), deferred norm ( class(oft_cvector), intent(inout)  self,
integer(i4), intent(in)  itype 
)
pure virtualinherited

Norm of vector.

Parameters
[in,out]selfVector object
[in]itypeType of norm (1-> 1-norm, 2-> 2-norm, 3-> Inf-norm)
Returns
Specified norm of vector

◆ norm() [2/2]

procedure norm ( class(oft_native_cvector), intent(inout)  self,
integer(i4), intent(in)  itype 
)

Norm of field.

Parameters
[in,out]selfVector object
[in]itypeType of norm (1-> 1-norm, 2-> 2-norm, 3-> Inf-norm)
Returns
Specified norm of vector

◆ restore_local() [1/2]

procedure(cvec_restore_local), deferred restore_local ( class(oft_cvector), intent(inout)  self,
complex(c8), dimension(:), intent(in)  array,
integer(i4), intent(in), optional  iblock,
logical, intent(in), optional  add,
logical, intent(in), optional  wait 
)
pure virtualinherited

Restore local portion of vector.

Parameters
[in,out]selfVector object
[in]arrayLocal values
[in]iblockSub-block to restore
[in]addAdd values instead of replace
[in]waitWait to perform global sync

◆ restore_local() [2/2]

procedure restore_local ( class(oft_native_cvector), intent(inout)  self,
complex(c8), dimension(:), intent(in)  array,
integer(i4), intent(in), optional  iblock,
logical, intent(in), optional  add,
logical, intent(in), optional  wait 
)

Restore local portion of field.

Parameters
[in,out]selfVector object
[in]arrayLocal values
[in]iblockSub-block to restore
[in]addAdd values instead of replace
[in]waitWait to perform global sync?

◆ restore_slice() [1/2]

procedure(cvec_restore_slice), deferred restore_slice ( class(oft_cvector), intent(inout)  self,
complex(c8), dimension(:), intent(in)  array,
integer(i4), intent(in), optional  iblock,
logical, intent(in), optional  wait 
)
pure virtualinherited

Restore locally-owned portion of vector.

Parameters
[in,out]selfVector object
[in]arraySlice values
[in]iblockSub-block to restore
[in]waitWait to perform global sync

◆ restore_slice() [2/2]

procedure restore_slice ( class(oft_native_cvector), intent(inout)  self,
complex(c8), dimension(:), intent(in)  array,
integer(i4), intent(in), optional  iblock,
logical, intent(in), optional  wait 
)

Restore owned portion of field.

Parameters
[in,out]selfVector object
[in]arraySlice values
[in]iblockSub-block to restore
[in]waitWait to perform global sync?

◆ scale() [1/2]

procedure(cvec_scale), deferred scale ( class(oft_cvector), intent(inout)  self,
complex(c8), intent(in)  alpha 
)
pure virtualinherited

Scale vector by a scalar.

Parameters
[in,out]selfVector object
[in]alphaScale factor

◆ scale() [2/2]

procedure scale ( class(oft_native_cvector), intent(inout)  self,
complex(c8), intent(in)  alpha 
)

Scale vector by a scalar.

Parameters
[in,out]selfVector object
[in]alphaScale factor

◆ set() [1/2]

procedure(cvec_set), deferred set ( class(oft_cvector), intent(inout)  self,
complex(c8), intent(in)  alpha,
integer(i4), intent(in), optional  iblock,
logical, intent(in), optional  random 
)
pure virtualinherited

Set all elements to a scalar.

Parameters
[in,out]selfVector object
[in]alphaUpdated vector value
[in]iblockVector sub-block to act on
[in]randomSet to random number, if true alpha is ignored (optional)

◆ set() [2/2]

procedure set ( class(oft_native_cvector), intent(inout)  self,
complex(c8), intent(in)  alpha,
integer(i4), intent(in), optional  iblock,
logical, intent(in), optional  random 
)

Set all elements to a scalar.

Parameters
[in,out]selfVector object
[in]alphaUpdated vector value
[in]iblockVector sub-block to act on
[in]randomSet to random number, if true alpha is ignored (optional)

◆ stitch() [1/2]

procedure(cvec_stitch), deferred stitch ( class(oft_cvector), intent(inout)  self,
integer(i4), intent(in)  up_method 
)
pure virtualinherited

Perform global sitching.

Parameters
[in,out]selfVector object
[in]up_methodType of stitching to perform

◆ stitch() [2/2]

procedure stitch ( class(oft_native_cvector), intent(inout)  self,
integer(i4), intent(in)  up_method 
)

Perform global stitching.

Parameters
[in,out]selfVector object

◆ sum() [1/2]

procedure(cvec_sum), deferred sum ( class(oft_cvector), intent(inout)  self)
pure virtualinherited

Sum reduction over vector.

Parameters
[in,out]selfVector object
Returns
Sum of vector elements

◆ sum() [2/2]

procedure sum ( class(oft_native_cvector), intent(inout)  self)

Sum reduction over vector.

Parameters
[in,out]selfVector object
Returns
Sum of vector elements

Member Data Documentation

◆ local_tmp

complex(c8), dimension(:), pointer, contiguous local_tmp => NULL()

Local value cache.

◆ map

type(oft_map), dimension(:), pointer map => NULL()
inherited

Block mapping.

◆ n

integer(i4) n = -1
inherited

Local size of vector.

◆ nblocks

integer(i4) nblocks = 1
inherited

Number of blocks.

◆ ng

integer(i8) ng = -1
inherited

Gobal size of vector.

◆ nslice

integer(i4) nslice = -1
inherited

Number of locally-owned values.

◆ stitch_info

type(oft_seam), pointer stitch_info => NULL()
inherited

Seam information.

◆ v

complex(c8), dimension(:), pointer, contiguous v => NULL()

Vector values.


The documentation for this type was generated from the following file: