ARTS  2.2.66
test_cia.cc
Go to the documentation of this file.
1 /* Copyright (C) 2012 Stefan Buehler <sbuehler@ltu.se>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA. */
17 
26 #include "cia.h"
27 #include "make_vector.h"
28 
29 void test01()
30 {
31  cout << "Testing CIA Interpolation.\n";
32  GriddedField2 cia_data;
33 
34  Matrix A(5,3,0.);
35  A(2,1) = 1;
36  // cout << "A:" << A << endl;
37 
38  cia_data.data = A;
39  cia_data.set_grid(0, MakeVector(1,2,3,4,5));
40  cia_data.set_grid(1, MakeVector(100,200,300));
41 
42  cout << "cia_data:" << cia_data << endl;
43 
44 
45  // Output frequencies and temperature:
46  Vector f_out(1,9,0.5);
47  cout << "f_out:" << f_out << endl;
48  Numeric T_out = 150;
49  cout << "T_out:" << T_out << endl;
50 
51  Vector result(9);
52  cia_interpolation(result,
53  f_out,
54  T_out,
55  cia_data,
56  0.5,
57  0,
58  Verbosity(3,3,0));
59  cout << "result:" << result << endl;
60 
61 }
62 
63 int main()
64 {
65  test01();
66  return 0;
67 }
GriddedField2
Definition: gridded_fields.h:250
Matrix
The Matrix class.
Definition: matpackI.h:788
main
int main()
Definition: test_cia.cc:63
cia_interpolation
void cia_interpolation(VectorView result, ConstVectorView f_grid, const Numeric &temperature, const GriddedField2 &cia_data, const Numeric &T_extrapolfac, const Index &robust, const Verbosity &verbosity)
Interpolate CIA data.
Definition: cia.cc:53
GriddedField2::data
Matrix data
Definition: gridded_fields.h:303
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
Verbosity
Definition: messages.h:50
make_vector.h
The class MakeVector is a special kind of Vector that can be initialized explicitly from one or more ...
MakeVector
Definition: make_vector.h:42
GriddedField::set_grid
void set_grid(Index i, const Vector &g)
Set a numeric grid.
Definition: gridded_fields.cc:225
Vector
The Vector class.
Definition: matpackI.h:556
cia.h
Header file for work with HITRAN collision induced absorption (CIA).
test01
void test01()
Definition: test_cia.cc:29