Skip to content

Commit bfafaa5

Browse files
committed
use facility size
1 parent 3ec23a4 commit bfafaa5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

example/linalg/example_solve_custom.f90

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
module custom_solver
22
use stdlib_kinds, only: dp
33
use stdlib_sparse
4-
use stdlib_linalg_iterative_solvers, only: linop_dp, solver_workspace_dp, solve_pccg_generic
4+
use stdlib_linalg_iterative_solvers, only: linop_dp, &
5+
solver_workspace_dp, &
6+
solve_pccg_generic, &
7+
size_wksp_pccg
58
implicit none
69
contains
710
subroutine solve_pccg_custom(A,b,x,di,tol,maxiter,restart,workspace)
@@ -44,7 +47,7 @@ subroutine solve_pccg_custom(A,b,x,di,tol,maxiter,restart,workspace)
4447
else
4548
allocate( workspace_ )
4649
end if
47-
if(.not.allocated(workspace_%tmp)) allocate( workspace_%tmp(n,4) , source = 0.d0 )
50+
if(.not.allocated(workspace_%tmp)) allocate( workspace_%tmp(n,size_wksp_pccg) , source = 0.d0 )
4851
!-------------------------
4952
! Jacobi preconditionner factorization
5053
call diag(A,diagonal)

0 commit comments

Comments
 (0)