mmgpy 0.2.0__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bin/__init__.py +10 -0
- bin/concrt140.dll +0 -0
- bin/mmg.dll +0 -0
- bin/mmg2d.dll +0 -0
- bin/mmg2d_O3.exe +0 -0
- bin/mmg3d.dll +0 -0
- bin/mmg3d_O3.exe +0 -0
- bin/mmgs.dll +0 -0
- bin/mmgs_O3.exe +0 -0
- bin/msvcp140.dll +0 -0
- bin/msvcp140_1.dll +0 -0
- bin/msvcp140_2.dll +0 -0
- bin/msvcp140_atomic_wait.dll +0 -0
- bin/msvcp140_codecvt_ids.dll +0 -0
- bin/vcruntime140.dll +0 -0
- bin/vcruntime140_1.dll +0 -0
- include/__init__.py +10 -0
- include/mmg/common/libmmgtypes.h +687 -0
- include/mmg/common/libmmgtypesf.h +762 -0
- include/mmg/common/mmg_export.h +47 -0
- include/mmg/common/mmgcmakedefines.h +46 -0
- include/mmg/common/mmgcmakedefinesf.h +29 -0
- include/mmg/common/mmgversion.h +54 -0
- include/mmg/libmmg.h +67 -0
- include/mmg/libmmgf.h +42 -0
- include/mmg/mmg2d/libmmg2d.h +2761 -0
- include/mmg/mmg2d/libmmg2df.h +3263 -0
- include/mmg/mmg2d/mmg2d_export.h +34 -0
- include/mmg/mmg3d/libmmg3d.h +3444 -0
- include/mmg/mmg3d/libmmg3df.h +4041 -0
- include/mmg/mmg3d/mmg3d_export.h +34 -0
- include/mmg/mmgs/libmmgs.h +2560 -0
- include/mmg/mmgs/libmmgsf.h +3028 -0
- include/mmg/mmgs/mmgs_export.h +34 -0
- lib/__init__.py +10 -0
- lib/cmake/mmg/FindElas.cmake +57 -0
- lib/cmake/mmg/FindSCOTCH.cmake +373 -0
- lib/cmake/mmg/MmgTargets-release.cmake +53 -0
- lib/cmake/mmg/MmgTargets.cmake +127 -0
- lib/cmake/mmg/mmgConfig.cmake +43 -0
- lib/mmg.lib +0 -0
- lib/mmg2d.lib +0 -0
- lib/mmg3d.lib +0 -0
- lib/mmgs.lib +0 -0
- mmgpy/__init__.py +888 -0
- mmgpy/_logging.py +86 -0
- mmgpy/_mmgpy.cp310-win_amd64.pyd +0 -0
- mmgpy/_mmgpy.pyi +650 -0
- mmgpy/_options.py +304 -0
- mmgpy/_progress.py +539 -0
- mmgpy/_pyvista.py +423 -0
- mmgpy/_version.py +3 -0
- mmgpy/_version.py.in +3 -0
- mmgpy/lagrangian.py +394 -0
- mmgpy/metrics.py +595 -0
- mmgpy/mmg2d.dll +0 -0
- mmgpy/mmg2d.lib +0 -0
- mmgpy/mmg3d.dll +0 -0
- mmgpy/mmg3d.lib +0 -0
- mmgpy/mmgs.dll +0 -0
- mmgpy/mmgs.lib +0 -0
- mmgpy/progress.py +57 -0
- mmgpy/py.typed +0 -0
- mmgpy/sizing.py +370 -0
- mmgpy-0.2.0.dist-info/DELVEWHEEL +2 -0
- mmgpy-0.2.0.dist-info/METADATA +75 -0
- mmgpy-0.2.0.dist-info/RECORD +129 -0
- mmgpy-0.2.0.dist-info/WHEEL +5 -0
- mmgpy-0.2.0.dist-info/entry_points.txt +6 -0
- mmgpy-0.2.0.dist-info/licenses/LICENSE +38 -0
- mmgpy.libs/vtkCommonColor-9.4-799ae0f43eb3a04510b0ed500c05e895.dll +0 -0
- mmgpy.libs/vtkCommonComputationalGeometry-9.4-e1ee47e9ca84c220e3fda21c864610e9.dll +0 -0
- mmgpy.libs/vtkCommonCore-9.4.dll +0 -0
- mmgpy.libs/vtkCommonDataModel-9.4.dll +0 -0
- mmgpy.libs/vtkCommonExecutionModel-9.4-5fea279cddbd0dd8e39907cbfb423d2c.dll +0 -0
- mmgpy.libs/vtkCommonMath-9.4-70aba6f1b0ad06008b5990b6843ff4e9.dll +0 -0
- mmgpy.libs/vtkCommonMisc-9.4-96697cc413673520510a54c05fa0ef99.dll +0 -0
- mmgpy.libs/vtkCommonSystem-9.4-a748ca3c31712678e4e0f2ff3b09785b.dll +0 -0
- mmgpy.libs/vtkCommonTransforms-9.4-11e72e99aca2003a38a3ff9bcfb90d92.dll +0 -0
- mmgpy.libs/vtkDICOMParser-9.4-6f27d14c12768aac52622cbd28ca0b3a.dll +0 -0
- mmgpy.libs/vtkFiltersCellGrid-9.4-5675f4c4a8440bd5f5981149f99315e8.dll +0 -0
- mmgpy.libs/vtkFiltersCore-9.4-ef29a82b399f8ffeec5dfa8c7e010901.dll +0 -0
- mmgpy.libs/vtkFiltersExtraction-9.4-6a452db7095d68b3af501d1b39a05670.dll +0 -0
- mmgpy.libs/vtkFiltersGeneral-9.4-b9b071ef41cba7c6468dd7e0a9f5d4bf.dll +0 -0
- mmgpy.libs/vtkFiltersGeometry-9.4-757f3c8b9a1fd9774cce83aec0c94c55.dll +0 -0
- mmgpy.libs/vtkFiltersHybrid-9.4-6b343077b9da30bb95fc4492762b9bed.dll +0 -0
- mmgpy.libs/vtkFiltersHyperTree-9.4-831d7e88dd11a3faec876929089d21e8.dll +0 -0
- mmgpy.libs/vtkFiltersModeling-9.4-a3fc680a4836e8913376390217ceae1e.dll +0 -0
- mmgpy.libs/vtkFiltersParallel-9.4-5307d8b619459bb2aeb13c2872cebc2b.dll +0 -0
- mmgpy.libs/vtkFiltersReduction-9.4-f7abe86bfcde726b6e7daec4773a089f.dll +0 -0
- mmgpy.libs/vtkFiltersSources-9.4-d38546a5e2bfd83ea0a70f5be4fa7fdc.dll +0 -0
- mmgpy.libs/vtkFiltersStatistics-9.4-d2abec2372ab98574cdbd0461c73d459.dll +0 -0
- mmgpy.libs/vtkFiltersTexture-9.4-a374b3cfe75e10483976a6a6780ca1ca.dll +0 -0
- mmgpy.libs/vtkFiltersVerdict-9.4-a6a276b6e0d3ac6d042f192842c9382a.dll +0 -0
- mmgpy.libs/vtkIOCellGrid-9.4-0df3bee5d56b2062dad430b53f81f06a.dll +0 -0
- mmgpy.libs/vtkIOCore-9.4.dll +0 -0
- mmgpy.libs/vtkIOGeometry-9.4-13e2301d83eea31e8df955a8dd196eb1.dll +0 -0
- mmgpy.libs/vtkIOImage-9.4-666beab0c43da6c4b2c59fba464bb6b1.dll +0 -0
- mmgpy.libs/vtkIOLegacy-9.4.dll +0 -0
- mmgpy.libs/vtkIOParallel-9.4.dll +0 -0
- mmgpy.libs/vtkIOParallelXML-9.4.dll +0 -0
- mmgpy.libs/vtkIOXML-9.4.dll +0 -0
- mmgpy.libs/vtkIOXMLParser-9.4-f4144aed6a73ee50eefeae75a78fd71b.dll +0 -0
- mmgpy.libs/vtkImagingCore-9.4-ecc92d2d09d8ac4e8f3b199a917f96fd.dll +0 -0
- mmgpy.libs/vtkImagingSources-9.4-944fcaf71940d51ed5dc1b5c8eba2571.dll +0 -0
- mmgpy.libs/vtkParallelCore-9.4-114ce4e5a12302a9f3c3485ab88d5a39.dll +0 -0
- mmgpy.libs/vtkParallelDIY-9.4-7add130df7f5139505a17ee72afefa41.dll +0 -0
- mmgpy.libs/vtkRenderingCore-9.4-ec5612bc182f43047add4c6a55050be4.dll +0 -0
- mmgpy.libs/vtkdoubleconversion-9.4-676429e05704a1fd81323494aba16669.dll +0 -0
- mmgpy.libs/vtkexpat-9.4-58e3b6d3064cf0e02659e3a57f60f779.dll +0 -0
- mmgpy.libs/vtkfmt-9.4-fd2ae0aaa19f2f735b93d4feb613d558.dll +0 -0
- mmgpy.libs/vtkjpeg-9.4-2fd58669e746a0d571706ff3f4c1896f.dll +0 -0
- mmgpy.libs/vtkjsoncpp-9.4-c2076501decec6ce45be5280d480c02d.dll +0 -0
- mmgpy.libs/vtkkissfft-9.4-874ed77ec96808d2e395a6caeb69abbe.dll +0 -0
- mmgpy.libs/vtkloguru-9.4-1038f41dd2d3acc7d894c1d57b428cc6.dll +0 -0
- mmgpy.libs/vtklz4-9.4-9982d6f8f47ac19965668cd3c2926473.dll +0 -0
- mmgpy.libs/vtklzma-9.4-a473d065be12f766957c699a0aefac38.dll +0 -0
- mmgpy.libs/vtkmetaio-9.4-aa48920e94a28f23d08054f5e82867f4.dll +0 -0
- mmgpy.libs/vtkpng-9.4-cbefdfbef5c0d4dd7ae43b9d526e881a.dll +0 -0
- mmgpy.libs/vtkpugixml-9.4-9c7652d9a42fd99e62753e7d3fd87ee9.dll +0 -0
- mmgpy.libs/vtksys-9.4.dll +0 -0
- mmgpy.libs/vtktiff-9.4-9822dcf52447c045cf9a70960d45a9bd.dll +0 -0
- mmgpy.libs/vtktoken-9.4-471c14923651cbbd86067852f347807b.dll +0 -0
- mmgpy.libs/vtkverdict-9.4-c549882a3b8671666be1366008f27f7e.dll +0 -0
- mmgpy.libs/vtkzlib-9.4-3b9ffa51c80ccd91bb22a4c3ca11a8d7.dll +0 -0
- share/__init__.py +10 -0
- share/man/man1/mmg2d.1.gz +0 -0
- share/man/man1/mmg3d.1.gz +0 -0
- share/man/man1/mmgs.1.gz +0 -0
mmgpy/_logging.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""Logging configuration for mmgpy with Rich integration."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import functools
|
|
6
|
+
import logging
|
|
7
|
+
import os
|
|
8
|
+
from typing import TYPE_CHECKING
|
|
9
|
+
|
|
10
|
+
from rich.logging import RichHandler
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from typing import Literal
|
|
14
|
+
|
|
15
|
+
LogLevel = Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@functools.lru_cache(maxsize=1)
|
|
19
|
+
def get_logger() -> logging.Logger:
|
|
20
|
+
"""Get or create the mmgpy logger.
|
|
21
|
+
|
|
22
|
+
Returns
|
|
23
|
+
-------
|
|
24
|
+
logging.Logger
|
|
25
|
+
The mmgpy logger instance, configured with RichHandler.
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
logger = logging.getLogger("mmgpy")
|
|
29
|
+
|
|
30
|
+
if not logger.handlers:
|
|
31
|
+
_configure_logger(logger)
|
|
32
|
+
|
|
33
|
+
return logger
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _configure_logger(logger: logging.Logger) -> None:
|
|
37
|
+
"""Configure the logger with RichHandler."""
|
|
38
|
+
handler = RichHandler(
|
|
39
|
+
rich_tracebacks=True,
|
|
40
|
+
show_path=False,
|
|
41
|
+
markup=True,
|
|
42
|
+
)
|
|
43
|
+
handler.setFormatter(logging.Formatter("%(message)s"))
|
|
44
|
+
logger.addHandler(handler)
|
|
45
|
+
|
|
46
|
+
if os.environ.get("MMGPY_DEBUG"):
|
|
47
|
+
logger.setLevel(logging.DEBUG)
|
|
48
|
+
else:
|
|
49
|
+
logger.setLevel(logging.WARNING)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def set_log_level(level: LogLevel | int) -> None:
|
|
53
|
+
"""Set the logging level for mmgpy.
|
|
54
|
+
|
|
55
|
+
Parameters
|
|
56
|
+
----------
|
|
57
|
+
level : LogLevel | int
|
|
58
|
+
The logging level. Can be a string like "DEBUG", "INFO", "WARNING",
|
|
59
|
+
"ERROR", "CRITICAL" or an integer constant from the logging module.
|
|
60
|
+
|
|
61
|
+
Examples
|
|
62
|
+
--------
|
|
63
|
+
>>> import mmgpy
|
|
64
|
+
>>> mmgpy.set_log_level("DEBUG") # Show all debug messages
|
|
65
|
+
>>> mmgpy.set_log_level("INFO") # Show info and above
|
|
66
|
+
>>> mmgpy.set_log_level("WARNING") # Default - show warnings and errors
|
|
67
|
+
|
|
68
|
+
"""
|
|
69
|
+
logger = get_logger()
|
|
70
|
+
if isinstance(level, str):
|
|
71
|
+
level = getattr(logging, level.upper())
|
|
72
|
+
logger.setLevel(level)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def enable_debug() -> None:
|
|
76
|
+
"""Enable debug logging for mmgpy.
|
|
77
|
+
|
|
78
|
+
This is equivalent to calling `set_log_level("DEBUG")` or setting
|
|
79
|
+
the `MMGPY_DEBUG` environment variable.
|
|
80
|
+
"""
|
|
81
|
+
set_log_level(logging.DEBUG)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def disable_logging() -> None:
|
|
85
|
+
"""Disable all logging output from mmgpy."""
|
|
86
|
+
set_log_level(logging.CRITICAL + 1)
|
|
Binary file
|