# C++ API

## 3D FFT examples

Compute energy in both physical and spectral 3D arrays using different
libraries. To use another FFT library, simply use another header file, and a
class name as suggested in the comments.

```{literalinclude} compute_energy.cpp
:language: cpp
```

Can be compiled by adapting the following Makefile:

```{literalinclude} Makefile
:language: make
```
