We (@santiagobadia and @fverdugo) are happy to announce Gridap.jl a new Finite Element framework written in Julia for the numerical simulation of a wide range of mathematical models governed by partial differential equations (PDEs).
Gridap.jl is designed with three main purposes:
- to help application experts to easily simulate complex PDE-based real world problems
- to help researchers improve productivity when developing new Finite Element techniques
- and also for its usage in numerical PDE courses
What can Gridap.jl do ?
Gridap is able to solve different types of PDEs:
- linear and nonlinear
- Steady state, state-dependent, and time-dependent
- Single field and multi-physics
- PDEs in 1D, 2D, 3D, 4D, 5D, …
with different types of Finite Element techniques:
- Continuous and Discontinuous Galerkin methods
- Grad, div, and curl-conforming interpolations of arbitrary order
- Embedded Finite Elements (AgFEM and CutFEM)
that can easily be extended.
Why Gridap.jl ?
The main motivation behind Gridap.jl is to find an improved balance between computational performance, user-experience and work-flow productivity, when working with Finite Element libraries. To this end, the library design is based on lazy data-structures that represent objects (e.g., elemental matrices and vectors) on the entire computational domain. This allows us the library developers to hide assembly loops and other core computations from the user-code leading to a very compact, user-friendly, syntax, while providing a high degree of flexibility to users to define their own FE solvers.
For instance a Poisson problem can be solved with Gridap.jl in few lines of code by using the different abstractions provided by the library:
using Gridap
# FE mesh (aka discrete model)
url = "https://raw.githubusercontent.com/gridap/Tutorials/master/models/model.json"
model = DiscreteModelFromFile(download(url,"model.json"))
# Test and trial FE spaces
order = 2; V0 = TestFESpace(
reffe=:Lagrangian, order=order, valuetype=Float64,
conformity=:H1, model=model, dirichlet_tags="sides")
g(x) = 2.0; Ug = TrialFESpace(V0,g)
# Volume terms
trian_Ω = Triangulation(model)
degree = 2*order; quad_Ω = CellQuadrature(trian_Ω,degree)
a_Ω(u,v) = ∇(v)⋅∇(u); b_Ω(v) = v
t_Ω = AffineFETerm(a_Ω,b_Ω,trian_Ω,quad_Ω)
# Neumann terms
neumanntags = ["circle", "triangle", "square"]
trian_Γ = BoundaryTriangulation(model,neumanntags)
quad_Γ = CellQuadrature(trian_Γ,degree)
h(x) = 3.0; b_Γ(v) = v*h
t_Γ = FESource(b_Γ,trian_Γ,quad_Γ);
# FE problem and solution
op = AffineFEOperator(Ug,V0,t_Ω,t_Γ)
solver = LinearFESolver(LUSolver())
uh = solve(solver,op)
# Output file for visualization
writevtk(trian_Ω,"results",cellfields=["uh"=>uh])
How to start ?
If you are further interested in the project, visit the Gridap.jl repository.
If you want to start learning how to solve PDEs with Gridap.jl, then visit our Tutorials repository.