2
$\begingroup$

I would like to use MMA FEM abilities for example to apply galerkin's method to solve intergal equations or nonstandard numerical applications in a given mesh m.

Is it possible to extract the "node-functions" (one node value ==1, all others==0) from ElementMeshInterpolation[]?

To be more clear here is a very simple attempt( 1dimensional mesh, 3 nodes)

<< "NDSolve`FEM`"   
m = ToElementMesh["Coordinates" -> {{0}, {2/3}, {1}},"MeshElements" -> {LineElement[{{1, 2}, {2, 3} }]} ]
id = IdentityMatrix[ Length@m["Coordinates"]];
ff[x_] := Map[ElementMeshInterpolation[{m}, #][x] &, id];   

For further use with symbolic(!) node values {ui} I can use

ff[x].{u1,u2,u3}

My question: Is it possible to extract ff[x] more efficient?

$\endgroup$
  • 1
    $\begingroup$ Nope. Using ElementMeshInterpolation is very, very slow (has been the topic in several discussions) and there are (at least to my knowledge) currently no other alternatives to assembling by hand (which is not very hard) . I did something the like for the Laplacian of an embedded surface here. Maybe it helps. I also used the same approach for integral operators over curves. Let me know if I should provide code for it. $\endgroup$ – Henrik Schumacher Jan 2 '18 at 17:44
  • $\begingroup$ Just for clarification: I assumed that you aim at assembling the system matrix and right hand side by integrating numerically against ff[x]. $\endgroup$ – Henrik Schumacher Jan 2 '18 at 17:54
  • $\begingroup$ @ Henrik Schumacher: Yes! Thank you for your tricky approach. I have to think about because I should provide initial mesh node values $\endgroup$ – Ulrich Neumann Jan 2 '18 at 18:48
  • $\begingroup$ @HenrikSchumacher, can you show me an example where ElementMeshInterpolation is "very, very slow"? I suspect there is some miss understanding here that should be easy to remedy. $\endgroup$ – user21 Jan 3 '18 at 7:27
  • $\begingroup$ I do not understand your question. Are you looking for the shape functions? Can you explain a bit how you plan to compute the integral equations? I gave a presentation a while back on how to write PDE solvers. That can possibly serve as a basis - for example the FEM method in NIntegrate uses the approach shown there. $\endgroup$ – user21 Jan 3 '18 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.