Object responsible for interfacing with PETSc
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | userDefined | = | .false. |
True only if user explicitly sets it to true |
|
| type(PETScPreallocationData), | private | :: | preallocData |
Data used for preallocating PETSc objects |
|||
| type(SolverOptions), | private | :: | options |
Solver options for the KSP solver |
|||
| logical, | private | :: | objCreated |
True if PETSc object components have been created |
|||
| type(PETSsObjs), | private, | allocatable, dimension(:) | :: | objs |
Groups of PETSc objects |
||
| ksp, | public | :: | ConvergedReason::lastConvergedReason |
Converged reason for last attempted solve |
|||
| petscint, | public | :: | lastNumIterations |
Number of iterations for last attemtped solve |
Getter for userDefined
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Object), | intent(in) | :: | this |
Set userDefined to .true.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Object), | intent(inout) | :: | this |
Set userDefined to .false.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Object), | intent(inout) | :: | this |
Add sparse row data structure to total preallocation sparsity pattern
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PETScController), | intent(inout) | :: | this | |||
| type(SparseRowData), | intent(in) | :: | rowData |
Assemble the preallocation object, create PETSc objects, and deallocate the preallocation object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PETScController), | intent(inout) | :: | this |
Add row data to matrix, optionally multiplied by a real constant
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PETScController), | intent(inout) | :: | this | |||
| type(SparseRowData), | intent(in) | :: | rowData | |||
| real(kind=rk), | intent(in), | optional | :: | multConst | ||
| integer(kind=ik), | intent(in), | optional | :: | objGroup |
Solve the equation petscMat * unknownVec = knownVec where the vectors are local to each processor - assembles and zeros out the matrix before/after the solve
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PETScController), | intent(inout) | :: | this | |||
| real(kind=rk), | intent(in), | dimension(:) | :: | knownVec | ||
| real(kind=rk), | intent(out), | dimension(:) | :: | unknownVec | ||
| integer(kind=ik), | intent(in), | optional | :: | objGroup |
Return true if PETSc objects have been created
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PETScController), | intent(in) | :: | this |
Getter for lastConvergedReason
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PETScController), | intent(in) | :: | this |
Getter for lastNumIterations
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PETScController), | intent(in) | :: | this |
PETSc controller initialization routine
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PETScController), | intent(inout) | :: | this | |||
| type(Indexing), | intent(in) | :: | indexingObj |
Indexing object used to initialize preallocation data |
||
| type(MPIController), | intent(in) | :: | mpiCont |
Reference MPI controller |
||
| type(SolverOptions), | intent(in) | :: | solOptions |
KSP solver options |
||
| integer(kind=ik), | intent(in), | optional | :: | numObjs |
Number of PETSc object groups |
Finalizes PETSc and destroys all PETSc objects
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PETScController), | intent(inout) | :: | this |