ARTS  2.3.1285(git:92a29ea9-dirty)
interpolation_poly.h
Go to the documentation of this file.
1 /* Copyright (C) 2012 Stefan Buehler <sbuehler(at)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 #ifndef interpolation_poly_h
27 #define interpolation_poly_h
28 
29 #include "interpolation.h"
30 #include "matpackI.h"
31 
33 
64 struct GridPosPoly {
71 };
72 
74 
79 
80 ostream& operator<<(ostream& os, const GridPosPoly& gp);
81 
83  ConstVectorView old_grid,
84  ConstVectorView new_grid,
85  const Index order,
86  const Numeric& extpolfac = 0.5);
87 
88 void gridpos_poly(GridPosPoly& gp,
89  ConstVectorView old_grid,
90  const Numeric& new_grid,
91  const Index order,
92  const Numeric& extpolfac = 0.5);
93 
94 void gridpos_poly_longitudinal(const String& error_msg,
96  ConstVectorView old_grid,
97  ConstVectorView new_grid,
98  const Index order,
99  const Numeric& extpolfac = 0.5);
100 
102  ConstVectorView old_grid,
103  ConstVectorView new_grid,
104  const Index order,
105  const Numeric& extpolfac = 0.5);
106 
108  ConstVectorView old_grid,
109  const Numeric& new_grid,
110  const Index order,
111  const Numeric& extpolfac = 0.5);
112 
114  ConstVectorView old_grid,
115  const Numeric& new_grid,
116  const Index order,
117  const Numeric& extpolfac = 0.5);
118 
120 // Red Interpolation
122 
123 void interpweights(VectorView itw, const GridPosPoly& tc);
124 
125 void interpweights(VectorView itw,
126  const GridPosPoly& tr,
127  const GridPosPoly& tc);
128 
129 void interpweights(VectorView itw,
130  const GridPosPoly& tp,
131  const GridPosPoly& tr,
132  const GridPosPoly& tc);
133 
134 void interpweights(VectorView itw,
135  const GridPosPoly& tb,
136  const GridPosPoly& tp,
137  const GridPosPoly& tr,
138  const GridPosPoly& tc);
139 
140 void interpweights(VectorView itw,
141  const GridPosPoly& ts,
142  const GridPosPoly& tb,
143  const GridPosPoly& tp,
144  const GridPosPoly& tr,
145  const GridPosPoly& tc);
146 
147 void interpweights(VectorView itw,
148  const GridPosPoly& tv,
149  const GridPosPoly& ts,
150  const GridPosPoly& tb,
151  const GridPosPoly& tp,
152  const GridPosPoly& tr,
153  const GridPosPoly& tc);
154 
156 
158  ConstMatrixView a,
159  const GridPosPoly& tr,
160  const GridPosPoly& tc);
161 
164  const GridPosPoly& tp,
165  const GridPosPoly& tr,
166  const GridPosPoly& tc);
167 
170  const GridPosPoly& tb,
171  const GridPosPoly& tp,
172  const GridPosPoly& tr,
173  const GridPosPoly& tc);
174 
177  const GridPosPoly& ts,
178  const GridPosPoly& tb,
179  const GridPosPoly& tp,
180  const GridPosPoly& tr,
181  const GridPosPoly& tc);
182 
185  const GridPosPoly& tv,
186  const GridPosPoly& ts,
187  const GridPosPoly& tb,
188  const GridPosPoly& tp,
189  const GridPosPoly& tr,
190  const GridPosPoly& tc);
191 
193 // Blue interpolation
195 
196 void interpweights(MatrixView itw, const ArrayOfGridPosPoly& cgp);
197 
198 void interpweights(MatrixView itw,
199  const ArrayOfGridPosPoly& rgp,
200  const ArrayOfGridPosPoly& cgp);
201 
202 void interpweights(MatrixView itw,
203  const ArrayOfGridPosPoly& pgp,
204  const ArrayOfGridPosPoly& rgp,
205  const ArrayOfGridPosPoly& cgp);
206 
207 void interpweights(MatrixView itw,
208  const ArrayOfGridPosPoly& bgp,
209  const ArrayOfGridPosPoly& pgp,
210  const ArrayOfGridPosPoly& rgp,
211  const ArrayOfGridPosPoly& cgp);
212 
213 void interpweights(MatrixView itw,
214  const ArrayOfGridPosPoly& sgp,
215  const ArrayOfGridPosPoly& bgp,
216  const ArrayOfGridPosPoly& pgp,
217  const ArrayOfGridPosPoly& rgp,
218  const ArrayOfGridPosPoly& cgp);
219 
220 void interpweights(MatrixView itw,
221  const ArrayOfGridPosPoly& vgp,
222  const ArrayOfGridPosPoly& sgp,
223  const ArrayOfGridPosPoly& bgp,
224  const ArrayOfGridPosPoly& pgp,
225  const ArrayOfGridPosPoly& rgp,
226  const ArrayOfGridPosPoly& cgp);
227 
228 void interp(VectorView ia,
229  ConstMatrixView itw,
230  ConstVectorView a,
231  const ArrayOfGridPosPoly& cgp);
232 
233 void interp(VectorView ia,
234  ConstMatrixView itw,
235  ConstMatrixView a,
236  const ArrayOfGridPosPoly& rgp,
237  const ArrayOfGridPosPoly& cgp);
238 
239 void interp(VectorView ia,
240  ConstMatrixView itw,
242  const ArrayOfGridPosPoly& pgp,
243  const ArrayOfGridPosPoly& rgp,
244  const ArrayOfGridPosPoly& cgp);
245 
246 void interp(VectorView ia,
247  ConstMatrixView itw,
249  const ArrayOfGridPosPoly& bgp,
250  const ArrayOfGridPosPoly& pgp,
251  const ArrayOfGridPosPoly& rgp,
252  const ArrayOfGridPosPoly& cgp);
253 
254 void interp(VectorView ia,
255  ConstMatrixView itw,
257  const ArrayOfGridPosPoly& sgp,
258  const ArrayOfGridPosPoly& bgp,
259  const ArrayOfGridPosPoly& pgp,
260  const ArrayOfGridPosPoly& rgp,
261  const ArrayOfGridPosPoly& cgp);
262 
263 void interp(VectorView ia,
264  ConstMatrixView itw,
266  const ArrayOfGridPosPoly& vgp,
267  const ArrayOfGridPosPoly& sgp,
268  const ArrayOfGridPosPoly& bgp,
269  const ArrayOfGridPosPoly& pgp,
270  const ArrayOfGridPosPoly& rgp,
271  const ArrayOfGridPosPoly& cgp);
272 
274 // Green interpolation
276 
277 void interpweights(Tensor3View itw,
278  const ArrayOfGridPosPoly& rgp,
279  const ArrayOfGridPosPoly& cgp);
280 
281 void interpweights(Tensor4View itw,
282  const ArrayOfGridPosPoly& pgp,
283  const ArrayOfGridPosPoly& rgp,
284  const ArrayOfGridPosPoly& cgp);
285 
286 void interpweights(Tensor5View itw,
287  const ArrayOfGridPosPoly& bgp,
288  const ArrayOfGridPosPoly& pgp,
289  const ArrayOfGridPosPoly& rgp,
290  const ArrayOfGridPosPoly& cgp);
291 
292 void interpweights(Tensor6View itw,
293  const ArrayOfGridPosPoly& sgp,
294  const ArrayOfGridPosPoly& bgp,
295  const ArrayOfGridPosPoly& pgp,
296  const ArrayOfGridPosPoly& rgp,
297  const ArrayOfGridPosPoly& cgp);
298 
299 void interpweights(Tensor7View itw,
300  const ArrayOfGridPosPoly& vgp,
301  const ArrayOfGridPosPoly& sgp,
302  const ArrayOfGridPosPoly& bgp,
303  const ArrayOfGridPosPoly& pgp,
304  const ArrayOfGridPosPoly& rgp,
305  const ArrayOfGridPosPoly& cgp);
306 
307 void interp(MatrixView ia,
308  ConstTensor3View itw,
309  ConstMatrixView a,
310  const ArrayOfGridPosPoly& rgp,
311  const ArrayOfGridPosPoly& cgp);
312 
313 void interp(Tensor3View ia,
314  ConstTensor4View itw,
316  const ArrayOfGridPosPoly& pgp,
317  const ArrayOfGridPosPoly& rgp,
318  const ArrayOfGridPosPoly& cgp);
319 
320 void interp(Tensor4View ia,
321  ConstTensor5View itw,
323  const ArrayOfGridPosPoly& bgp,
324  const ArrayOfGridPosPoly& pgp,
325  const ArrayOfGridPosPoly& rgp,
326  const ArrayOfGridPosPoly& cgp);
327 
328 void interp(Tensor5View ia,
329  ConstTensor6View itw,
331  const ArrayOfGridPosPoly& sgp,
332  const ArrayOfGridPosPoly& bgp,
333  const ArrayOfGridPosPoly& pgp,
334  const ArrayOfGridPosPoly& rgp,
335  const ArrayOfGridPosPoly& cgp);
336 
337 void interp(Tensor6View ia,
338  ConstTensor7View itw,
340  const ArrayOfGridPosPoly& vgp,
341  const ArrayOfGridPosPoly& sgp,
342  const ArrayOfGridPosPoly& bgp,
343  const ArrayOfGridPosPoly& pgp,
344  const ArrayOfGridPosPoly& rgp,
345  const ArrayOfGridPosPoly& cgp);
346 
347 #endif // interpolation_poly_h
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
The VectorView class.
Definition: matpackI.h:610
The Tensor4View class.
Definition: matpackIV.h:284
A constant view of a Tensor7.
Definition: matpackVII.h:147
The Tensor7View class.
Definition: matpackVII.h:1286
void gridpos_poly_longitudinal(const String &error_msg, ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac=0.5)
Set up grid positions for higher order interpolation on longitudes.
The Vector class.
Definition: matpackI.h:860
The MatrixView class.
Definition: matpackI.h:1093
A constant view of a Tensor6.
Definition: matpackVI.h:149
The Tensor6View class.
Definition: matpackVI.h:621
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPosPoly &tc)
Red 1D Interpolate.
Header file for interpolation.cc.
ostream & operator<<(ostream &os, const GridPosPoly &gp)
Output operator for GridPosPoly.
A constant view of a Tensor4.
Definition: matpackIV.h:133
The Tensor3View class.
Definition: matpackIII.h:239
ArrayOfIndex idx
void gridpos_poly(ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac=0.5)
The maximum difference from 1 that we allow for a sum check.
A constant view of a Tensor5.
Definition: matpackV.h:143
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Implementation of Matrix, Vector, and such stuff.
The Tensor5View class.
Definition: matpackV.h:333
A constant view of a Tensor3.
Definition: matpackIII.h:132
A constant view of a Vector.
Definition: matpackI.h:476
A constant view of a Matrix.
Definition: matpackI.h:982
Structure to store a grid position for higher order interpolation.
void gridpos_poly_cyclic_longitudinal(ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac=0.5)
Set up grid positions for higher order interpolation.
void interpweights(VectorView itw, const GridPosPoly &tc)
Red 1D interpolation weights.
Array< GridPosPoly > ArrayOfGridPosPoly
An Array of grid positions.