xref: /libCEED/examples/petsc/README.md (revision 36de5dbf48990ea8531ad6af338dc02f7a058d7a)
1## libCEED + PETSc Examples
2
3### CEED bakeoff problems - bpsraw
4
5This code solves the CEED bakeoff problems on a structured grid generated and
6referenced using only low-level communication primitives.
7
8To build, run `make bpsraw`
9
10To run, `./bpsraw -ceed [ceed-resource] -problem bp[1-6] -degree [degree]`
11
12In addition to the common arguments, the following arguments may be set:
13
14- `-local`             - Target number of locally owned DoFs per process
15
16### CEED bakeoff problems with DMPlex - bps
17
18This code solves the CEED bakeoff problems on a unstructured grid using DMPlex.
19This example requires a PETSc version later than 3.11.3.
20
21To build, run `make bps`
22
23To run, `./bps -ceed [ceed-resource] -problem bp[1-6] -degree [degree]`
24
25In addition to the common arguments, the following arguments may be set:
26
27- `-mesh`              - Read mesh from file
28- `-cells`             - Number of cells per dimension
29
30### CEED bakeoff problems with DMPlex and PCMG - multigrid
31
32This code solves the CEED bakeoff problems on a unstructured grid using DMPlex
33with p-multigrid implemented in PCMG. This example requires a PETSc version later than 3.11.3.
34
35To build, run `make multigrid`
36
37To run, `./multigrid -ceed [ceed-resource] -problem bp[1-6] -degree [degree]`
38
39In addition to the common arguments, the following arguments may be set:
40
41- `-mesh`              - Read mesh from file
42- `-cells`             - Number of cells per dimension
43
44### Command line arguments
45
46The following arguments can be specified for all of the above examples:
47
48- `-ceed`              - CEED resource specifier
49- `-problem`           - CEED benchmark problem to solve
50- `-degree`            - Polynomial degree of tensor product basis
51- `-qextra`            - Number of extra quadrature points
52- `-test`              - Testing mode (do not print unless error is large)
53- `-benchmark`         - Benchmarking mode (prints benchmark statistics)
54
55### libCEED example to compute surface area using DMPlex - area
56
57This example uses the mass matrix to compute the surface area of a cube or a discrete cubed-sphere, defined via DMPlex.
58
59To build, run `make area`
60
61To run, `./area -problem cube -ceed [ceed-resource] -petscspace_degree [degree]`
62
63or
64
65`./area -problem sphere -ceed [ceed-resource] -petscspace_degree [degree]`
66
67#### Command line arguments
68
69The following arguments can be specified for the area example:
70
71- `-ceed`              - CEED resource specifier
72- `-problem`           - Problem to solve, either 'cube' or 'sphere'
73- `-petscspace_degree` - Polynomial degree of tensor product basis
74- `-qextra`            - Number of extra quadrature points
75- `-test`              - Testing mode (do not print unless error is large)
76- `-mesh`              - Read mesh from file
77
78