pihnn.graphics.plot_stresses#

pihnn.graphics.plot_stresses(triangulation, model, model_true=None, format='png', dir='results/', figsize=None, split=False, **kwargs)#

Specialization of pihnn.graphics.plot_sol for the linear elasticity problem.

Parameters:
  • triangulation (matplotlib.tri.Triangulation) – 2D mesh used for the contour plot.

  • model (pihnn.nn.PIHNN/pihnn.nn.DD_PIHNN) – Neural network model.

  • model_true (callable) – Reference solution. It returns the 3 components of the stress tensor (leave it to None if no comparison is desired).

  • format (str) – Format of the save figure.

  • dir (str) – Directory where to save the figure.

  • figsize (tuple of float) – Size of the matplotlib.pyplot.figure. If None, no figure is created.

  • split (bool) – Whether to split the solutions into multiple files or a single picture.