# Julia's FEM Landscape: where should DifferentialEquations go?

**URL:** <https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592>\
**Category:** Numerics\
**Tags:** diffeq\
**Created:** [January 19, 2017, 4:41pm UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592 "2017-01-19T16:41:59Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [May 21, 2019, 1:10am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/21 "2019-05-21T01:10:15Z")

</div>

We’re starting with the automated finite difference discretization operators in DiffEqOperators.jl and the symbolic specification framework of ModelingToolkit.jl. The next step is to setup an interface for specifying arbitrary PDEs and their discretizations via ModelingToolkit operators. If you’re a student looking for a summer project in this area, PM me.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [May 21, 2019, 2:50am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/22 "2019-05-21T02:50:30Z")

</div>

What do you wish to do? What problems do you intend to solve?

---

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [May 21, 2019, 5:48am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/23 "2019-05-21T05:48:35Z")

</div>

I’d suggest designing an FEM code in a modular way: so a package for meshes, another package for quadrature, etc.

I’ve been looking for a nice way of working with meshes that captures the entire geometric structure (e.g. the ability to find elements adjoining an edge) but everything I’ve found is tied into a giant FEM framework. In my case I’m trying to make a coefficient-based p-FEM so the assumptions made by standard FEM don’t apply.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 21, 2019, 7:56am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/24 "2019-05-21T07:56:49Z")

</div>

I hope to grow [GeometryBasics](https://github.com/SimonDanisch/GeometryBasics.jl) into such a package.  
It should be possible to define arbitrary structured meshes, with arbitrary per face/ per vertex attributes.  
Let me know what’s missing and we can integrate it 🙂

---

<div class="post-metadata">

**Author:** ![pablosanjose](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablosanjose/32/7006_2.png) [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Post date:** [May 21, 2019, 9:03am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/25 "2019-05-21T09:03:06Z")

</div>

@sdanisch, I’m so happy to see this! I don’t work on PDEs, but I still find myself needing some form of generic meshing platform for bandstructure calculations, and GeometryBasics looks just like the kind of foundation I’d need. Do you plan to incorporate Delaunay triangulation routines here? How about periodic boundary conditions to meshes?

(Sorry for the slightly off-topic post).

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 21, 2019, 9:12am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/26 "2019-05-21T09:12:49Z")

</div>

TetGen uses GeometryBasics, so I’d say yes 😉  
[https://github.com/JuliaGeometry/Tetgen.jl](https://github.com/JuliaGeometry/Tetgen.jl)

---

<div class="post-metadata">

**Author:** ![pablosanjose](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablosanjose/32/7006_2.png) [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Post date:** [May 21, 2019, 9:14am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/27 "2019-05-21T09:14:55Z")

</div>

But TetGen is strictly for ~~2D and~~ 3D meshing, right? It is also not MIT-licensed. Your GeometryBasics seems dimension-agnostic, which I like (need).

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 21, 2019, 9:21am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/28 "2019-05-21T09:21:50Z")

</div>

Yeah, any other Delaunay triangulation needs to be implemented/wrapped by someone else 😉

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [May 21, 2019, 9:57am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/29 "2019-05-21T09:57:43Z")

</div>

I might look into bindings to Triangle (2D triangle meshing) over the few months. Don’t hold you breath though.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [May 21, 2019, 11:24am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/30 "2019-05-21T11:24:16Z")

</div>

See [GitHub - konsim83/TriangleMesh.jl: Generate and refine unstructured 2D triangular meshes from polygons with Julia](https://github.com/konsim83/TriangleMesh.jl) and [GitHub - cvdlab/Triangle.jl: A Julia interface to Jonathan Richard Shewchuk's Triangle library.](https://github.com/cvdlab/Triangle.jl).

---

<div class="post-metadata">

**Author:** ![c42f](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/c42f/32/52842_2.png) [@c42f](https://discourse.julialang.org/u/c42f)\
**Post date:** [May 21, 2019, 12:25pm UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/31 "2019-05-21T12:25:23Z")

</div>

Last I looked into this, the qhull library was still a standard for higher dimensional Voroni diagrams and Delaunay triangulations. There’s a (partial?) julia wrapper but it depends on pycall.

---

<div class="post-metadata">

**Author:** ![pablosanjose](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablosanjose/32/7006_2.png) [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Post date:** [May 21, 2019, 12:35pm UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/32 "2019-05-21T12:35:13Z")

</div>

Yes, I think qhull → pycall → Julia is our only option for high-dimensional Delaunay at the moment. I’m sure this is a gap that we will be able to fill with a pure Julia solution at some point. I want to tackle the problem myself, but as it is not straightforward I’m having difficulties to find the time (and courage) 😃

---

<div class="post-metadata">

**Author:** ![krcools](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krcools/32/10212_2.png) [@krcools](https://discourse.julialang.org/u/krcools)\
**Post date:** [May 21, 2019, 6:00pm UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/33 "2019-05-21T18:00:42Z")

</div>

Could I mention the existence of:

[https://github.com/krcools/CompScienceMeshes.jl](https://github.com/krcools/CompScienceMeshes.jl)

I use it for boundary elements mostly, but it is trivial to generate adjacency information etc.

---

<div class="post-metadata">

**Author:** ![Pier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pier/32/7335_2.png) [@Pier](https://discourse.julialang.org/u/Pier)\
**Post date:** [June 10, 2019, 8:03am UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/34 "2019-06-10T08:03:04Z")

</div>

I am certainly misunderstanding the issue you are mentioning, but… if you just need to find all elements adjoining an edge why not store the element/edge incidence matrix in a CSC sparse format and access it by column ?

---

<div class="post-metadata">

**Author:** ![joergbuchwald](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joergbuchwald/32/13112_2.png) [@joergbuchwald](https://discourse.julialang.org/u/joergbuchwald)\
**Post date:** [December 10, 2020, 9:31pm UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/35 "2020-12-10T21:31:58Z")

</div>

Does anyone know what happened to JuliaFEM? To me, it seems like there hasn’t been much development over the last months.  
@ChrisRackauckas can you tell something about the roadmap of DifferentialEquations.jl, with respect to the FEM development?  
Is the FENICS now the way to go or is it only an intermediate step?

---

<div class="post-metadata">

**Author:** ![isaacsas](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@isaacsas](https://discourse.julialang.org/u/isaacsas)\
**Post date:** [December 10, 2020, 9:48pm UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/36 "2020-12-10T21:48:32Z")

</div>

Have you seen [gridap.jl](https://github.com/gridap/Gridap.jl)? It is a Julia native Fenics like package.

---

<div class="post-metadata">

**Author:** ![joergbuchwald](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joergbuchwald/32/13112_2.png) [@joergbuchwald](https://discourse.julialang.org/u/joergbuchwald)\
**Post date:** [December 10, 2020, 10:01pm UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/37 "2020-12-10T22:01:49Z")

</div>

Not yet. Thx, it looks quite promising.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [December 10, 2020, 10:05pm UTC](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592/38 "2020-12-10T22:05:49Z")

</div>

Yes, Gridap.jl is taking the helm for FEM and we’ll be adding support for it in ModelingToolkit, but the discretizations will come from them.

[Previous page](https://discourse.julialang.org/t/julias-fem-landscape-where-should-differentialequations-go/1592.md?page=1)
