ReFRACtor
FullPhysics::CompositePerturbation Class Reference

A common way to create a perturbation is to have other classes responsible for portions of the state vector (e.g., an Atmosphere class creates the portion of the initial guess that handles the description of the atmosphere layers). More...

#include <composite_perturbation.h>

+ Inheritance diagram for FullPhysics::CompositePerturbation:
+ Collaboration diagram for FullPhysics::CompositePerturbation:

Public Member Functions

virtual ~CompositePerturbation ()
 
void add_builder (const boost::shared_ptr< PerturbationBuilder > &B)
 Add a builder to the build list. More...
 
int number_element () const
 Number of elements that will be in the state vector. More...
 
virtual blitz::Array< double, 1 > perturbation () const
 Return the perturbation vector to use. More...
 
virtual void print (std::ostream &Os) const
 Print description of object. More...
 
std::string print_to_string () const
 Print to string. More...
 
void remove_builder (const boost::shared_ptr< PerturbationBuilder > &B)
 Remove a builder to the build list. More...
 

Detailed Description

A common way to create a perturbation is to have other classes responsible for portions of the state vector (e.g., an Atmosphere class creates the portion of the initial guess that handles the description of the atmosphere layers).

This class implements this division.

This is an example of the "Builder" design pattern. This class is what is commonly called the "Director", and the PerturbationBuilder classes are the "Builder" classes.

Note that the PerturbationBuilder objects are called in the order they are added to the CompositePerturbation object. A common PerturbationBuilder adds additional values to the end state vector, so the order is important.

Definition at line 70 of file composite_perturbation.h.

Constructor & Destructor Documentation

◆ ~CompositePerturbation()

virtual FullPhysics::CompositePerturbation::~CompositePerturbation ( )
inlinevirtual

Definition at line 72 of file composite_perturbation.h.

Member Function Documentation

◆ add_builder()

void FullPhysics::CompositePerturbation::add_builder ( const boost::shared_ptr< PerturbationBuilder > &  B)
inline

Add a builder to the build list.

Definition at line 80 of file composite_perturbation.h.

◆ number_element()

int CompositePerturbation::number_element ( ) const

Number of elements that will be in the state vector.

Definition at line 10 of file composite_perturbation.cc.

◆ perturbation()

blitz::Array< double, 1 > CompositePerturbation::perturbation ( ) const
virtual

Return the perturbation vector to use.

Implements FullPhysics::Perturbation.

Definition at line 22 of file composite_perturbation.cc.

◆ print()

void CompositePerturbation::print ( std::ostream &  Os) const
virtual

Print description of object.

Reimplemented from FullPhysics::Perturbation.

Definition at line 37 of file composite_perturbation.cc.

◆ print_to_string()

std::string FullPhysics::Printable< Perturbation >::print_to_string ( ) const
inlineinherited

Print to string.

This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.

Definition at line 31 of file printable.h.

◆ remove_builder()

void FullPhysics::CompositePerturbation::remove_builder ( const boost::shared_ptr< PerturbationBuilder > &  B)
inline

Remove a builder to the build list.

Definition at line 90 of file composite_perturbation.h.


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

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:12