Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [linear-solver]

Referring to methods for solving linear systems of equations.

2
votes
1answer
71 views

Memory/speed tradeoff for many small matrix inverses

Problem In the case of a finite element code, I have many small (order of 30x30) matrix inverses (or LU factorizations), one per finite element. These matrix inverses never change and must be applied ...
0
votes
1answer
37 views

How to access solution to linear system in PETSc?

I have just started with PETSc hence it might seem like a very stupid question but I couldn't find any answer in manual. After Calling KSPSolve, where can I access the soluition for my linear system? ...
2
votes
1answer
54 views

How many operations are needed for LAPACK's zgesv to solve a linear system?

I have a linear system of complex numbers. I am using LAPACK' zgesv (actually I am using intel MKL LAPACKE, but I am assuming the algorithm is the same). No assumption can be made about the system. I ...
2
votes
2answers
144 views

Lost on Matrix Inversion

I try to implement some big matrix inversion. My system configuration is Hardware:- Memory: 62.8GiB, Processor: Intel Xeon(R)CPU E5-2670 v3 @2.30GHZ*48 To implement matrix inversion I am using ...
0
votes
1answer
70 views

Use of GPU with respect to CPU

I have research work where I need to compute a matrix inversion. The matrix has a size $31300\times31300$. I am using a universal java matrix package to invert this matrix. But as the dimension of the ...
0
votes
0answers
62 views

Is it possible to solve the incompressible Navier-Stokes equations by solving just one matrix per timestep?

I'm trying to simulate the 2D incompressible Navier-Stokes equations using a finite difference scheme that uses the implicit Backwards Euler method for moving the simulation forward in time. I have ...
2
votes
1answer
61 views

How can a CG solver solve a non positive definite sparse matrix

I am using the CUSP CG solver and I ran it on couple of sparse matrices from the University of Florida sparse matrix collection. The solver was able to solve non positive definite sparse matrices. My ...
2
votes
1answer
118 views

Can the Power Method be used here?

Given a set of $n$ points on which a triangulation is performed, it is possible to construct coefficients $\lambda_{ij}>0$ such that each point $x_i$ is a convex combination of the points connected ...
6
votes
1answer
127 views

Solving linear system of the form $ABx=b$

I would like to solve a linear system of the form $ABx=b$ in parallel, where $A$ and $B$ are large, sparse matrices. Currently, I am forming the system matrix $AB$ explicitly, but I would like to ...
4
votes
2answers
123 views

How “sparse” should a sparse matrix be to see benefits?

I have a matrix, whose size scales as $2^N$ (assume even $N$). In each row of the matrix, only about $2^{N/2}$ of the entries are filled ($N$ can be somewhere between 10 and 40, depending on what's ...
5
votes
0answers
53 views

conjugate gradient for Newton's method with non positive definite Hessian matrix

I want to minimize a non-linear function $f(x)$ using Newton's method. At each optimization step, I compute a descent direction $d$ to update $x$ using a second-order approximation of $f(x)$: $$ \...
1
vote
1answer
173 views

How to use CSDP to express a semidefinite program?

I am trying to use CSDP and am struggling with it. Consider, for example, the following semidefinite program $$\begin{array}{ll} \text{minimize} & 0\\ \text{subject to} & Q - A' Q A - \...
2
votes
0answers
90 views

Efficiently solve linear system with matrix quadratic form

Take the system $$A^TCAx=b$$ where $$A\in\mathbb{R}^{n\times m},\;C\in\mathbb{R}^{n\times n},\;x,b\in\mathbb{R}^{m}, \;m\leq n$$ and $$A^TA=I$$ and $$Cy=d$$ can be solved efficiently in general (...
1
vote
1answer
58 views

Partitioning SPD matrix with METIS to preserve block SPD-ness

I am using the METIS to partition a matrix and then using domain decomposition to solve the subdomains in parallel using the Restricted Additive Schwarz method. I am currently trying to solve some ...
2
votes
1answer
112 views

Finite Elements: using preconditioned conjugate gradients with incomplete cholesky decomposition

I have to write a little finite elements code in C. I was asked to implement the conjugate gradients method, which I have done. Now, I am looking to improve further the efficiency of my program by ...
0
votes
0answers
48 views

How do I “push” matlab's lsqr solver to a particular solution?

The background to my problem can be found here: Iteratively solving a sparse, ill-conditioned system I have a function that now works well. When I give it test data, I recover the expected result. ...
3
votes
0answers
91 views

Iteratively solving a sparse, ill-conditioned system

I have a sparse (density = 0.2%), ill-conditioned system that I am trying to solve, with no luck. Background I have a sequence of sampled data, where two of every 8 samples have been zeroed due to a ...
1
vote
1answer
63 views

Reordering algorithm for minimization of ram usage of a skyline matrix

The stiffness matrix of $Ax=B$ system of linear equations, where $A$ is an $n\times n$ symmetric matrix stored in the form of symmetric skyline matrix, that is associated with a finite element model ...
2
votes
2answers
179 views

Automatic Differentiation - reverse accumulation of linear system solve

I am studying the reverse mode of automatic differentiation. The reverse mode of automatic differentiation allows the efficient computation of a the derivative of a single dependent variable $y$ with ...
0
votes
1answer
52 views

Conjugate Gradient for non symmetric matrix

I have a large sparse matrix which is symmetric for the location of non zero values, but the values are different. Could I still use the CG method? I don't have much knowledge of linear algebra, the ...
0
votes
0answers
29 views

Minimum Residual Richardson Iteration for non positive definite matrix

I am trying to solve a matrix equation using a simple Minimum Residual Richardson method (http://depts.washington.edu/ph506/Boyd.pdf : page 304-306). I am using a finite difference matrix as ...
3
votes
1answer
97 views

Solve $A^{-1} b$ when one column is replaced

Given square matrix $A_0$, vector $b$, vector $A_0^{-1}b$ and matrices $A_1, A_2, \dots, A_k$, in which each $A_i$ is generated from $A_{i-1}$ by replacing one single column, I would like to find an ...
2
votes
0answers
61 views

Acceleration of matrix geometric series

Suppose we want to find $x$ such that: $$x=b+Ax$$ where $A$ is a large sparse square matrix with eigenvalues in the unit circle. There are two representations of the solution: 1) $$x=(I-A)^{-1}b,$$...
0
votes
0answers
75 views

Julia--background code for “jacobi” and “gauss_seidel”

Considering the system below, I can solve it by both Jacobi's method and Gauss-Seidel's method. I know there are pre-made functions for both in Julia, which is what I used, but I'd like to to see ...
1
vote
1answer
111 views

Efficiency of parallel direct linear solver

I am currently working on solving a positive definite symmetric systems in parallel. The parallel direct solver I used is MUMPS. However, the performance and efficiency of the parallel direct solver ...
0
votes
0answers
25 views

MG - B-splines - BC conditions

I am trying to implement multigrid method for poisson problem, which was discretized by using bi-cubic B-spline basis functions. I am wondering, is there any literature available on how to treat/...
2
votes
1answer
82 views

Which iterative method and preconditioner from petsc should be used when solving linear algebra in parallel?

I am currently trying to parallelize the incompressible flow solver code. However, when I run the code I realise that the parallel code takes much longer time than sequential code to finish one ...
0
votes
1answer
92 views

Questions about iterative projection methods in Saad book

I am reading Chapter 5 of Saad's iterative methods book, and I don't understand section 5.2.1 about the two propositions of optimality results. In the statements of the propositions, what does it mean ...
2
votes
1answer
99 views

MA57 vs HSL_MA57: symmetric indefinite solvers

What are the differences between MA57 and HSL_MA57 solvers? I'm in an optimization class that will make use of symmetric indefinite factorizations, and I'm trying to learn about the distinction ...
1
vote
0answers
54 views

Why do higher order finite elements (Q2) do not perform well for large Peclet number flows, as compared to Q1 finite elments?

I a solving the 2d steady state convection-diffusion problem on the famous flow around a cylinder in rectangular domain benchmark. My numerical results show that with Q1 finite elements, the solver is ...
0
votes
0answers
46 views

Symmetric Positive Definite matrix for checking my code using LAPACK [duplicate]

I am learning to use LAPACK and BLAS libraries to solve $Ax = B$, where $A$ is a banded symmetric positive definite $(N \times N)$ matrix and $B$ is a vector of size $N\times 1$ and is solved for $x$. ...
1
vote
1answer
49 views

Optimal algorithm choice for mixed diagonal/dense problem

$$ \text{Let}\\ A, B \in \mathbb{C}^{n \times n} \text{ and } \hat{\alpha}, \hat{\beta} \in \mathbb{C}^{n}, \hat{f} \in \mathbb{C}^{2n} \\ \text{Find }\\ \underline{\mathbf{x}} \in \mathbb{C}^{2n} \...
0
votes
1answer
50 views

Matlab backslash reordering algorithm

For the linear system $\mathbf A \mathbf x = \mathbf b$ generated from 2D Poisson equation using the standard central finite difference method, $$ \mathbf A = \begin{bmatrix} \mathbf K & -\mathbf ...
0
votes
1answer
135 views

How to verify solution to pre-conditioned linear systems solver?

I am solving Ax=b. A has a very large condition number (> O(10^10)) I am using the conjugate gradients method with point jacobi pre-conditioning. I obtained a solution 'x' that "looks" reasonable. ...
2
votes
1answer
50 views

Implicit solution to Sylvester equation

Suppose a matrix $M\in\mathbb{R}^{n\times n}$ is defined as the solution to a Sylvester equation $$AM+MB=C,$$ for some fixed (known) matrices $A,B,C$. In the regime where $n$ is large, we may with ...
1
vote
1answer
66 views

Solving for $C$ in $Q = YCZ$ using least squares in Matlab

I am trying to solve for the matrix $C$ in $Q = YCZ$ in matlab. I have preliminary results but they don't seem realistic. Here, $Q$ is $n \times m-1$, $Y$ is $n \times p$, $C$ is $p \times m$ and $Z$ ...
1
vote
1answer
162 views

Method to solve linear, first order ODE of generalized matrix matrix form

The equation and its meaning: Consider two sets $(A)_{l=0,...,m_a},$,$(B)_{l=0,...,m_b}$ of hermitian matrices and a set of positive semidefinite matrices $(C)_{l=0,...,m_c}$. Each matrix has the ...
1
vote
0answers
46 views

Parallel dense solve with submatrices from mesh refinement with Petsc

For a Bounday Element Method problem I require the solution of a system of linear equations with multiple right-hand sides. Though this is a dense system, I still want to do it via Petsc in parallel. ...
1
vote
0answers
40 views

Iterative solver, which balances the equations with the biggest errors

I am trying to understand the mathematical side of an algorithm, which approximates the solution of coulomb's law. Their approach is to balance the two elements with the biggest positive/negative ...
2
votes
0answers
134 views

Iterative linear solvers compatible with automatic differentiation?

I'm using automatic differentiation on a function that contains a sparse nonsymmetric linear system to be solved. I was using BiCGStab to solve this part of the function, but noticed the derivatives ...
1
vote
3answers
179 views

Practical reference on sparse linear solvers for PDEs (Navier-Stokes, Poisson) and on learning PETSc

My background is mainly engineering and applied research and I have been a developer or some CFD software, but mostly at high level without worrying about linear solvers and the like. This has been ...
1
vote
2answers
305 views

Linear solvers: How to deal with a singular system? (Poisson equation with Neumann boundary conditions)

The question is in the context of iterative numerical solution of large PDE systems with Finite Differences or Finite Elements: Stating the Poisson equation with Neumann boundary conditions will lead ...
1
vote
1answer
159 views

Algebraic multigrid in PETSc

Consider a potential/poisson equation on a very large, complicated geometry. Currently, an self-written FEM and linear solvers from NumPy are used. Performance is, of course, not good enough for ...
2
votes
0answers
47 views

Scaling for a nonsymmetric eigenvalue problem

I have an eigenvalue problem emerging from the internal vibro-acoustic coupling. The eigenvalue problem is nonsymmetric but it was proven in literature that it results in real eigenvalues and ...
4
votes
1answer
185 views

Why is the speed of the parts of the LU-decomposition so different?

I know that an easy way to solve the matrix problem $$A\cdot x=b$$ is the LU decomposition $$\begin{split} L,\,U&=\text{lu}(A)\\ y&=\text{solve}(L,\,b)\\ x&=\text{solve}(U,\,y) \end{split}$...
5
votes
2answers
281 views

Solving Poisson equation with current BC using FEM

I have a 3-dimensional domain D, with 3 types of BC which I am trying to solve the Poisson equation on. $$-\nabla \cdot (\sigma(x,y,z)\nabla u)=0$$ Insulator (Neumann BC) Electrode set at some ...
0
votes
0answers
40 views

Alternatives for ScaLAPACK pdgesv_ to reduce solving time [duplicate]

I call ScaLAPACK pdgesv_ inside of my FE code. Now, I have to solve matrices of size more than $20000 \times 20000$ and pdgesv_ ...
1
vote
5answers
3k views

Fast c++ library to solve very big sparse systems

I am working on a project with electrical circuits, where I am trying to compute the voltages at all the nodes of an electrical circuit. I know that the electrical circuit is a perfect grid, so each ...
1
vote
1answer
128 views

Fast counting of all submatrices of a binary matrix with a full column rank

I have a binary full-rank matrix of size, say, $25 \times 50$. I need to count how many subsets of its columns form matrices with a full column rank, i.e. all the columns in the subset are linearly ...
2
votes
1answer
365 views

Which is the best subroutine available for solving sparse linear system of equations [closed]

I am trying to solve the system of linear equations: $AX=B$. For this currently I am using Intel MKL Pardiso solver. It works well when the order of $A$ is around $13500\times13500$ and below. Above ...