8
votes
Accepted
Solving Poisson equation with current BC using FEM
It is standard procedure for general case like that. You can enforce condition for electrode by Lagrange multipliers,
$$
L(u,\lambda) = \int_\Omega \sigma u_{,i} u_{,i} \, \textrm{d}V - \int_{\...
8
votes
Accepted
Solving Ax = b with sparse A and sparse b
When looking at the solution of your system, you will find that almost all entries of $x$ are nonzero although the right-hand side is "sparse". Hence, whatever algorithm you use, it'll have to visit ...
5
votes
Poisson equation finite-difference with pure Neumann boundary conditions
I know this question is old but I found an error that I wanted to clear up in @DrHansGruber 's answer. It took me a few hours to spot the issue and I wanted to post the solution to save anyone else ...
4
votes
Jacobi iteration for finite difference: when to stop?
For solving systems you shouldn't be comparing the results between each iteration but rather computing the residual.
If you consider the matrix representation to be in the standard form:
$ A\cdot y ...
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 (...
4
votes
Accepted
Iteratively solving 3D Poisson equation in MATLAB
The finite difference matrix for the Poisson equation is symmetric and positive definite.
So the preconditioned conjugate gradient algorithm is the iterative solver of choice for
this problem.
The ...
4
votes
Surface Normal for 2D Finite Element Method
As @BillGreen already said in one of the comments, the test function $v$ is actually zero on the boundary, so the whole boundary integral simply disappears.
If you want to understand why $v$ is zero, ...
4
votes
Linear solvers: How to deal with a singular system? (Poisson equation with Neumann boundary conditions)
Krylov solvers have no problem converging if the system is consistent, i.e., if the right-hand side is in the image of the system matrix $A$; see, e.g., Iterative Krylov Methods for Large Linear ...
4
votes
Solving Poisson equation with current BC using FEM
Like @likask points out in the other answer, using Lagrange multipliers is one way to do this. The other is to recognize that if you have constraints of the form $\sum_i a_i U_i=0$, then you can ...
4
votes
Accepted
Step3 in deal.II - Convergence of the mean
$h$ is a measure of the mesh size. In the example, they are using rectangular elements. For which a commonly used measure of the mesh size is the length of the largest diagonal.
Looking at the table ...
4
votes
Accepted
Integral of the Poisson Kernel
The tangent has periodic singularities, poles where it jumps from $+\infty$ to $-\infty$. At these points the inverse tangent will jump from $+\frac\pi2$ to $-\frac\pi2$. This is of course not ...
4
votes
Accepted
Does DCT diagonalize the FD discretisation of the Laplacian with Neumann boundary conditions?
The "issue" seems to have been that there is a discrepancy between the used transforms. The DCT transforms discussed in the linked paper are orthogonal, i.e. $U^{-1}=U^T$, where the even one ...
4
votes
Convergence stall when solving 2D Poisson PDE with pure Neumann boundaries (finite differences)
For this equation, with the Neumann boundary conditions the problem becomes mathematically ill-posed; if there is a solution $\phi(x,y)$ then $\phi(x,y)+const$ is also a solution. This ill-posedness ...
4
votes
Poisson equation with discontinuous variable coefficient
First, some comments on discretization schemes for elliptic problems in general.
There are some improvements you can make on the difference scheme that you've derived.
The idealized problem is to ...
3
votes
Linear solvers: How to deal with a singular system? (Poisson equation with Neumann boundary conditions)
The problem I imagine you are trying to solve is a diffusion equation with source term with homogeneous Neumann BC. To do so it must be well posed in order to obtain physical and good results.
The ...
3
votes
Mixed formulation of the Poisson equation (FEM)
For this problem you cannot use arbitrary finite elements. The finite element spaces should satisfy the so-called discrete inf-sup condition. You did not mention what elements you used so I assume ...
3
votes
Solving Ax = b with sparse A and sparse b
It is unclear to me from your question whether the answer is of theoretical
or practical interest. I'll address both.
For this to be of practical importance, either your system would need
to have a ...
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 ...
3
votes
Kronecker product representation of the finite difference laplacian
This is my attempt at providing some intuition. Everything I state might be obvious, moreover it doesn't have much to do with physics, so this could be a non-answer. I will ignore boundary conditions.
...
3
votes
Accepted
Kronecker product representation of the finite difference laplacian
Maybe this isn't a helpful response but the reason this happens for the matrix form of Laplacians is because this actually happens for the true infinite-dimensional Laplacians in some settings. In ...
3
votes
FV Discretization of source term in 2D Poisson Equation
The correct way is to average the source term which you can do easily in this case as you have a polynomial. In general you can do the average with a quadrature. For second order accuracy if the ...
3
votes
Tensor product representation for the 9-point finite difference approximations for the Poisson equation
This is too long for a comment, so I'll post an answer.
If you start from the analytical 2D-Laplace operator, it naturally is already in a (sum of) tensor product form:
$$
\Delta = \partial^2_x \...
3
votes
Accepted
Memory issues with iterative solvers
As you pointed out, your matrices are sparse which means that the number of non-zeros is small compared to the number of zeros. There are several formats to store such matrices, e.g. COO, CSC, CSR etc....
3
votes
Discretization of Poisson's equation with 2d permittivity tensor
You have
\begin{align}
\nabla \cdot \left(\begin{pmatrix} a & b \\ c & d\end{pmatrix} \nabla \phi \right) &= \nabla\cdot\begin{pmatrix} a \partial_x\phi + b\partial_{y}\phi \\ c\partial_{x}...
3
votes
Accepted
Solving Poisson's Equation with Periodic Boundary Conditions
Here's what I think the problem is. You have the equation:
$$\Delta u(x) = f(x), \, x\in \Omega.$$
where $\Omega$ is a circle/torus. First you have some compatibility constraints you have to satisfy. ...
2
votes
Accepted
Boundary treatment with higher order methods
Common Ghost cell treatment in CFD
Ghost cell treatment is an art in CFD, we can't arbitrarily choose ghost cell for all the problems. Let's assume $0$ is boundary point and $-1$ is ghost point and $...
2
votes
Solving Poisson equation while suffering from the curse of dimensionality
The short answer is that you can't do this -- it's outside our computational power today. To explain why, think of just building the box itself, where you have one degree of freedom on each vertex. In ...
2
votes
Accepted
Finite difference equations representing semilinear elliptic PDE
Since you don't end up with a linear system, you have to use a nonlinear root finder. The most common choice is Newton's method, because it converges quite quickly (if your initial guess is good ...
2
votes
Accepted
Explicitly including boundary points in a set of finite-difference equations
If you include the boundary condition directly in the matrix, you will only get the g value at the points where the boundary is prescribed. If we use 5 nodes with the following BCS:
$$u_1=g_1$$ and $$...
2
votes
Accepted
FFT Poisson Solver for non-uniform grid
First, there are non-uniform mesh FFT variations that you could use without having to do the coordinate transformation.
Second, the FFT is not easily applicable to the transformed problem. The reason ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
poisson × 147finite-difference × 40
finite-element × 35
boundary-conditions × 26
pde × 16
elliptic-pde × 16
iterative-method × 12
matlab × 11
python × 11
numerics × 11
linear-solver × 11
convergence × 10
discretization × 10
fluid-dynamics × 8
finite-volume × 8
electromagnetism × 8
multigrid × 8
sparse-matrix × 6
fourier-analysis × 6
conjugate-gradient × 6
linear-algebra × 5
nonlinear-equations × 5
spectral-method × 5
laplacian × 5
computational-physics × 4