15
votes
Accepted
Adaptive gradient descent step size when you can't do a line search
I'll begin with a general remark: first-order information (i.e., using only gradients, which encode slope) can only give you directional information: It can tell you that the function value decreases ...
- 12k
14
votes
Accepted
What are the differences between the different gradient-based numerical optimization methods?
First, you should forget about solving linear equations for the moment -- that's a different context from optimization, and trying to consider both on equal footing will only lead to confusion. Why ...
- 12k
11
votes
What is required of the objective function in order to use Gauss Newton method?
Just to clarify notation, I'll be discussing the Gauss-Newton method for the problem
$\min \phi(x)=(1/2) \| F(x) \|_{2}^{2}$
with the search direction $p$ computed as the solution to the linear ...
- 18k
10
votes
Which C++ linear algebra library is probably the fastest on solving huge sparse [square matrix] linear system?
Eigen 3 is a nice C++ template library some of whose routines are parallelized.
c.f. Eigen documentation
The parallelization is OMP only, so if you intend to parallelise using MPI (and OMP) it is ...
- 341
10
votes
Accepted
How can a CG solver solve a non positive definite sparse matrix
I highly recommend the following read:
J.R. Shewchuk, "An Introduction to the Conjugate Gradient Method Without the Agonizing Pain"
In short, if the matrix is non-positive definite, there is no ...
- 8,521
9
votes
What is the worst case complexity of Conjugate Gradient?
The answer is a resounding yes. The convergence rate bound of $(\sqrt{\kappa}-1) / (\sqrt{\kappa}+1)$ is sharp over the set of symmetric positive definite matrices with condition number $\kappa$. In ...
- 2,435
9
votes
Accepted
What happens when I use a conjugate gradient solver with a symmetric positive semi-definite matrix?
You first have to make sure that your system is solvable: this happens iff the right-hand side $b$ is orthogonal to the kernel of $A$. If $A$ has a dimension-1 kernel spanned by $v$, you need to have $...
- 9,666
7
votes
BiCGSTAB convergence
First of all, size 40 is pretty much microscopic for the sort of purposes that BiCGstab was invented. I assure you, this method is great for matrices of sizes in the millions and beyond.
Then: even ...
- 1,295
6
votes
Accepted
CG question: is symmetry always necessary?
The CG method works by producing in every iteration a vector $x^k\in\mathbb{R}^n$ that solves the minimization problem (assuming $x^0=0$ for simplicity)
$$\min_{x\in \mathcal{K}_k} \frac12(x-x^*)^TA(x-...
- 12k
6
votes
Accepted
Caveats of Hessian free method
The approximation error is $\mathcal{O}(\varepsilon)$, where $\varepsilon$ is the parameter in the finite difference calculation. It will be good to know how this approximation affects the number of ...
- 30k
6
votes
Why minimizing with respect to A-norm?
Wolfgang Bangerth's answer already says almost everything, but another subtle detail is that GMRES/MINRES minimize the norm of the residual, i.e., $\|Ax_k-b\|$, while CG minimizes the (A-)norm of the ...
- 9,666
5
votes
Accepted
How to verify solution to pre-conditioned linear systems solver?
You've started with a singular linear system of equations $Ax=b$. As a practical matter, it's unlikely that $b$ lies exactly in the range of $A$, so at best you can find a least squares solution that ...
- 18k
5
votes
Accepted
Relation between conjugate gradient method and finite elements method
The methods are unrelated. The finite element method is a way to convert a partial differential equation into a finite dimensional problem ("discretization") so it can be solved on a computer. The ...
- 52.2k
5
votes
Accepted
Why minimizing with respect to A-norm?
In some sense it doesn't matter: In finite dimensions, all norms are equivalent, so if an algorithm conveniently has the property that proving convergence in one norm is easy, then that's what people ...
- 52.2k
4
votes
Why does conjugate gradient work with this nonsymmetric preconditioner?
In short, orthogonalization of the Krylov vectors occurs with respect to the operator, but not with respect to the preconditioner.
Alright, so say we want to solve $Ax=b$ with preconditioner $B$. ...
- 717
4
votes
Accepted
Hessian-free and Truncated Newton methods
It looks like this paper is combining Hessian-free with truncated Newton method.
Yes, it is.
...the approach is referred to as Hessian-free method. That is because the Hessian is never computed ...
- 30k
4
votes
Solving the Poisson equation with Neumann Boundary Conditions - Finite Difference, BiCGSTAB
One of the standard ways to handle singular problems like Poisson with Neumann boundary conditions which lead to a sinuglar problem $Ax=b$ is to make the obtained solution orthogonal to the kernel (...
- 254
4
votes
Accepted
Why the iteration steps become twice if the step size reduces half for CG methods?
Let's say the condition number of the original matrix is $k_1$, and the one after refining the mesh is $k_2=4k_1$. You then want to compare the number of iterations necessary to reach a tolerance $\...
- 52.2k
4
votes
Accepted
What's wrong with the **PCG and MINRES** in matlab?
While very similar, each method is slightly different and you should definitely take this into account.
The GMRES method is the simplest, it will construct an orthogonal basis for $\mathcal{K}_k(A,b)$...
- 1,254
4
votes
In which cases does the nonlinear conjugate gradient method take more than $n$ steps?
The nonlinear conjugate gradient method will converge for a quadratic function in $N$ steps at most. You do not have a quadratic function, and have no guarantees on convergence. It can be helpful to ...
- 2,037
3
votes
Accepted
The linear system in Quasi Newton method
It is a well-known theorem that conjugate gradients is guaranteed to converge (in exact arithmetic) within $r+1$ steps for an identity-plus-rank-$r$ matrix, regardless of its size. In finite precision,...
- 2,435
3
votes
Boundary conditions in conjugate gradient method for poisson's equation
Neumann boundary conditions will show up in the right hand side of your problem, and so you can just start your iteration with any vector you want -- it doesn't have to satisfy any particular boundary ...
- 52.2k
3
votes
Would recalculating the residual in the conjugate gradient method help?
This tutorial talks about recalculating the residual every 50 iterations to mitigate round-off errors.
- 656
3
votes
What happens when I use a conjugate gradient solver with a symmetric positive semi-definite matrix?
To at least partially answer the question:
You have to make sure the system is solvable in the first place. As mentined in the accepted answer, "the system $Ax=b$ is solvable iff $b \bot Ker(A)$&...
- 31
3
votes
Why does smoothed aggregation multigrid method used as preconditioner in conjugate gradient slows down the solution time?
If I understand your question correctly you're solving a linear elasticity problem using conjugate gradient and it's preconditioned with a preconditioned AMG solver? It seems to me that this may be ...
- 2,037
3
votes
CG without division by 0 in a solution
Either of $p_k$ or $r_k$ being zero implies exact convergence in exact arithmetic, so that is never a problem. Conjugate gradient was used as a direct solver for linear systems of equations much ...
- 2,321
3
votes
When will the Orthomin/CG iteration fails
Your statement is not correct, I believe.
The equivalent condition for the real case is that the iteration will fail if there is a vector $x\in{\mathbb R}^n$ so that $x^T A x = 0$, which is equivalent ...
- 52.2k
3
votes
Reason for why apparent acceleration of algebraic multigrid solve by addition of positive definite diagonal matrix
The computation in your update does most of the work towards a solution. You just need to note that $\frac{\varepsilon_1}{\varepsilon_2} \leq \frac{\max D_{ii}}{\min D_{ii}} = \kappa(D)$, and that
$$
...
- 9,666
2
votes
Estimate extreme eigenvalues with CG
This question is very related to another SE question on condition number estimates which contains relevant materials.
As @Jack_Poulson mentioned, the following paper contains a detailed discussion on ...
Community wiki
2
votes
Can this equation be solved with the conjugate gradient method?
The trick is to view your equation as the first-order optimality conditions of an unconstrained optimization problem $\min_x f(x)$. Recall that the first-order optimality conditions are just $\nabla f(...
- 221
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
conjugate-gradient × 93optimization × 28
linear-solver × 17
iterative-method × 17
linear-algebra × 15
krylov-method × 12
preconditioning × 10
convergence × 9
finite-element × 8
numerics × 7
nonlinear-programming × 5
newton-method × 5
poisson × 5
gmres × 4
algorithms × 3
boundary-conditions × 3
sparse-matrix × 3
multigrid × 3
pde × 2
matlab × 2
finite-difference × 2
matrix × 2
nonlinear-equations × 2
parallel-computing × 2
constrained-optimization × 2