cashocs.io.import_function#

cashocs.io.import_function(filename: str, name: str, function_space: fenics.FunctionSpace, step: int = 0) fenics.Function[source]#

Imports a function from an xdmf file to cashocs.

Parameters:
  • filename (str) – The path / filename to the xdmf file.

  • name (str) – The name of the function in the xdmf file.

  • function_space (fenics.FunctionSpace) – The corresponding function space for the function. Note that this must be created on a suitable mesh, which has been reimported with cashocs.io.reimport_mesh().

  • step (int) – The checkpoint number. Default is 0.

Returns:

The fenics function which is stored in the xdmf file.

Return type:

fenics.Function