bluemira.codes.plasmod.api._setup ================================= .. py:module:: bluemira.codes.plasmod.api._setup .. autoapi-nested-parse:: Defines the 'Setup' stage of the plasmod solver. Classes ------- .. autoapisummary:: bluemira.codes.plasmod.api._setup.Setup Module Contents --------------- .. py:class:: Setup(params: bluemira.codes.plasmod.params.PlasmodSolverParams, problem_settings: dict[str, Any], plasmod_input_file: str) Bases: :py:obj:`bluemira.codes.interface.CodesSetup` .. autoapi-inheritance-diagram:: bluemira.codes.plasmod.api._setup.Setup :parts: 1 :private-bases: Setup task for a plasmod solver. On run, this task writes a plasmod input file using the input values defined in this class. :param params: The bluemira parameters for the task. Note that this task does not apply any mappings to the ParameterFrame, so they should already be set. Most likely by a solver. :param problem_settings: Any non-bluemira parameters that should be passed to plasmod. :param plasmod_input_file: The path where the plasmod input file should be written. .. py:attribute:: params :type: bluemira.codes.plasmod.params.PlasmodSolverParams .. py:attribute:: inputs .. py:attribute:: plasmod_input_file .. py:method:: run() Run plasmod setup. .. py:method:: mock() Run plasmod setup in mock mode. No need to generate an input file as results will be mocked. .. py:method:: read() Run plasmod setup in read mode. No need to generate an input file as results will be read from file. .. py:method:: update_inputs(new_inputs: dict[str, float | enum.Enum] | None = None) Update plasmod inputs using the given values. This also pulls input values from the task's ParameterFrame and uses them to update the inputs attributes. The inputs to this method take precedence over inputs in the ParameterFrame. :param new_inputs: The new inputs to update with. .. rubric:: Notes Updates this class's :code:`inputs` attribute. .. py:method:: _remove_non_plasmod_inputs(_inputs: dict[str, Any]) -> dict[str, Any] :staticmethod: Remove non-plasmod inputs from a dictionary. Warn that the removed inputs will be ignored. This copies the original dictionary, the input dictionary is not modified. .. py:method:: _write_input() Write inputs to file to be read by plasmod. :raises CodesError: Cannot write input file