LILAC
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
stable_ode Class Reference

A class representing an ODE system that is integrated towards stability. More...

#include <stable.h>

Inheritance diagram for stable_ode:
Inheritance graph
[legend]
Collaboration diagram for stable_ode:
Collaboration graph
[legend]

Public Member Functions

const std::type_info & vtype () const
double score ()
virtual std::vector< std::stringdependencies () const
virtual void postprocess (input &invals)
virtual std::string type () const
virtual ~stable_ode ()
- Public Member Functions inherited from stable
double simulate ()
virtual ~stable ()
- Public Member Functions inherited from vartype
bool compare (const vartype *in) const
bool compare (const vartype &in) const
bool compare (const std::type_info &tinf)
template<typename T >
bool compare () const
template<typename T >
bool compare (const T &in) const
std::string vname () const
virtual const std::type_info & vtype_internal () const
bool compare_internal (const vartype *in) const
bool compare_internal (const vartype &in) const
bool compare_internal (const std::type_info &tinf)
template<typename T >
bool compare_internal () const
template<typename T >
bool compare_internal (const T &in) const
std::string vname_internal () const
virtual ~vartype ()

Protected Member Functions

virtual void pre_integration_operations ()
virtual void post_integration_operations ()
 This applies operations ofter the integration occurs.
virtual void iterate_system ()
virtual double get_change ()

Protected Attributes

std::shared_ptr< stable_odeactual
integratorinter
 This defines the integrator being used.
- Protected Attributes inherited from stable
int max_iterations
 Maximum number of times the system is iterated before assuming an unstable state.
double change_threshold
 The threshold of change between two iterations for which the system will be considered stable.
int num_gone
int round
int bad_res
std::shared_ptr< writercur_writer
- Protected Attributes inherited from simulation
controllercont
 The controller.
objectiveobj
 The objective function.
writercur_writer
- Protected Attributes inherited from item_dim
mempool memp
std::set< item_dim * > children
item_dimparent
size_t dimension
- Protected Attributes inherited from item
std::string _name
std::string _write_name
char has_write_name

Additional Inherited Members

- Static Public Member Functions inherited from item
static std::shared_ptr< itemcreate (std::string name, engineimp *rval)
- Public Attributes inherited from simulation
std::string out_f_name

Detailed Description

A class representing an ODE system that is integrated towards stability.

This class represents an ODE system that undergoes integration, possibly towards a stable equilibrium. Upon reaching this equilibrium, the integration will cease.

The class tests this by doing multiple sub-integrations, and checking the difference between consecutive solutions. In addition, operators can be applied before and after each integration round.

Note that this class is really a wrapper to a statically typed template class. This allows the system to choose the type at runtime, and generally be ignorant of the variable type of the defined problem.

Definition at line 58 of file stable.h.

Constructor & Destructor Documentation

stable_ode::~stable_ode ( )
virtual

Definition at line 44 of file stable_ode.cpp.

Member Function Documentation

std::vector< std::string > stable_ode::dependencies ( ) const
virtual

Returns the dependencies of the stable_ode class the stable_ode class depends on:

  • integrator integrator: The integrator that is being used
  • double int_len: The time to integrate between checking for convergence

And has optional parameters:

  • double t0: The starting time, defaults to 0

Implements stable.

Reimplemented in jones_optical, stable_spectral_pde_1d_tmpl< T >, and stable_spectral_pde_1d_tmpl< comp >.

Definition at line 72 of file stable_ode.cpp.

Here is the call graph for this function:

double stable_ode::get_change ( )
protectedvirtual

Implements stable.

Reimplemented in jones_optical, stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Definition at line 82 of file stable_ode.cpp.

void stable_ode::iterate_system ( )
protectedvirtual

This is the function that iterates the ODE system forwards. It applies the operator pre_integration_operations, then integrates from tcur to tcur+tlen, and then applies the operator post_integration_operations.

See Also
stable::simulate

Implements stable.

Reimplemented in stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Definition at line 31 of file stable_ode.cpp.

void stable_ode::post_integration_operations ( )
protectedvirtual

This applies operations ofter the integration occurs.

Performs operations after the integration

Reimplemented in stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Definition at line 55 of file stable_ode.cpp.

void stable_ode::postprocess ( input invals)
virtual

Implements stable.

Reimplemented in jones_optical, stable_spectral_pde_1d_tmpl< T >, stable_spectral_pde_1d_tmpl< comp >, stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Definition at line 35 of file stable_ode.cpp.

Here is the call graph for this function:

void stable_ode::pre_integration_operations ( )
protectedvirtual

Performs operations that occur before the integration

Reimplemented in stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Definition at line 49 of file stable_ode.cpp.

double stable_ode::score ( )
virtual

Reimplemented from simulation.

Reimplemented in jones_optical, stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Definition at line 76 of file stable_ode.cpp.

std::string stable_ode::type ( ) const
virtual
const std::type_info & stable_ode::vtype ( ) const
virtual

Implements vartype.

Reimplemented in stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Definition at line 79 of file stable_ode.cpp.

Member Data Documentation

std::shared_ptr<stable_ode> stable_ode::actual
protected

Definition at line 60 of file stable.h.

integrator* stable_ode::inter
protected

This defines the integrator being used.

Definition at line 62 of file stable.h.


The documentation for this class was generated from the following files: