-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy path__init__.py
More file actions
47 lines (38 loc) · 1.16 KB
/
__init__.py
File metadata and controls
47 lines (38 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""
PyMeshGen - A Python-based unstructured mesh generator
This package provides tools for generating unstructured meshes for computational fluid dynamics simulations.
"""
import sys
import os
from pathlib import Path
# Add the project root directory to the Python path
project_root = Path(__file__).parent
sys.path.insert(0, str(project_root))
# Add subdirectories to the Python path to ensure all modules can be imported
SUBDIRS = [
"fileIO",
"data_structure",
"meshsize",
"visualization",
"adfront2",
"optimize",
"utils",
"gui"
]
for subdir in SUBDIRS:
subdir_path = project_root / subdir
if subdir_path.exists() and str(subdir_path) not in sys.path:
sys.path.append(str(subdir_path))
# Import main functions for easy access
from .core import generate_mesh
from .data_structure.parameters import Parameters
def _load_version():
version_file = project_root / "VERSION"
if version_file.exists():
version = version_file.read_text(encoding="utf-8").strip()
if version:
return version
return "0.0.0"
__version__ = _load_version()
__author__ = "CFD_Dev"
__all__ = ["generate_mesh", "Parameters"]