Skip to main content
Share Your Experience: Take the 2024 Developer Survey
21 votes
Accepted

The real myth of GPU (specifically CUDA) really speed up FEM/CFD

Here's the deal with GPUs. On a GPU, every single core is slow. Really slow. However, you have thousands of cores. If you can effectively use the thousands of cores at a time, then your algorithm will ...
Chris Rackauckas's user avatar
19 votes
Accepted

Mathematically, why does mass matrix / load vector lumping work?

In the finite element method, the matrix entries and right hand side entries are defined as integrals. We can, in general, not compute these exactly and apply quadrature. But there are many quadrature ...
Wolfgang Bangerth's user avatar
14 votes
Accepted

$L^2$-convergence of finite element method when right hand side is only in $H^{-1}$ (Poisson eqn)

Yes, this is the standard Aubin-Nitsche (or duality) trick. The idea is to use the fact that $L^2$ is its own dual space to write the $L^2$-norm as an operator norm $$\|u\|_{L^2} = \sup_{\phi\in L^2\...
Christian Clason's user avatar
14 votes
Accepted

Galerkin method: Test functions vs. Basis functions

Suppose that the solution $u$ of the PDE lives in some function space $X$. We'll write the PDE as a bilinear form $A(u, v) = f(v)$ for all $v$ in $X$, where $f$ is some element of the dual space $X^*...
Daniel Shapero's user avatar
13 votes
Accepted

What does optimal convergence rate mean? How to prove whether a numerical method, e.g. FEM, has an optimal convergence rate or not?

The term is commonly used in the following way in the finite element context: Let's assume that $u\in V$ is the exact solution of the PDE, and $u_h\in V_h$ the finite element approximation. Then we ...
Wolfgang Bangerth's user avatar
13 votes
Accepted

Why do we use hermite interpolation for finite element method in beams?

The weak form of the euler-bernoulli beam equations has second order weak derivatives. This means that the finite element space requires continuity in the 1st derivatives across each element boundary....
Paul's user avatar
  • 12k
13 votes
Accepted

Under what circumstances is parallel scaling of the finite element method not "solved"?

There are multiple questions in the post, so let me address these separately: Scaling: Every parallel program is composed of sequential and parallel tasks, and Amdahl's law then guarantees that there ...
Wolfgang Bangerth's user avatar
12 votes

Finite-difference software for solving custom equations

I'm going to assume since you mention electrodynamics that you're interested in PDEs. You've already mentioned FEniCS in your comment. FEniCS offers a domain-specific language (DSL) called UFL. This ...
Daniel Shapero's user avatar
12 votes
Accepted

PETSc-like library for Julia

Julia is built in such a way that you will never see a full PETSc-like library, and that's on purpose. PETSc is not a single thing: it is an HPC library with some utility functions, linear solvers, ...
Chris Rackauckas's user avatar
11 votes
Accepted

How to calculate/derive analytic FEM Newton Jacobian

Your example is a pretty good indication that the two derivatives (with respect to $x$ and with respect to $u$) do not commute :) (In fact, they're very different beasts -- one is a Fréchet derivative,...
Christian Clason's user avatar
11 votes
Accepted

Stability of hyperbolic PDE and DG-FEM

Stability does indeed mean that small changes in the data lead to small changes in the solution. This can be shown for the linear advection equation through the energy method; in proving the stability ...
Tristan Montoya's user avatar
11 votes

Who uses finite elements with higher continuity?

This paper by Kirby and Mitchell describes the implementation of $C^1$ elements in the Firedrake package*. One of the main use cases is biharmonic problems, which show up in the elastic deformation of ...
Daniel Shapero's user avatar
10 votes
Accepted

Intro to DG Finite Element methods

For parabolic/elliptic PDE's, I highly recommend Beatrice Riviere's book: Discontinuous Galerkin methods for solving elliptic and parabolic equations: theory and implementation. For hyperbolic PDE'...
Paul's user avatar
  • 12k
10 votes

Are there any "light-weight" FEM packages around?

I've been developing a lightweight finite element library in Python 2.7 harnessing the power of NumPy arrays and SciPy sparse matrices. The general idea is that given a mesh and a finite element, you ...
knl's user avatar
  • 2,104
10 votes

What are the most important theorems in computational science?

You'll get everyone to give different answers to this question, and maybe that's alright. Here are some of my favorite ones: Taylor's theorem that a function (of sufficient smoothness) equals its ...
Wolfgang Bangerth's user avatar
10 votes

Who uses finite elements with higher continuity?

$C^1$ elements are mostly a historic relic. In the finite element method, the traditional view is that the best methods are "conforming", i.e., methods where the finite element space $V_h$ ...
Wolfgang Bangerth's user avatar
10 votes

What condition ensures the global continuity of the solution in the FEM?

For the linear elements you consider, you are mapping the shape functions from the reference cell to each of the cells of your mesh. The important properties you are using here are: The shape ...
Wolfgang Bangerth's user avatar
9 votes

What are the conceptual differences between the finite element and finite volume method?

The basic difference is simply the meaning to be attached to the results. FDM predicts point values of any aspect of the solution. Interpolation between these values is often left to the imagination ...
Philip Roe's user avatar
  • 1,154
9 votes

What is a common file/data format for a mesh (for FEM)?

The short answer is no, there is not a standard format. But there are some common ones, like Gmsh for input/output and VTK for output. Before making a decision you need to find out what do you want ...
nicoguaro's user avatar
  • 8,525
9 votes
Accepted

How can I derive the a priori error estimate for a symmetric bilinear form using lagrange finite elements?

To extend VorKir's basically correct answer, to derive a priori error estimate for finite element approximations, you need to stack the following three Lego blocks: The well-posedness of the weak ...
Christian Clason's user avatar
9 votes
Accepted

Interpolating a mathematical function using a Hermite Cubic Finite Element Space

Short answer You are missing the Jacobian of the transformation for the derivatives. Long answer The conditions that you propose for your interpolator translate into the following system of ...
nicoguaro's user avatar
  • 8,525
9 votes
Accepted

Why is the FVM traditionally used in CFD, and FEM in computational structures?

The finite element method is actually quite widely used in fluid flow problems, for example for the Stokes and Navier-Stokes equations. The delineation between the methods is more along the following ...
Wolfgang Bangerth's user avatar
9 votes
Accepted

What are all these functions in FEM? Shape function vs Basis Function vs Trial Function vs Test Function vs Interpolation Function

This confused me a lot as well when I was first studying FEM. They are often used interchangeably, but they are not necessarily all the same. Trial Functions vs Test Functions I think of it as ...
Paul's user avatar
  • 12k
9 votes
Accepted

Solving Schrodinger Equation with finite element and Crank-Nicolson?

You made an error in the indices for the real and imaginary part. $$ M\frac{\xi_{R,n+1}-\xi_{R,n}}{Δt}=-A\frac{\xi_{I,n+1}+\xi_{I,n}}2 \\ M\frac{\xi_{I,n+1}-\xi_{I,n}}{Δt}=A\frac{\xi_{R,n+1}+\xi_{R,n}}...
Lutz Lehmann's user avatar
  • 6,109
9 votes
Accepted

FEM for vector valued problems: reference request

Short answer: Just replicate the vector of interpolation functions into a block-diagonal matrix, as showed e.g. on page 5 in this lecture note. Detailed answer: Mathematically oriented texts typically ...
Zoltan Csati's user avatar
9 votes

Is it really necessary to solve a system of linear equations in the Finite Element Method?

I think your question is actually pretty fundamental and deserves a thoughtful answer. Paraphrasing a bit, your question is perhaps motivated by the observation that engineering design is often ...
rchilton1980's user avatar
  • 4,906
9 votes
Accepted

Does the weighted residual method not use energy minimization in any form?

The answer to your question depends on the problem. For example, consider the diffusion equation for a field $q$, with diffusivity $k$ and sources $f$. The variational form of this problem states that,...
Daniel Shapero's user avatar
8 votes

Why the product of symmetric-sparse matrices is not symmetric, or dense

You seem to think that: The product of two sparse matrices is sparse; The inverse of a sparse matrix is sparse; The product of two symmetric matrices is symmetric. None of these facts is true, in ...
Federico Poloni's user avatar
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_{\...
likask's user avatar
  • 906
8 votes
Accepted

What is the global problem in the two-level additive Schwarz?

Continuous finite elements Typically, if $A$ is your finite element discretization on the finest mesh, $A_i = R_i * A * R_i^T$. So, for $i=0$, $A_0$ corresponds to the finite element discretization ...
user107904's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible