Jupyter Notebooks using xeus-cling
xeus-cling is a C++ Jupyter Kernel based on cling, which can be used to create interactive C++ MFEM and GLVis notebooks.
Click on the binder button above for an interactive example.
Installing Locally
In order to run notebooks locally you will need xeus-cling along with mfem and xglvis. We recommend you use
miniconda or, if you already have it installed,
conda.
- Follow the install steps on https://github.com/jupyter-xeus/xeus-cling to install the C++ kernels
- Build and install a shared version of mfem
- for example:
make serial SHARED=YES
- for example:
- Install pyglvis
- for the widget frontend
- Get xeus-glvis and
cpthe header to{PREFIX}/glvis/xglvis.hpp- (this could be improved)
Running Locally
Once you've installed Jupyter, the C++ Kernel, mfem, and glvis start the notebook server (jupyter-notebook)
and open an existing example or a new C++ 1x kernel.
You will always need to #pragma cling load("mfem") and you may need to point the cling runtime at your
mfem and/or glvis installs, do this with the
#pragma cling statements.