Dear All,
I know that your first recommendation would be to use Paraview, PyVista or vedo for 3D geometries and meshes. But I really would like to use Jupyter Notebook interface to show a couple of very simple graphs and annotations such as mesh dimensions and some graphs for just a 2D cross-sectional plane (here I am not on this subject).
This is the simple problem. I am trying to put dimensions on a mesh. I’d really appreciate your help. Here is the code I came up with so far:
import matplotlib.pyplot as plt
from dolfin import *
%matplotlib inline
def plot_mesh(u):
fig = plt.figure(figsize=(5,5))
fig = plot(u)
plt.title('Mesh Generated for the Problem Geometry')
plt.xlabel(r'$x$ in mm')
plt.ylabel(r'$y$ in mm')
plt.zlabel(r'$z$ in mm')
Room_Mesh = BoxMesh(Point(0.0, 0.0, 0.0), Point(3, 4, 5), int(3), int(4), int(5))
plot_mesh(Room_Mesh)
I think I need to use:
mpl_toolkits.mplot3d.axes3d as axes3d
but then I don’t know how to tell fenics what are the dimensions of the mesh (X, Y, Z). So please do not consider only this case, my ultimate goal is to do it with a 3D mesh I import from gmsh.
All the best.