xref: /libCEED/python/tests/README.md (revision b761d2cab99a31c30bb32e57e285fc6533e68118)
1*0ef72598Sjeremylt# libCEED Python Tests
2*0ef72598Sjeremylt
3*0ef72598SjeremyltThese files provide libCEED for Python tests. Full examples of finite element
4*0ef72598Sjeremyltoperators can be found in the file `test-5-operator.py`.
5*0ef72598Sjeremylt
6*0ef72598Sjeremylt## Testing
7*0ef72598Sjeremylt
8*0ef72598SjeremyltTo run the tests, first build the user QFunctions file by running
9*0ef72598Sjeremylt
10*0ef72598Sjeremylt  python setup-qfunctions.py build
11*0ef72598Sjeremylt
12*0ef72598SjeremyltThen, to run the test suite use the command
13*0ef72598Sjeremylt
14*0ef72598Sjeremylt  pytest test-*.py --ceed /cpu/self/ref/serial
15*0ef72598Sjeremylt
16*0ef72598Sjeremylt## Building QFunctions
17*0ef72598Sjeremylt
18*0ef72598SjeremyltTo build user defined QFunctions, modify `libceed-qfunctions.c` to include
19*0ef72598Sjeremyltthe apropriate QFunction single source file and run
20*0ef72598Sjeremylt`python setup-qfunctions.py build`. The files `test-4-qfunction.py` and
21*0ef72598Sjeremylt`test-5-operator.py` both contain the example function `load_qfs_so()` for
22*0ef72598Sjeremyltloading the user defined QFunctions so the QFunction pointers can be passed to
23*0ef72598SjeremyltlibCEED.
24