Computes the approximate solution vectors.
dcgmrhscomputes approximate solution vectors using the CG with multiple right-hand sides (MRHS) method [Young71]. The routine
dcgmrhsuses the value that was in the
xbefore the first call as an initial approximation to the solution. The parameter
RCI_requestgives information about task completion status and requests results of certain operations that are required by the solver.
Note that lengths of all vectors are assumed to have been defined in a previous call to the
- Sets the size of the problem, and the sizes of arraysINTEGER.xandb.
- Array of sizeDOUBLE PRECISION.. Contains the initial approximation to the solution vectors.n*nrhs
- Sets the number of right-hand sides.INTEGER.
- Array of sizeDOUBLE PRECISION.. Contains the right-hand side vectors.n*nrhs
- Gives information about result of work of the routine.INTEGER.
- Array of sizeDOUBLE PRECISION.(. Contains the updated approximation to the solution vectors.nbynrhs)
- Indicates that the task completed normally and the solution is found and stored in the vectorx. This occurs only if the stopping tests are fully automatic. For the user defined stopping tests, see the description of theRCI_request= 2.
- Indicates that the routine was interrupted because the maximum number of iterations was reached, but the relative stopping criterion was not met. This situation occurs only if both tests are requested by the user.
- The routine was interrupted because of an attempt to divide by zero. This situation happens if the matrix is non-positive definite or almost non-positive definite.
- RCI_request=- 10
- Indicates that the routine was interrupted because the residual norm is invalid. This usually happens because the valuedpar(6)was altered outside of the routine, or thedcg_checkroutine was not called.
- Indicates that the routine was interrupted because it enters the infinite cycle. This usually happens because the valuesipar(8),ipar(9),ipar(10)were altered outside of the routine, or thedcg_checkroutine was not called.
- RCI_request= 1
- Indicates that you must multiply the matrix bytmp(1:, put the result in then,1)tmp(1:, and return control back to the routinen,2)dcg.
- RCI_request= 2
- Indicates that you must perform the stopping tests. If they fail, return control back to thedcgroutine. Otherwise, the solution is found and stored in the vectorx.
- RCI_request= 3
- Indicates that you must apply the preconditioner totmp(:, 3), put the result in thetmp(:, 4), and return control back to the routinedcg.