Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
80b01c2
Add an octree-informed structured mesh component
javoha Oct 19, 2026
a95a3b6
Run SfePy on the octree-informed mesh
javoha Oct 20, 2026
05169a6
Compute the SfePy fault zone from the fault surfaces
javoha Oct 20, 2026
164d204
Merge jvh_dev_octrees_dc (with main) into jvh_dev_octree_mesh
javoha Oct 21, 2026
3477407
Let the Workbench read the octree-informed mesh component's signature
javoha Oct 21, 2026
70f73cb
Merge branch 'jvh_dev_octrees_dc' into jvh_dev_octree_mesh
javoha Nov 3, 2026
482cc14
Merge branch 'jvh_dev_octrees_dc' into jvh_dev_octree_mesh
javoha Nov 11, 2026
1d91131
Merge branch 'jvh_dev_octrees_dc' into jvh_dev_octree_mesh
javoha Nov 19, 2026
889a3b0
Merge branch 'jvh_dev_octrees_dc' into jvh_dev_octree_mesh
javoha Nov 19, 2026
46559b7
Merge branch 'jvh_dev_octrees_dc' into jvh_dev_octree_mesh
javoha Nov 19, 2026
8abe53b
Merge main into jvh_dev_octree_mesh
javoha Dec 1, 2026
0814f42
Octree-informed mesh: colour and sidebar position from the palette
javoha Dec 1, 2026
85e4290
GOLEM: accept the octree-informed structured mesh
javoha Dec 1, 2026
2f2d8c2
Unstructured mesh: accept structural models on an OctreeGrid
javoha Dec 2, 2026
2dfb107
Merge remote-tracking branch 'origin/main' into jvh_dev_octree_mesh
javoha Dec 2, 2026
0f92057
Octree models: example sections in model 1 and 2, manuals
javoha Dec 2, 2026
48bec39
Meshing manual: trade-offs of the octree-informed mesh
javoha Dec 4, 2026
dc5cc50
Meshing manual: octree-informed trade-offs as requested in review
javoha Dec 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions core/meshing_components/explicit/unstructured/mesh_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from numpy.typing import NDArray
from core.object_components import StructuralModelResults, ExtentData
from core.object_components import MeshResults, MeshType
from core.meshing_components.pre_checks import pre_check_regular_grid
from core.meshing_components.explicit.unstructured.create_grid_fragment_surface import create_surface_grid, import_surfaces, fragment_surfaces
from core.meshing_components.explicit.unstructured.structural_surfaces import build_grid_litho, import_structural_surfaces
from core.meshing_components.explicit.unstructured.domain_geometry import (
Expand Down Expand Up @@ -2592,7 +2591,6 @@ class CSVSurfaceModelResults:
positionInGroup=990,
identifier='create_unstructured_mesh_data', # a unique identifier
return_name='Mesh', # the name for the returned-port
input_checks=[pre_check_regular_grid],
) # inputs are handled via the method signature
def create_unstructured_mesh_data(
geomodel_result: typing.Union[StructuralModelResults, CSVSurfaceModelResults],
Expand Down Expand Up @@ -2669,12 +2667,10 @@ def create_unstructured_mesh_data(
Returns:
MeshResults: An instance of the MeshResults class.

Raises:
ValueError: geomodel_result's structural model is on an OctreeGrid.
Structural models on a RegularGrid and on an OctreeGrid are both supported:
the surfaces come from the extended masked meshes, and the lithology of the
volumes is looked up on the structural grid (the finest octree cells).
"""
# Pre-checks can be ignored/skipped by a caller (see docs/developers/components.md),
# so also enforced here.
pre_check_regular_grid(geomodel_result)


# normalize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from scipy.spatial import ConvexHull, cKDTree

from core.object_components import StructuralModelResults
from core.structural_modeling_components.structural_objects.grids.grid_classes import OctreeGrid, to_regular

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -71,21 +72,37 @@ class SurfacePiece:
faces: NDArray[np.int64]


def _cell_spacing(grid) -> NDArray[np.float64]:
"""Size of the structural grid cells as (dx, dy, dz): the finest cells on an OctreeGrid."""
return np.asarray(grid.finest_spacing if isinstance(grid, OctreeGrid) else grid.spacing, dtype=float)


def build_grid_litho(geomodel_result: StructuralModelResults) -> pd.DataFrame:
"""
Lithology of every structural grid cell, used to assign lithologies to the mesh volumes.

On an OctreeGrid the lithology is sampled exactly at the centres of the finest
cells (each octree cell covers whole finest cells), so the table looks like the
one of a RegularGrid at the finest resolution.

Args:
geomodel_result: Structural model result.

Returns:
DataFrame with columns ``x``, ``y``, ``z`` (cell centres) and ``lithology``.
"""
frame = geomodel_result.structural_frame
# grid_coordinates is (N, 3); lith_block is (nx, ny, nz) -- flatten to (N,).
grid = frame.grid
if isinstance(grid, OctreeGrid):
coordinates = grid.equivalent_regular_grid().grid_coordinates
lithology = to_regular(grid, frame.cells, frame.lith_block).flatten()
else:
# grid_coordinates is (N, 3); lith_block is (nx, ny, nz) -- flatten to (N,).
coordinates = grid.grid_coordinates
lithology = frame.lith_block.flatten()
return pd.concat([
pd.DataFrame(frame.grid.grid_coordinates, columns=["x", "y", "z"]),
pd.DataFrame(frame.lith_block.flatten(), columns=["lithology"]),
pd.DataFrame(coordinates, columns=["x", "y", "z"]),
pd.DataFrame(lithology, columns=["lithology"]),
], axis=1)


Expand Down Expand Up @@ -132,7 +149,7 @@ def collect_surface_pieces(geomodel_result: StructuralModelResults) -> List[Surf
structural model was computed with an older version.
"""
frame = geomodel_result.structural_frame
spacing = np.asarray(frame.grid.spacing, dtype=float)
spacing = _cell_spacing(frame.grid)
min_area = _MIN_PIECE_AREA_CELLS * float(np.sort(spacing)[:2].prod())

sources: List[Tuple[str, bool, object]] = [
Expand Down Expand Up @@ -352,7 +369,7 @@ def import_structural_surfaces(geomodel_result: StructuralModelResults) -> Tuple
reference_surface_indices: Fault pieces as {label: position in ``surfaces``};
used by ``fragment_surfaces`` for fault physical groups and fault refinement.
"""
spacing = np.asarray(geomodel_result.structural_frame.grid.spacing, dtype=float)
spacing = _cell_spacing(geomodel_result.structural_frame.grid)
cell = float(spacing.min())
step = _BSPLINE_STEP_CELLS * float(spacing.max())

Expand Down
202 changes: 202 additions & 0 deletions core/meshing_components/implicit/octree_informed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
"""
Octree-informed structured mesh: a rectilinear hexahedral mesh whose cell sizes
follow the octree of a structural model.

The cells are laid out like a regular grid (``n_x * n_y * n_z`` hexahedra on
three coordinate lists), but each axis has its own non-uniform spacing: fine
where the octree is refined to its max level (contacts, erosion boundaries,
faults), coarse elsewhere. Along each axis:

1) Interface density: the share of the max-level cells of the stored octree
in each slab of finest cells.
2) Node positions by equidistribution of ``w = alpha * density + (1 - alpha) * uniform``:
every cell holds the same share of ``w``.
3) Cell sizes limited to at least one finest octree cell and to a growth
factor between neighbours of at most ``max_growth``.

Each cell takes the lithology of the octree cell at its center (a look-up in
the stored result, no interpolation). The coordinate lists are what
structured mesh generators take as spacing lists (e.g. MOOSE's
``CartesianMeshGenerator`` ``dx``/``ix``): ``np.diff`` of the edges.
"""

from typing import List, Tuple

import meshio
import numpy as np
import numpy.typing as npt
from py_api_wbgeo.nodesapi import wbgeo_component
from core import workbench_palette as palette

from core.meshing_components.explicit.unstructured.mesh_data import build_point_sets, classify_boundary_nodes
from core.meshing_components.pre_checks import pre_check_octree_grid
from core.object_components import MeshResults, MeshType, StructuralModelResults
from core.structural_modeling_components.structural_objects.grids.grid_classes import OctreeCells, OctreeGrid

FloatArray = npt.NDArray[np.float64]

# Iterations of the size limiting (minimum size, growth factor, total length);
# it converges in a few for any reachable target.
_SPACING_ITERATIONS: int = 200


@wbgeo_component(
description='Provides a structured hexahedral mesh whose cell sizes follow the octree of the structural model',
title='Create Octree-Informed Structured Mesh',
color=palette.MESH,
border_color=palette.BORDER,
group='Meshing',
positionInGroup=960,
identifier='wbgeo::meshing_create_octree_informed_structured_mesh',
return_name='Mesh',
input_checks=[pre_check_octree_grid],
)
def create_octree_informed_structured_mesh(
geomodel_result: StructuralModelResults,
n_cells_x: int = 0,
n_cells_y: int = 0,
n_cells_z: int = 0,
alpha: float = 0.7,
max_growth: float = 1.3,
) -> MeshResults:
"""
Create a rectilinear hexahedral mesh with cell sizes informed by the octree.

Args:
geomodel_result: A structural model computed on an OctreeGrid.
n_cells_x: Cells along x; 0 for half the finest octree resolution. At
most the finest resolution (cells are at least one finest cell).
n_cells_y: Cells along y, as ``n_cells_x``.
n_cells_z: Cells along z, as ``n_cells_x``.
alpha: Weight of the interface density against a uniform spacing,
in ``[0, 1]``: 0 gives a uniform grid, 1 follows the density only.
max_growth: Largest size ratio of neighbouring cells along an axis (>= 1).

Returns:
MeshResults with hexahedra grouped by lithology id (``cell_data["block_id"]``),
boundary point sets, and ``mesh_type`` OCTREE_INFORMED.

Raises:
ValueError: The model is not on an OctreeGrid or not computed, or a
parameter is out of range.
"""
# Pre-checks can be skipped by a caller, so also enforced here.
pre_check_octree_grid(geomodel_result)
frame = geomodel_result.structural_frame
grid = frame.grid
edges = octree_informed_edges(grid, frame.cells, (n_cells_x, n_cells_y, n_cells_z), alpha, max_growth)

# Lithology of the octree cell at each mesh cell's center.
centers = [0.5 * (e[:-1] + e[1:]) for e in edges]
cx, cy, cz = np.meshgrid(*centers, indexing="ij")
points_c = np.column_stack([cx.ravel(), cy.ravel(), cz.ravel()])
block = np.asarray(frame.lith_block)[frame.cells.locate(grid, points_c)].astype(np.int64) # (n_x*n_y*n_z,)

nodes, hexahedra = _rectilinear_hexahedra(edges)
cells: List[meshio.CellBlock] = []
block_ids: List[np.ndarray] = []
for block_id in np.unique(block):
members = hexahedra[block == block_id]
cells.append(meshio.CellBlock("hexahedron", members))
block_ids.append(np.full(len(members), block_id, dtype=np.int64))

extent_mesh = np.array([edges[0][0], edges[0][-1], edges[1][0], edges[1][-1], edges[2][0], edges[2][-1]])
point_sets = build_point_sets(classify_boundary_nodes(nodes, extent_mesh), len(nodes))
return MeshResults(
nodes=nodes,
elements=cells,
cell_data={"block_id": block_ids},
point_sets=point_sets,
mesh_type=MeshType.OCTREE_INFORMED,
)


def octree_informed_edges(
grid: OctreeGrid,
cells: OctreeCells,
n_cells: Tuple[int, int, int],
alpha: float = 0.7,
max_growth: float = 1.3,
) -> Tuple[FloatArray, FloatArray, FloatArray]:
"""
Cell edge coordinates along x, y and z from the octree's interface density.

Args:
grid: The octree grid.
cells: The stored cells of a structural model on it.
n_cells: Cells per axis; 0 for half the finest resolution.
alpha: Weight of the interface density against a uniform spacing, in ``[0, 1]``.
max_growth: Largest size ratio of neighbouring cells (>= 1).

Returns:
Three increasing coordinate arrays, ``n + 1`` edges each, from the
extent's lower to its upper bound.
"""
if not 0.0 <= alpha <= 1.0:
raise ValueError(f"alpha must lie in [0, 1], got {alpha}.")
if max_growth < 1.0:
raise ValueError(f"max_growth must be at least 1, got {max_growth}.")
finest = np.asarray(grid.finest_resolution, dtype=np.int64)
fine = np.asarray(cells.level) == grid.max_level
edges = []
for axis in range(3):
n_finest = int(finest[axis])
n = int(n_cells[axis]) or max(1, n_finest // 2)
if not 1 <= n <= n_finest:
raise ValueError(f"Cells along axis {'xyz'[axis]} must lie in [1, {n_finest}] "
f"(the finest octree resolution), got {n}.")
counts = np.bincount(np.asarray(cells.ijk)[fine, axis], minlength=n_finest).astype(np.float64)
density = counts / counts.sum() if counts.sum() > 0 else np.full(n_finest, 1.0 / n_finest)
weight = alpha * density + (1.0 - alpha) / n_finest
low, high = grid.extent[2 * axis], grid.extent[2 * axis + 1]
sizes = _equidistributed_sizes(weight, n, (high - low) / n_finest, max_growth)
edges.append(low + np.concatenate([[0.0], np.cumsum(sizes)]))
edges[-1][-1] = high # exact upper bound despite rounding
return edges[0], edges[1], edges[2]


def _equidistributed_sizes(weight: FloatArray, n: int, h: float, max_growth: float) -> FloatArray:
"""
``n`` cell sizes over ``len(weight)`` slabs of size ``h``, each holding an
equal share of ``weight`` (piecewise constant per slab), then limited to at
least ``h`` and a neighbour ratio of at most ``max_growth``, summing to the
axis length.
"""
length = h * weight.size
cumulative = np.concatenate([[0.0], np.cumsum(weight)])
slab_edges = np.arange(weight.size + 1) * h
nodes = np.interp(np.linspace(0.0, cumulative[-1], n + 1), cumulative, slab_edges)
sizes = np.diff(nodes)
for _ in range(_SPACING_ITERATIONS):
before = sizes.copy()
sizes = np.maximum(sizes, h)
for k in range(1, n): # small cells next to large ones grow
sizes[k] = max(sizes[k], sizes[k - 1] / max_growth)
for k in range(n - 2, -1, -1):
sizes[k] = max(sizes[k], sizes[k + 1] / max_growth)
sizes *= length / sizes.sum()
if np.allclose(sizes, before, rtol=1e-12, atol=0.0):
break
return sizes


def _rectilinear_hexahedra(edges: Tuple[FloatArray, FloatArray, FloatArray]) -> Tuple[FloatArray, np.ndarray]:
"""
Nodes and hexahedra of the rectilinear grid on the edge coordinates.

Node ``(i, j, k)`` has index ``(i * (ny + 1) + j) * (nz + 1) + k``; hexahedra
in cell order ``(i, j, k)``, corners as in the implicit structured mesh.
"""
nx, ny, nz = (len(e) - 1 for e in edges)
gx, gy, gz = np.meshgrid(*edges, indexing="ij")
nodes = np.column_stack([gx.ravel(), gy.ravel(), gz.ravel()]).astype(np.float64)

def node(i, j, k):
return (i * (ny + 1) + j) * (nz + 1) + k

i, j, k = (a.ravel() for a in np.meshgrid(np.arange(nx), np.arange(ny), np.arange(nz), indexing="ij"))
hexahedra = np.column_stack([
node(i, j, k), node(i + 1, j, k), node(i + 1, j + 1, k), node(i, j + 1, k),
node(i, j, k + 1), node(i + 1, j, k + 1), node(i + 1, j + 1, k + 1), node(i, j + 1, k + 1),
]).astype(np.int64)
return nodes, hexahedra

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# VTK/meshio HEX8 corner ordering, identical to _rectilinear_hexahedra.
_HEX8_OFFSETS = np.array([
    [0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0],
    [0, 0, 1], [1, 0, 1], [1, 1, 1], [0, 1, 1],
], dtype=np.int64)


def _octree_leaf_hexahedra(grid: OctreeGrid, cells: OctreeCells):
    """Convert stored leaves to HEX8 using integer finest-grid coordinates.

    Supports level-local ijk and finest-grid lower-corner ijk. The existing
    locate method is used to verify the indexing convention against leaf IDs.
    Assumes a complete dyadic leaf partition of the rectangular grid extent.
    """
    finest = np.asarray(grid.finest_resolution, dtype=np.int64)
    extent = np.asarray(grid.extent, dtype=np.float64).reshape(3, 2)
    low, high = extent[:, 0], extent[:, 1]
    levels = np.asarray(cells.level, dtype=np.int64).reshape(-1)
    ijk = np.asarray(cells.ijk, dtype=np.int64)
    if (finest.shape != (3,) or np.any(finest <= 0) or
            np.any(high <= low) or not np.all(np.isfinite(extent))):
        raise ValueError('Invalid octree grid extent or resolution.')
    if (ijk.shape != (len(levels), 3) or not len(levels) or
            np.any(levels < 0) or np.any(levels > grid.max_level) or
            grid.max_level > 60):
        raise ValueError('Invalid octree leaf indices or levels.')
    stride = np.left_shift(np.int64(1), grid.max_level - levels)
    h = (high - low) / finest
    if sum(int(s)**3 for s in stride) != int(finest[0])*int(finest[1])*int(finest[2]):
        raise ValueError('Stored cells do not have the volume of a complete leaf partition.')
    valid = []
    for lower in (ijk * stride[:, None], ijk):
        upper = lower + stride[:, None]
        if (np.any(lower < 0) or np.any(upper > finest) or
                np.any(lower % stride[:, None])):
            continue
        centers = low + (lower + 0.5 * stride[:, None]) * h
        located = np.asarray(cells.locate(grid, centers)).reshape(-1)
        if np.array_equal(located, np.arange(len(levels))):
            if not any(np.array_equal(lower, other) for other in valid):
                valid.append(lower)
    if len(valid) != 1:
        raise ValueError('Cannot uniquely verify octree ijk convention using cells.locate(). '
                         'Inspect OctreeCells before exporting.')
    corners = valid[0][:, None, :] + stride[:, None, None] * _HEX8_OFFSETS[None, :, :]
    # Deduplicate exactly on the integer lattice, not by floating-point tolerance.
    lattice, inverse = np.unique(corners.reshape(-1, 3), axis=0, return_inverse=True)
    nodes = low + lattice * h
    nodes = np.where(lattice == finest, high, nodes)
    return nodes, inverse.reshape(-1, 8).astype(np.int64)


@wbgeo_component(
    description='Converts octree leaves directly to locally refined hexahedra (non-conforming)',
    title='Create Octree-Preserving Mesh',
    color=palette.MESH,
    border_color=palette.BORDER,
    group='Meshing',
    positionInGroup=961,
    identifier='wbgeo::meshing_create_octree_preserving_mesh',
    return_name='Mesh',
    input_checks=[pre_check_octree_grid],
)
def create_octree_preserving_mesh(geomodel_result: StructuralModelResults) -> MeshResults:
    """One HEX8 per stored octree leaf; original lithology and refinement.

    WARNING: coarse/fine interfaces may contain hanging nodes. This function
    does not balance the tree or generate solver constraints. Do not treat
    this mesh as a conforming FEM mesh without further processing.
    """
    pre_check_octree_grid(geomodel_result)
    frame = geomodel_result.structural_frame
    grid = frame.grid
    mesh_type = getattr(MeshType, 'OCTREE_PRESERVING', None)
    if mesh_type is None:
        raise ValueError('Add OCTREE_PRESERVING to MeshType in core.object_components '
                         'and register it with your plotting/export dispatch as needed.')
    nodes, hexahedra = _octree_leaf_hexahedra(grid, frame.cells)
    block = np.asarray(frame.lith_block).reshape(-1).astype(np.int64)
    levels = np.asarray(frame.cells.level).reshape(-1).astype(np.int64)
    if len(block) != len(hexahedra):
        raise ValueError('Expected one lithology ID per octree leaf.')
    elements = []
    block_ids = []
    octree_levels = []
    for block_id in np.unique(block):
        mask = block == block_id
        elements.append(meshio.CellBlock('hexahedron', hexahedra[mask]))
        block_ids.append(block[mask])
        octree_levels.append(levels[mask])
    point_sets = build_point_sets(
        classify_boundary_nodes(nodes, np.asarray(grid.extent)), len(nodes))
    return MeshResults(
        nodes=nodes,
        elements=elements,
        cell_data={'block_id': block_ids, 'octree_level': octree_levels},
        point_sets=point_sets,
        mesh_type=mesh_type,
    )

1 change: 1 addition & 0 deletions core/meshing_components/mesh_format/exodus/Exo_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class MeshType(StrEnum):
ObjectMeshType.IMPLICIT: MeshType.IMPLICIT,
ObjectMeshType.STRUCTURED: MeshType.STRUCTURED,
ObjectMeshType.UNSTRUCTURED: MeshType.UNSTRUCTURED,
ObjectMeshType.OCTREE_INFORMED: MeshType.IMPLICIT, # hexahedra with block ids, like the implicit mesh
}


Expand Down
40 changes: 29 additions & 11 deletions core/meshing_components/pre_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,39 @@

def pre_check_regular_grid(geomodel_result: StructuralModelResults) -> None:
"""
Pre-check: meshing needs a structural model computed on a RegularGrid.
Pre-check for the implicit and the structured mesh: they need a structural
model computed on a RegularGrid.

The meshing components read the regular grid's layout (resolution, grid
coordinates, a lithology block per voxel, marching-cubes surfaces whose
vertices lie on the grid lines), which a model on an OctreeGrid doesn't
have. Raises to block the connection rather than fail somewhere inside the
mesher or, for the structured mesh, silently build an oversized mesh.

Other geology inputs (the unstructured mesher also takes surfaces read
from CSV files) have no grid, so there is nothing to check.
Both read the regular grid's layout: the implicit mesh one hexahedron per
voxel of the lithology block, the structured mesh the marching-cubes surfaces
whose vertices lie on the grid lines. A model on an OctreeGrid has neither
(one hexahedron per octree cell would not be a conforming mesh). Raises to
block the connection rather than fail somewhere inside the mesher or, for
the structured mesh, silently build an oversized mesh. The unstructured mesh
and the octree-informed structured mesh accept octree models.
"""
if not isinstance(geomodel_result, StructuralModelResults):
return
if isinstance(geomodel_result.structural_frame.grid, OctreeGrid):
raise ValueError(
"Meshing does not support structural models computed on an OctreeGrid yet. "
"Compute the structural model on a RegularGrid for meshing."
"This mesh needs a structural model computed on a RegularGrid. For a model on an "
"OctreeGrid, use 'Create Octree-Informed Structured Mesh' or 'Create Unstructured "
"Explicit Mesh'."
)


def pre_check_octree_grid(geomodel_result: StructuralModelResults) -> None:
"""
Pre-check: the octree-informed mesh needs a structural model computed on an OctreeGrid.

Its cell spacing comes from where the octree is refined, which a model on a
RegularGrid doesn't have. Raises to block the connection.
"""
frame = geomodel_result.structural_frame
if not isinstance(frame.grid, OctreeGrid):
raise ValueError(
"The octree-informed mesh needs a structural model computed on an OctreeGrid. "
"Use the other meshing components for models on a RegularGrid."
)
if frame.cells is None or frame.lith_block is None:
raise ValueError("The structural model has not been computed yet (no octree cells or lithology).")
10 changes: 6 additions & 4 deletions core/object_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ class FaultModelResults:

class MeshType(StrEnum):
"""
Which meshing component produced a MeshResults -- the three mesh
generation approaches available (create_implicit_structured_mesh,
create_structured_mesh_data, create_unstructured_mesh_data). Set
Which meshing component produced a MeshResults -- the mesh generation
approaches available (create_implicit_structured_mesh,
create_structured_mesh_data, create_unstructured_mesh_data, and
create_octree_informed_structured_mesh for models on an OctreeGrid). Set
automatically by each of those on the MeshResults they return, so
downstream consumers (e.g. SfepyHydrothermalProblemBuilder) can read a
mesh's own provenance instead of requiring it to be passed separately
Expand All @@ -169,13 +170,14 @@ class MeshType(StrEnum):
IMPLICIT = "implicit"
STRUCTURED = "structured"
UNSTRUCTURED = "unstructured"
OCTREE_INFORMED = "octree_informed"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
OCTREE_INFORMED = "octree_informed"
OCTREE_PRESERVING = "octree_preserving"


MeshTypeType = typing.Annotated[
MeshType,
AnnotatedScriptType(
name="MeshType",
identifier="MeshTypeType",
controlled="Select|implicit|structured|unstructured",
controlled="Select|implicit|structured|unstructured|octree_informed",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
controlled="Select|implicit|structured|unstructured|octree_informed",
controlled="Select|implicit|structured|unstructured|octree_informed|octree_preserving",

color=palette.PARAMETER,
),
]
Expand Down
Loading