ReFRACtor
absorber.cc
Go to the documentation of this file.
1 #include "absorber.h"
2 
3 using namespace FullPhysics;
4 using namespace blitz;
5 
6 #ifdef HAVE_LUA
7 #include "register_lua.h"
9 .def("gas_index", &Absorber::gas_index)
10 .def("number_species", &Absorber::number_species)
11 .def("gas_name", &Absorber::gas_name)
12 .def("absorber_vmr", &Absorber::absorber_vmr)
14 #endif
15 
16 //-----------------------------------------------------------------------
18 //-----------------------------------------------------------------------
19 
20 AccumulatedTimer Absorber::timer("Absorber optical_depth_each_layer");
21 
22 //-----------------------------------------------------------------------
26 //-----------------------------------------------------------------------
27 
28 int Absorber::gas_index(const std::string& Name) const
29 {
30  for(int i = 0; i < number_species(); ++i)
31  if(gas_name(i) == Name)
32  return i;
33  return -1;
34 }
35 
36 
virtual int number_species() const
Number of species.
Definition: absorber.h:41
virtual std::string gas_name(int Species_index) const =0
Name of gases, in the order that optical_depth_each_layer returns them.
virtual boost::shared_ptr< AbsorberVmr > absorber_vmr(const std::string &gas_name) const =0
Returns the AbsorberVmr object for a given species index.
#define REGISTER_LUA_CLASS(X)
Definition: register_lua.h:116
Apply value function to a blitz array.
static AccumulatedTimer timer
Timer for optical_depth_each_layer.
Definition: absorber.h:31
This is a simple timer class that can be used to accumulate the time spent in multiple calls to a fun...
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
virtual int gas_index(const std::string &Name) const
Map a gas name to the index number it appears in optical_depth_each_layer.
Definition: absorber.cc:28
This class maintains the absorber portion of the state.
Definition: absorber.h:27

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