ReFRACtor
ground_coxmunk_plus_lambertian.cc
Go to the documentation of this file.
2 #include "ostream_pad.h"
3 
4 using namespace FullPhysics;
5 using namespace blitz;
6 
7 #ifdef HAVE_LUA
8 #include "register_lua.h"
9 
10 boost::shared_ptr<Ground> ground_cm_plus_lamb_output_create(boost::shared_ptr<Ground>& coxmunk, boost::shared_ptr<Ground>& lambertian)
11 {
13  (new GroundCoxmunkPlusLambertian(boost::dynamic_pointer_cast<GroundCoxmunk>(coxmunk),
14  boost::dynamic_pointer_cast<GroundLambertian>(lambertian)));
15 }
16 
17 
20 .scope
21 [
22  luabind::def("create", &ground_cm_plus_lamb_output_create)
23 ]
25 #endif
26 
27 
29  const boost::shared_ptr<GroundLambertian>& Lambertian)
30  : coxmunk_(Coxmunk), lambertian_(Lambertian)
31 {
32  std::vector<boost::shared_ptr<SubStateVectorObserver> > proxied;
33  proxied.push_back(coxmunk_);
34  proxied.push_back(lambertian_);
35  initialize(proxied);
36 }
37 
38 ArrayAd<double, 1> GroundCoxmunkPlusLambertian::surface_parameter(const double wn, const int spec_index) const
39 {
40  ArrayAd<double, 1> spars = coxmunk_->surface_parameter(wn, spec_index);
41  AutoDerivative<double> lamb_param = lambertian_->surface_parameter(wn, spec_index)(0);
42  spars(2) = lamb_param;
43  return spars;
44 }
45 
48 }
49 
50 void GroundCoxmunkPlusLambertian::print(std::ostream& Os) const
51 {
52  OstreamPad opad(Os, " ");
53  Os << "GroundCoxmunkPlusLambertian:\n";
54  coxmunk_->print(opad);
55  lambertian_->print(opad);
56  opad.strict_sync();
57 }
void initialize(const std::vector< boost::shared_ptr< SubStateVectorObserver > > &Proxied)
Registers the classes that will be proxied.
This class implements a Coxmunk plus Lambertian ground type.
This is a filtering stream that adds a pad to the front of every line written out.
Definition: ostream_pad.h:32
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
This class maintains the ground portion of the state.
Definition: ground.h:22
Apply value function to a blitz array.
virtual void print(std::ostream &Os) const
Output the print results from the proxied classes.
GroundCoxmunkPlusLambertian(const boost::shared_ptr< GroundCoxmunk > &Coxmunk, const boost::shared_ptr< GroundLambertian > &Lambertian)
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
#define REGISTER_LUA_END()
Definition: register_lua.h:134
def(luabind::constructor< int >()) .def("rows"
virtual boost::shared_ptr< Ground > clone() const
Clone a Ground object.
virtual ArrayAd< double, 1 > surface_parameter(const double wn, const int spec_index) const
Surface parmeters.

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