Skip to content

shwina/firedrake-gpu

 
 

Repository files navigation

Minimal examples of the desired firedrake operations.

test_minimal.py assembles $\int v \text{ d}x$, expressed in UFL as v * dx. This is a 1-form and the first example we are interested in.

test_laplace.py assembles $\int \nabla v \cdot \nabla u \text{ d}x$, expressed in UFL as dot(grad(v), grad(u)) * dx. This is a 2-form and an example of the further forms we will be assembling. A detailed explanation of this form can be found in section 3.2 of this paper. It is assembled over two different finite element spaces - one for u and one for v. Note that the action of this 2-form against a fixed vector is used for checking - this is to avoid storing large matrices.

test_coefficients.py assembles $\int (f + g)v \text{ d}x$, expressed in UFL as (f + g) * v dx. f, g and v are all expressed in different finite element spaces. This demonstrates the use of coefficients.

Along with the full scripts, there are also *_no_firedrake.py versions, which can be run without Firedrake installed, so long as the corresponding data files are accessible.

stream_mfe.py notes the issues encountered using streams and einsums together.

About

Minimal examples of desirable operations to enable Firedrake on GPUs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%