# \[ANN\] Gridap.jl: A feature-rich Finite Element ecosystem 100% in Julia

**URL:** <https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824>\
**Category:** Package Announcements\
**Tags:** package, announcement, pde, fem\
**Created:** [July 10, 2020, 5:59am UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824 "2020-07-10T05:59:30Z")\
**Posts on this page:** 10\
**Page:** 3

<div class="post-metadata">

**Author:** ![vavrines](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vavrines/32/8024_2.png) [@vavrines](https://discourse.julialang.org/u/vavrines)\
**Post date:** [July 30, 2020, 8:15pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/41 "2020-07-30T20:15:17Z")

</div>

Just come back from JuliaCon, really nice work for the Gridap.

I just met the same issue as johnh.  
Regarding it, I think it would be much better to note in README Gmsh sdk is needed rather than Gmsh itself. Otherwise the sentence `gmsh_jl = joinpath(gmsh_root,"lib","gmsh.jl")` won’t work.

---

<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:** [July 30, 2020, 8:22pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/42 "2020-07-30T20:22:39Z")

</div>

Yes, we need to clarify this.

In any way, an artifact would be even better!

---

<div class="post-metadata">

**Author:** ![AndiMD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andimd/32/6531_2.png) [@AndiMD](https://discourse.julialang.org/u/AndiMD)\
**Post date:** [August 11, 2020, 10:56am UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/43 "2020-08-11T10:56:06Z")

</div>

Great package, love the simple API!  
I would really like to see importing hexahedra (and pyramids) work in the future. I had a look at the code, but could not get my head around the index juggling

---

<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:** [August 11, 2020, 4:07pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/44 "2020-08-11T16:07:24Z")

</div>

> [@AndiMD](#):
>
> I would really like to see importing hexahedra (and pyramids) work in the future.

Have you tried it for hexs? Which kind of error do you get? Perhaps you can open an issue in [GitHub - gridap/GridapGmsh.jl: Gmsh generated meshes for Gridap](https://github.com/gridap/GridapGmsh.jl)

---

<div class="post-metadata">

**Author:** ![AndiMD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andimd/32/6531_2.png) [@AndiMD](https://discourse.julialang.org/u/AndiMD)\
**Post date:** [August 11, 2020, 5:52pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/45 "2020-08-11T17:52:23Z")

</div>

Is this supposed to work? It saw this issue opened by yourself:  
[https://github.com/gridap/GridapGmsh.jl/issues/3](https://github.com/gridap/GridapGmsh.jl/issues/3)  
so I concluded this is not in a working state. I get errors like this for quad and hex meshes:  
`ERROR: BoundsError: attempt to access 1365-element Array{Int64,1} at index [0]`  
for meshes that open perfectly fine in gmsh.

---

<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:** [August 11, 2020, 6:21pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/46 "2020-08-11T18:21:48Z")

</div>

Yes, the issue is correct. Hex meshes are not suposed to work at the moment. I assume that the fix should not be very difficult.

---

<div class="post-metadata">

**Author:** ![bplcn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bplcn/32/7552_2.png) [@bplcn](https://discourse.julialang.org/u/bplcn)\
**Post date:** [August 12, 2020, 11:47pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/47 "2020-08-12T23:47:02Z")

</div>

Impressive work! I am now reading the tutorial and codes learn how to use it. I am wondering that if linear constrains on DoF of nodes can be set in the Gridap now. If so some speical boundary condition, i.e. periodic boundary condition, can be implemented. Thanks!

---

<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:** [August 13, 2020, 6:11am UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/48 "2020-08-13T06:11:46Z")

</div>

The answer is yes, yes.

For periodic conditions (now only for Cartesian meshes)

```julia
dimain = (0,1,0,1,0,0.01)
cells = (4,4,3)
model = CartesianDiscreteModel(domain,cells;isperiodic=(false,false,true))

```

For linear DOF constraints:

[https://github.com/gridap/Gridap.jl/blob/master/test/FESpacesTests/FESpacesWithLinearConstraintsTests.jl](https://github.com/gridap/Gridap.jl/blob/master/test/FESpacesTests/FESpacesWithLinearConstraintsTests.jl)

hope it helps

---

<div class="post-metadata">

**Author:** ![larsm](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@larsm](https://discourse.julialang.org/u/larsm)\
**Post date:** [August 17, 2020, 3:12pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/49 "2020-08-17T15:12:56Z")

</div>

Is it, or will it be, possible to have nonlinear boundary conditions in Gridap? Like for example grad(u)\*n = u^4, or grad(u)\*n = u/(u+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:** [August 17, 2020, 3:54pm UTC](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824/50 "2020-08-17T15:54:32Z")

</div>

Yes, sure. You only need to include `n_Γ⋅∇(u) - f(u)` in your residual, by doing something like this:

```julia
n_Γ = get_normal_vector(trian_Γ)
@law f(u) = u^4
t_Γ = FETerm( (u,v) -> v*(n_Γ⋅∇(u) - f(u)) , trian_Γ,quad_Γ)

```

where `trian_Γ` is the `BoundaryTriangulation` instance of your boundary, and `quad_Γ` the corresponding `CellQuadrature`. Do not forget to add the term `t_Γ` when creating the `FEOperator`.

[Previous page](https://discourse.julialang.org/t/ann-gridap-jl-a-feature-rich-finite-element-ecosystem-100-in-julia/42824.md?page=2)
