Feel++ Template Project Notebook

This is a Jupyter notebook for the Feel++ Template Project project.

1. Introduction

You write your notebook in AsciiDoc including LaTeX math and thanks to the :page-jupyter: true attribute, the notebook is converted to a Jupyter notebook when the book is built.

2. Code cells

You can include code cells in your notebook using the [source,python] block macro.

import sys, os
print("Hello, world!")

3. Feel++ Code cells

You can include Feel++ code cells in your notebook using the [source,python] block macro.

import feelpp
app = feelpp.Environment(["myapp"],config=feelpp.globalRepository("myapp"))

geo=feelpp.download( "github:{repo:feelpp,path:feelpp/quickstart/laplacian/cases/feelpp2d/feelpp2d.geo}", worldComm=app.worldCommPtr() )[0]
print("geo file: {}".format(geo))
mesh = feelpp.load(feelpp.mesh(dim=2,realdim=2), geo, 0.1)

Xh=feelpp.functionSpace(mesh=mesh, space="Pchv")
f = Xh.element()
e= feelpp.exporter(mesh=mesh)

You can then visualize the result using the pyvista package as follows:

from xvfbwrapper import Xvfb
vdisplay = Xvfb()

import pyvista as pv
reader = pv.get_reader("exports/ensightgold/Exporter/Exporter.case")
mesh = reader.read()