The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
|
PETSc solver implementations.
Wrappers for PETSc solvers implementing the common oft_solver interface.
Wrappers for PETSc preconditioners implementing the common oft_solver interface.
Data Types | |
type | oft_petsc_asprecond |
PETSc Additive-Schwarz preconditioner. More... | |
type | oft_petsc_cg_solver |
PETSc Conjugate-Gradient solver. More... | |
type | oft_petsc_diagprecond |
PETSc diagonal preconditioning. More... | |
type | oft_petsc_direct_solver |
PETSc direct solver (LU factorization) More... | |
type | oft_petsc_factordef |
PETSc factorization package information. More... | |
type | oft_petsc_gmres_solver |
PETSc GMRES solver. More... | |
type | oft_petsc_jacobi_solver |
PETSc Point-Jacobi solver. More... | |
type | oft_petsc_luprecond |
PETSc LU factorization/solve. More... | |
type | oft_petsc_mgprecond |
PETSc multi-grid preconditioner. More... | |
type | oft_petsc_precond |
PETSc abstract preconditioner class. More... | |
type | oft_petsc_sjacobi_solver |
PETSc symmetric Point-Jacobi solver. More... | |
type | oft_petsc_solver |
PETSc abstract solver class. More... | |
Functions/Subroutines | |
subroutine | asprecond_setup (self, pc, dist) |
Setup additiv Schwarz preconditioner. | |
subroutine | asprecond_setup_xml (self, solver_node, level) |
Setup additive Schwarz preconditioner from XML definition. | |
subroutine | cg_setup_ksp (self, ksp) |
Setup PETSc ksp object for CG. | |
subroutine | cg_setup_xml (self, solver_node, level) |
Setup CG solver from XML definition. | |
subroutine | cg_solver_apply (self, u, g) |
Solve a linear system using PETSc's implementation of the Conjugate-Gradient method. | |
subroutine | cg_view (self) |
Print solver configuration. | |
subroutine | create_lu_pc (self, pc) |
Create PETSc LU PC object. | |
subroutine | diagprecond_setup (self, pc, dist) |
Setup diagonal preconditioner. | |
subroutine | diagprecond_view (self) |
Print solver configuration. | |
subroutine | direct_setup_ksp (self, ksp) |
Setup PETSc ksp object for direct solver. | |
subroutine | direct_setup_xml (self, solver_node, level) |
Setup direct solver from XML definition. | |
subroutine | direct_solver_apply (self, u, g) |
Solve a linear system using a direct solver through PETSc (LU factorization) | |
subroutine | direct_view (self) |
Print solver configuration. | |
subroutine | gmres_setup_ksp (self, ksp) |
Setup PETSc ksp object for FGMRES. | |
subroutine | gmres_setup_xml (self, solver_node, level) |
Setup FGMRES solver from XML definition. | |
subroutine | gmres_solver_apply (self, u, g) |
Solve a linear system using PETSc's implementation of the FGMRES method. | |
subroutine | gmres_view (self) |
Print solver configuration. | |
subroutine | jacobi_solver_apply (self, u, g) |
Solve a linear system using PETSc's implementation of the Point-Jacobi method. | |
subroutine | lu_pc_load_xml (self, solver_node, level) |
Setup LU preconditioner object from XML definition. | |
subroutine | luprecond_setup (self, pc, dist) |
Setup LU factorization preconditioner. | |
subroutine | mgprecond_setup (self, pc, dist) |
Setup multi-grid preconditioner. | |
logical function | petsc_cg_solver_cast (self, source) |
Cast a solver object to a oft_petsc_cg_solver. | |
logical function | petsc_diagprecond_cast (self, source) |
Cast a solver object to a oft_petsc_diagprecond. | |
logical function | petsc_direct_solver_cast (self, source) |
Cast a solver object to a oft_petsc_direct_solver. | |
logical function | petsc_gmres_solver_cast (self, source) |
Cast a solver object to a oft_petsc_gmres_solver. | |
logical function | petsc_jacobi_solver_cast (self, source) |
Cast a solver object to a oft_petsc_jacobi_solver. | |
logical function | petsc_precond_cast (self, source) |
Cast a solver object to a oft_petsc_precond. | |
logical function | petsc_sjacobi_solver_cast (self, source) |
Cast a solver object to a oft_petsc_sjacobi_solver. | |
logical function | petsc_solver_cast (self, source) |
Cast a vector object to a oft_petsc_vector. | |
subroutine | petsc_solver_delete (self) |
Delete PETSc solver. | |
subroutine | petsc_solver_setup (self) |
Update solver after changing settings/operators. | |
subroutine | petsc_solver_setup_ksp (self, ksp) |
Setup PETSc ksp object. | |
subroutine | petsc_solver_setup_pm (ksp) |
Setup performance monitor for PETSc solver. | |
recursive subroutine | petsc_solver_update (self, new_pattern) |
Update solver after updating settings/matrix. | |
subroutine | precond_apply (self, u, g) |
Precondition a linear system using one iteration of a PETSc preconditioner. | |
subroutine | precond_delete (self) |
Delete PETSc solver. | |
subroutine | precond_dummy_setup (self, pc, dist) |
Setup preconditioner. | |
recursive subroutine | precond_update (self, new_pattern) |
Update preconditioner after changing settings/operators. | |
subroutine | set_solver_package (pc, sol_type, ierr) |
Set factorization package for PETSc PC object. | |
subroutine | sjacobi_setup_xml (self, solver_node, level) |
Setup symmetric Jacobi solver from XML definition. | |
subroutine | sjacobi_solver_apply (self, u, g) |
Apply 1-step of a symmetric Jacobi smoother with PETSc matrices. | |
subroutine asprecond_setup | ( | class(oft_petsc_asprecond), intent(inout) | self, |
type(tpc), intent(inout) | pc, | ||
logical, intent(in) | dist | ||
) |
Setup additiv Schwarz preconditioner.
[in,out] | self | Solver object |
[in,out] | pc | PETSc PC object |
[in] | dist | Flag for local vs distributed solve? |
subroutine asprecond_setup_xml | ( | class(oft_petsc_asprecond), intent(inout) | self, |
type(xml_node), intent(in), pointer | solver_node, | ||
integer(i4), intent(in), optional | level | ||
) |
Setup additive Schwarz preconditioner from XML definition.
[in,out] | self | Solver object |
[in] | solver_node | XML element containing solver definition |
[in] | level | Level in MG hierarchy (optional) |
subroutine cg_setup_ksp | ( | class(oft_petsc_cg_solver), intent(inout) | self, |
type(tksp), intent(inout) | ksp | ||
) |
Setup PETSc ksp object for CG.
[in,out] | self | Solver object |
[in,out] | ksp | PETSc KSP object |
subroutine cg_setup_xml | ( | class(oft_petsc_cg_solver), intent(inout) | self, |
type(xml_node), intent(in), pointer | solver_node, | ||
integer(i4), intent(in), optional | level | ||
) |
Setup CG solver from XML definition.
[in,out] | self | Solver object |
[in] | solver_node | XML element containing solver definition |
[in] | level | Level in MG hierarchy (optional) |
subroutine cg_solver_apply | ( | class(oft_petsc_cg_solver), intent(inout) | self, |
class(oft_vector), intent(inout) | u, | ||
class(oft_vector), intent(inout) | g | ||
) |
Solve a linear system using PETSc's implementation of the Conjugate-Gradient method.
[in,out] | self | Solver object |
[in,out] | u | Guess (input), Solution (output) |
[in,out] | g | RHS (input), Residual (output) |
subroutine cg_view | ( | class(oft_petsc_cg_solver), intent(inout) | self | ) |
Print solver configuration.
[in,out] | self | Solver object |
subroutine create_lu_pc | ( | class(oft_petsc_factordef), intent(inout) | self, |
type(tpc), intent(inout) | pc | ||
) |
Create PETSc LU PC object.
[in,out] | self | Solver object |
[in,out] | pc | PETSc PC object |
subroutine diagprecond_setup | ( | class(oft_petsc_diagprecond), intent(inout) | self, |
type(tpc), intent(inout) | pc, | ||
logical, intent(in) | dist | ||
) |
Setup diagonal preconditioner.
[in,out] | self | Solver object |
[in,out] | pc | PETSc PC object |
[in] | dist | Flag for local vs distributed solve? |
subroutine diagprecond_view | ( | class(oft_petsc_diagprecond), intent(inout) | self | ) |
Print solver configuration.
[in,out] | self | Solver object |
subroutine direct_setup_ksp | ( | class(oft_petsc_direct_solver), intent(inout) | self, |
type(tksp), intent(inout) | ksp | ||
) |
Setup PETSc ksp object for direct solver.
[in,out] | self | Solver object |
[in,out] | ksp | PETSc KSP solver object |
subroutine direct_setup_xml | ( | class(oft_petsc_direct_solver), intent(inout) | self, |
type(xml_node), intent(in), pointer | solver_node, | ||
integer(i4), intent(in), optional | level | ||
) |
Setup direct solver from XML definition.
[in,out] | self | Solver object |
[in] | solver_node | XML element containing solver definition |
[in] | level | Level in MG hierarchy (optional) |
subroutine direct_solver_apply | ( | class(oft_petsc_direct_solver), intent(inout) | self, |
class(oft_vector), intent(inout) | u, | ||
class(oft_vector), intent(inout) | g | ||
) |
Solve a linear system using a direct solver through PETSc (LU factorization)
[in,out] | self | Solver object |
[in,out] | u | Guess (input), Solution (output) |
[in,out] | g | RHS (input), Residual (output) |
subroutine direct_view | ( | class(oft_petsc_direct_solver), intent(inout) | self | ) |
Print solver configuration.
[in,out] | self | Solver object |
subroutine gmres_setup_ksp | ( | class(oft_petsc_gmres_solver), intent(inout) | self, |
type(tksp), intent(inout) | ksp | ||
) |
Setup PETSc ksp object for FGMRES.
[in,out] | self | Solver object |
[in,out] | ksp | PETSc KSP object |
subroutine gmres_setup_xml | ( | class(oft_petsc_gmres_solver), intent(inout) | self, |
type(xml_node), intent(in), pointer | solver_node, | ||
integer(i4), intent(in), optional | level | ||
) |
Setup FGMRES solver from XML definition.
[in,out] | self | Solver object |
[in] | solver_node | XML element containing solver definition |
[in] | level | Level in MG hierarchy (optional) |
subroutine gmres_solver_apply | ( | class(oft_petsc_gmres_solver), intent(inout) | self, |
class(oft_vector), intent(inout) | u, | ||
class(oft_vector), intent(inout) | g | ||
) |
Solve a linear system using PETSc's implementation of the FGMRES method.
[in,out] | self | Solver object |
[in,out] | u | Guess (input), Solution (output) |
[in,out] | g | RHS (input), Residual (output) |
subroutine gmres_view | ( | class(oft_petsc_gmres_solver), intent(inout) | self | ) |
Print solver configuration.
[in,out] | self | Solver object |
subroutine jacobi_solver_apply | ( | class(oft_petsc_jacobi_solver), intent(inout) | self, |
class(oft_vector), intent(inout) | u, | ||
class(oft_vector), intent(inout) | g | ||
) |
Solve a linear system using PETSc's implementation of the Point-Jacobi method.
[in,out] | self | Solver object |
[in,out] | u | Guess (input), Solution (output) |
[in,out] | g | RHS (input), Residual (output) |
subroutine lu_pc_load_xml | ( | class(oft_petsc_factordef), intent(inout) | self, |
type(xml_node), intent(in), pointer | solver_node, | ||
integer(i4), intent(in), optional | level | ||
) |
Setup LU preconditioner object from XML definition.
[in,out] | self | Solver object |
[in] | solver_node | XML element containing solver definition |
[in] | level | Level in MG hierarchy (optional) |
subroutine luprecond_setup | ( | class(oft_petsc_luprecond), intent(inout) | self, |
type(tpc), intent(inout) | pc, | ||
logical, intent(in) | dist | ||
) |
Setup LU factorization preconditioner.
[in,out] | self | Solver object |
[in,out] | pc | PETSc PC object |
[in] | dist | Flag for local vs distributed solve? |
subroutine mgprecond_setup | ( | class(oft_petsc_mgprecond), intent(inout) | self, |
type(tpc), intent(inout) | pc, | ||
logical, intent(in) | dist | ||
) |
Setup multi-grid preconditioner.
[in,out] | self | Solver object |
[in,out] | pc | PETSc PC object |
[in] | dist | Flag for local vs distributed solve? |
logical function petsc_cg_solver_cast | ( | type(oft_petsc_cg_solver), intent(out), pointer | self, |
class(oft_solver), intent(in), target | source | ||
) |
Cast a solver object to a oft_petsc_cg_solver.
The source solver must be oft_petsc_cg_solver 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 petsc_diagprecond_cast | ( | type(oft_petsc_diagprecond), intent(out), pointer | self, |
class(oft_solver), intent(in), target | source | ||
) |
Cast a solver object to a oft_petsc_diagprecond.
The source solver must be oft_petsc_diagprecond 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 petsc_direct_solver_cast | ( | type(oft_petsc_direct_solver), intent(out), pointer | self, |
class(oft_solver), intent(in), target | source | ||
) |
Cast a solver object to a oft_petsc_direct_solver.
The source solver must be oft_petsc_direct_solver 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 petsc_gmres_solver_cast | ( | type(oft_petsc_gmres_solver), intent(out), pointer | self, |
class(oft_solver), intent(in), target | source | ||
) |
Cast a solver object to a oft_petsc_gmres_solver.
The source solver must be oft_petsc_gmres_solver 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 petsc_jacobi_solver_cast | ( | type(oft_petsc_jacobi_solver), intent(out), pointer | self, |
class(oft_solver), intent(in), target | source | ||
) |
Cast a solver object to a oft_petsc_jacobi_solver.
The source solver must be oft_petsc_jacobi_solver 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 petsc_precond_cast | ( | class(oft_petsc_precond), intent(out), pointer | self, |
class(oft_solver), intent(in), target | source | ||
) |
Cast a solver object to a oft_petsc_precond.
The source solver must be oft_petsc_precond 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 petsc_sjacobi_solver_cast | ( | type(oft_petsc_sjacobi_solver), intent(out), pointer | self, |
class(oft_solver), intent(in), target | source | ||
) |
Cast a solver object to a oft_petsc_sjacobi_solver.
The source solver must be oft_petsc_sjacobi_solver 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 petsc_solver_cast | ( | class(oft_petsc_solver), intent(out), pointer | self, |
class(oft_solver), 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 |
subroutine petsc_solver_delete | ( | class(oft_petsc_solver), intent(inout) | self | ) |
Delete PETSc solver.
[in,out] | self | Solver object |
subroutine petsc_solver_setup | ( | class(oft_petsc_solver), intent(inout) | self | ) |
Update solver after changing settings/operators.
[in,out] | self | Solver object |
subroutine petsc_solver_setup_ksp | ( | class(oft_petsc_solver), intent(inout) | self, |
type(tksp), intent(inout) | ksp | ||
) |
Setup PETSc ksp object.
[in,out] | self | Solver object |
subroutine petsc_solver_setup_pm | ( | type(tksp), intent(inout) | ksp | ) |
Setup performance monitor for PETSc solver.
recursive subroutine petsc_solver_update | ( | class(oft_petsc_solver), intent(inout) | self, |
logical, intent(in), optional | new_pattern | ||
) |
Update solver after updating settings/matrix.
[in,out] | self | Solver object |
[in] | new_pattern | Update matrix pattern (optional) |
subroutine precond_apply | ( | class(oft_petsc_precond), intent(inout) | self, |
class(oft_vector), intent(inout) | u, | ||
class(oft_vector), intent(inout) | g | ||
) |
Precondition a linear system using one iteration of a PETSc preconditioner.
[in,out] | self | Solver object |
[in,out] | u | Guess (input), Solution (output) |
[in,out] | g | RHS (input), Residual (output) |
subroutine precond_delete | ( | class(oft_petsc_precond), intent(inout) | self | ) |
Delete PETSc solver.
[in,out] | self | Solver object |
subroutine precond_dummy_setup | ( | class(oft_petsc_precond), intent(inout) | self, |
type(tpc), intent(inout) | pc, | ||
logical, intent(in) | dist | ||
) |
Setup preconditioner.
[in,out] | self | Solver object |
[in,out] | pc | PETSc PC object |
[in] | dist | Flag for local vs distributed solve? |
recursive subroutine precond_update | ( | class(oft_petsc_precond), intent(inout) | self, |
logical, intent(in), optional | new_pattern | ||
) |
Update preconditioner after changing settings/operators.
[in,out] | self | Solver object |
[in] | new_pattern | Update matrix pattern (optional) |
subroutine set_solver_package | ( | type(tpc), intent(inout) | pc, |
character(len=*), intent(in) | sol_type, | ||
integer(i4), intent(out) | ierr | ||
) |
Set factorization package for PETSc PC object.
[in,out] | pc | PETSc PC object |
[in] | sol_type | Solver type |
[out] | ierr | Error flag |
subroutine sjacobi_setup_xml | ( | class(oft_petsc_sjacobi_solver), intent(inout) | self, |
type(xml_node), intent(in), pointer | solver_node, | ||
integer(i4), intent(in), optional | level | ||
) |
Setup symmetric Jacobi solver from XML definition.
[in,out] | self | Solver object |
[in] | solver_node | XML element containing solver definition |
[in] | level | Level in MG hierarchy (optional) |
subroutine sjacobi_solver_apply | ( | class(oft_petsc_sjacobi_solver), intent(inout) | self, |
class(oft_vector), intent(inout) | u, | ||
class(oft_vector), intent(inout) | g | ||
) |
Apply 1-step of a symmetric Jacobi smoother with PETSc matrices.
[in,out] | self | Solver object |
[in,out] | u | Guess (input), Solution (output) |
[in,out] | g | RHS (input), Residual (output) |