pihnn.graphics.plot_scalar#

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

Specialization of pihnn.graphics.plot_sol for the Laplace and biharmonic problems.

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/None) – Reference solution as a scalar function (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.