All Questions

816 questions
Filter by
Sorted by
Tagged with
12k views

How should boundary conditions be applied when using finite-volume method?

Following from my previous question I am trying to apply boundary conditions to this non-uniform finite volume mesh, I would like to apply a Robin type boundary condition to the l.h.s. of the domain (...
9k views

Periodic boundary condition for the heat equation in ]0,1[

Let us consider a smooth initial condition and the heat equation in one dimension : $$\partial_t u = \partial_{xx} u$$ in the open interval $]0,1[$, and let us assume that we want to solve it ...
3k views

How to incorporate the boundary conditions with the Galerkin method?

I've been reading some resources on the web about Galerkin methods to solve PDEs, but I'm not clear about something. The following is my own account of what I have understood. Consider the following ...
6k views

Are there any heuristics for optimizing the successive over-relaxation (SOR) method?

As I understand it, successive over relaxation works by choosing a parameter $0\leq\omega\leq2$ and using a linear combination of a (quasi) Gauss-Seidel iteration and the value at the previous ...
8k views

Null-space of a rectangular dense matrix

Given a dense matrix $$A \in R^{m \times n}, m >> n; max(m) \approx 100000$$ what is the best way to find its null-space basis within some tolerance $\epsilon$? Based on that basis can I then ...
885 views

Computing accurate fluxes with FEM

I have solved Poisson equation on a 3d domain with neumann and dirichlet boundary condition. I get the potential, take the gradient for each element and integrate on a surface of an element, I do this ...
67k views

How to determine the amount of FLOPs my computer is capable of

I would like to determine the theoretical number of FLOPs (Floating Point Operations) that my computer can do. Can someone please help me with this. (I would like to compare my computer to some ...
8k views

Understanding how Numpy does SVD

I have been using different methods to calculate both the rank of a matrix and the solution of a matrix system of equations. I came across the function linalg.svd. Comparing this to my own effort of ...
4k views

Applying Dirichlet boundary conditions to the Poisson equation with finite volume method

I would like to know how Dirichlet conditions are normally applied when using the finite volume method on a cell-centered non-uniform grid, My current implementation simply imposes the boundary ...
7k views

Tikhonov regularization in the non-negative least square - NNLS (python:scipy)

I am working on a project that I need to add a regularization into the NNLS algorithm. Is there a way to add the Tikhonov regularization into the NNLS implementation of scipy [1]? [2] talks about it, ...
2k views

PDE discretization with the method of rothe and the method of lines (Modular implementation)

The Heat equation is discretized in space with FV (or FEM), and a semi-discrete equation is obtained (system of ODEs). This approach, known as the method of lines, allows to easily switch from one ...
2k views

The meaning of conservative discretization in Galerkin FEM and Discontinuous Galerkin

I do understand the meanning of "conservative discretization" within the FVM/FDM framework, indeed it is well explained in this post. Now, according to the table in this slide (pp.8), it concludes: ...
1k views

Does Computational Science involve programming?

I read about computational science on Wikipedia, but my understanding is not very clear. Does computational science involve programming? How different is computational science from computational ...
1k views

Estimation of condition numbers for very large matrices

Which approaches are used in practice for estimating the condition number of large sparse matrices?
510 views

More Smearing with decreasing timestep in advection problems

I find it kind of counter intuitive, that the result of an advection gets more smeared out at the borders when decreasing the timestep (which should make it more accurate). Let there be a equally ...
2k views

Why can't Householder reflections diagonalize a matrix?

When computing the QR factorization in practice, one uses Householder reflections to zero out the lower portion of a matrix. I know that for computing eigenvalues of symmetric matrices, the best you ...
458 views

Eigenvectors of a small norm adjustment

I have a dataset that is slowly changing, and I need to keep track of eigenvectors/eigenvalues of its covariance matrix. I've been using scipy.linalg.eigh, but it'...
426 views

How to directly compute the inverse of an ill-conditioned dense matrix

I know that it is generally a bad idea to compute the inverse matrix directly. However, if it is necessary to compute the inverse of an ill-conditioned invertible dense matrix, then what can I try? ...
151 views

1k views

2k views

Numerical derivative and finite difference coefficients: any update of the Fornberg method?

When one want to compute numerical derivatives, the method presented by Bengt Fornberg here (and reported here) is very convenient (both precise and simple to implement). As the original paper date ...
394 views

Where can I find a good reference for the stability properties of several methods of solving parabolic PDEs?

Right now I have a code that uses the Crank-Nicholson algorithm, but I think that I would like to move to a higher-order algorithm for timestepping. I know that the Crank-Nicholson algorithm is stable ...
28k views

Difference between Nodes and CPUs when running software on a cluster?

I'm looking into moving some computations of mine to a data center to get more computation power. In the context of this process, I am getting confused by the differentiation of a computation node and ...
16k views

How to formulate lumped mass matrix in FEM

When solving time dependent PDE's using the finite element method, for example say the heat equation, if we use explicit time stepping then we have to solve a linear system because of the mass matrix. ...