mmgpy 0.3.0__cp312-cp312-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.
Files changed (132) hide show
  1. bin/Release/mmg2d_O3.exe +0 -0
  2. bin/Release/mmg3d_O3.exe +0 -0
  3. bin/Release/mmgs_O3.exe +0 -0
  4. bin/__init__.py +10 -0
  5. bin/concrt140.dll +0 -0
  6. bin/mmg.dll +0 -0
  7. bin/mmg2d.dll +0 -0
  8. bin/mmg2d_O3.exe +0 -0
  9. bin/mmg3d.dll +0 -0
  10. bin/mmg3d_O3.exe +0 -0
  11. bin/mmgs.dll +0 -0
  12. bin/mmgs_O3.exe +0 -0
  13. bin/msvcp140.dll +0 -0
  14. bin/msvcp140_1.dll +0 -0
  15. bin/msvcp140_2.dll +0 -0
  16. bin/msvcp140_atomic_wait.dll +0 -0
  17. bin/msvcp140_codecvt_ids.dll +0 -0
  18. bin/vcruntime140.dll +0 -0
  19. bin/vcruntime140_1.dll +0 -0
  20. include/__init__.py +10 -0
  21. include/mmg/common/libmmgtypes.h +687 -0
  22. include/mmg/common/libmmgtypesf.h +762 -0
  23. include/mmg/common/mmg_export.h +47 -0
  24. include/mmg/common/mmgcmakedefines.h +46 -0
  25. include/mmg/common/mmgcmakedefinesf.h +29 -0
  26. include/mmg/common/mmgversion.h +54 -0
  27. include/mmg/libmmg.h +67 -0
  28. include/mmg/libmmgf.h +42 -0
  29. include/mmg/mmg2d/libmmg2d.h +2761 -0
  30. include/mmg/mmg2d/libmmg2df.h +3263 -0
  31. include/mmg/mmg2d/mmg2d_export.h +34 -0
  32. include/mmg/mmg3d/libmmg3d.h +3444 -0
  33. include/mmg/mmg3d/libmmg3df.h +4041 -0
  34. include/mmg/mmg3d/mmg3d_export.h +34 -0
  35. include/mmg/mmgs/libmmgs.h +2560 -0
  36. include/mmg/mmgs/libmmgsf.h +3028 -0
  37. include/mmg/mmgs/mmgs_export.h +34 -0
  38. lib/__init__.py +10 -0
  39. lib/cmake/mmg/FindElas.cmake +57 -0
  40. lib/cmake/mmg/FindSCOTCH.cmake +373 -0
  41. lib/cmake/mmg/MmgTargets-release.cmake +53 -0
  42. lib/cmake/mmg/MmgTargets.cmake +127 -0
  43. lib/cmake/mmg/mmgConfig.cmake +43 -0
  44. lib/mmg.lib +0 -0
  45. lib/mmg2d.lib +0 -0
  46. lib/mmg3d.lib +0 -0
  47. lib/mmgs.lib +0 -0
  48. mmgpy/__init__.py +888 -0
  49. mmgpy/_logging.py +86 -0
  50. mmgpy/_mmgpy.cp312-win_amd64.pyd +0 -0
  51. mmgpy/_mmgpy.pyi +650 -0
  52. mmgpy/_options.py +304 -0
  53. mmgpy/_progress.py +539 -0
  54. mmgpy/_pyvista.py +423 -0
  55. mmgpy/_version.py +3 -0
  56. mmgpy/_version.py.in +3 -0
  57. mmgpy/lagrangian.py +394 -0
  58. mmgpy/metrics.py +595 -0
  59. mmgpy/mmg2d.dll +0 -0
  60. mmgpy/mmg2d.lib +0 -0
  61. mmgpy/mmg3d.dll +0 -0
  62. mmgpy/mmg3d.lib +0 -0
  63. mmgpy/mmgs.dll +0 -0
  64. mmgpy/mmgs.lib +0 -0
  65. mmgpy/progress.py +57 -0
  66. mmgpy/py.typed +0 -0
  67. mmgpy/sizing.py +370 -0
  68. mmgpy-0.3.0.dist-info/DELVEWHEEL +2 -0
  69. mmgpy-0.3.0.dist-info/METADATA +75 -0
  70. mmgpy-0.3.0.dist-info/RECORD +132 -0
  71. mmgpy-0.3.0.dist-info/WHEEL +5 -0
  72. mmgpy-0.3.0.dist-info/entry_points.txt +6 -0
  73. mmgpy-0.3.0.dist-info/licenses/LICENSE +38 -0
  74. mmgpy.libs/vtkCommonColor-9.5-07cd19e9d77559cb8be83e8ac8833cd4.dll +0 -0
  75. mmgpy.libs/vtkCommonComputationalGeometry-9.5-4aaf997b087c330e171c14a4ba6be7b2.dll +0 -0
  76. mmgpy.libs/vtkCommonCore-9.5.dll +0 -0
  77. mmgpy.libs/vtkCommonDataModel-9.5.dll +0 -0
  78. mmgpy.libs/vtkCommonExecutionModel-9.5-2f7a1bae0a1d4d0e205eea43596a659c.dll +0 -0
  79. mmgpy.libs/vtkCommonMath-9.5-609b01246386fe29df2677fa5c7ca793.dll +0 -0
  80. mmgpy.libs/vtkCommonMisc-9.5-4173df33811eddea1529a40bf93266c8.dll +0 -0
  81. mmgpy.libs/vtkCommonSystem-9.5-e5b15bd84934b99e3b2bbe5d3e064c97.dll +0 -0
  82. mmgpy.libs/vtkCommonTransforms-9.5-9b76a61640718d893271cc0b5db50d1d.dll +0 -0
  83. mmgpy.libs/vtkDICOMParser-9.5-203c95a77d21799a8049a576e1b28f2e.dll +0 -0
  84. mmgpy.libs/vtkFiltersCellGrid-9.5-fa6bda61d2d528369d8b2f3a66d2d6b4.dll +0 -0
  85. mmgpy.libs/vtkFiltersCore-9.5-935a5f5225a975e99626296b2f3ded70.dll +0 -0
  86. mmgpy.libs/vtkFiltersExtraction-9.5-dc0a7543ba584f7e8ce9f9184485a228.dll +0 -0
  87. mmgpy.libs/vtkFiltersGeneral-9.5-709f69dbcca8aba1750582106a97c605.dll +0 -0
  88. mmgpy.libs/vtkFiltersGeometry-9.5-7abfb655763a62f56d63b45038d6e811.dll +0 -0
  89. mmgpy.libs/vtkFiltersHybrid-9.5-0721ec98d8a8b7442d900747e1ec59fb.dll +0 -0
  90. mmgpy.libs/vtkFiltersHyperTree-9.5-f9ee6a4761fdad8956c08a51dae77636.dll +0 -0
  91. mmgpy.libs/vtkFiltersModeling-9.5-458d9d2c544bb3c37de28c26c05c07bc.dll +0 -0
  92. mmgpy.libs/vtkFiltersParallel-9.5-1f243ffe308277c3970d8be4172d856f.dll +0 -0
  93. mmgpy.libs/vtkFiltersReduction-9.5-bf8c4a248bd84fbd6bb1a2ab5f646e56.dll +0 -0
  94. mmgpy.libs/vtkFiltersSources-9.5-492fa5b1b8562f4b141a347a38ae1ce5.dll +0 -0
  95. mmgpy.libs/vtkFiltersStatistics-9.5-6e99ef76387303ec5ff8c0fe6101d446.dll +0 -0
  96. mmgpy.libs/vtkFiltersTexture-9.5-15c23120b41b9a1c4acb01f790aad01f.dll +0 -0
  97. mmgpy.libs/vtkFiltersVerdict-9.5-332c0402a58129ec5b6af7b7f56cbb62.dll +0 -0
  98. mmgpy.libs/vtkIOCellGrid-9.5-88e1ec9c5a3554a82aedc0027fe84c6b.dll +0 -0
  99. mmgpy.libs/vtkIOCore-9.5.dll +0 -0
  100. mmgpy.libs/vtkIOGeometry-9.5-47c69db15c63c5773efa6851b59ae0a7.dll +0 -0
  101. mmgpy.libs/vtkIOImage-9.5-74bb92e688da5595ff9ff7645f9a0a13.dll +0 -0
  102. mmgpy.libs/vtkIOLegacy-9.5.dll +0 -0
  103. mmgpy.libs/vtkIOParallel-9.5.dll +0 -0
  104. mmgpy.libs/vtkIOParallelXML-9.5.dll +0 -0
  105. mmgpy.libs/vtkIOXML-9.5.dll +0 -0
  106. mmgpy.libs/vtkIOXMLParser-9.5-1893156c41fd4cf7165904675cb5d15d.dll +0 -0
  107. mmgpy.libs/vtkImagingCore-9.5-145fc0249cffbd27c610d10812e1cbfc.dll +0 -0
  108. mmgpy.libs/vtkImagingSources-9.5-f0c087a4669caa045584ed61f52502b7.dll +0 -0
  109. mmgpy.libs/vtkParallelCore-9.5-e91757b6dbd2a5369ab2bd05ff95d79d.dll +0 -0
  110. mmgpy.libs/vtkParallelDIY-9.5-04dd6b6b5dd8a5eacd43d270999cf09a.dll +0 -0
  111. mmgpy.libs/vtkRenderingCore-9.5-24a9802d77a083def26449fa681b1af7.dll +0 -0
  112. mmgpy.libs/vtkdoubleconversion-9.5-5e39712b9f4e44ea8a26e9119e53a7d4.dll +0 -0
  113. mmgpy.libs/vtkexpat-9.5-3b1dd25e09a2cccbbac723de448cb894.dll +0 -0
  114. mmgpy.libs/vtkfmt-9.5-50239b66bf315d100ecd306114139e9b.dll +0 -0
  115. mmgpy.libs/vtkjpeg-9.5-9412ee79f685a9196398b988a59666cd.dll +0 -0
  116. mmgpy.libs/vtkjsoncpp-9.5-abfad956527e3a4885dbb39f99f9e4d4.dll +0 -0
  117. mmgpy.libs/vtkkissfft-9.5-464db9175ce63de19addc69be524c4b7.dll +0 -0
  118. mmgpy.libs/vtkloguru-9.5-ec016ed005b4a79062e329ad8f1c382d.dll +0 -0
  119. mmgpy.libs/vtklz4-9.5-798b58f4518733b0eee8027eeba022fb.dll +0 -0
  120. mmgpy.libs/vtklzma-9.5-8f489b5430eb47d578de52c769a4dd5c.dll +0 -0
  121. mmgpy.libs/vtkmetaio-9.5-8f0a559399d53e4c7fc06272620b2167.dll +0 -0
  122. mmgpy.libs/vtkpng-9.5-1dbed3116ba7e31f56512a93b942cdf5.dll +0 -0
  123. mmgpy.libs/vtkpugixml-9.5-23ef37d65494ab52babc6d45b24764b7.dll +0 -0
  124. mmgpy.libs/vtksys-9.5.dll +0 -0
  125. mmgpy.libs/vtktiff-9.5-767fd93c8402517d5b2d1befab98c41e.dll +0 -0
  126. mmgpy.libs/vtktoken-9.5-f4ff567202eeb9a613c0b242aa05dbc9.dll +0 -0
  127. mmgpy.libs/vtkverdict-9.5-6bb84649d1b0ca1cc5454307fd35083b.dll +0 -0
  128. mmgpy.libs/vtkzlib-9.5-779937c44671e188e9f96125eb5afb12.dll +0 -0
  129. share/__init__.py +10 -0
  130. share/man/man1/mmg2d.1.gz +0 -0
  131. share/man/man1/mmg3d.1.gz +0 -0
  132. 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