upxo.meshing.gbconformant.pipeline.estimate module
A forecast of a run’s size, time and memory before it starts.
The forecast is a power law in the number of voxels, scaled by the surface and volume size factors, with constants fitted to runs of the FM-steel development data (a crop of 8,800 voxels under eight settings, and a crop of 27,000 voxels). When the data directory holds earlier runs of this computer, the forecast is scaled by how far those runs differ from it, which also absorbs the speed of the computer. The result is a range: the mesh depends on the grain shapes, which no formula sees, and the time of a run changed by up to 1.9 times between runs of one computer.
- class upxo.meshing.gbconformant.pipeline.estimate.Observation(name: str, voxels: int, tets: int | None = None, nodes: int | None = None, seconds: float | None = None, peak_memory_mb: float | None = None, tet_size_factor: float | None = None, gmsh_size_factor: float | None = None, complete: bool = False)[source]
Bases:
objectWhat an earlier run turned out to be.
- class upxo.meshing.gbconformant.pipeline.estimate.Forecast(voxels: int, tets: int, tets_range: tuple, nodes: int, seconds: float, seconds_range: tuple, memory_mb: float, memory_range: tuple, basis: str, runs_used: int = 0, notes: list = <factory>, output: dict | None = None, output_range: tuple | None = None)[source]
Bases:
objectThe expected size of a run; every figure comes with the range it is likely to fall in.
- upxo.meshing.gbconformant.pipeline.estimate.model_tets(voxels: float, tet_size_factor: float | None = None, gmsh_size_factor: float | None = None) float[source]
Tetrahedra the fitted law gives for
voxelsat the given size factors (default settings when omitted).The surface size factor sets the count; the volume size factor adds tetrahedra only when its size is smaller than the surface size (the interior is then meshed finer than the boundary).
- upxo.meshing.gbconformant.pipeline.estimate.model_seconds(voxels: float) float[source]
Time of a run: it followed the number of voxels, not the number of tetrahedra, on the crops measured.
- upxo.meshing.gbconformant.pipeline.estimate.model_memory_mb(tets: float) float[source]
Peak memory of the main process; worker processes add their own.
- upxo.meshing.gbconformant.pipeline.estimate.forecast(voxels: int, config: dict | None = None, history: Iterable[Observation] = ()) Forecast[source]
The size, time and memory to expect for a run of
voxelswithconfig(default settings when omitted).historyholds earlier runs (seeload_observations()); those that finished are used to scale the fitted law to this computer and to this kind of data.