https://github.com/glvis/xeus-glvis
C++ backend for the Jupyter GLVis widget
https://github.com/glvis/xeus-glvis
Last synced: 8 months ago
JSON representation
C++ backend for the Jupyter GLVis widget
- Host: GitHub
- URL: https://github.com/glvis/xeus-glvis
- Owner: GLVis
- Created: 2021-08-04T00:51:35.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-05-25T21:56:15.000Z (about 4 years ago)
- Last Synced: 2025-02-28T10:36:23.761Z (over 1 year ago)
- Language: C++
- Size: 9.77 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Interactive GLVis Jupyter Widget for xeus kernels
## Usage with xeus-cling
### Install Dependencies
1) Install [xeus-cling](https://github.com/jupyter-xeus/xeus-cling)
2) Install [pyglvis](https://github.com/glvis/pyglvis)
- this is for the widget frontend, we will update the install to improve this step in the future
### Example with saved file
```
#include "path/to/your/xeus-glvis/include/xglvis.hpp";
const std::string stream = glvis::read_file("path/to/stream.saved");
auto glv = glvis::glvis();
glv.plot(stream);
glv
```
### Example with `GridFunction` and `Mesh`
```
#include "path/to/your/xeus-glvis/include/xglvis.hpp";
std::stringstream ss;
ss << "solution\n" << mesh << x << flush;
auto glv = glvis::glvis();
glv.plot(ss.str());
glv
// update a time-dependent solution:
glv.update(stream_string);
// change the plot size:
glv.size_size(width, height);
```
## TODO
- Constructor that takes an `std::string`
- Routines that take a `Mesh` and `GridFunction`
- binder example