cashocs.io.function.import_function#
- cashocs.io.function.import_function(
- filename: str,
- function_space: fenics.FunctionSpace,
- name: str | None = None,
- step: int = 0,
Imports a function from an xdmf file to cashocs.
- Parameters:
filename (str) – The path / filename to 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().name (str | None) – The name of the function in the xdmf file.
step (int) – The checkpoint number. Default is
0.
- Returns:
The fenics function which is stored in the xdmf file.
- Return type:
fenics.Function