fedoo.Problem.add_output

Problem.add_output(filename, assembly, output_list=None, output_type=None, file_format='fdh5', compressed=False, position=None, element_set=None, save_mesh=True, include_static_obstacles=False, write_mode='overwrite', ignore_missing=False, private=False)

Register an output for automatic saving managed by solve methods.

optionnaly, the add_output can be used without specifying the assembly with the arguments:

>>> problem.add_output(filename, output_list, **kargs)

In this case, the Assembly defined in problem.assembly will be used.

Parameters:
  • filename (str) – name of the file used to save data to disk.

  • assembly (Assembly, optional) – Assembly object used to extract the results.

  • output_list (list[str]) – list of result labels.

  • output_type ('Node', 'Element' or 'GaussPoint', optional) – Type of results. If None, the type of output is not converted. Scalar results are not concerned by this parameter.

  • file_format ("fdh5", "fdz", "vtk", "msh", "npz", "csv", "xlsx") – file format used to save the results. The default file format and recommanding one is “fdh5”.

  • compressed (bool, default = False) – if True, the fdz data are compressed.

  • position (None, scalar, coordinate pair or array, optional) – For beams, normalized (y, z) coordinates, either one pair or an array with shape (n_section_points, 2). None extracts all configured output_points; scalar beam positions are rejected. Shell positions are scalars or a vector in [-1, 1] (bottom to top); None saves all configured thickness output points.

  • element_set (str or list[int], optional) – set of element indices or name of an element set associated to the mesh. If specified, only the results restriced to the set of elements are extracted.

  • save_mesh (bool, default = True) – If True the mesh is saved.

  • include_static_obstacles (bool, default = False) – If True, static meshes registered by fedoo.constraint.RigidBody.set_static_obstacle() are added to the output mesh. The same obstacle mesh shared by several rigid bodies is included only once. This option requires the fdh5 file format, which preserves the MultiMesh structure.

  • write_mode ({"overwrite", "append", "error"}, default="overwrite") – Existing-file policy for fdh5 output. "overwrite" replaces an existing file on the first write, "append" continues after its highest iteration, and "error" refuses to register an existing file. Other formats, including fdz, accept only "overwrite".

  • ignore_missing (bool, default=False) – If True, requested result fields that are unavailable are omitted. This is useful for a common output list shared by constitutive laws with different state variables. If False, an unavailable field raises NameError when results are extracted.

  • private (bool, default=False) – Prefix requested mesh-associated fields with _ so the viewer hides them until Show internal fields is enabled.