ReFRACtor
composite_perturbation.cc
Go to the documentation of this file.
2 #include <boost/foreach.hpp>
3 
4 using namespace FullPhysics;
5 
6 //-----------------------------------------------------------------------
8 //-----------------------------------------------------------------------
9 
11 {
12  int res = 0;
13  BOOST_FOREACH(const boost::shared_ptr<PerturbationBuilder>& v, blist)
14  res += v->number_element();
15  return res;
16 }
17 
18 //-----------------------------------------------------------------------
20 //-----------------------------------------------------------------------
21 
22 blitz::Array<double, 1> CompositePerturbation::perturbation() const
23 {
24  blitz::Array<double, 1> res(number_element());
25  int index = 0;
26  BOOST_FOREACH(const boost::shared_ptr<PerturbationBuilder>& v, blist) {
27  v->build_perturbation(res, index);
28  index += v->number_element();
29  }
30  return res;
31 }
32 
33 //-----------------------------------------------------------------------
35 //-----------------------------------------------------------------------
36 
37 void CompositePerturbation::print(std::ostream& Os) const
38 {
39  Os << "Composite Perturbation";
40 }
41 
virtual void print(std::ostream &Os) const
Print description of object.
virtual blitz::Array< double, 1 > perturbation() const
Return the perturbation vector to use.
int number_element() const
Number of elements that will be in the state vector.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1

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