{
  "$defs": {
    "ExecSolver": {
      "description": "When Elmer executes a solver (the ``Exec Solver`` keyword).",
      "enum": [
        "Always",
        "Before simulation",
        "After simulation",
        "Before timestep",
        "After timestep",
        "Never"
      ],
      "title": "ExecSolver",
      "type": "string"
    },
    "IterativeMethod": {
      "description": "The Krylov method for an iterative linear solve (``Linear System Iterative Method``).",
      "enum": [
        "BiCGStab",
        "BiCGStabl",
        "CG",
        "CGS",
        "GMRES",
        "GCR",
        "TFQMR"
      ],
      "title": "IterativeMethod",
      "type": "string"
    },
    "LinearSolverType": {
      "description": "The ``Linear System Solver`` strategy: an iterative Krylov method or a direct factorization.",
      "enum": [
        "Iterative",
        "Direct"
      ],
      "title": "LinearSolverType",
      "type": "string"
    },
    "Preconditioning": {
      "description": "The ``Linear System Preconditioning`` for an iterative solve.",
      "enum": [
        "None",
        "Diagonal",
        "ILU0",
        "ILU1",
        "ILU2",
        "ILU",
        "ILUT"
      ],
      "title": "Preconditioning",
      "type": "string"
    }
  },
  "description": "SCAFFOLD: linear elasticity (Elmer's StressSolve). Consumes ``Youngs Modulus`` and ``Poisson Ratio`` material\nkeywords; the latter is not yet stored on MechanicalProperties.",
  "properties": {
    "steady_state_convergence_tolerance": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": 1e-06,
      "description": "Steady-state convergence tolerance.",
      "title": "Steady State Convergence Tolerance"
    },
    "nonlinear_system_convergence_tolerance": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": 1e-07,
      "description": "Residual tolerance for the nonlinear (outer) iteration.",
      "title": "Nonlinear System Convergence Tolerance"
    },
    "nonlinear_system_max_iterations": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 1,
      "description": "Iteration cap for the nonlinear (outer) iteration.",
      "title": "Nonlinear System Max Iterations"
    },
    "nonlinear_system_newton_after_iterations": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Switch from Picard to Newton after this many outer iterations.",
      "title": "Nonlinear System Newton After Iterations"
    },
    "nonlinear_system_newton_after_tolerance": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Switch from Picard to Newton once the residual drops below this.",
      "title": "Nonlinear System Newton After Tolerance"
    },
    "nonlinear_system_relaxation_factor": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Under/over-relaxation factor for the nonlinear update (1 = none).",
      "title": "Nonlinear System Relaxation Factor"
    },
    "nonlinear_system_convergence_measure": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Nonlinear residual measure (e.g. \"solution\"); None keeps Elmer's default.",
      "title": "Nonlinear System Convergence Measure"
    },
    "linear_system_solver": {
      "anyOf": [
        {
          "$ref": "#/$defs/LinearSolverType"
        },
        {
          "type": "null"
        }
      ],
      "default": "Iterative",
      "description": "Iterative (Krylov) or Direct linear solve."
    },
    "linear_system_direct_method": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Factorization backend for a Direct solve (e.g. \"umfpack\"); None omits the keyword.",
      "title": "Linear System Direct Method"
    },
    "linear_system_iterative_method": {
      "anyOf": [
        {
          "$ref": "#/$defs/IterativeMethod"
        },
        {
          "type": "null"
        }
      ],
      "default": "BiCGStab",
      "description": "Krylov method when the solve is iterative."
    },
    "linear_system_max_iterations": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 5000,
      "description": "Iteration cap for the linear solve.",
      "title": "Linear System Max Iterations"
    },
    "linear_system_convergence_tolerance": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": 1e-08,
      "description": "Residual tolerance for the linear solve.",
      "title": "Linear System Convergence Tolerance"
    },
    "linear_system_preconditioning": {
      "anyOf": [
        {
          "$ref": "#/$defs/Preconditioning"
        },
        {
          "type": "null"
        }
      ],
      "default": "ILU0",
      "description": "Preconditioner for the iterative solve."
    },
    "linear_system_residual_output": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Print the linear residual every N iterations; None omits it.",
      "title": "Linear System Residual Output"
    },
    "linear_system_abort_not_converged": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Abort the run if the linear solve doesn't converge; False lets a stalled gauge-non-unique AV solve proceed.",
      "title": "Linear System Abort Not Converged"
    },
    "bicgstabl_polynomial_degree": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Polynomial degree l for the BiCGStab(l) Krylov method.",
      "title": "Bicgstabl Polynomial Degree"
    },
    "extra_keywords": {
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      },
      "description": "Escape hatch: verbatim sif keyword/value pairs merged (last, so they win) into [`to_elmer`][] \u2014 any Elmer\nkeyword the typed fields don't model yet stays authorable without subclassing.",
      "title": "Extra Keywords",
      "type": "object"
    },
    "kind": {
      "const": "StressSolver",
      "default": "StressSolver",
      "description": "Discriminator that names this solver, doubling as its sif Solver label.",
      "title": "Kind",
      "type": "string"
    },
    "equation": {
      "default": "Linear elasticity",
      "description": "Elmer equation/solver name.",
      "title": "Equation",
      "type": "string"
    },
    "procedure": {
      "default": "\"StressSolve\" \"StressSolver\"",
      "description": "Elmer Procedure: \"library\" \"function\".",
      "title": "Procedure",
      "type": "string"
    },
    "variable": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "Displacement",
      "description": "Primary solver variable; None for solvers that declare none.",
      "title": "Variable"
    },
    "variable_dofs": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 3,
      "description": "Degrees of freedom per node; None lets Elmer infer.",
      "title": "Variable Dofs"
    },
    "exec_solver": {
      "$ref": "#/$defs/ExecSolver",
      "default": "Always",
      "description": "When Elmer runs this solver."
    },
    "stabilize": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Enable stabilization; None omits the keyword.",
      "title": "Stabilize"
    },
    "optimize_bandwidth": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": true,
      "description": "Reorder DOFs to reduce matrix bandwidth; None omits the keyword.",
      "title": "Optimize Bandwidth"
    },
    "calculate_stresses": {
      "default": true,
      "description": "Recover the stress tensor from the displacement.",
      "title": "Calculate Stresses",
      "type": "boolean"
    }
  },
  "title": "StressSolver",
  "type": "object"
}
