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_cmatrix Type Referenceabstract

Detailed Description

Abstract complex matrix class.

Basic class for OFT matices (ex. fem operators)

Inheritance diagram for oft_cmatrix:
Inheritance graph
[legend]

Public Member Functions

procedure(cmat_add_values), deferred add_values (self, i_inds, j_inds, b, n, m, iblock, jblock, loc_cache)
 Add values to the matrix.
 
generic apply (self, a, b)
 Compute matrix-vector product.
 
generic apply (self, a, b)
 Compute matrix-vector product.
 
procedure(cmat_apply_cvec), deferred apply_complex (self, a, b)
 
procedure apply_real (self, a, b)
 Compute matrix vector product.
 
generic applyt (self, a, b)
 Compute matrix-vector product for matrix transpose.
 
generic applyt (self, a, b)
 Compute matrix-vector product for matrix transpose.
 
procedure(cmat_apply_cvec), deferred applyt_complex (self, a, b)
 
procedure applyt_real (self, a, b)
 Apply matrix vector product for matrix transpose.
 
procedure(cmat_assemble), deferred assemble (self, diag)
 Complete matrix assembly.
 
procedure(cmat_add_values), deferred atomic_add_values (self, i_inds, j_inds, b, n, m, iblock, jblock, loc_cache)
 Add values atomically to the matrix.
 
procedure delete (self)
 Delete matrix.
 
procedure(cmat_set_values), deferred set_values (self, i_inds, j_inds, b, n, m, iblock, jblock)
 Set values of the matrix.
 
procedure(cmat_zero), deferred zero (self)
 Zero all elements.
 
procedure(cmat_zero_rows), deferred zero_rows (self, nrows, irows, iblock, keep_diag)
 Zero all elements in a given row.
 

Public Attributes

class(oft_cvector), pointer d => NULL()
 Diagonal entries for scaling.
 
logical force_local = .FALSE.
 Do not stitch resulting vector (Native ONLY)
 
type(oft_map), dimension(:), pointer i_map => NULL()
 Row block mapping.
 
type(oft_map), dimension(:), pointer j_map => NULL()
 Column block mapping.
 
integer(i4nc
 Local number of columns.
 
integer(i8ncg
 Gobal number of columns.
 
integer(i4ncslice = 0
 Number of owned columns.
 
integer(i4ni = 0
 Number of row blocks.
 
integer(i4nj = 0
 Number of column blocks.
 
integer(i4nr
 Local number of rows.
 
integer(i8nrg
 Gobal number of rows.
 
integer(i4nrslice = 0
 Number of owned rows.
 

Member Function/Subroutine Documentation

◆ add_values()

procedure(cmat_add_values), deferred add_values ( class(oft_cmatrix), intent(inout)  self,
integer(i4), dimension(n), intent(in)  i_inds,
integer(i4), dimension(m), intent(in)  j_inds,
complex(c8), dimension(n,m), intent(in)  b,
integer(i4), intent(in)  n,
integer(i4), intent(in)  m,
integer(i4), intent(in), optional  iblock,
integer(i4), intent(in), optional  jblock,
integer(i4), dimension(n,m), intent(inout), optional  loc_cache 
)
pure virtual

Add values to the matrix.

Parameters
[in]i_indsRow indices of entries to add [n]
[in]j_indsColumn indices of entries to add [m]
[in]bValues to add [n,m]
[in]nNumber of rows in local matrix
[in]mNumber of columns in local matrix
[in]iblockRow block (optional)
[in]jblockColumn block (optional)
[in,out]loc_cacheCache of entry locations

◆ apply() [1/2]

generic apply ( class(oft_cmatrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)

Compute matrix-vector product.

b = self * a

Parameters
[in,out]selfMatrix object
[in,out]aVector object
[in,out]bResult vector

◆ apply() [2/2]

generic apply ( class(oft_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)

Compute matrix-vector product.

Parameters
[in,out]aSource vector
[in,out]bResult of matrix product

◆ apply_complex()

procedure(cmat_apply_cvec), deferred apply_complex ( class(oft_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
pure virtual
Parameters
[in,out]aSource vector
[in,out]bResult of matrix product

◆ apply_real()

procedure apply_real ( class(oft_cmatrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)

Compute matrix vector product.

b = self * a

Parameters
[in,out]selfMatrix object
[in,out]aVector object
[in,out]bResult vector

◆ applyt() [1/2]

generic applyt ( class(oft_cmatrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)

Compute matrix-vector product for matrix transpose.

b = self^T * a

Parameters
[in,out]selfMatrix object
[in,out]aVector object
[in,out]bResult vector

◆ applyt() [2/2]

generic applyt ( class(oft_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)

Compute matrix-vector product for matrix transpose.

Parameters
[in,out]aSource vector
[in,out]bResult of matrix product

◆ applyt_complex()

procedure(cmat_apply_cvec), deferred applyt_complex ( class(oft_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
pure virtual
Parameters
[in,out]aSource vector
[in,out]bResult of matrix product

◆ applyt_real()

procedure applyt_real ( class(oft_cmatrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)

Apply matrix vector product for matrix transpose.

b = self^T * a

Parameters
[in,out]selfMatrix object
[in,out]aVector object
[in,out]bResult vector

◆ assemble()

procedure(cmat_assemble), deferred assemble ( class(oft_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), optional, target  diag 
)
pure virtual

Complete matrix assembly.

Parameters
[in,out]diagDiagonal entries of matrix [nr] (optional)

◆ atomic_add_values()

procedure(cmat_add_values), deferred atomic_add_values ( class(oft_cmatrix), intent(inout)  self,
integer(i4), dimension(n), intent(in)  i_inds,
integer(i4), dimension(m), intent(in)  j_inds,
complex(c8), dimension(n,m), intent(in)  b,
integer(i4), intent(in)  n,
integer(i4), intent(in)  m,
integer(i4), intent(in), optional  iblock,
integer(i4), intent(in), optional  jblock,
integer(i4), dimension(n,m), intent(inout), optional  loc_cache 
)
pure virtual

Add values atomically to the matrix.

Parameters
[in]i_indsRow indices of entries to add [n]
[in]j_indsColumn indices of entries to add [m]
[in]bValues to add [n,m]
[in]nNumber of rows in local matrix
[in]mNumber of columns in local matrix
[in]iblockRow block (optional)
[in]jblockColumn block (optional)
[in,out]loc_cacheCache of entry locations

◆ delete()

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

Delete matrix.

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

◆ set_values()

procedure(cmat_set_values), deferred set_values ( class(oft_cmatrix), intent(inout)  self,
integer(i4), dimension(n), intent(in)  i_inds,
integer(i4), dimension(m), intent(in)  j_inds,
complex(c8), dimension(n,m), intent(in)  b,
integer(i4), intent(in)  n,
integer(i4), intent(in)  m,
integer(i4), intent(in), optional  iblock,
integer(i4), intent(in), optional  jblock 
)
pure virtual

Set values of the matrix.

Parameters
[in]i_indsRow indices of entries to set [n]
[in]j_indsColumn indices of entries to set [m]
[in]bValues to set [n,m]
[in]nNumber of rows in local matrix
[in]mNumber of columns in local matrix
[in]iblockRow block (optional)
[in]jblockColumn block (optional)

◆ zero()

procedure(cmat_zero), deferred zero ( class(oft_cmatrix), intent(inout)  self)
pure virtual

Zero all elements.

◆ zero_rows()

procedure(cmat_zero_rows), deferred zero_rows ( class(oft_cmatrix), intent(inout)  self,
integer(i4), intent(in)  nrows,
integer(i4), dimension(nrows), intent(in)  irows,
integer(i4), intent(in), optional  iblock,
logical, intent(in), optional  keep_diag 
)
pure virtual

Zero all elements in a given row.

Parameters
[in]nrowsNumber of rows to zero
[in]irowsIndices of rows to zero [nrows]
[in]iblockRow block (optional)
[in]keep_diagKeep diagonal entries

Member Data Documentation

◆ d

class(oft_cvector), pointer d => NULL()

Diagonal entries for scaling.

◆ force_local

logical force_local = .FALSE.

Do not stitch resulting vector (Native ONLY)

◆ i_map

type(oft_map), dimension(:), pointer i_map => NULL()

Row block mapping.

◆ j_map

type(oft_map), dimension(:), pointer j_map => NULL()

Column block mapping.

◆ nc

integer(i4) nc

Local number of columns.

◆ ncg

integer(i8) ncg

Gobal number of columns.

◆ ncslice

integer(i4) ncslice = 0

Number of owned columns.

◆ ni

integer(i4) ni = 0

Number of row blocks.

◆ nj

integer(i4) nj = 0

Number of column blocks.

◆ nr

integer(i4) nr

Local number of rows.

◆ nrg

integer(i8) nrg

Gobal number of rows.

◆ nrslice

integer(i4) nrslice = 0

Number of owned rows.


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