Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize and finalize Gmsh in Delaunay2D and Delaunay3D classes #392

Open
tkoyama010 opened this issue Sep 9, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@tkoyama010
Copy link
Member

tkoyama010 commented Sep 9, 2024

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
@tkoyama010
Copy link
Member Author

tkoyama010 commented Sep 9, 2024

@tkoyama010 tkoyama010 reopened this Sep 10, 2024
@tkoyama010 tkoyama010 changed the title Inheriting from threading.Thread to manage Gmsh processes Initialize and finalize Gmsh in Delaunay2D and Delaunay3D classes Sep 10, 2024
@tkoyama010 tkoyama010 added the enhancement New feature or request label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant