You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `linop_<kind>_type` derive type is an auxiliary class enabling to abstract the definition of the linear system and the actual implementation of the solvers.
20
+
The `stdlib_linop_<kind>_type` derive type is an auxiliary class enabling to abstract the definition of the linear system and the actual implementation of the solvers.
21
21
22
22
#### Type-bound procedures
23
23
@@ -72,7 +72,7 @@ The output is a scalar of `type` and `kind` same as to that of `x` and `y`.
The `solver_workspace_<kind>_type` derive type is an auxiliary class enabling to hold the data associated to the working arrays needed by the solvers to operate.
75
+
The `stdlib_solver_workspace_<kind>_type` derive type is an auxiliary class enabling to hold the data associated to the working arrays needed by the solvers to operate.
76
76
77
77
#### Type-bound procedures
78
78
@@ -91,15 +91,15 @@ Subroutine
91
91
`iter`: scalar of `integer` type giving the current iteration counter. This argument is `intent(in)`.
Implements the Conjugate Gradient (CG) method for solving the linear system \( Ax = b \), where \( A \) is a symmetric positive-definite linear operator defined via the `linop` type. This is the core implementation, allowing flexibility for custom matrix types or parallel environments.
`maxiter` (optional): scalar of type `integer` defining the maximum allowed number of iterations. If no value is given, a default of `N` is set, where `N = size(b)`. This argument is `intent(in)`.
158
158
159
-
`workspace` (optional): scalar derived type of `type(solver_workspace_<kind>_type)` holding the work array for the solver. If the user passes its own `workspace`, then a pointer is set internally to it. Otherwise, memory will be internally allocated and deallocated before exiting the procedure. This argument is `intent(inout)`.
159
+
`workspace` (optional): scalar derived type of `type(stdlib_solver_workspace_<kind>_type)` holding the work array for the solver. If the user passes its own `workspace`, then a pointer is set internally to it. Otherwise, memory will be internally allocated and deallocated before exiting the procedure. This argument is `intent(inout)`.
Implements the Preconditioned Conjugate Gradient (PCG) method for solving the linear system \( Ax = b \), where \( A \) is a symmetric positive-definite linear operator defined via the `linop` type. This is the core implementation, allowing flexibility for custom matrix types or parallel environments.
173
173
174
174
#### Syntax
175
175
176
-
`call `[[stdlib_iterative_solvers(module):solve_cg_kernel(interface)]]` (A, M, b, x, tol, maxiter, workspace)`
176
+
`call `[[stdlib_iterative_solvers(module):stdlib_solve_cg_kernel(interface)]]` (A, M, b, x, tol, maxiter, workspace)`
177
177
178
178
#### Status
179
179
@@ -185,9 +185,9 @@ Subroutine
185
185
186
186
#### Argument(s)
187
187
188
-
`A`: `class(linop_<kind>_type)` defining the linear operator. This argument is `intent(in)`.
188
+
`A`: `class(stdlib_linop_<kind>_type)` defining the linear operator. This argument is `intent(in)`.
189
189
190
-
`M`: `class(linop_<kind>_type)` defining the preconditioner linear operator. This argument is `intent(in)`.
190
+
`M`: `class(stdlib_linop_<kind>_type)` defining the preconditioner linear operator. This argument is `intent(in)`.
191
191
192
192
`b`: 1-D array of `real(<kind>)` defining the loading conditions of the linear system. This argument is `intent(in)`.
193
193
@@ -197,7 +197,7 @@ Subroutine
197
197
198
198
`maxiter`: scalar of type `integer` defining the maximum allowed number of iterations. This argument is `intent(in)`.
199
199
200
-
`workspace`: scalar derived type of `type(solver_workspace_<kind>_type)` holding the work array for the solver. This argument is `intent(inout)`.
200
+
`workspace`: scalar derived type of `type(stdlib_solver_workspace_<kind>_type)` holding the work array for the solver. This argument is `intent(inout)`.
Provides a user-friendly interface to the PCG method for solving \( Ax = b \), supporting `dense` and `CSR_<kind>_type` matrices. It supports optional preconditioners and handles workspace allocation.
214
214
215
215
#### Syntax
216
216
217
-
`call `[[stdlib_iterative_solvers(module):solve_pcg(interface)]]` (A, b, x [, di, tol, maxiter, restart, precond, M, workspace])`
217
+
`call `[[stdlib_iterative_solvers(module):stdlib_solve_pcg(interface)]]` (A, b, x [, di, tol, maxiter, restart, precond, M, workspace])`
218
218
219
219
#### Status
220
220
@@ -240,9 +240,9 @@ Subroutine
240
240
241
241
`precond` (optional): scalar of type `integer` enabling to switch among the default preconditioners available with the following enum (`pc_none`, `pc_jacobi`). If no value is given, no preconditionning will be applied. This argument is `intent(in)`.
242
242
243
-
`M` (optional): scalar derived type of `class(linop_<kind>_type)` defining a custom preconditioner linear operator. If given, `precond` will have no effect, a pointer is set to this custom preconditioner.
243
+
`M` (optional): scalar derived type of `class(stdlib_linop_<kind>_type)` defining a custom preconditioner linear operator. If given, `precond` will have no effect, a pointer is set to this custom preconditioner.
244
244
245
-
`workspace` (optional): scalar derived type of `type(solver_workspace_<kind>_type)` holding the work temporal array for the solver. If the user passes its own `workspace`, then internally a pointer is set to it, otherwise, memory will be internally allocated and deallocated before exiting the procedure. This argument is `intent(inout)`.
245
+
`workspace` (optional): scalar derived type of `type(stdlib_solver_workspace_<kind>_type)` holding the work temporal array for the solver. If the user passes its own `workspace`, then internally a pointer is set to it, otherwise, memory will be internally allocated and deallocated before exiting the procedure. This argument is `intent(inout)`.
0 commit comments