|
The Open FUSION Toolkit 1.0.0-beta5
Modeling tools for plasma and fusion research and engineering
|
PETSc vector class.
Used for implementing composite fields in OFT with PETSc backend. Replacement for oft_vectors::oft_block_field when PETSc backend is being used.

Public Member Functions | |
| procedure(vec_add), deferred | add (self, gamma, alpha, a, beta, b) |
| Add fields. | |
| procedure | add (self, gamma, alpha, a, beta, b) |
| Add vectors. | |
| procedure | delete (self) |
| Delete field. | |
| procedure | delete (self) |
| Delete vector. | |
| generic | dot (self, a) |
| Dot product with a second field. | |
| generic | dot (self, a) |
| Dot product with a second field. | |
| procedure(vec_dot_cvec), deferred | dot_complex (self, a) |
| procedure | dot_complex (self, a) |
| Dot product with a second vector. | |
| procedure(vec_dot_vec), deferred | dot_real (self, a) |
| procedure | dot_real (self, a) |
| Dot product with a second vector. | |
| procedure(vec_get_local), deferred | get_local (self, array, iblock) |
| Get local portion of field. | |
| procedure | get_local (self, array, iblock) |
| Get local portion of field. | |
| procedure(vec_get_slice), deferred | get_slice (self, array, iblock) |
| Get owned portion of field. | |
| procedure | get_slice (self, array, iblock) |
| Get owned portion of field. | |
| generic | mdot (self, a, n) |
| Dot product with a set of fields. | |
| generic | mdot (self, a, n) |
| Dot product with a set of fields. | |
| procedure(vec_mdot_cvec), deferred | mdot_complex (self, a, n) |
| procedure | mdot_complex (self, a, n) |
| Dot product with a second vector. | |
| procedure(vec_mdot_vec), deferred | mdot_real (self, a, n) |
| procedure | mdot_real (self, a, n) |
| Dot product with a second vector. | |
| procedure(vec_mult), deferred | mult (self, a, div_flag) |
| Multiply fields element by element. | |
| procedure | mult (self, a, div_flag) |
| Multiply fields element by element. | |
| generic | new (self, new) |
| Create a new field as a bare copy. | |
| generic | new (self, new) |
| Create a new field as a bare copy. | |
| procedure(vec_new_cvec), deferred | new_complex (self, new) |
| procedure | new_complex (self, new) |
| Create a new vector as a bare copy. | |
| procedure(vec_new_vec), deferred | new_real (self, new) |
| procedure | new_real (self, new) |
| Create a new vector as a bare copy. | |
| procedure(vec_norm), deferred | norm (self, itype) |
| Norm of field. | |
| procedure | norm (self, itype) |
| Norm of vector. | |
| procedure(vec_restore_local), deferred | restore_local (self, array, iblock, add, wait) |
| Restore local portion of field. | |
| procedure | restore_local (self, array, iblock, add, wait) |
| Restore local portion of field. | |
| procedure(vec_restore_slice), deferred | restore_slice (self, array, iblock, wait) |
| Restore owned portion of field. | |
| procedure | restore_slice (self, array, iblock, wait) |
| Restore owned portion of field. | |
| procedure(vec_scale), deferred | scale (self, alpha) |
| Scale field by a scalar. | |
| procedure | scale (self, alpha) |
| Scale vector by a scalar. | |
| procedure(vec_set), deferred | set (self, alpha, iblock, random) |
| Set all elements to a scalar. | |
| procedure | set (self, alpha, iblock, random) |
| Set all elements to a scalar. | |
| procedure(vec_stitch), deferred | stitch (self, up_method) |
| Perform global sitching. | |
| procedure | stitch (self, up_method) |
| Perform global stitching. | |
| procedure(vec_sum), deferred | sum (self) |
| Sum reduction over field. | |
| procedure | sum (self) |
| Sum reduction over vector. | |
Public Attributes | |
| type(tvecscatter) | get |
| PETSc local to global scatter context. | |
| type(tis) | lis |
| PETSc local to global mapping. | |
| logical | loc_current = .FALSE. |
| Flag indicating local/global vectors are consistent. | |
| logical | loc_store = .FALSE. |
| Flag indicating pending local->global sync. | |
| type(oft_map), dimension(:), pointer | map => NULL() |
| Block mapping. | |
| integer(i4) | n = -1 |
| Local size of field. | |
| integer(i4) | nblocks = 1 |
| Number of blocks. | |
| integer(i8) | ng = -1 |
| Gobal size of field. | |
| integer(i4) | nslice = -1 |
| Local size of field. | |
| type(oft_seam), pointer | stitch_info => NULL() |
| Seam information. | |
| type(tvec) | v |
| PETSc vector object. | |
| type(tvec) | vloc |
| PETSc local vector object. | |
|
pure virtualinherited |
Add fields.
| procedure add | ( | class(oft_petsc_vector), intent(inout) | self, |
| real(r8), intent(in) | gamma, | ||
| real(r8), intent(in) | alpha, | ||
| class(oft_vector), intent(in), target | a, | ||
| real(r8), intent(in), optional | beta, | ||
| class(oft_vector), intent(in), optional, target | b | ||
| ) |
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) |
|
inherited |
Delete field.
| procedure delete | ( | class(oft_petsc_vector), intent(inout) | self | ) |
Delete vector.
|
inherited |
Dot product with a second field.
|
inherited |
Dot product with a second field.
|
pure virtualinherited |
| procedure dot_complex | ( | class(oft_petsc_vector), intent(inout) | self, |
| class(oft_cvector), intent(in), target | a | ||
| ) |
Dot product with a second vector.
| [in] | a | Second vector for dot product |
|
pure virtualinherited |
| procedure dot_real | ( | class(oft_petsc_vector), intent(inout) | self, |
| class(oft_vector), intent(in), target | a | ||
| ) |
Dot product with a second vector.
| [in] | a | Second vector for dot product |
|
pure virtualinherited |
Get local portion of field.
| procedure get_local | ( | class(oft_petsc_vector), intent(inout) | self, |
| real(r8), dimension(:), intent(inout), pointer | array, | ||
| integer(i4), intent(in), optional | iblock | ||
| ) |
Get local portion of field.
| [in] | alpha | Updated field value |
|
pure virtualinherited |
Get owned portion of field.
| procedure get_slice | ( | class(oft_petsc_vector), intent(inout) | self, |
| real(r8), dimension(:), intent(inout), pointer | array, | ||
| integer(i4), intent(in), optional | iblock | ||
| ) |
Get owned portion of field.
| [in] | alpha | Updated field value |
|
inherited |
Dot product with a set of fields.
|
inherited |
Dot product with a set of fields.
|
pure virtualinherited |
| procedure mdot_complex | ( | class(oft_petsc_vector), intent(inout) | self, |
| type(oft_vector_ptr), dimension(n), intent(in) | a, | ||
| integer(i4), intent(in) | n | ||
| ) |
Dot product with a second vector.
| [in] | a | Second vector for dot product |
|
pure virtualinherited |
| procedure mdot_real | ( | class(oft_petsc_vector), intent(inout) | self, |
| type(oft_vector_ptr), dimension(n), intent(in) | a, | ||
| integer(i4), intent(in) | n | ||
| ) |
Dot product with a second vector.
| [in] | a | Second vector for dot product |
|
pure virtualinherited |
Multiply fields element by element.
| procedure mult | ( | class(oft_petsc_vector), intent(inout) | self, |
| class(oft_vector), intent(in), target | a, | ||
| logical, intent(in), optional | div_flag | ||
| ) |
Multiply fields element by element.
\( self_i = self_i * a_i \)
| [in] | a | First field to add |
|
inherited |
Create a new field as a bare copy.
|
inherited |
Create a new field as a bare copy.
|
pure virtualinherited |
| procedure new_complex | ( | class(oft_petsc_vector), intent(in) | self, |
| class(oft_cvector), intent(out), pointer | new | ||
| ) |
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 |
|
pure virtualinherited |
| procedure new_real | ( | class(oft_petsc_vector), intent(in) | self, |
| class(oft_vector), intent(out), pointer | new | ||
| ) |
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 |
|
pure virtualinherited |
Norm of field.
| procedure norm | ( | class(oft_petsc_vector), intent(inout) | self, |
| integer(i4), intent(in) | itype | ||
| ) |
Norm of vector.
| [in] | itype | Type of norm (1-> 1-norm, 2-> 2-norm, 3-> Inf-norm) |
|
pure virtualinherited |
Restore local portion of field.
| procedure restore_local | ( | class(oft_petsc_vector), intent(inout) | self, |
| real(r8), dimension(:), intent(inout) | array, | ||
| integer(i4), intent(in), optional | iblock, | ||
| logical, intent(in), optional | add, | ||
| logical, intent(in), optional | wait | ||
| ) |
Restore local portion of field.
| [in] | alpha | Updated field value |
|
pure virtualinherited |
Restore owned portion of field.
| procedure restore_slice | ( | class(oft_petsc_vector), intent(inout) | self, |
| real(r8), dimension(:), intent(in) | array, | ||
| integer(i4), intent(in), optional | iblock, | ||
| logical, intent(in), optional | wait | ||
| ) |
Restore owned portion of field.
| [in] | alpha | Updated field value |
|
pure virtualinherited |
Scale field by a scalar.
| procedure scale | ( | class(oft_petsc_vector), intent(inout) | self, |
| real(r8), intent(in) | alpha | ||
| ) |
Scale vector by a scalar.
self = \( \alpha \) self
| [in] | alpha | Factor to scale field |
|
pure virtualinherited |
Set all elements to a scalar.
| procedure set | ( | class(oft_petsc_vector), intent(inout) | self, |
| real(r8), intent(in) | alpha, | ||
| integer(i4), intent(in), optional | iblock, | ||
| logical, intent(in), optional | random | ||
| ) |
Set all elements to a scalar.
| [in] | alpha | Updated vector value |
| [in] | random | Set to random number, if true alpha is ignored (optional) |
|
pure virtualinherited |
Perform global sitching.
| procedure stitch | ( | class(oft_petsc_vector), intent(inout) | self, |
| integer(i4), intent(in) | up_method | ||
| ) |
Perform global stitching.
| [in] | up_method | Type of stitching to perform |
|
pure virtualinherited |
Sum reduction over field.
| procedure sum | ( | class(oft_petsc_vector), intent(inout) | self | ) |
Sum reduction over vector.
| type(tvecscatter) get |
PETSc local to global scatter context.
| type(tis) lis |
PETSc local to global mapping.
| logical loc_current = .FALSE. |
Flag indicating local/global vectors are consistent.
| logical loc_store = .FALSE. |
Flag indicating pending local->global sync.
|
inherited |
Block mapping.
|
inherited |
Local size of field.
|
inherited |
Number of blocks.
|
inherited |
Gobal size of field.
|
inherited |
Local size of field.
|
inherited |
Seam information.
| type(tvec) v |
PETSc vector object.
| type(tvec) vloc |
PETSc local vector object.