ODE

We distinguish between ode solvers for explicit and implicit problems. These are described in Explicit ODE and Implicit ODE.

Here we describe the base class for all ode solvers:

class assimulo.ode.ODE

Base class for all our integrators.

Defines general starting attributes for a simulation problem.

backward

Specifies if the simulation is done in reverse time. (NOTE: experimental!)

Parameters:

backward

    - Default False
    - Boolean
clear_logs()

Clears the currently stored log messages.

clock_step

Specifies if the elapsed time of an integrator step should be timed or not. Not that this is only possible if running in report continuously mode.

display_progress

This option actives output during the integration in terms of that the current integration is periodically printed to the stdout. Note though that report_continuously needs to be activated.

Parameters:

display_progress
            - Default True
get_elapsed_step_time()

Returns the elapsed time of a step. I.e. how long a step took. Note that this is only possible if running in report_continuously mode and should only be used to get a general idea of how long a step really took.

Returns:

Elapsed time (note -1.0 indicates that it was not used)
get_event_data()

Returns the event information (if any). If there exists information about events, it will be returned as a list of tuples where the first value is the time of the occured event and the second is the event information.

get_options()

Returns the current solver options.

get_statistics()

Returns the run-time statistics (if any).

get_supports()

Returns the functionality which the solver supports.

num_threads

This options specifies the number of threads to be used for those solvers that supports it.

Parameters:

num_threads
  
        - Default is the number of cores
    
        - Should be a integer.
print_event_data()

Prints the event information (if any).

print_statistics()

This method should print the statistics of the solver.

report_continuously

This options specifies if the solver should report the solution continuously after steps.

Parameters:

report_continuously
  
        - Default False
    
        - Should be a boolean.
simulate()

Calls the integrator to perform the simulation over the given time-interval. If a second call to simulate is performed, the simulation starts from the last given final time.

Parameters:

tfinal  
        - Final time for the simulation

        - Should be a float or integer greater than the initial time.
        
ncp     
        - Default '0'. Number of communication points where the 
          solution is returned. If '0', the integrator will return 
          at its internal steps.
          
        - Should be an integer.
        
ncp_list
        - Default None. A list of time points where the solution
          should be returned. Note, requires that ncp == 0.
          
    Example:
    
        simulate(10.0, 100), 10.0 is the final time and 100 is the number
                             communication points.
store_event_points

This options specifies if the solver should save additional points at the events, \(t_e^-, t_e^+\).

Parameters:

store_event_points
  
        - Default True
    
        - Should be a Boolean.
time_limit

This option can be used to limit the time of an integration. I.e to set an upper bound on the time allowed for the integration to be completed. The time limit is specified in seconds. For the limit to be checked, the option report_continuously must be True.

Parameters:

time_limit
            - Default 0, i.e. NO limit.
verbosity

This determines the level of the output. A smaller value means more output. The following values can be set:

QUIET = 50 WHISPER = 40 NORMAL = 30 LOUD = 20 SCREAM = 10

Parameters:

verb  
        - Default 30 (NORMAL)
    
        - Should be a integer.