Skip to content
Snippets Groups Projects
Commit 0026ef4b authored by Elias Pipping's avatar Elias Pipping Committed by pipping
Browse files

Whitespace

[[Imported from SVN: r11715]]
parent 29fb4de1
No related branches found
No related tags found
No related merge requests found
...@@ -81,25 +81,25 @@ void CGSolver<MatrixType, VectorType>::solve() ...@@ -81,25 +81,25 @@ void CGSolver<MatrixType, VectorType>::solve()
// Perform one iteration step // Perform one iteration step
// minimize in given search direction p // minimize in given search direction p
matrix_->mv(p,q); // q=Ap matrix_->mv(p,q); // q=Ap
alpha = p*q; // scalar product alpha = p*q; // scalar product
lambda = rholast/alpha; // minimization lambda = rholast/alpha; // minimization
x_->axpy(lambda,p); // update solution x_->axpy(lambda,p); // update solution
rhs_->axpy(-lambda,q); // update defect rhs_->axpy(-lambda,q); // update defect
// determine new search direction // determine new search direction
q = 0; // clear correction q = 0; // clear correction
// apply preconditioner // apply preconditioner
preconditioner_->setProblem(*matrix_,q,b); preconditioner_->setProblem(*matrix_,q,b);
preconditioner_->iterate(); preconditioner_->iterate();
q = preconditioner_->getSol(); q = preconditioner_->getSol();
rho = q*b; // orthogonalization rho = q*b; // orthogonalization
beta = rho/rholast; // scaling factor beta = rho/rholast; // scaling factor
p *= beta; // scale old search direction p *= beta; // scale old search direction
p += q; // orthogonalization with correction p += q; // orthogonalization with correction
rholast = rho; // remember rho for recurrence rholast = rho; // remember rho for recurrence
// write iteration to file, if requested // write iteration to file, if requested
if (this->historyBuffer_!="") if (this->historyBuffer_!="")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment