# Tag Info

2

Contrary to what @user21's answer, I don't think that you need to do anything special for point loads. Let's see why. A point load can be represented as a Dirac delta "function". So, in your case it would be something like $$R = \rho \delta(x - x_i)\, ,$$ where $\rho$ is the intensity of the source and $x_i$ is the position. If we use a weighted ...

1

Seen that you also have an account over at mathematica stackexchange I am going to show an implementation using Mathematica. This is certainly not the only way you can do it but hopefully gets you started. We start by creating a 1D mesh Needs["NDSolveFEM"] region = Line[{{0}, {1}}]; includePoints = {{1/3}, {2/3}}; mesh = ToElementMesh[region, &...

2

This is a (FDM) supplement to VoB's answer. You could write an extremely vectorized and optimized solver for your problem, but that is not a good first idea. Writing a for loop is easier, and once you identify the opportunities for optimization, you can implement them. Here is how I would go about it (in pseudo-code): Assume $0\leq i\leq n$ and \$0\leq j\leq ...

3

Probably not what OP was waiting for, but I think it could be pretty instructive and useful. FEM codes use a much different approach to build the so-called stiffness matrix. In practice, they loop over elements and compute for each element small matrices (in your case if you use linear elements 3by3) which are distributed to the right entries of the global ...

Top 50 recent answers are included