Skip to content

[Python|OGSMesh] Add required functionality and fix bug outputting every time step

  • Add functions to access
    • the names of all available data arrays / PropertyVectors
    • the number of components of a data array / PropertyVector
    • the mesh item type of a data array / PropertyVector (Node or Cell)
  • Move outputting the results of the last time step into function finalize() of the Python interface (fixes output bug)

API Overview

from ogs import OGSMesh, OGSSimulation  # Python API to a running OGS

OGSSimulation:

  • __init__() # statt initialize()
  • current_time()
  • end_time()
  • execute_time_step()
  • mesh() # statt getMesh()
  • mesh_names() # neu
  • close()
  • def exit(self, exc_type, exc_val, exc_tb): self.close()
  • def enter(self): return self

OGSMesh:

  • mesh_item_type()
  • data_array_names() # statt getDataArrayNames()
  • data_array()

~~ - getNumberOfComponent()~~ ~~ - materialIDs() ~~

  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behaviour change was documented?
Edited by Tobias Meisel

Merge request reports

Loading