# \[ANN\] Gridap.jl 0.15 comes with major enhancements!

**URL:** <https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971>\
**Category:** Package Announcements\
**Tags:** package, announcement, pde, finite-element, gridap\
**Created:** [December 17, 2020, 11:36am UTC](https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971 "2020-12-17T11:36:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fverdugo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fverdugo/32/9446_2.png) [@fverdugo](https://discourse.julialang.org/u/fverdugo)\
**Post date:** [December 17, 2020, 11:36am UTC](https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971/1 "2020-12-17T11:36:08Z")

</div>

After months of work, the Gridap developers are happy to announce the [Gridap v0.15 release](https://github.com/gridap/Gridap.jl/tree/v0.15.0) 🚀!

This new version comes with major improvements in the user API (and also in the library internals). The most exciting novelty is how the user writes the weak form. Now, it should be as easy as “copying” it from the paper. Gridap will automatically generate an efficient Finite Element assembly loop for you, thanks to the awesome Julia JIT compiler.

## Examples

Here is how the weak form of some well-known PDEs can be specified with the new Gridap API.

### Poisson equation with a source term and a Neumann boundary condition

(see complete code [here](https://gridap.github.io/Tutorials/stable/pages/t001_poisson/))

```julia-auto
f(x) = 1.0
h(x) = 3.0
a(u,v) = ∫( ∇(v)⋅∇(u) )*dΩ
l(v) = ∫( v*f )*dΩ + ∫( v*h )*dΓ

```

### Linear elasticity without body forces

(see complete code [here](https://gridap.github.io/Tutorials/stable/pages/t003_elasticity/))

```julia-auto
E = 70.0e9;
ν = 0.33
λ = (E*ν)/((1+ν)*(1-2*ν))
μ = E/(2*(1+ν))
σ(ε) = λ*tr(ε)*one(ε) + 2*μ*ε
a(u,v) = ∫( ε(v) ⊙ (σ∘ε(u)) )*dΩ
l(v) = 0

```

### Incompressible Navier-Stokes equation

(see complete code [here](https://gridap.github.io/Tutorials/stable/pages/t008_inc_navier_stokes/))

```julia-auto
Re = 10.0
res((u,p),(v,q)) = ∫( v⋅(Re*u⋅∇(u)) + ∇(v)⊙∇(u) - (∇⋅v)*p + q*(∇⋅u) )*dΩ

```

### Poisson equation discretized with DG

(see complete code [here](https://gridap.github.io/Tutorials/stable/pages/t006_dg_discretization/))

```julia-auto
a(u,v) =
  ∫( ∇(v)⋅∇(u) )*dΩ +
  ∫( (γ/h)*v*u - v*(n_Γ⋅∇(u)) - (n_Γ⋅∇(v))*u )*dΓ +
  ∫( (γ/h)*jump(v*n_Λ)⋅jump(u*n_Λ) -
    jump(v*n_Λ)⋅mean(∇(u)) -
    mean(∇(v))⋅jump(u*n_Λ) )*dΛ

l(v) =
  ∫( v*f )*dΩ +
  ∫( (γ/h)*v*u - (n_Γ⋅∇(v))*u )*dΓ

```

### Stokes equation with an equal order DG

(see complete code [here](https://github.com/gridap/Gridap.jl/blob/master/test/GridapTests/StokesDGTests.jl))

```julia-auto
a((u,p),(v,q)) =
  ∫( ∇(v)⊙∇(u) - ∇(q)⋅u + v⋅∇(p) )*dΩ +
  ∫( (γ/h)*v⋅u - v⋅(n_Γ⋅∇(u)) - (n_Γ⋅∇(v))⋅u + 2*(q*n_Γ)⋅u )*dΓ +
  ∫( (γ/h)*jump(v⊗n_Λ)⊙jump(u⊗n_Λ) -
      jump(v⊗n_Λ)⊙mean(∇(u)) -
      mean(∇(v))⊙jump(u⊗n_Λ) +
      (γ0*h)*jump(q*n_Λ)⋅jump(p*n_Λ) +
      jump(q*n_Λ)⋅mean(u) -
      mean(v)⋅jump(p*n_Λ)
   )*dΛ

l((v,q)) =
  ∫( v⋅f + q*g )*dΩ +
  ∫( (γ/h)*v⋅u - (n_Γ⋅∇(v))⋅u + (q*n_Γ)⋅u )*dΓ

```

## How to get started?

If you are further interested in the project, visit the [Gridap.jl](https://github.com/gridap/Gridap.jl) repository. Consider to give us an ⭐!

If you want to start learning how to solve PDEs with Gridap.jl, visit our [Tutorials](https://github.com/gridap/Tutorials) repository.

You are welcome to interact with the Gridap community via our [Gitter chat](https://gitter.im/Gridap-jl/community).

## Do you want to collaborate?

We are open to scientific collaborations with research groups willing to use Gridap for their research. We can collaborate, e.g., to add new functionality to the library and to write scientific publications resulting from it.

---

<div class="post-metadata">

**Author:** ![SamBrand](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@SamBrand](https://discourse.julialang.org/u/SamBrand)\
**Post date:** [January 6, 2021, 10:25am UTC](https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971/2 "2021-01-06T10:25:12Z")

</div>

Just stumbled onto this… Just wanted to say that this looks brilliant!

Quick question: A lot of epidemic models are naturally written as integro-differential equations e.g. time since infection models where the rate of infectious contacts might be proportional to

R(t) \int\_0^\infty I(t,\tau) w(\tau) d\tau

Where the generation time distribution w(\tau) governs how infectious contacts distribute over time since an individual was infected \tau, and the instantaneous reproductive number R(t) covers changes in transmission over calendar time.

Do you think that Gridap.jl can easily solve these models?

---

<div class="post-metadata">

**Author:** ![fverdugo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fverdugo/32/9446_2.png) [@fverdugo](https://discourse.julialang.org/u/fverdugo)\
**Post date:** [January 6, 2021, 5:56pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971/3 "2021-01-06T17:56:52Z")

</div>

Hi @SamBrand!

Gridap is designed to solve PDEs via various types of Finite Element methods.

For ODEs check out [DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl)

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [January 6, 2021, 8:07pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971/4 "2021-01-06T20:07:11Z")

</div>

Offtopic, but do you have a particular resource in studying integro-differential equations within the context of epidemiology?

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [January 6, 2021, 8:58pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971/5 "2021-01-06T20:58:30Z")

</div>

I’d say no. You can. try ApproxFun though

---

<div class="post-metadata">

**Author:** ![SamBrand](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@SamBrand](https://discourse.julialang.org/u/SamBrand)\
**Post date:** [January 6, 2021, 9:17pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971/6 "2021-01-06T21:17:34Z")

</div>

Cheers!

---

<div class="post-metadata">

**Author:** ![SamBrand](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@SamBrand](https://discourse.julialang.org/u/SamBrand)\
**Post date:** [January 6, 2021, 10:37pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971/7 "2021-01-06T22:37:06Z")

</div>

DifferentialEquations.jl ecosystem is brilliant, but the time-since-infection model sort of falls inbetween ODEs and PDEs.

A vanilla version of time-since-infection could be written as:

\partial\_t S(t) = - \frac{S(t)}{N} R(t) \int\_0^\infty I(t,\tau) w(\tau) d \tau, \\ \partial\_t I(t,\tau) + \partial\_\tau I(t,\tau) = 0, \\ I(t,0) = \frac{S(t)}{N} R(t) \int\_0^\infty I(t,\tau)w(\tau) d \tau .

I have solved these sorts of equations using just standard discretisation. But always wondered if you could just drop them into a more sophisticated FEM solver…

---

<div class="post-metadata">

**Author:** ![SamBrand](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@SamBrand](https://discourse.julialang.org/u/SamBrand)\
**Post date:** [January 6, 2021, 10:41pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-0-15-comes-with-major-enhancements/51971/8 "2021-01-06T22:41:06Z")

</div>

Hi @affans .

The classic reference for me wrt to this sort of epi model is _O. Diekmann, J. A. P. Heesterbeek, Mathematical epidemiology of infectious diseases (Wiley, 2000)._

Although, just for your awareness, they use the equivalent formulation where you model the **incidence** (i.e. rate of new infections) and integrate over the past rather than the current density of people who were infected in the past. So the the equations look slightly different.
