Skip to content

nate-sime/dolfin_dg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dolfin_dg

unit tests badge

dolfin_dg provides utility functions for the automatic generation of nonlinear DG FEM formulations using UFL.

dolfin_dg derives its name from original development with the DOLFIN component of the FEniCS project. However, the core components of dolfin_dg now solely depend on UFL.

dolfin_dg has been successfully employed with:

Specifically, what does it do?

Consider the nonlinear conservation equation

$$ \nabla \cdot \mathcal{L}(u; \nabla u) = f $$

Here $\mathcal{L}(\cdot; \cdot)$ is a semilinear operator (nonlinear in the first argument and linear in the second). The semilinear residual weak formulation, subject to appropriate boundary conditions, reads: find $u \in V$ such that

$$ \mathcal{N}(u; v) = \int_D \mathcal{L}(u; \nabla u) : \nabla v ; \mathrm{d}x - \int_{\partial D} \mathcal{L}(u; \nabla u) \cdot n \cdot v ; \mathrm{d} s - \int_D f \cdot v ; \mathrm{d} x \equiv 0 \quad \forall v \in V. $$

The DG FEM formulation of the above equation is notoriously verbose to define. Programming the code to compute the DG FEM approximation $u_h \in V_h$ is a large task. dolfin_dg provides utility functions for the automatic formulation of the DG FEM discretisation of the weak formulation. These functions work with UFL to facilitate simple implementation and efficient computation of the DG approximation of nonlinear FEM problems.

More details and citing

Paul Houston and Nathan Sime,
Automatic symbolic computation for discontinuous Galerkin finite element methods,
SIAM Journal on Scientific Computing, 2018, 40(3), C327–C357
(arXiv)

Nathan Sime and Cian R. Wilson,
Automatic weak imposition of free slip boundary conditions via Nitsche's method: application to nonlinear problems in geodynamics
(arXiv)

Dependencies

Optional dependencies
  • For dolfin_dg.dolfinx and the dolfinx demos: the core components of the FEniCSx project.
  • For dolfin_dg.dolfin and the dolfin demos: the core components of the legacy FEniCS project.
    • For the hybrid discontinuous Galerkin (HDG) solvers employing static condensation with dolfin, this LEoPart fork is required.
  • For firedrake support the core components of the Firedrake project

Installation

Navigate to the dolfin_dg directory and install with

pip install .

Legacy dolfin docker image with LEoPart fork

A docker image facilitating compilation and execution of dolfin_dg examples with the legacy version of dolfin and leopart is available:

docker run -it quay.io/natesime/dolfin_dg:master

Contributors

License

GNU LGPL, version 3.

About

Utility functions for the automatic generation of nonlinear DG FEM formulations using UFL

Resources

License

Stars

Watchers

Forks

Packages

No packages published