The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
|
PETSc vector implementation.
Data Types | |
type | oft_petsc_matrix |
PETSc matrix implementation. More... | |
type | oft_petsc_vector |
PETSc vector implementation. More... | |
Functions/Subroutines | |
subroutine | mat_add_values (self, i_inds, j_inds, b, n, m, iblock, jblock, loc_cache) |
Add values to a matrix. | |
subroutine | mat_apply_cvec (self, a, b) |
Compute matrix-vector product (complex) | |
subroutine | mat_apply_vec (self, a, b) |
Compute matrix-vector product. | |
subroutine | mat_applyt_cvec (self, a, b) |
Apply matrix vector product for matrix transpose (complex vector) | |
subroutine | mat_applyt_vec (self, a, b) |
Apply matrix vector product for matrix transpose. | |
subroutine | mat_assemble (self, diag) |
Finish assembly of matrix and optionally extract diagonals. | |
subroutine | mat_delete (self) |
Delete matrix. | |
subroutine | mat_set_values (self, i_inds, j_inds, b, n, m, iblock, jblock) |
Set values of a matrix. | |
subroutine | mat_zero (self) |
Zero all entries in matrix. | |
subroutine | mat_zero_rows (self, nrows, irows, iblock, keep_diag) |
Zero all entries in the specified rows. | |
logical function, public | oft_petsc_matrix_cast (self, source) |
Cast a oft_matrix object to a oft_petsc_matrix. | |
logical function, public | oft_petsc_vector_cast (self, source) |
Cast a vector object to a oft_petsc_vector. | |
subroutine | vec_add (self, gamma, alpha, a, beta, b) |
Add vectors. | |
subroutine | vec_delete (self) |
Finalize vector. | |
complex(c8) function | vec_dot_cvec (self, a) |
Dot product with a complex vector. | |
real(r8) function | vec_dot_vec (self, a) |
Dot product with a vector. | |
subroutine | vec_get_local (self, array, iblock) |
Get local values from vector. | |
subroutine | vec_get_slice (self, array, iblock) |
Get values for locally-owned portion of vector (slice) | |
complex(c8) function, dimension(n) | vec_mdot_cvec (self, a, n) |
Dot product with an array of complex vectors. | |
real(r8) function, dimension(n) | vec_mdot_vec (self, a, n) |
Dot product with an array of vectors. | |
subroutine | vec_mult (self, a, div_flag) |
Elementwise multiplication with another vector. | |
subroutine | vec_new_cvec (self, new) |
Create a new complex vector as a bare copy of self | |
subroutine | vec_new_vec (self, new) |
Create a new vector as a bare copy of self | |
real(r8) function | vec_norm (self, itype) |
Compute norm of vector. | |
subroutine | vec_restore_local (self, array, iblock, add, wait) |
Set/add local values to vector. | |
subroutine | vec_restore_slice (self, array, iblock, wait) |
Set/add values for locally-owned portion of vector (slice) | |
subroutine | vec_scale (self, alpha) |
Scale vector by a scalar. | |
subroutine | vec_set (self, alpha, iblock, random) |
Set all elements to a scalar. | |
subroutine | vec_stitch (self, up_method) |
Perform global stitching. | |
real(r8) function | vec_sum (self) |
Sum reduction over vector. | |
|
private |
Add values to a matrix.
[in,out] | self | Matrix object |
[in] | i_inds | Row indices of entries to add [n] |
[in] | j_inds | Column indices of entries to add [m] |
[in] | b | Values to set [n,m] |
[in] | n | Number of rows in local matrix |
[in] | m | Number of columns in local matrix |
[in] | iblock | Row block (optional) |
[in] | jblock | Column block (optional) |
[in,out] | loc_cache | Cache of entry locations |
|
private |
Compute matrix-vector product (complex)
b = self * a
[in,out] | self | Matrix object |
[in,out] | a | Source vector |
[in,out] | b | Result of matrix product |
|
private |
Compute matrix-vector product.
b = self * a
[in,out] | self | Matrix object |
[in,out] | a | Source vector |
[in,out] | b | Result of matrix product |
|
private |
Apply matrix vector product for matrix transpose (complex vector)
b = self^T * a
[in,out] | self | Matrix object |
[in,out] | a | Source vector |
[in,out] | b | Result of matrix product |
|
private |
Apply matrix vector product for matrix transpose.
b = self^T * a
[in,out] | self | Matrix object |
[in,out] | a | Source vector |
[in,out] | b | Result of matrix product |
|
private |
Finish assembly of matrix and optionally extract diagonals.
[in,out] | self | Matrix object |
[in,out] | diag | Diagonal entries of matrix [nr] (optional) |
|
private |
Delete matrix.
[in,out] | self | Matrix object |
|
private |
Set values of a matrix.
[in,out] | self | Matrix object |
[in] | i_inds | Row indices of entries to set [n] |
[in] | j_inds | Column indices of entries to set [m] |
[in] | b | Values to set [n,m] |
[in] | n | Number of rows in local matrix |
[in] | m | Number of columns in local matrix |
[in] | iblock | Row block (optional) |
[in] | jblock | Column block (optional) |
|
private |
Zero all entries in matrix.
[in,out] | self | Matrix object |
|
private |
Zero all entries in the specified rows.
[in,out] | self | Matrix object |
[in] | nrows | Number of rows to zero |
[in] | irows | Indices of rows to zero [nrows] |
[in] | iblock | Row block (optional) |
[in] | keep_diag | Keep diagonal entries |
logical function, public oft_petsc_matrix_cast | ( | class(oft_petsc_matrix), intent(out), pointer | self, |
class(oft_matrix), intent(in), target | source | ||
) |
Cast a oft_matrix object to a oft_petsc_matrix.
The source matrix must be oft_petsc_matrix or a child class, otherwise pointer will be returned as null
and success == .FALSE.
[out] | self | Reference to source object with desired class |
[in] | source | Source solver to cast |
logical function, public oft_petsc_vector_cast | ( | class(oft_petsc_vector), intent(out), pointer | self, |
class(oft_vector), intent(in), target | source | ||
) |
Cast a vector object to a oft_petsc_vector.
The source vector must be oft_petsc_vector or a child class, otherwise pointer will be returned as null
and success == .FALSE.
[out] | self | Reference to source object with desired class |
[in] | source | Source solver to cast |
|
private |
Add vectors.
self = \( \gamma \) self + \( \alpha \) a + \( \beta \) b
[in,out] | self | Vector object |
[in] | gamma | Scale of source vector |
[in] | alpha | Scale of first vector |
[in,out] | a | First vector to add |
[in] | beta | Scale of second vector (optional) |
[in,out] | b | Second vector to add (optional) |
|
private |
Finalize vector.
[in,out] | self | Vector object |
|
private |
Dot product with a complex vector.
[in,out] | self | Vector object |
[in,out] | a | Second vector for dot product |
|
private |
Dot product with a vector.
[in,out] | self | Vector object |
[in,out] | a | Second vector for dot product |
|
private |
Get local values from vector.
[in,out] | self | Vector object |
[in,out] | array | Local values |
[in] | iblock | Sub-block to retrieve |
|
private |
Get values for locally-owned portion of vector (slice)
[in,out] | self | Vector object |
[in,out] | array | Slice values |
[in] | iblock | Sub-block to retrieve |
|
private |
Dot product with an array of complex vectors.
[in,out] | self | Vector object |
[in,out] | a | Array of vectors for dot product [n] |
[in] | n | Length of vector array |
|
private |
Dot product with an array of vectors.
[in,out] | self | Vector object |
[in,out] | a | Array of vectors for dot product [n] |
[in] | n | Length of vector array |
|
private |
Elementwise multiplication with another vector.
\( self_i = self_i * a_i \)
[in,out] | self | Vector object |
[in,out] | a | vector for multiplication |
[in] | div_flag | Divide instead of multiply? |
|
private |
Create a new complex vector as a bare copy of self
[in] | self | Vector object |
[out] | new | New vector |
|
private |
Create a new vector as a bare copy of self
[in] | self | Vector object |
[out] | new | New vector |
|
private |
Compute norm of vector.
[in,out] | self | Vector object |
[in] | itype | Type of norm (1-> 1-norm, 2-> 2-norm, 3-> Inf-norm) |
|
private |
Set/add local values to vector.
[in,out] | self | Vector object |
[in] | array | Local values |
[in] | iblock | Sub-block to restore |
[in] | add | Add values instead of replace |
[in] | wait | Wait to perform global sync |
|
private |
Set/add values for locally-owned portion of vector (slice)
[in,out] | self | Vector object |
[in] | array | Slice values |
[in] | iblock | Sub-block to restore |
[in] | wait | Wait to perform global sync? |
|
private |
Scale vector by a scalar.
[in,out] | self | Vector object |
[in] | alpha | Scale factor |
|
private |
Set all elements to a scalar.
[in,out] | self | Vector object |
[in] | alpha | Updated vector value |
[in] | iblock | Vector sub-block to act on |
[in] | random | Set to random number, if true alpha is ignored (optional) |
|
private |
Perform global stitching.
[in,out] | self | Vector object |
[in] | up_method | Type of stitching to perform |
|
private |
Sum reduction over vector.
[in,out] | self | Vector object |