The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
|
Wrapper matrix for matrix-free Jacobians.
Computes a Finite Difference approximation to the Jacobian of a function \( F'(v) = [F(u0 + h * v) - F(u0)]/h \)
Public Member Functions | |
procedure | add_values (self, i_inds, j_inds, b, n, m, iblock, jblock, loc_cache) |
Add values to a matrix. | |
procedure(mat_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 | apply_complex (self, a, b) |
Compute matrix vector product (complex) | |
procedure | apply_real (self, a, b) |
Apply the matrix to a field. | |
procedure | apply_real (self, a, b) |
Compute matrix vector product. | |
procedure(mat_apply_vec), deferred | apply_real (self, a, b) |
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 | applyt_complex (self, a, b) |
Apply the matrix to a field. | |
procedure | applyt_complex (self, a, b) |
Apply matrix vector product for matrix transpose (complex vector) | |
procedure | applyt_real (self, a, b) |
Apply the matrix to a field. | |
procedure(mat_apply_vec), deferred | applyt_real (self, a, b) |
procedure | assemble (self, diag) |
Finish assembly of matrix and optionally extract diagonals. | |
procedure(mat_assemble), deferred | assemble (self, diag) |
Complete matrix assembly. | |
procedure | atomic_add_values (self, i_inds, j_inds, b, n, m, iblock, jblock, loc_cache) |
Add values to a matrix. | |
procedure(mat_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 | delete (self) |
Cleanup internal storage. | |
procedure | delete (self) |
Delete matrix. | |
procedure | set_values (self, i_inds, j_inds, b, n, m, iblock, jblock) |
Set values of a matrix. | |
procedure(mat_set_values), deferred | set_values (self, i_inds, j_inds, b, n, m, iblock, jblock) |
Set values of the matrix. | |
procedure | setup (self, a, f, utyp) |
Setup MF jacobian operator. | |
procedure | update (self, a) |
Update linearization point. | |
procedure | zero (self) |
Zero all entries in matrix. | |
procedure(mat_zero), deferred | zero (self) |
Zero all elements. | |
procedure | zero_rows (self, nrows, irows, iblock, keep_diag) |
Zero all entries in the specified rows. | |
procedure(mat_zero_rows), deferred | zero_rows (self, nrows, irows, iblock, keep_diag) |
Zero all elements in a given row. | |
Public Attributes | |
real(r8) | b0 = 1.d-6 |
Approximate relative error in function eval. | |
class(oft_vector), pointer | d => NULL() |
Diagonal entries for scaling. | |
class(oft_matrix), pointer | f => NULL() |
Non-linear function. | |
class(oft_vector), pointer | f0 => NULL() |
Linearization value "F(u0)". | |
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(i4) | nc |
Local number of columns. | |
integer(i8) | ncg |
Gobal number of columns. | |
integer(i4) | ncslice = 0 |
Number of owned columns. | |
integer(i4) | ni = 0 |
Number of row blocks. | |
integer(i4) | nj = 0 |
Number of column blocks. | |
integer(i4) | nr |
Local number of rows. | |
integer(i8) | nrg |
Gobal number of rows. | |
integer(i4) | nrslice = 0 |
Number of owned rows. | |
class(oft_vector), pointer | tmp => NULL() |
Internal work vector. | |
class(oft_vector), pointer | u0 => NULL() |
Linearization point. | |
class(oft_vector), pointer | utyp => NULL() |
Typical values vector. | |
|
inherited |
Add values to a matrix.
[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 |
|
pure virtualinherited |
Add values to the 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 |
|
inherited |
Compute matrix-vector product.
[in,out] | self | Matrix object |
[in,out] | a | Source vector |
[in,out] | b | Result of matrix product |
|
inherited |
Compute matrix-vector product.
b = self * a
[in,out] | self | Matrix object |
[in,out] | a | Vector object |
[in,out] | b | Result vector |
|
inherited |
Compute matrix vector product (complex)
b = self * a
[in,out] | self | Matrix object |
[in,out] | a | Vector object |
[in,out] | b | Result vector |
|
inherited |
Apply the matrix to a field.
b = self * a
[in,out] | a | Source field |
[in,out] | b | Result of matrix product |
procedure apply_real | ( | class(oft_mf_matrix), intent(inout) | self, |
class(oft_vector), intent(inout), target | a, | ||
class(oft_vector), intent(inout) | b | ||
) |
Compute matrix vector product.
b = (selff(a) - selff0)/eps
[in,out] | self | Matrix object |
[in,out] | a | Vector object |
[in,out] | b | Result vector |
|
pure virtualinherited |
[in,out] | self | Matrix object |
[in,out] | a | Source vector |
[in,out] | b | Result of matrix product |
|
inherited |
Compute matrix-vector product for matrix transpose.
b = self^T * a
[in,out] | self | Matrix object |
[in,out] | a | Vector object |
[in,out] | b | Result vector |
|
inherited |
Compute matrix-vector product for matrix transpose.
[in,out] | self | Matrix object |
[in,out] | a | Source vector |
[in,out] | b | Result of matrix product |
|
inherited |
Apply the matrix to a field.
b = self * a
[in,out] | a | Source field |
[in,out] | b | Result of matrix product |
|
inherited |
Apply matrix vector product for matrix transpose (complex vector)
b = self^T * a
[in,out] | self | Matrix object |
[in,out] | a | Vector object |
[in,out] | b | Result vector |
|
inherited |
Apply the matrix to a field.
b = self * a
[in,out] | a | Source field |
[in,out] | b | Result of matrix product |
|
pure virtualinherited |
[in,out] | self | Matrix object |
[in,out] | a | Source vector |
[in,out] | b | Result of matrix product |
|
inherited |
Finish assembly of matrix and optionally extract diagonals.
[in,out] | diag | Diagonal entries of matrix [nr] (optional) |
|
pure virtualinherited |
Complete matrix assembly.
[in,out] | self | Matrix object |
[in,out] | diag | Diagonal entries of matrix [nr] (optional) |
|
inherited |
Add values to a matrix.
[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 |
|
pure virtualinherited |
Add values atomically to the 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 |
|
inherited |
Delete matrix.
procedure delete | ( | class(oft_mf_matrix), intent(inout) | self | ) |
Cleanup internal storage.
[in,out] | self | Matrix object |
|
inherited |
Delete matrix.
|
inherited |
Set values of a 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) |
|
pure virtualinherited |
Set values of the 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) |
procedure 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 | ||
) |
Setup MF jacobian operator.
[in,out] | self | Matrix object |
[in,out] | a | Vector defining domain and range spaces |
[in] | f | Non-linear function defining the Jacobian |
[in,out] | utyp | Vector of "typical sizes" (optional) |
procedure update | ( | class(oft_mf_matrix), intent(inout) | self, |
class(oft_vector), intent(inout) | a | ||
) |
Update linearization point.
[in,out] | self | Matrix object |
[in,out] | a | New linearization point |
|
inherited |
Zero all entries in matrix.
|
pure virtualinherited |
Zero all elements.
[in,out] | self | Matrix object |
|
inherited |
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 |
|
pure virtualinherited |
Zero all elements in a given row.
[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 |
|
inherited |
Diagonal entries for scaling.
class(oft_matrix), pointer f => NULL() |
Non-linear function.
class(oft_vector), pointer f0 => NULL() |
Linearization value "F(u0)".
|
inherited |
Do not stitch resulting vector? (Native ONLY)
|
inherited |
Row block mapping.
|
inherited |
Column block mapping.
|
inherited |
Local number of columns.
|
inherited |
Gobal number of columns.
|
inherited |
Number of owned columns.
|
inherited |
Number of row blocks.
|
inherited |
Number of column blocks.
|
inherited |
Local number of rows.
|
inherited |
Gobal number of rows.
|
inherited |
Number of owned rows.
class(oft_vector), pointer tmp => NULL() |
Internal work vector.
class(oft_vector), pointer u0 => NULL() |
Linearization point.
class(oft_vector), pointer utyp => NULL() |
Typical values vector.