Difference between revisions of "Bi-Conjugate Gradient Stabilized"
From Gw-qcd-wiki
(→Usage) |
Craigpeli1 (talk | contribs) m (→Usage) |
||
Line 25: | Line 25: | ||
# The BICGStabM only guarantees the convergence of the linear system associated with the pfncMatMult you give it. You need to check this in your code. In fact, you should have a segment of your code check for this. If one or more shifts fails, for example, you could restart them using a single shift inverter. They should converge quickly since they probably already have almost converged to the desired accuracy. | # The BICGStabM only guarantees the convergence of the linear system associated with the pfncMatMult you give it. You need to check this in your code. In fact, you should have a segment of your code check for this. If one or more shifts fails, for example, you could restart them using a single shift inverter. They should converge quickly since they probably already have almost converged to the desired accuracy. | ||
# The example explains in more detail how to correctly use BICGStabM through an example. | # The example explains in more detail how to correctly use BICGStabM through an example. | ||
− | + | [[Media:Example.jpg]] |
Revision as of 16:57, 21 April 2010
The bi-conjugate gradient stabilized method (BICGStab), returns the solution to a set of shifted linear systems of the form
\((M+\sigma_i) \textbf{x} =\textbf{b} \quad i=1,2,... ,N \)
where \( \sigma_i\) are the shift values.
Definitions:
\( \text{residue} = || ( M+\sigma_i) - \textbf{b} || \)
\( \text{error} = || ( M+\sigma_i) - \textbf{b} || / ||\textbf{b}|| \)
Usage
int qcd::bicgstabm_device(device_wilson_field &src, int noshifts, double shifts[],device_wilson_field* sol[], double dError, int maxiters, matmult<device_wilson_field>& pfncMatMult, device_random_field& rnd);
- src = b.
- noShifts = (N-1) the number of shifts minus one.
- shifts[] = a pointer to all shift values except the most singular value
- sol = a pointer to an array of N pointers pointing to the solutions.
- dError = the maximum error in the solution (see definition).
- maxiters = the maximum number of iterations allowed.
- pfncMatMult = pointer to the matrix multiplication.
- rnd = a random vector used to start the algorithm.
- the function returns the number of iterations required for convergence.
NOTES:
- The BICGStabM only guarantees the convergence of the linear system associated with the pfncMatMult you give it. You need to check this in your code. In fact, you should have a segment of your code check for this. If one or more shifts fails, for example, you could restart them using a single shift inverter. They should converge quickly since they probably already have almost converged to the desired accuracy.
- The example explains in more detail how to correctly use BICGStabM through an example.