Frame

class simframe.frame.Frame(integrator=None, writer=None, updater=None, verbosity=2, progressbar=None, description='')[source]

Bases: simframe.frame.group.Group

This is the parent object of type Group that contains all other objects.

During integration the update() function of the Frame object will be called. You have to sub-delegete the updates of your other Group and Field objects within this function.

Frame has additional functionality for writing output files and for integration.

Attributes
description

Description of the instance.

integrator

Integrator that controls the simulation.

progressbar

Progressbar for displaying current status.

toc

Complete table of contents starting from this object.

updateorder

Update order if updater was set with list of strings.

updater

Heartbeat object with update instructions.

verbosity

Verbosity of the Frame objects.

writer

Writer object for writing output files.

Methods

addfield(name, value[, updater, …])

Function to add a new Field to the object.

addgroup(name[, updater, description])

Function to add a new Group to the object.

addintegrationvariable(name, value[, …])

Function to add a new integration variable IntVar to the object.

run()

This method starts the simulation.

update(*args, **kwargs)

Function to update the object.

writeoutput([i, forceoverwrite, filename])

Writes output to file, if Writer is specified.

Attributes Summary

integrator

Integrator that controls the simulation.

progressbar

Progressbar for displaying current status.

verbosity

Verbosity of the Frame objects.

writer

Writer object for writing output files.

Methods Summary

run()

This method starts the simulation.

writeoutput([i, forceoverwrite, filename])

Writes output to file, if Writer is specified.

Attributes Documentation

integrator

Integrator that controls the simulation.

progressbar

Progressbar for displaying current status.

verbosity

Verbosity of the Frame objects.

writer

Writer object for writing output files.

Methods Documentation

run()[source]

This method starts the simulation. An Integrator has to be set beforehand.

writeoutput(i=0, forceoverwrite=False, filename='', **kwargs)[source]

Writes output to file, if Writer is specified.

Parameters
  • i (int, optional, default : 0) – Number of output

  • forceoverwrite (boolean, optional, default : False) – If True, this overrules the seetings of the Writer and enforces the file to be overwritten.

  • filename (string, optional, default = "") – if given this will write the output to this file. Otherwise, it uses the standard scheme.

  • kwargs (additional keyword arguments) – Additional options that can be passed to the writer