rompy.swan.subcomponents.numerics.SETUP#

pydantic model rompy.swan.subcomponents.numerics.SETUP[source]#

Stop criteria in the computation of wave setup.

SETUP [eps2] [outp] [niter]

Controls the stopping criterion and amount of output for the SOR solver in the computation of the wave-induced set-up.

Examples

In [302]: from rompy.swan.subcomponents.numerics import SETUP

In [303]: setup = SETUP()

In [304]: print(setup.render())
SETUP

In [305]: setup = SETUP(eps2=1e-4, outp=0, niter=20)

In [306]: print(setup.render())
SETUP eps2=0.0001 outp=0 niter=20

Show JSON schema
{
   "title": "SETUP",
   "description": "Stop criteria in the computation of wave setup.\n\n.. code-block:: text\n\n    SETUP [eps2] [outp] [niter]\n\nControls the stopping criterion and amount of output for the SOR solver in the\ncomputation of the wave-induced set-up.\n\nExamples\n--------\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.numerics import SETUP\n    setup = SETUP()\n    print(setup.render())\n    setup = SETUP(eps2=1e-4, outp=0, niter=20)\n    print(setup.render())",
   "type": "object",
   "properties": {
      "model_type": {
         "default": "setup",
         "description": "Model type discriminator",
         "enum": [
            "setup",
            "SETUP"
         ],
         "title": "Model Type",
         "type": "string"
      },
      "eps2": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Relative stopping criterion to terminate the linear solver (SIP or SOR). (SWAN default: 1.e-4 in case of SIP and 1.e-6 in case of SOR)",
         "title": "Eps2"
      },
      "outp": {
         "anyOf": [
            {
               "enum": [
                  0,
                  1,
                  2,
                  3
               ],
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Output for the iterative solver:\n\n* 0 = no output\n* 1 = additional information about the iteration process is written to the PRINT file \n* 2 = gives a maximal amount of output concerning the iteration process \n* 3 = summary of the iteration process\n\n(SWAN default: 0)",
         "title": "Outp"
      },
      "niter": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Maximum number of iterations for the linear solver (SWAN default: 20 in case of SIP and 1000 in case of SOR)",
         "title": "Niter"
      }
   },
   "additionalProperties": false
}

Fields:
field eps2: float | None = None#

Relative stopping criterion to terminate the linear solver (SIP or SOR). (SWAN default: 1.e-4 in case of SIP and 1.e-6 in case of SOR)

field model_type: Literal['setup', 'SETUP'] = 'setup'#

Model type discriminator

field niter: int | None = None#

Maximum number of iterations for the linear solver (SWAN default: 20 in case of SIP and 1000 in case of SOR)

field outp: Literal[0, 1, 2, 3] | None = None#

Output for the iterative solver:

  • 0 = no output

  • 1 = additional information about the iteration process is written to the PRINT file

  • 2 = gives a maximal amount of output concerning the iteration process

  • 3 = summary of the iteration process

(SWAN default: 0)

cmd() str[source]#

Command file string for this component.