PySAGAS Geometry Parsers

class pysagas.geometry.parsers.AbstractParser[source]

Interface for a geometry parser.

abstract __init__(**kwargs)[source]
Return type:

None

abstract load()[source]

Load cells from file.

Return type:

List[Cell]

abstract classmethod load_from_file()[source]

Convenience method for loading cells from file.

Return type:

List[Cell]

class pysagas.geometry.parsers.MeshIO[source]

Meshio parser

__init__(filepath, verbosity=1)[source]
Parameters:
  • filepath (str)

  • verbosity (int)

Return type:

None

load()[source]

Load cells from file.

Return type:

List[Cell]

class pysagas.geometry.parsers.Parser[source]
__init__(filepath, verbosity=1)[source]
Parameters:
  • filepath (str)

  • verbosity (int)

Return type:

None

classmethod load_from_file(filepath, geom_sensitivities=None, verbosity=1, **kwargs)[source]

Convenience method for loading cells from file.

Parameters:
  • filepath (str) – The filepath to the geometry.

  • geom_sensitivities (str | DataFrame, optional) – The geometry sensitivity data, to optionally add to the loaded cells. This can be provided as a path to the data in csv format, or directly as a Pandas DataFrame. The default is None.

  • verbosity (int, optional) – The verbosity of the code. The defualt is 1.

  • **kwargs – Additional keyword arguments can be provided to control the sensitivity matching algorithm.

Return type:

List[Cell]

class pysagas.geometry.parsers.PyMesh[source]
__init__(filepath, verbosity=1)[source]
Parameters:
  • filepath (str)

  • verbosity (int)

Return type:

None

load()[source]

Load cells from file.

Return type:

List[Cell]

class pysagas.geometry.parsers.STL[source]
load()[source]

Load cells from file.

Return type:

List[Cell]

class pysagas.geometry.parsers.TRI[source]
load()[source]

Load cells from file.

Return type:

List[Cell]

classmethod load_from_file(filepath, verbosity=1, **kwargs)[source]

Convenience method for loading cells from file.

Parameters:
  • filepath (str)

  • verbosity (int)

Return type:

List[Cell]