Muscat.Containers.MmgRemeshing module¶
- class MmgRemeshing(mesh: Mesh, solution=None, metric=None)[source]¶
Bases:
object
- BuildMmgCommandLine(options: dict)[source]¶
Build command line for mmg execution
- Parameters:
options (dict) – keys corresponding to mmg option name and value corresponding to value if applicable
- Returns:
CommandLine – the command line for mmg execution
- Return type:
str
- LaunchMmg(CommandLine: str)[source]¶
Launch mmg with a subprocess using command line
- Parameters:
CommandLine (str) – the command line for mmg execution
- ReadMesh(prefix='mmg')[source]¶
Read mesh file produced by mmg
- Returns:
mesh – mmg resulting mesh from adaption
- Return type:
- Runner(options: dict, temp_name: str | None = 'temp_file', binary: bool = True, offset: int = 1, prefix: str = 'mmg', keep_temp_files: bool = False, temp_dir: str | None = None)[source]¶
Run the process to write mesh in an inria mesh file, launch mmg and read the resulting mesh
Notes
The inria mesh file (called temp_name) will be writen in a temporary directory
- Parameters:
options (dict) – keys corresponding to mmg option name and value corresponding to value if applicable
temp_name (str) – name of the output mesh file (without extension) default : “temp_file”
binary (bool) – defaults to True
prefix (str) – defaults to “mmg”
keep_temp_files (bool) – defaults to False
temp_dir (str) – directory to store temporary files if none a Temporary Directory is used for temporary file, default None
- Returns:
mesh – mmg resulting mesh from adaption
- Return type: