|
The Open FUSION Toolkit 1.0.0-beta5
Modeling tools for plasma and fusion research and engineering
|
PETSc vector implementation.
Data Types | |
| type | oft_petsc_matrix |
| PETSc matrix class. More... | |
| type | oft_petsc_vector |
| PETSc vector class. More... | |
Functions/Subroutines | |
| subroutine | mat_add_values (self, i_inds, j_inds, b, n, m, iblock, jblock, loc_cache) |
| Add values to a PETSc matrix. | |
| subroutine | mat_apply_cvec (self, a, b) |
| Apply the matrix to a field. | |
| subroutine | mat_apply_vec (self, a, b) |
| Apply the matrix to a field. | |
| subroutine | mat_applyt_cvec (self, a, b) |
| Apply the matrix to a field. | |
| subroutine | mat_applyt_vec (self, a, b) |
| Apply the matrix to a field. | |
| subroutine | mat_assemble (self, diag) |
| Finish assembly of matrix. | |
| subroutine | mat_delete (self) |
| Delete matrix. | |
| subroutine | mat_set_values (self, i_inds, j_inds, b, n, m, iblock, jblock) |
| Set values of a PETSc 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. | |
| integer(i4) function | oft_petsc_matrix_cast (self, source) |
| Attempt to cast a matrix object to a oft_petsc_matrix. | |
| integer(i4) function | oft_petsc_vector_cast (self, source) |
| Cast oft_vector to oft_petsc_la::oft_petsc_vector. | |
| subroutine | vec_add (self, gamma, alpha, a, beta, b) |
| Add vectors. | |
| subroutine | vec_delete (self) |
| Finalize vector. | |
| function | vec_dot_cvec (self, a) |
| Dot product with a second vector. | |
| real(r8) function | vec_dot_vec (self, a) |
| Dot product with a second vector. | |
| subroutine | vec_get_local (self, array, iblock) |
| Set all elements to a scalar. | |
| subroutine | vec_get_slice (self, array, iblock) |
| Set all elements to a scalar. | |
| real(r8) function, dimension(n) | vec_mdot_cvec (self, a, n) |
| Dot product with a second vector. | |
| real(r8) function, dimension(n) | vec_mdot_vec (self, a, n) |
| Dot product with a second vector. | |
| subroutine | vec_mult (self, a, div_flag) |
| Multiply fields element by element. | |
| subroutine | vec_new_cvec (self, new) |
| Create a new vector as a bare copy. | |
| subroutine | vec_new_vec (self, new) |
| Create a new vector as a bare copy. | |
| real(r8) function | vec_norm (self, itype) |
| Norm of a vector. | |
| subroutine | vec_restore_local (self, array, iblock, add, wait) |
| Set all elements to a scalar. | |
| subroutine | vec_restore_slice (self, array, iblock, wait) |
| Set all elements to a scalar. | |
| subroutine | vec_scale (self, alpha) |
| Scale vector by a scalar. | |
| subroutine | vec_set (self, alpha, iblock, random) |
| Set all elements to a scalar or random number. | |
| subroutine | vec_stitch (self, up_method) |
| Perform global stitching. | |
| real(r8) function | vec_sum (self) |
| Sum reduction over a vector. | |
|
private |
Add values to a PETSc matrix.
| [in] | i_inds | Row indices of entries to set [n] |
| [in] | j_inds | Column indices of entries to set [m] |
| [in] | b | Values to add [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 |
Apply the matrix to a field.
b = self * a
| [in] | a | Source field |
| [out] | b | Result of matrix product |
|
private |
Apply the matrix to a field.
b = self * a
| [in] | a | Source field |
| [out] | b | Result of matrix product |
|
private |
Apply the matrix to a field.
b = self * a
| [in] | a | Source field |
| [out] | b | Result of matrix product |
|
private |
Apply the matrix to a field.
b = self * a
| [in] | a | Source field |
| [out] | b | Result of matrix product |
|
private |
Finish assembly of matrix.
| [in,out] | diag | Diagonal entries of matrix [nr] (optional) |
|
private |
Delete matrix.
|
private |
Set values of a PETSc matrix.
| [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.
|
private |
Zero all entries in the specified rows.
| [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 |
|
private |
Attempt to cast a matrix object to a oft_petsc_matrix.
The source matrix must be oft_petsc_matrix or a child class, otherwise an error will be thrown
| [out] | self | Pointer to cast oft_petsc_matrix |
| [in] | source | Source matrix to cast |
| integer(i4) function oft_petsc_vector_cast | ( | class(oft_petsc_vector), intent(out), pointer | self, |
| class(oft_vector), intent(in), target | source | ||
| ) |
Cast oft_vector to oft_petsc_la::oft_petsc_vector.
| [out] | self | Object of desired type, unassociated if cast fails |
| [in] | source | Source object to cast |
|
private |
Add vectors.
self = \( \gamma \) self + \( \alpha \) a + \( \beta \) b
| [in] | gamma | Scale of source vector |
| [in] | alpha | Scale of first vector |
| [in] | a | First vector to add |
| [in] | beta | Scale of second vector (optional) |
| [in] | b | Second vector to add (optional) |
|
private |
Finalize vector.
|
private |
Dot product with a second vector.
| [in] | a | Second vector for dot product |
|
private |
Dot product with a second vector.
| [in] | a | Second vector for dot product |
|
private |
Set all elements to a scalar.
| [in] | alpha | Updated field value |
|
private |
Set all elements to a scalar.
| [in] | alpha | Updated field value |
|
private |
Dot product with a second vector.
| [in] | a | Second vector for dot product |
|
private |
Dot product with a second vector.
| [in] | a | Second vector for dot product |
|
private |
Multiply fields element by element.
\( self_i = self_i * a_i \)
| [in] | a | First field to add |
|
private |
Create a new vector as a bare copy.
Creates a new vector of the same size and with the same gobal mapping. The new vector is also initialized to 0.
| [out] | new | New vector |
|
private |
Create a new vector as a bare copy.
Creates a new vector of the same size and with the same gobal mapping. The new vector is also initialized to 0.
| [out] | new | New vector |
|
private |
Norm of a vector.
| [in] | itype | Type of norm (1-> 1-norm, 2-> 2-norm, 3-> Inf-norm) |
|
private |
Set all elements to a scalar.
| [in] | alpha | Updated field value |
|
private |
Set all elements to a scalar.
| [in] | alpha | Updated field value |
|
private |
Scale vector by a scalar.
self = \( \alpha \) self
| [in] | alpha | Factor to scale field |
|
private |
Set all elements to a scalar or random number.
| [in] | alpha | Updated vector value |
| [in] | random | Set to random number, if true alpha is ignored (optional) |
|
private |
Perform global stitching.
| [in] | up_method | Type of stitching to perform |
|
private |
Sum reduction over a vector.