{
  "$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"
    }
  },
  "description": "SaveScalars (SaveData): export scalar reductions to ``scalars.dat`` and its ``.names`` sidecar.\n\nIts ``diffusive flux`` operator integrates each ``Save Scalars = True`` electrode's terminal current, the ``I`` in ``R = \u0394V / I``.",
  "properties": {
    "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": "SaveScalars",
      "default": "SaveScalars",
      "description": "Discriminator that names this solver, doubling as its sif Solver label.",
      "title": "Kind",
      "type": "string"
    },
    "equation": {
      "default": "SaveScalars",
      "description": "Elmer equation/solver name.",
      "title": "Equation",
      "type": "string"
    },
    "procedure": {
      "default": "\"SaveData\" \"SaveScalars\"",
      "description": "Elmer Procedure: \"library\" \"function\".",
      "title": "Procedure",
      "type": "string"
    },
    "variable": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Primary solver variable; None for solvers that declare none.",
      "title": "Variable"
    },
    "variable_dofs": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Degrees of freedom per node; None lets Elmer infer.",
      "title": "Variable Dofs"
    },
    "exec_solver": {
      "$ref": "#/$defs/ExecSolver",
      "default": "After timestep",
      "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": null,
      "description": "Reorder DOFs to reduce matrix bandwidth; None omits the keyword.",
      "title": "Optimize Bandwidth"
    },
    "save_component_results": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Also export the scalars arising from Component sections.",
      "title": "Save Component Results"
    },
    "parallel_reduce": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Reduce a partitioned run's output to one ``scalars.dat`` instead of per-rank ``.dat.<rank>`` files.",
      "title": "Parallel Reduce"
    },
    "filename": {
      "default": "\"scalars.dat\"",
      "description": "The .dat the scalars land in (the run parser reads it, or its per-rank ``.dat.<rank>`` siblings, via the ``.names`` sidecar).",
      "title": "Filename",
      "type": "string"
    },
    "variable_1": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "Potential",
      "description": "The variable the operator reduces.",
      "title": "Variable 1"
    },
    "operator_1": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "diffusive flux",
      "description": "The reduction: boundary integral of the conjugate flux of ``variable_1``.",
      "title": "Operator 1"
    },
    "coefficient_1": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "Electric Conductivity",
      "description": "The material coefficient weighting the flux (\u03c3 \u2202\u03c6/\u2202n integrates to a current).",
      "title": "Coefficient 1"
    },
    "variable_2": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "Joule Heating",
      "description": "Second reduction: the Joule loss field (requires ``Calculate Joule Heating``).",
      "title": "Variable 2"
    },
    "operator_2": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": "int",
      "description": "Volume integral: total dissipated power P (W), the flux-independent cross-check R = \u0394V\u00b2/P.",
      "title": "Operator 2"
    },
    "variable_3": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Third reduction; the coupled joule-heating stack sets ``Temperature`` here.",
      "title": "Variable 3"
    },
    "operator_3": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Reduction for ``variable_3``; the coupled stack uses ``max`` (peak temperature).",
      "title": "Operator 3"
    }
  },
  "title": "SaveScalarsSolver",
  "type": "object"
}
