# 4.9.2. Restart Reference

Restart is used in analyses that may not complete in a single job submission and might complete when continued from a previous termination time. Aria maintains the ability to restart a previous analysis by recording the internal state variables of a problem in a restart database. In this case the input mesh is supplied from a Finite Element Model block and the restart information is obtained from the restart data. See the command reference for a detailed description of the lines possible when defining this block. See Restart Examples for examples using restart.

Note

Often one wishes to initialize an analysis with results from another analysis (e.g. a steady simulation fed into a transient IC). In these cases, a full restart is not necessary. Instead Ic Input_Output_Region and Ic Read_File can be used to initialize specific fields of interest using the results of the other simulation.

If one believes that a simulation might run too long, and wishes to record restart databases, they need only to add a restart data block as follows:

    # Scope: Sierra > Procedure > Aria Region
    Begin restart data data
      at step 0, increment = 1
      database name = restart.e
    End

The restart database uses the same output scheduling logic as the results/heartbeat output, and can similarly be given an output scheduler block in place of specifying the commands in the restart block.

To restart a simulation, one must specify either the restart time to start at, or enable automatic restart (latest available time, start of simulation if not found) at Sierra scope. Aria will read the given database name for the required restart information

    Begin Sierra Job
      # Scope: Sierra!
      RESTART TIME = 0.00125
      # or: RESTART = auto

      ...
      Begin Procedure theProcedure
          ...

          Begin Aria Region Aria_Region
            ...

            # Scope: Sierra > Procedure > Aria Region
            Begin restart data data
              ...

              # Pointing to a previously created restart database
              database name = restart.e
            End
          End Aria Region Aria_Region

        End Procedure theProcedure
    End Sierra Job

Warning

Specifying an input database name that does not exist would skip restart in previous versions, but this behavior is deprecated and moving forward will be treated as an error. To recover this behavior, one should specify only a database name line which will be used as both the input and output database. Alternatively, one can use an Aprepro switch to switch between reading and writing a restart database e.g.

    # Scope: Sierra!
    # is_restart = {is_restart = 0} # default to off
    {if(is_restart)}
    RESTART = auto
    {endif}

    # Scope: Sierra > Procedure > Aria Region
    Begin restart data data
      ...

      {if(is_restart)}
        input database name = restart.e
      {else}
        output database name = restart.e
      {endif}
    End

The same input can then be used by adding an Aprepro definition to the restart launch line

    #First run
    launch -n 8 aria -i aria.i

    #Restart run
    launch -n 8 aria -i aria.i --define "is_restart=1"

To save space, options are provided to minimize the retained restart data. These options include

- Cycle Count - Cycle timesteps within a single DB file

- File Cycle Count - Cycle timesteps within individual DB files

- Overlay Count - Overwrite intermediate time steps within a single DB file