{
  "$defs": {
    "GmshOptions": {
      "description": "Typed gmsh meshing options; a knob left at None keeps gmsh's own default.",
      "properties": {
        "import_labels": {
          "default": true,
          "description": "Import STEP/OpenCASCADE entity labels (Geometry.OCCImportLabels); the mesher needs these to match parts to materials.",
          "title": "Import Labels",
          "type": "boolean"
        },
        "terminal_output": {
          "default": false,
          "description": "Print gmsh's progress to the terminal (General.Terminal); never changes the mesh, so it stays out of every identity.",
          "title": "Terminal Output",
          "type": "boolean"
        },
        "algorithm_2d": {
          "$ref": "#/$defs/MeshAlgorithm2D",
          "default": 6,
          "description": "2D meshing algorithm (Mesh.Algorithm); the default Frontal-Delaunay gives the all-triangle surface mesh HXT needs and meshes the bodies of a 2D model."
        },
        "algorithm_3d": {
          "$ref": "#/$defs/MeshAlgorithm3D",
          "default": 10,
          "description": "3D meshing algorithm (Mesh.Algorithm3D); the default HXT runs on ``num_threads`` and needs the all-triangle surface mesh ``recombine_all=False`` keeps."
        },
        "recombine_all": {
          "default": false,
          "description": "Recombine the simplex mesh into quads and hexes (Mesh.RecombineAll); keep it False, since WhitneyAVSolver needs tetrahedra and recombining makes 3D meshing fail.",
          "title": "Recombine All",
          "type": "boolean"
        },
        "mesh_size_min": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "`h_min` `[m]`: Lower clamp on element size (Mesh.MeshSizeMin); None inherits gmsh's default.",
          "title": "Mesh Size Min"
        },
        "mesh_size_max": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "`h_max` `[m]`: Upper clamp on element size (Mesh.MeshSizeMax); None inherits gmsh's default.",
          "title": "Mesh Size Max"
        },
        "optimize": {
          "default": true,
          "description": "Run mesh optimization after generation (Mesh.Optimize).",
          "title": "Optimize",
          "type": "boolean"
        },
        "smoothing": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Number of mesh smoothing steps (Mesh.Smoothing); None inherits gmsh's default.",
          "title": "Smoothing"
        },
        "num_threads": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Meshing threads (General.NumThreads): every physical core by default, None for gmsh's own default of one, and never part of an identity.",
          "title": "Num Threads"
        },
        "target_units": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": "M",
          "description": "Length unit OpenCASCADE converts the imported STEP to (Geometry.OCCTargetUnit): ``\"M\"`` keeps the pipeline in metres, None keeps the STEP's own unit.",
          "title": "Target Units"
        }
      },
      "title": "GmshOptions",
      "type": "object"
    },
    "MeshAlgorithm2D": {
      "description": "A gmsh 2D meshing algorithm, valued as the integer ``Mesh.Algorithm`` takes.",
      "enum": [
        1,
        2,
        5,
        6
      ],
      "title": "MeshAlgorithm2D",
      "type": "integer"
    },
    "MeshAlgorithm3D": {
      "description": "A gmsh 3D meshing algorithm, valued as the integer ``Mesh.Algorithm3D`` takes.",
      "enum": [
        1,
        4,
        7,
        10
      ],
      "title": "MeshAlgorithm3D",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "description": "How the geometry is discretized for the gmsh backend: the STEP source, domain-wide element size, and typed gmsh knobs.",
  "properties": {
    "step": {
      "default": "data/geometry.step",
      "description": "Path to the STEP file the mesher imports; its build123d part names are parsed into materials and region tags (`MeshEntity`).",
      "title": "Step",
      "type": "string"
    },
    "global_mesh_size": {
      "default": 0.001,
      "description": "`h` `[m]`: Domain-wide target element size, which a region's [`EntityTag.mesh_size`][femforge.physical.domain.EntityTag.mesh_size] overrides.",
      "title": "Global Mesh Size",
      "type": "number"
    },
    "gmsh_options": {
      "$ref": "#/$defs/GmshOptions",
      "description": "Typed gmsh options applied before meshing."
    },
    "deterministic": {
      "default": false,
      "description": "Pin meshing to one thread, so HXT's multithreading cannot vary the result and the same STEP and sizes always yield the identical mesh; slower, and part of the run identity.",
      "title": "Deterministic",
      "type": "boolean"
    }
  },
  "title": "MeshConfig",
  "type": "object"
}
