1# libCEED: Examples 2 3This page provides a brief description of the examples for the libCEED library. 4 5## Example 1 6 7This example uses the mass matrix to compute the length, area, or volume of a 8region, depending upon runtime parameters. 9 10## Bakeoff Problems 11 12This section provides a brief description of the bakeoff problems, used as examples 13for the libCEED library. These bakeoff problems are high-order benchmarks designed 14to test and compare the performance of high-order finite element codes. 15 16For further documentation, readers may wish to consult the 17[CEED documentation](http://ceed.exascaleproject.org/bps/) of the bakeoff problems. 18 19### Bakeoff Problem 1 20 21Bakeoff problem 1 is the *L<sup>2</sup>* projection problem into the finite element space. 22 23The supplied examples solve *_B_ u = f*, where *_B_* is the mass matrix. 24 25### Bakeoff Problem 3 26 27Bakeoff problem 1 is the Poisson problem. 28 29The supplied examples solve *_A_ u = f*, where *_A_* is the Poisson operator. 30 31### Navier-Stokes Solver 32 33The Navier-Stokes problem solves the compressible Navier-Stokes equations using an explicit time integration. 34 35## Running Examples 36 37To build the examples, set the `MFEM_DIR`, `PETSC_DIR` and `NEK5K_DIR` variables 38and run: 39 40```console 41# libCEED examples on CPU and GPU 42cd ceed 43make 44./ex1 -ceed /cpu/self 45./ex1 -ceed /gpu/occa 46cd ../.. 47 48# MFEM+libCEED examples on CPU and GPU 49cd mfem 50make 51./bp1 -ceed /cpu/self -no-vis 52./bp1 -ceed /gpu/occa -no-vis 53cd ../.. 54 55# PETSc+libCEED examples on CPU and GPU 56cd petsc 57make 58./bp1 -ceed /cpu/self 59./bp1 -ceed /gpu/occa 60cd ../.. 61 62cd navier-stokes 63make 64./navierstokes -ceed /cpu/self 65./navierstokes -ceed /gpu/occa 66cd ../.. 67 68# Nek+libCEED examples on CPU and GPU 69cd nek5000 70./make-nek-examples.sh 71./run-nek-example.sh -ceed /cpu/self -b 3 72./run-nek-example.sh -ceed /gpu/occa -b 3 73cd ../.. 74``` 75 76The above code assumes a GPU-capable machine with the OCCA backend 77enabled. Depending on the available backends, other Ceed resource specifiers can 78be provided with the `-ceed` option. 79