New answers tagged

6

You really don't want to implement this yourself -- you'll spend a year or two on things others have already done, and will have done far better than you can hope for. The difficulty is generally getting h and p refinement to work at the same time. That is not a trivial challenge. The implementation in deal.II is largely described here: https://www.math....


0

You define a function $u$ on $\Omega=\Omega_1 \cup \Omega_2$ so that on $\Omega_1$ you have $u=u_1$ and similarly on the other part of the domain. You'd do the same with a function $v$. Then the term you have trouble with is simply $$ (\nabla u, \nabla v)_\Omega. $$


3

The elastic energy stored in your solid is computed as $$\Pi = \int_\Omega \sigma : \epsilon\, \mathrm{d}\Omega\, ,$$ where $\sigma$ is the stress tensor, $\epsilon$ is the strain tensor, and $:$ is the double contraction over the tensors. When you discretize the solid, the strain energy is $$\Pi_h = \mathbf{F}^T \mathbf{U}\, ,$$ where $h$ represents the ...


1

Finite element methods are generally easier to deal with when using adaptive mesh refinement because higher order finite difference methods have stencils that extend for several mesh sizes away from a point, and one has to deal with all of the possible hanging nodes one might encounter in this large neighborhood even if the mesh is rectangular and is derived ...


1

Since, the title of your question has a term 'finite difference' into it, I assume you are looking for a software for finite difference method. Finite difference methods are restrictive. Usually softwares are made for wide situations and range of the problems. Finite volume and finite element methods offer greater flexibility than finite difference methods. ...


0

Due to the fact you want to create a 3D triangulated surface out of a point cloud that is not necessary a closed surface (as I understand it's a topographical surface which is not closed anyway), the best method I can think of is using Advancing Front Surface Reconstruction method from CGAL: https://doc.cgal.org/latest/Advancing_front_surface_reconstruction/...


0

Just happened to have a look at this old post and happened to notice that the given calculation in the accepted answer is scientifically completely (!) wrong such that I had to outline it in this post: The given computational burden is wrong by four orders of magnitude: A calculation which actually takes less than 2 hours and a half on a modern GPU would ...


1

You need to use a different kind of indexing in l2g. Right now you are using the indices of the global vertices when deciding which rows and columns to fill. This causes wrong entries to be summed when building the global matrix. You need to instead uniquely index all edges of your mesh and use those indices in l2g.


1

Your assembly procedure seems correct to me. I made some edits in your post to correct some possible typos. Feel free to raise objections. Looking at the graphs and their legends, I see the rate of convergence as $\mathcal{O}(h)$ and $\mathcal{O}(\sqrt{h})$ for the $L^2$ and $H^1$ norms. I propose the following extensions to test your understanding: Run ...


9

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 do not bother about detailing the implementation, that is why you haven't met it. On the other hand, engineering FEM do detail the implementation (but lack the ...


4

We can show how it works on the example of linear elasticity. In classical finite elements formulations, on every node, we will have a scalar shape (base) function to which we have associated number coefficients equal to the dimension of the problem. Coefficients at nodes are interpreted as physical nodal displacements. Let displacements are are approximated ...


2

All you are guaranteed by mathematical analysis is that the numerical solution converges as the mesh size decreases. In some cases, quantities will converge from below, in others from above, and in yet others, convergence may be oscillatory. What it is in your case is not obvious and your observation that convergence appears to be from below seems as good a ...


2

The second Piola Stress for incompressible hyperelastic material is expressed as \begin{equation} \mathbf{S}=2 \frac{\partial W(\mathbf{C})}{\partial C}+pJ\mathbf{C}^{-1}=\mathbf{S}^{'}+pJ\mathbf{C}^{-1}, \end{equation} where $\mathbf{C}=\mathbf{F}^\textrm{T}\mathbf{F}$ and $J^2=\textrm{det}(\mathbf{C})$. In order that $p$ can be interpreted as hydrostatic ...


Top 50 recent answers are included