• Stars
    star
    636
  • Rank 68,488 (Top 2 %)
  • Language
    Julia
  • License
    MIT License
  • Created about 5 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Grid-based approximation of partial differential equations in Julia

Documentation
Build Status
Build Status Codecov
Community
Join the chat at https://gitter.im/Gridap-jl/community
Citation
DOI

What

Gridap provides a set of tools for the grid-based approximation of partial differential equations (PDEs) written in the Julia programming language. The library currently supports linear and nonlinear PDE systems for scalar and vector fields, single and multi-field problems, conforming and nonconforming finite element (FE) discretizations, on structured and unstructured meshes of simplices and n-cubes. It also provides methods for time integration. Gridap is extensible and modular. One can implement new FE spaces, new reference elements, use external mesh generators, linear solvers, post-processing tools, etc. See, e.g., the list of available Gridap plugins.

Gridap has a very expressive API allowing one to solve complex PDEs with very few lines of code. The user can write the underlying weak form with a syntax almost 1:1 to the mathematical notation, and Gridap generates an efficient FE assembly loop automatically by leveraging the Julia JIT compiler. For instance, the weak form for an interior penalty DG method for the Poisson equation can be simply specified as:

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Γ

See the complete code here. As an example for multi-field PDEs, this is how the weak form for the Stokes equation with Neumann boundary conditions can be specified:

a((u,p),(v,q)) =
  ∫( ∇(v)⊙∇(u) - (∇⋅v)*p + q*(∇⋅u) )*dΩ

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

See the complete code here.

Documentation

  • STABLE — Documentation for the most recently tagged version of Gridap.jl.
  • DEVEL — Documentation for the in-development version of Gridap.

Tutorials

A hands-on user-guide to the library is available as a set of tutorials. They are available as Jupyter notebooks and html pages.

Installation

Gridap is a registered package in the official Julia package registry. Thus, the installation of Gridap is straight forward using the Julia's package manager. Open the Julia REPL, type ] to enter package mode, and install as follows

pkg> add Gridap

Plugins

Examples

These are some popular PDEs solved with the Gridap library. Examples taken from the Gridap Tutorials.

Poisson equation Linear elasticity Hyper-elasticity p-Laplacian
Poisson eq. with DG Darcy eq. with RT Incompressible Navier-Stokes Isotropic damage

Known issues

Since Julia 1.6 onwards we have noticed large first call latencies of Gridap.jl codes with the default compiler optimization level (i.e., -O2). In general, while developing code, but specially if you are noting high first call latencies, we recommend to run julia with the -O1 flag. For production runs use -O2 or -O3.

Gridap community

You can ask questions and interact with the Gridap community on the Julia Slack channel #gridap (see here how to join). or our gitter.

Contributing to Gridap

Gridap is a collaborative project open to contributions. If you want to contribute, please take into account:

  • Before opening a PR with a significant contribution, contact the project administrators, e.g., by writing a message in our gitter chat or by opening an issue describing what you are willing to implement. Wait for feed-back.
  • Carefully read and follow the instructions in the CONTRIBUTING.md file.
  • Carefully read and follow the instructions in the CODE_OF_CONDUCT.md file.
  • Open a PR with your contribution.

Want to help? We have a number of issues waiting for help. You can start contributing to the Gridap project by solving some of those issues.

How to cite Gridap

In order to give credit to the Gridap contributors, we simply ask you to cite the references below in any publication in which you have made use of the Gridap project. If you are using other Gridap sub-packages, please cite them as indicated in their repositories.

@article{Badia2020,
  doi = {10.21105/joss.02520},
  url = {https://doi.org/10.21105/joss.02520},
  year = {2020},
  publisher = {The Open Journal},
  volume = {5},
  number = {52},
  pages = {2520},
  author = {Santiago Badia and Francesc Verdugo},
  title = {Gridap: An extensible Finite Element toolbox in Julia},
  journal = {Journal of Open Source Software}
}

@article{Verdugo2022,
  doi = {10.1016/j.cpc.2022.108341},
  url = {https://doi.org/10.1016/j.cpc.2022.108341},
  year = {2022},
  month = jul,
  publisher = {Elsevier {BV}},
  volume = {276},
  pages = {108341},
  author = {Francesc Verdugo and Santiago Badia},
  title = {The software design of Gridap: A Finite Element package based on the Julia {JIT} compiler},
  journal = {Computer Physics Communications}
}

Contact

Please, contact the project administrators, Santiago Badia, Francesc Verdugo, and Alberto F. Martin for further questions about licenses and terms of use.

More Repositories

1

Tutorials

Start solving PDEs in Julia with Gridap.jl
Julia
116
star
2

GridapDistributed.jl

Parallel distributed-memory version of Gridap
Julia
97
star
3

GridapGmsh.jl

Gmsh generated meshes for Gridap
Julia
36
star
4

GridapODEs.jl

Time stepping for Gridap
Julia
33
star
5

GridapMakie.jl

Makie plotting recipes for Gridap
Julia
33
star
6

GridapEmbedded.jl

Embedded finite element methods in Julia
Julia
32
star
7

GridapPETSc.jl

Provides PETSc solvers to the Gridap project
Julia
30
star
8

SparseMatricesCSR.jl

Sparse matrices in CSR format for Julia computations
Julia
29
star
9

MiniQhull.jl

A small Julia wrapper of the Qhull library
Julia
29
star
10

STLCutters.jl

Julia
11
star
11

GridapPardiso.jl

Provides Pardiso solvers to the Gridap project
Julia
10
star
12

GridapP4est.jl

Julia
9
star
13

P4est_wrapper.jl

Julia wrappers for p4est library
Julia
9
star
14

GridapSolvers.jl

Solvers and preconditioners for the Gridap ecosystem.
Julia
8
star
15

GridapHybrid.jl

Hybrid discretisation methods in Julia (VEM, HDG, HHO, etc) 🚧 🚧 🚧 Work in progress 🚧 🚧🚧
Julia
6
star
16

GSoC

5
star
17

JourneeGridap2022

Material for the Gridap tutorial day hosted by Groupe Calcul and INRIA Saclay on 1st December 2022
Jupyter Notebook
5
star
18

GridapTalks

Videos and slides about Gridap
TeX
5
star
19

GridapWorkshop2023Material

Material corresponding to the Gridap Workshop, held at ANU Canberra, Australia, 28th/29th, Nov, 2023
Jupyter Notebook
4
star
20

TensorPolynomialBases.jl

++REPO NOT MAINTAINED++ Gallery of tensor-valued multivariate polynomial bases for the julia language
Julia
3
star
21

UnstructuredGrids.jl

++REPO NOT MAINTAINED++ Helper routines for topological operations on unstructured grids in julia
Julia
3
star
22

TutorialsForDevelopers

Learn the internals to become a Gridap developer
Julia
1
star
23

CellwiseValues.jl

++REPO NOT MAINTAINED++ Data structures defined on the cells of a grid
Julia
1
star
24

GridapWorkshopNCI2023

Public files of the Workshop webpage + materials
JavaScript
1
star
25

GridapGPU.jl

Julia
1
star