Skip to content

Initialize and finalize Gmsh in Delaunay2D and Delaunay3D classes #392

Open
@tkoyama010

Description

@tkoyama010

Describe the feature you would like to be added.

Links to Gmsh Documentation, Examples, or Class Definitions.

https://github.com/Deltares/pandamesh/blob/a61664fcc09d66d4d03c6c9a54b6a6d0cc188c28/pandamesh/gmsh_mesher.py#L127-L140

Pseudocode or Screenshots

    def __new__(cls, *args, **kwargs) -> "GmshMesher":
        if cls._instance is not None:
            raise RuntimeError(
                "Multiple Delaunay2D instances are not allowed. "
                "Please use del statement to clean up before creating a new instance."
            )
        cls._instance = super().__new__(cls)
        cls._instance._initialized = True
        return cls._instance

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions