The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
oft_deriv_matrices Module Reference

Detailed Description

Abstract operator interfaces and native matrix implementations.

Abstract interface definitions

Native vector implementations

Authors
Chris Hansen
Date
Feburary 2012

Data Types

type  oft_diagmatrix
 Diagonal matrix class. More...
 
type  oft_mf_matrix
 Wrapper matrix for matrix-free Jacobians. More...
 
type  oft_noop_cmatrix
 Needs docs. More...
 
type  oft_noop_matrix
 Needs docs. More...
 
type  oft_sum_cmatrix
 Sum matrix class M = beta*J + alam*K. More...
 
type  oft_sum_matrix
 Sum matrix class M = beta*J + alam*K. More...
 

Functions/Subroutines

subroutine cnoop_add_values (self, i_inds, j_inds, b, n, m, iblock, jblock, loc_cache)
 Add values to a matrix.
 
subroutine cnoop_apply_comp (self, a, b)
 Apply the matrix to a field.
 
subroutine cnoop_apply_real (self, a, b)
 Apply the matrix to a field.
 
subroutine cnoop_applyt (self, a, b)
 Apply the matrix to a field.
 
subroutine cnoop_assemble (self, diag)
 Finish assembly of matrix and optionally extract diagonals.
 
subroutine cnoop_delete (self)
 Delete matrix.
 
subroutine cnoop_set_values (self, i_inds, j_inds, b, n, m, iblock, jblock)
 Set values of a matrix.
 
subroutine cnoop_zero (self)
 Zero all entries in matrix.
 
subroutine cnoop_zero_rows (self, nrows, irows, iblock, keep_diag)
 Zero all entries in the specified rows.
 
subroutine, public create_diagmatrix (self, a)
 Needs docs.
 
subroutine diagmat_add_values (self, i_inds, j_inds, b, n, m, iblock, jblock, loc_cache)
 Add values to a matrix.
 
subroutine diagmat_apply_comp (self, a, b)
 Apply the matrix to a field.
 
subroutine diagmat_apply_real (self, a, b)
 Apply the matrix to a field.
 
subroutine diagmat_assemble (self, diag)
 Finish assembly of matrix and optionally extract diagonals.
 
subroutine diagmat_delete (self)
 Delete matrix.
 
subroutine diagmat_set_values (self, i_inds, j_inds, b, n, m, iblock, jblock)
 Set values of a matrix.
 
subroutine diagmat_zero (self)
 Zero all entries in matrix.
 
subroutine diagmat_zero_rows (self, nrows, irows, iblock, keep_diag)
 Zero all entries in the specified rows.
 
logical function diagmatrix_cast (self, source)
 Cast a matrix object to a oft_diagmatrix.
 
subroutine mf_mat_apply_real (self, a, b)
 Compute matrix vector product.
 
subroutine mf_mat_delete (self)
 Cleanup internal storage and reset defaults.
 
subroutine mf_mat_setup (self, a, f, utyp)
 Setup matrix-free Jacobian operator.
 
subroutine mf_mat_update (self, a)
 Update linearization point for matrix-free Jacobian.
 
subroutine noop_add_values (self, i_inds, j_inds, b, n, m, iblock, jblock, loc_cache)
 Add values to a matrix.
 
subroutine noop_apply_comp (self, a, b)
 Apply the matrix to a field.
 
subroutine noop_apply_real (self, a, b)
 Apply the matrix to a field.
 
subroutine noop_applyt (self, a, b)
 Apply the matrix to a field.
 
subroutine noop_assemble (self, diag)
 Finish assembly of matrix and optionally extract diagonals.
 
subroutine noop_delete (self)
 Delete matrix.
 
subroutine noop_set_values (self, i_inds, j_inds, b, n, m, iblock, jblock)
 Set values of a matrix.
 
subroutine noop_zero (self)
 Zero all entries in matrix.
 
subroutine noop_zero_rows (self, nrows, irows, iblock, keep_diag)
 Zero all entries in the specified rows.
 
subroutine sum_cmat_apply_comp (self, a, b)
 Compute matrix vector product.
 
subroutine sum_cmat_apply_real (self, a, b)
 Compute matrix vector product (real)
 
subroutine sum_cmat_applyt_comp (self, a, b)
 Compute matrix vector product for matrix transpose.
 
subroutine sum_cmat_applyt_real (self, a, b)
 Compute matrix vector product for matrix transpose (real)
 
subroutine sum_cmat_assemble (self, diag)
 Finish assembly of matrix and optionally extract diagonals.
 
subroutine sum_mat_apply_comp (self, a, b)
 Compute matrix vector product (complex)
 
subroutine sum_mat_apply_real (self, a, b)
 Compute matrix vector product.
 
subroutine sum_mat_applyt_comp (self, a, b)
 Compute matrix vector product for matrix transpose (complex)
 
subroutine sum_mat_applyt_real (self, a, b)
 Compute matrix vector product for matrix transpose.
 
subroutine sum_mat_assemble (self, diag)
 Finish assembly of matrix and optionally extract diagonals.
 
logical function sum_matrix_cast (self, source)
 Cast a matrix object to a sum_matrix_cast.
 

Function/Subroutine Documentation

◆ cnoop_add_values()

subroutine cnoop_add_values ( class(oft_noop_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 
)
private

Add values to a matrix.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
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

◆ cnoop_apply_comp()

subroutine cnoop_apply_comp ( class(oft_noop_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Apply the matrix to a field.

b = self * a

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in,out]aSource field
[in,out]bResult of matrix product

◆ cnoop_apply_real()

subroutine cnoop_apply_real ( class(oft_noop_cmatrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Apply the matrix to a field.

b = self * a

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in,out]aSource field
[in,out]bResult of matrix product

◆ cnoop_applyt()

subroutine cnoop_applyt ( class(oft_noop_cmatrix), intent(inout)  self,
class(oft_vector), intent(inout)  a,
class(oft_cvector), intent(inout)  b 
)
private

Apply the matrix to a field.

b = selfT * a

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in,out]aSource field
[in,out]bResult of matrix product

◆ cnoop_assemble()

subroutine cnoop_assemble ( class(oft_noop_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), optional, target  diag 
)
private

Finish assembly of matrix and optionally extract diagonals.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in,out]diagDiagonal entries of matrix [nr] (optional)

◆ cnoop_delete()

subroutine cnoop_delete ( class(oft_noop_cmatrix), intent(inout)  self)
private

Delete matrix.

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

◆ cnoop_set_values()

subroutine cnoop_set_values ( class(oft_noop_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 
)
private

Set values of a matrix.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
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)

◆ cnoop_zero()

subroutine cnoop_zero ( class(oft_noop_cmatrix), intent(inout)  self)
private

Zero all entries in matrix.

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

◆ cnoop_zero_rows()

subroutine cnoop_zero_rows ( class(oft_noop_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 
)
private

Zero all entries in the specified rows.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in]nrowsNumber of rows to zero
[in]irowsIndices of rows to zero [nrows]
[in]iblockRow block (optional)
[in]keep_diagKeep diagonal entries

◆ create_diagmatrix()

subroutine, public create_diagmatrix ( class(oft_matrix), intent(inout), pointer  self,
class(oft_vector), intent(inout)  a 
)

Needs docs.

◆ diagmat_add_values()

subroutine diagmat_add_values ( class(oft_diagmatrix), intent(inout)  self,
integer(i4), dimension(n), intent(in)  i_inds,
integer(i4), dimension(m), intent(in)  j_inds,
real(r8), 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 
)
private

Add values to a matrix.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in,out]selfMatrix object
[in]i_indsRow indices of entries to add [n]
[in]j_indsColumn indices of entries to add [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)
[in,out]loc_cacheCache of entry locations

◆ diagmat_apply_comp()

subroutine diagmat_apply_comp ( class(oft_diagmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Apply the matrix to a field.

b = self * a

Parameters
[in,out]aSource field

◆ diagmat_apply_real()

subroutine diagmat_apply_real ( class(oft_diagmatrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_vector), intent(inout)  b 
)
private

Apply the matrix to a field.

b = self * a

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

◆ diagmat_assemble()

subroutine diagmat_assemble ( class(oft_diagmatrix), intent(inout)  self,
class(oft_vector), intent(inout), optional, target  diag 
)
private

Finish assembly of matrix and optionally extract diagonals.

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

◆ diagmat_delete()

subroutine diagmat_delete ( class(oft_diagmatrix), intent(inout)  self)
private

Delete matrix.

◆ diagmat_set_values()

subroutine diagmat_set_values ( class(oft_diagmatrix), intent(inout)  self,
integer(i4), dimension(n), intent(in)  i_inds,
integer(i4), dimension(m), intent(in)  j_inds,
real(r8), 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 
)
private

Set values of a matrix.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
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)

◆ diagmat_zero()

subroutine diagmat_zero ( class(oft_diagmatrix), intent(inout)  self)
private

Zero all entries in matrix.

◆ diagmat_zero_rows()

subroutine diagmat_zero_rows ( class(oft_diagmatrix), 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 
)
private

Zero all entries in the specified rows.

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

◆ diagmatrix_cast()

logical function diagmatrix_cast ( class(oft_diagmatrix), intent(out), pointer  self,
class(oft_matrix), intent(in), target  source 
)
private

Cast a matrix object to a oft_diagmatrix.

The source matrix must be oft_diagmatrix or a child class, otherwise pointer will be returned as null and success == .FALSE.

Parameters
[out]selfReference to source object with desired class
[in]sourceSource matrix to cast
Returns
Cast success flag

◆ mf_mat_apply_real()

subroutine mf_mat_apply_real ( class(oft_mf_matrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_vector), intent(inout)  b 
)
private

Compute matrix vector product.

b = (selff(a) - selff0)/eps

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

◆ mf_mat_delete()

subroutine mf_mat_delete ( class(oft_mf_matrix), intent(inout)  self)
private

Cleanup internal storage and reset defaults.

Parameters
[in,out]selfMatrix object

◆ mf_mat_setup()

subroutine mf_mat_setup ( class(oft_mf_matrix), intent(inout)  self,
class(oft_vector), intent(inout)  a,
class(oft_matrix), intent(in), target  f,
class(oft_vector), intent(inout), optional  utyp 
)
private

Setup matrix-free Jacobian operator.

Parameters
[in,out]selfMatrix object
[in,out]aVector defining domain and range spaces
[in]fNon-linear function defining the Jacobian
[in,out]utypVector of "typical sizes" (optional)

◆ mf_mat_update()

subroutine mf_mat_update ( class(oft_mf_matrix), intent(inout)  self,
class(oft_vector), intent(inout)  a 
)
private

Update linearization point for matrix-free Jacobian.

Parameters
[in,out]selfMatrix object
[in,out]aNew linearization point

◆ noop_add_values()

subroutine noop_add_values ( class(oft_noop_matrix), intent(inout)  self,
integer(i4), dimension(n), intent(in)  i_inds,
integer(i4), dimension(m), intent(in)  j_inds,
real(r8), 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 
)
private

Add values to a matrix.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in]i_indsRow indices of entries to add [n]
[in]j_indsColumn indices of entries to add [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)
[in,out]loc_cacheCache of entry locations

◆ noop_apply_comp()

subroutine noop_apply_comp ( class(oft_noop_matrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Apply the matrix to a field.

b = self * a

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in,out]aSource field
[in,out]bResult of matrix product

◆ noop_apply_real()

subroutine noop_apply_real ( class(oft_noop_matrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_vector), intent(inout)  b 
)

Apply the matrix to a field.

b = self * a

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in,out]aSource field
[in,out]bResult of matrix product

◆ noop_applyt()

subroutine noop_applyt ( class(oft_noop_matrix), intent(inout)  self,
class(oft_vector), intent(inout)  a,
class(oft_vector), intent(inout)  b 
)
private

Apply the matrix to a field.

b = self^T * a

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in,out]aSource field
[in,out]bResult of matrix product

◆ noop_assemble()

subroutine noop_assemble ( class(oft_noop_matrix), intent(inout)  self,
class(oft_vector), intent(inout), optional, target  diag 
)
private

Finish assembly of matrix and optionally extract diagonals.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in,out]diagDiagonal entries of matrix [nr] (optional)

◆ noop_delete()

subroutine noop_delete ( class(oft_noop_matrix), intent(inout)  self)
private

Delete matrix.

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

◆ noop_set_values()

subroutine noop_set_values ( class(oft_noop_matrix), intent(inout)  self,
integer(i4), dimension(n), intent(in)  i_inds,
integer(i4), dimension(m), intent(in)  j_inds,
real(r8), 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 
)
private

Set values of a matrix.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
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)

◆ noop_zero()

subroutine noop_zero ( class(oft_noop_matrix), intent(inout)  self)
private

Zero all entries in matrix.

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

◆ noop_zero_rows()

subroutine noop_zero_rows ( class(oft_noop_matrix), 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 
)
private

Zero all entries in the specified rows.

Note
This subroutine is a dummy routine used to specify the interface of the member function and catch errors in uninitialized matrices
Parameters
[in]nrowsNumber of rows to zero
[in]irowsIndices of rows to zero [nrows]
[in]iblockRow block (optional)
[in]keep_diagKeep diagonal entries

◆ sum_cmat_apply_comp()

subroutine sum_cmat_apply_comp ( class(oft_sum_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Compute matrix vector product.

b = (selfbeta*selfJ + selfalam*selfK) * a

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

◆ sum_cmat_apply_real()

subroutine sum_cmat_apply_real ( class(oft_sum_cmatrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Compute matrix vector product (real)

b = (selfbeta*selfJ + selfalam*selfK) * a

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

◆ sum_cmat_applyt_comp()

subroutine sum_cmat_applyt_comp ( class(oft_sum_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Compute matrix vector product for matrix transpose.

b = selfbeta*selfJ^T + selfalam*selfK^T * a

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

◆ sum_cmat_applyt_real()

subroutine sum_cmat_applyt_real ( class(oft_sum_cmatrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Compute matrix vector product for matrix transpose (real)

b = selfbeta*selfJ^T + selfalam*selfK^T * a

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

◆ sum_cmat_assemble()

subroutine sum_cmat_assemble ( class(oft_sum_cmatrix), intent(inout)  self,
class(oft_cvector), intent(inout), optional, target  diag 
)
private

Finish assembly of matrix and optionally extract diagonals.

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

◆ sum_mat_apply_comp()

subroutine sum_mat_apply_comp ( class(oft_sum_matrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Compute matrix vector product (complex)

b = (selfbeta*selfJ + selfalam*selfK) * a

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

◆ sum_mat_apply_real()

subroutine sum_mat_apply_real ( class(oft_sum_matrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_vector), intent(inout)  b 
)
private

Compute matrix vector product.

b = (selfbeta*selfJ + selfalam*selfK) * a

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

◆ sum_mat_applyt_comp()

subroutine sum_mat_applyt_comp ( class(oft_sum_matrix), intent(inout)  self,
class(oft_cvector), intent(inout), target  a,
class(oft_cvector), intent(inout)  b 
)
private

Compute matrix vector product for matrix transpose (complex)

b = selfbeta*selfJ^T + selfalam*selfK^T * a

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

◆ sum_mat_applyt_real()

subroutine sum_mat_applyt_real ( class(oft_sum_matrix), intent(inout)  self,
class(oft_vector), intent(inout), target  a,
class(oft_vector), intent(inout)  b 
)
private

Compute matrix vector product for matrix transpose.

b = selfbeta*selfJ^T + selfalam*selfK^T * a

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

◆ sum_mat_assemble()

subroutine sum_mat_assemble ( class(oft_sum_matrix), intent(inout)  self,
class(oft_vector), intent(inout), optional, target  diag 
)
private

Finish assembly of matrix and optionally extract diagonals.

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

◆ sum_matrix_cast()

logical function sum_matrix_cast ( class(oft_sum_matrix), intent(out), pointer  self,
class(oft_matrix), intent(in), target  source 
)
private

Cast a matrix object to a sum_matrix_cast.

The source matrix must be sum_matrix_cast or a child class, otherwise pointer will be returned as null and success == .FALSE.

Parameters
[out]selfReference to source object with desired class
[in]sourceSource matrix to cast
Returns
Cast success flag