-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path__init__.py
More file actions
66 lines (56 loc) · 1.74 KB
/
Copy path__init__.py
File metadata and controls
66 lines (56 loc) · 1.74 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
"""fullwave module."""
import logging
import platform
import time
from importlib.metadata import PackageNotFoundError, version
from .grid import Grid
from .medium import Medium, MediumExponentialAttenuation, MediumRelaxationMaps
from .sensor import Sensor
from .source import Source
from .transducer import Transducer, TransducerGeometry
from .medium_builder import presets # isort:skip
from .solver.solver import Solver # isort:skip
from .medium_builder.domain import Domain # isort:skip
from .medium_builder import MediumBuilder # isort:skip
from . import utils # isort:skip
logging.Formatter.converter = time.gmtime
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(filename)s | %(funcName)s | %(lineno)d - %(message)s",
datefmt="%Y-%m-%d %H:%M:%S GMT",
level=logging.INFO,
)
logger = logging.getLogger("__main__." + __name__)
# "FullwaveSolver",
__all__ = [
"Domain",
"Grid",
"Medium",
"MediumBuilder",
"MediumExponentialAttenuation",
"MediumRelaxationMaps",
"Sensor",
"Solver",
"Source",
"Transducer",
"TransducerGeometry",
"presets",
"utils",
]
PLATFORM = platform.system().lower()
# check linux environment
if PLATFORM != "linux":
message = (
"Warning: fullwave is primarily developed for Linux environment.\n"
"Using it on other operating systems may lead to unexpected issues.\n"
"Please consider using WSL2 (Windows Subsystem for Linux 2) if you are on Windows."
)
logger.warning(
message,
)
try:
__version__ = version("fullwave")
except PackageNotFoundError:
# Update via bump-my-version, not manually
__version__ = "1.2.6-dev9"
VERSION = __version__ # for convenience
logger.info("Fullwave version: %s", __version__)