ARTS  2.3.1285(git:92a29ea9-dirty)
arts_api_classes.cc
Go to the documentation of this file.
1 /* Copyright (C) 2020 Richard Larsson <larsson@mps.mpg.de>
2 
3  This program is free software; you can redistribute it and/or
4  modify it under the terms of the GNU General Public License as
5  published by the Free Software Foundation; either version 2 of the
6  License, or (at your option) any 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 
19 // File description
21 
29 #include "arts_api_classes.h"
30 
31 #include "absorption.h"
32 #include "absorptionlines.h"
33 #include "covariance_matrix.h"
34 #include "energylevelmap.h"
35 #include "global_data.h"
36 #include "lineshapemodel.h"
37 #include "quantum.h"
38 #include "supergeneric.h"
39 #include "xml_io.h"
40 #include "xml_io_types.h"
41 #include "zeemandata.h"
42 
43 #ifdef TIME_SUPPORT
44 #include <unistd.h>
45 #endif
46 
47 #define BasicInterfaceCAPI(TYPE) \
48 void * create##TYPE() \
49 { \
50  return new TYPE; \
51 } \
52  \
53 void delete##TYPE(void * data) \
54 { \
55  delete static_cast<TYPE *>(data); \
56 } \
57  \
58 void print##TYPE(void * data) \
59 { \
60  std::cout << (*static_cast<TYPE *>(data)) << std::endl; \
61 }
62 
63 
64 #define GetterSetterCAPI(TYPE, VALUE, BASETYPE) \
65 BASETYPE get##VALUE##TYPE(void * data) \
66 { \
67  return static_cast<TYPE *>(data) -> VALUE (); \
68 } \
69 void set##VALUE##TYPE(void * data, BASETYPE newval) \
70 { \
71  static_cast<TYPE *>(data) -> VALUE (newval); \
72 }
73 
74 
75 #define EnumGetterSetterCAPI(TYPE, VALUE, ENUM) \
76 Index get##VALUE##TYPE(void * data) \
77 { \
78  return Index(static_cast<TYPE *>(data) -> VALUE ()); \
79 } \
80 Index set##VALUE##TYPE(void * data, Index newval) \
81 { \
82  if (static_cast<TYPE *>(data) -> validIndexFor##VALUE (newval)) { \
83  static_cast<TYPE *>(data) -> VALUE (ENUM(newval)); \
84  return EXIT_SUCCESS; \
85  } else { \
86  return EXIT_FAILURE; \
87  } \
88 } \
89 Index string2index##VALUE##TYPE(void * data, char * newval) \
90 { \
91  return Index(static_cast<TYPE *>(data) -> string2##VALUE(newval)); \
92 }
93 
94 #define VoidGetterCAPI(TYPE, VALUE) \
95 void * get##VALUE##TYPE(void * data) \
96 { \
97  return &static_cast<TYPE *>(data) -> VALUE(); \
98 }
99 
100 #define VoidStructGetterCAPI(TYPE, VALUE) \
101 void * get##VALUE##TYPE(void * data) \
102 { \
103  return &static_cast<TYPE *>(data) -> VALUE; \
104 }
105 
106 
107 #define BasicInputOutputCAPI(TYPE) \
108 Index xmlread##TYPE(void * data, char * filepath) \
109 { \
110  try { \
111  xml_read_from_file(filepath, *static_cast<TYPE *>(data), Verbosity()); \
112  return EXIT_SUCCESS; \
113  } catch (std::runtime_error& e) { \
114  return EXIT_FAILURE; \
115  } \
116 } \
117  \
118 Index xmlsave##TYPE(void * data, char * filepath, Index filetype, Index clobber) \
119 { \
120  try { \
121  xml_write_to_file(filepath, *static_cast<const TYPE *>(data), FileType(filetype), not clobber, Verbosity()); \
122  return EXIT_SUCCESS; \
123  } catch (std::runtime_error& e) { \
124  return EXIT_FAILURE; \
125  } \
126 }
127 
128 
129 #define VoidArrayCAPI(TYPE) \
130 Index size##TYPE(void * data) \
131 { \
132  return static_cast<TYPE *>(data) -> size(); \
133 } \
134 void resize##TYPE(Index n, void * data) \
135 { \
136  static_cast<TYPE *>(data) -> resize(n); \
137 } \
138 void * getelem##TYPE(Index i, void * data) \
139 { \
140  return &static_cast<TYPE *>(data) -> operator[](i); \
141 }
142 
143 
144 #define VoidArrayElemCAPI(TYPE, ELEM) \
145 Index size##ELEM##TYPE(void * data) \
146 { \
147  return static_cast<TYPE *>(data) -> ELEM().size(); \
148 } \
149 void resize##ELEM##TYPE(Index n, void * data) \
150 { \
151  static_cast<TYPE *>(data) -> ELEM().resize(n); \
152 } \
153 void * getelem##ELEM##TYPE(Index i, void * data) \
154 { \
155  return &static_cast<TYPE *>(data) -> ELEM()[i]; \
156 }
157 
158 
159 // Index
162 Index getIndex(void * data) { return *static_cast<Index *>(data); }
163 void setIndex(void * data, Index newval) { *static_cast<Index *>(data) = newval; }
170 
171 
172 // Numeric
175 Numeric getNumeric(void * data) { return *static_cast<Numeric *>(data); }
176 void setNumeric(void * data, Numeric newval) { *static_cast<Numeric *>(data) = newval; }
177 
178 
179 // ZeemanModel
183 
184 
185 // Rational
190 void simplifyRational(void * data) { static_cast<Rational *>(data)->simplify_in_place(); }
191 
192 
193 // LineShape::ModelParameters
194 void printLineShapeModelParameters(void * data) { std::cout << (*static_cast<LineShape::ModelParameters *>(data)) << std::endl; }
195 Index getLineShapeModelParametersType(char * data) { try { return Index(LineShape::string2temperaturemodel(data)); } catch (std::runtime_error& e) { return -1; } }
196 
197 
198 // LineShape::SingleSpeciesModel
209 
210 
211 // LineShape::Model
214 
215 
216 // Absorption::SingleLine
226 VoidArrayElemCAPI(AbsorptionSingleLine, LowerQuantumNumbers)
227 VoidArrayElemCAPI(AbsorptionSingleLine, UpperQuantumNumbers)
228 
229 
230 // QuantumNumbers
232 void * getelemQuantumNumbers(Index i, void * data) { return &static_cast<QuantumNumbers *>(data)->operator[](i); }
235 
236 
237 // QuantumIdentifier
243 VoidGetterCAPI(QuantumIdentifier, EnergyLevelQuantumNumbers)
244 VoidGetterCAPI(QuantumIdentifier, LowerQuantumNumbers)
245 VoidGetterCAPI(QuantumIdentifier, UpperQuantumNumbers)
246 
247 // ArrayOfQuantumIdentifier
251 
252 // SpeciesTag
260 GetterSetterCAPI(SpeciesTag, CIADataset, Index)
268 
269 Index setSpeciesTag(void * data, char * newdata)
270 {
271  try {
272  *static_cast<SpeciesTag *>(data) = SpeciesTag(newdata);
273  return EXIT_SUCCESS;
274  } catch(std::exception& e) {
275  return EXIT_FAILURE;
276  }
277 }
278 
280 {
281  if (spec >= 0 and spec < global_data::species_data.nelem())
282  return EXIT_SUCCESS;
283  else
284  return EXIT_FAILURE;
285 }
286 
288 {
289  auto& species = global_data::species_data[spec];
290  if (isot == species.Isotopologue().nelem())
291  return EXIT_SUCCESS;
292  else
293  return EXIT_FAILURE;
294 }
295 
297 {
298  auto& species = global_data::species_data[spec];
299  if (isot >= 0 and isot < species.Isotopologue().nelem() and not species.Isotopologue()[isot].isContinuum())
300  return EXIT_SUCCESS;
301  else
302  return EXIT_FAILURE;
303 }
304 
305 Index validContinuum(Index spec, Index isot)
306 {
307  auto& species = global_data::species_data[spec];
308  if (isot >= 0 and isot < species.Isotopologue().nelem() and species.Isotopologue()[isot].isContinuum())
309  return EXIT_SUCCESS;
310  else
311  return EXIT_FAILURE;
312 }
313 
314 
315 // AbsorptionLines
327 GetterSetterCAPI(AbsorptionLines, LinemixingLimit, Numeric)
328 VoidGetterCAPI(AbsorptionLines, QuantumIdentity)
330 VoidGetterCAPI(AbsorptionLines, BroadeningSpecies)
338 void printmetaAbsorptionLines(void * data) { std::cout << static_cast<AbsorptionLines *>(data) -> MetaData() << std::endl; }
339 Index isAbsorptionLinesOK(void * data) { return Index(static_cast<AbsorptionLines *>(data) -> OK()); }
340 void * getSpeciesNameAbsorptionLines(void * data) {
341  String *s = new String(static_cast<AbsorptionLines *>(data)->SpeciesName());
342  return (void *)s;
343 }
344 
345 // EnergyLevelMap
352 bool getOKEnergyLevelMap(void * data) {return static_cast<EnergyLevelMap *>(data) -> OK();}
353 
354 
355 // Vector
364 void resizeVector(Index n, void * data) {static_cast<Vector *>(data) -> resize(n);}
365 Index nelemVector(void * data) {return static_cast<Vector *>(data) -> nelem();}
366 Numeric * getDataVector(void * data) {return static_cast<Vector *>(data) -> get_c_array();}
367 
368 
369 // Matrix
378 void resizeMatrix(Index nrows, Index ncols, void * data) {static_cast<Matrix *>(data) -> resize(nrows, ncols);}
379 Index rowsMatrix(void * data) {return static_cast<Matrix *>(data) -> nrows();}
380 Index colsMatrix(void * data) {return static_cast<Matrix *>(data) -> ncols();}
381 Numeric * getDataMatrix(void * data) {return static_cast<Matrix *>(data) -> get_c_array();}
382 
383 
384 // Tensor3
393 void resizeTensor3(Index npages, Index nrows, Index ncols, void * data) {static_cast<Tensor3 *>(data) -> resize(npages, nrows, ncols);}
394 Index pagesTensor3(void * data) {return static_cast<Tensor3 *>(data) -> npages();}
395 Index rowsTensor3(void * data) {return static_cast<Tensor3 *>(data) -> nrows();}
396 Index colsTensor3(void * data) {return static_cast<Tensor3 *>(data) -> ncols();}
397 Numeric * getDataTensor3(void * data) {return static_cast<Tensor3 *>(data) -> get_c_array();}
398 
399 
400 // Tensor4
406 // VoidArrayCAPI(ArrayOfArrayOfTensor4)
407 // BasicInterfaceCAPI(ArrayOfArrayOfTensor4)
408 // BasicInputOutputCAPI(ArrayOfArrayOfTensor4)
409 void resizeTensor4(Index nbooks, Index npages, Index nrows, Index ncols, void * data) {static_cast<Tensor4 *>(data) -> resize(nbooks, npages, nrows, ncols);}
410 Index booksTensor4(void * data) {return static_cast<Tensor4 *>(data) -> nbooks();}
411 Index pagesTensor4(void * data) {return static_cast<Tensor4 *>(data) -> npages();}
412 Index rowsTensor4(void * data) {return static_cast<Tensor4 *>(data) -> nrows();}
413 Index colsTensor4(void * data) {return static_cast<Tensor4 *>(data) -> ncols();}
414 Numeric * getDataTensor4(void * data) {return static_cast<Tensor4 *>(data) -> get_c_array();}
415 
416 
417 // Tensor5
423 // VoidArrayCAPI(ArrayOfArrayOfTensor5)
424 // BasicInterfaceCAPI(ArrayOfArrayOfTensor5)
425 // BasicInputOutputCAPI(ArrayOfArrayOfTensor5)
426 void resizeTensor5(Index nshelves, Index nbooks, Index npages, Index nrows, Index ncols, void * data) {static_cast<Tensor5 *>(data) -> resize(nshelves, nbooks, npages, nrows, ncols);}
427 Index shelvesTensor5(void * data) {return static_cast<Tensor5 *>(data) -> nshelves();}
428 Index booksTensor5(void * data) {return static_cast<Tensor5 *>(data) -> nbooks();}
429 Index pagesTensor5(void * data) {return static_cast<Tensor5 *>(data) -> npages();}
430 Index rowsTensor5(void * data) {return static_cast<Tensor5 *>(data) -> nrows();}
431 Index colsTensor5(void * data) {return static_cast<Tensor5 *>(data) -> ncols();}
432 Numeric * getDataTensor5(void * data) {return static_cast<Tensor5 *>(data) -> get_c_array();}
433 
434 
435 // Tensor6
444 void resizeTensor6(Index nvitrines, Index nshelves, Index nbooks, Index npages, Index nrows, Index ncols, void * data) {static_cast<Tensor6 *>(data) -> resize(nvitrines, nshelves, nbooks, npages, nrows, ncols);}
445 Index vitrinesTensor6(void * data) {return static_cast<Tensor6 *>(data) -> nvitrines();}
446 Index shelvesTensor6(void * data) {return static_cast<Tensor6 *>(data) -> nshelves();}
447 Index booksTensor6(void * data) {return static_cast<Tensor6 *>(data) -> nbooks();}
448 Index pagesTensor6(void * data) {return static_cast<Tensor6 *>(data) -> npages();}
449 Index rowsTensor6(void * data) {return static_cast<Tensor6 *>(data) -> nrows();}
450 Index colsTensor6(void * data) {return static_cast<Tensor6 *>(data) -> ncols();}
451 Numeric * getDataTensor6(void * data) {return static_cast<Tensor6 *>(data) -> get_c_array();}
452 
453 
454 // Tensor7
460 // VoidArrayCAPI(ArrayOfArrayOfTensor7)
461 // BasicInterfaceCAPI(ArrayOfArrayOfTensor7)
462 // BasicInputOutputCAPI(ArrayOfArrayOfTensor7)
463 void resizeTensor7(Index nlibraries, Index nvitrines, Index nshelves, Index nbooks, Index npages, Index nrows, Index ncols, void * data) {static_cast<Tensor7 *>(data) -> resize(nlibraries, nvitrines, nshelves, nbooks, npages, nrows, ncols);}
464 Index librariesTensor7(void * data) {return static_cast<Tensor7 *>(data) -> nlibraries();}
465 Index vitrinesTensor7(void * data) {return static_cast<Tensor7 *>(data) -> nvitrines();}
466 Index shelvesTensor7(void * data) {return static_cast<Tensor7 *>(data) -> nshelves();}
467 Index booksTensor7(void * data) {return static_cast<Tensor7 *>(data) -> nbooks();}
468 Index pagesTensor7(void * data) {return static_cast<Tensor7 *>(data) -> npages();}
469 Index rowsTensor7(void * data) {return static_cast<Tensor7 *>(data) -> nrows();}
470 Index colsTensor7(void * data) {return static_cast<Tensor7 *>(data) -> ncols();}
471 Numeric * getDataTensor7(void * data) {return static_cast<Tensor7 *>(data) -> get_c_array();}
472 
473 
474 // PropagationMatrix
484 Index stokesPropagationMatrix(void * data) {return static_cast<PropagationMatrix *>(data) -> StokesDimensions();}
485 Index frequenciesPropagationMatrix(void * data) {return static_cast<PropagationMatrix *>(data) -> NumberOfFrequencies();}
486 Index zenithsPropagationMatrix(void * data) {return static_cast<PropagationMatrix *>(data) -> NumberOfZenithAngles();}
487 Index azimuthsPropagationMatrix(void * data) {return static_cast<PropagationMatrix *>(data) -> NumberOfAzimuthAngles();}
489 {
490  if (s >= 0 and s < 5 and f >= 0 and z >= 0 and a >= 0) {
491  static_cast<PropagationMatrix *>(data) -> operator=(PropagationMatrix(f, s, z, a, v));
492  return EXIT_SUCCESS;
493  } else {
494  return EXIT_FAILURE;
495  }
496 }
497 bool getOKPropagationMatrix(void * data) {return static_cast<PropagationMatrix *>(data) -> OK();}
498 
499 
500 // StokesVector
510 Index stokesStokesVector(void * data) {return static_cast<StokesVector *>(data) -> StokesDimensions();}
511 Index frequenciesStokesVector(void * data) {return static_cast<StokesVector *>(data) -> NumberOfFrequencies();}
512 Index zenithsStokesVector(void * data) {return static_cast<StokesVector *>(data) -> NumberOfZenithAngles();}
513 Index azimuthsStokesVector(void * data) {return static_cast<StokesVector *>(data) -> NumberOfAzimuthAngles();}
514 Index setStokesVector(void * data, Index f, Index s, Index z, Index a, Numeric v)
515 {
516  if (s >= 0 and s < 5 and f >= 0 and z >= 0 and a >= 0) {
517  static_cast<StokesVector *>(data) -> operator=(StokesVector(f, s, z, a, v));
518  return EXIT_SUCCESS;
519  } else {
520  return EXIT_FAILURE;
521  }
522 }
523 bool getOKStokesVector(void * data) {return static_cast<StokesVector *>(data) -> OK();}
524 
525 
526 // String
535 void setString(void * data, char * newdata) {static_cast<String *>(data) -> operator=(String(newdata));}
536 char * getString(void * data) {return const_cast<char *>(static_cast<String *>(data) -> data());}
537 
538 
539 // GridPos
547 
548 
549 // GridPosPoly
555 Index xmlreadArrayOfGridPosPoly(void *, char *) {return 1;}
556 Index xmlsaveArrayOfGridPosPoly(void *, char *, Index, Index) {return 1;}
557 
558 
559 // Ppath
560 // BasicInterfaceCAPI(Ppath)
561 void * createPpath() {return new Ppath;}
562 void deletePpath(void * data) {delete static_cast<Ppath *>(data);}
563 void printPpath(void *) {std::cout << std::endl;}
567 VoidStructGetterCAPI(Ppath, constant)
568 VoidStructGetterCAPI(Ppath, background)
569 VoidStructGetterCAPI(Ppath, start_pos)
570 VoidStructGetterCAPI(Ppath, start_los)
571 VoidStructGetterCAPI(Ppath, start_lstep)
576 VoidStructGetterCAPI(Ppath, end_pos)
577 VoidStructGetterCAPI(Ppath, end_los)
578 VoidStructGetterCAPI(Ppath, end_lstep)
585 void * createArrayOfPpath() {return new ArrayOfPpath;}
586 void deleteArrayOfPpath(void * data) {delete static_cast<ArrayOfPpath *>(data);}
587 void printArrayOfPpath(void *) {std::cout << std::endl;}
589 
590 
591 // TransmissionMatrix
600 Numeric * getMat1TransmissionMatrix(Index i, void * data) {return static_cast<TransmissionMatrix *>(data) -> Mat1(i).data();}
601 Numeric * getMat2TransmissionMatrix(Index i, void * data) {return static_cast<TransmissionMatrix *>(data) -> Mat2(i).data();}
602 Numeric * getMat3TransmissionMatrix(Index i, void * data) {return static_cast<TransmissionMatrix *>(data) -> Mat3(i).data();}
603 Numeric * getMat4TransmissionMatrix(Index i, void * data) {return static_cast<TransmissionMatrix *>(data) -> Mat4(i).data();}
604 void setTransmissionMatrix(void * data, Index stokes, Index freqs) {static_cast<TransmissionMatrix *>(data) -> operator=(TransmissionMatrix(freqs, stokes));}
605 Index getStokesDimTransmissionMatrix(void * data) {return static_cast<TransmissionMatrix *>(data) -> StokesDim();}
606 Index getFrequenciesTransmissionMatrix(void * data) {return static_cast<TransmissionMatrix *>(data) -> Frequencies();}
607 
608 
609 // RadiationVector
618 Numeric * getVec1RadiationVector(Index i, void * data) {return static_cast<RadiationVector *>(data) -> Vec1(i).data();}
619 Numeric * getVec2RadiationVector(Index i, void * data) {return static_cast<RadiationVector *>(data) -> Vec2(i).data();}
620 Numeric * getVec3RadiationVector(Index i, void * data) {return static_cast<RadiationVector *>(data) -> Vec3(i).data();}
621 Numeric * getVec4RadiationVector(Index i, void * data) {return static_cast<RadiationVector *>(data) -> Vec4(i).data();}
622 void setRadiationVector(void * data, Index stokes, Index freqs) {static_cast<RadiationVector *>(data) -> operator=(RadiationVector(freqs, stokes));}
623 Index getStokesDimRadiationVector(void * data) {return static_cast<RadiationVector *>(data) -> StokesDim();}
624 Index getFrequenciesRadiationVector(void * data) {return static_cast<RadiationVector *>(data) -> Frequencies();}
625 
626 
627 // GriddedField1
636 Index get_dimGriddedField1(void * data) {return static_cast<GriddedField1 *>(data) -> get_dim();}
637 Index get_grid_typeIndexGriddedField1(Index i, void * data) {return Index(static_cast<GriddedField1 *>(data) -> get_grid_type(i));}
638 Index get_grid_sizeGriddedField1(Index i, void * data) {return static_cast<GriddedField1 *>(data) -> get_grid_size(i);}
639 char * get_nameGriddedField1(void * data) {return const_cast<char *>(static_cast<GriddedField1 *>(data) -> get_name().data());}
640 void set_nameGriddedField1(void * data, char * newdata) {static_cast<GriddedField1 *>(data) -> set_name(newdata);}
641 char * get_grid_nameGriddedField1(Index i, void * data) {return const_cast<char *>(static_cast<GriddedField1 *>(data) -> get_grid_name(i).data());}
642 void set_grid_nameGriddedField1(Index i, void * data, char * newdata) {static_cast<GriddedField1 *>(data) -> set_grid_name(i, newdata);}
643 void * get_numeric_gridGriddedField1(Index i, void * data) {return &static_cast<GriddedField1 *>(data) -> get_numeric_grid(i);}
644 void * get_string_gridGriddedField1(Index i, void * data) {return &static_cast<GriddedField1 *>(data) -> get_string_grid(i);}
645 void set_gridGriddedField1(Index i, void * data, void * newdata, bool NumericType)
646 {
647  if (NumericType)
648  static_cast<GriddedField1 *>(data) -> set_grid(i, *static_cast<Vector *>(newdata));
649  else
650  static_cast<GriddedField1 *>(data) -> set_grid(i, *static_cast<ArrayOfString *>(newdata));
651 }
652 void * dataGriddedField1(void * data) {return &static_cast<GriddedField1 *>(data) -> data;}
653 bool checksizeGriddedField1(void * data) {return static_cast<GriddedField1 *>(data) -> checksize();}
654 
655 
656 // GriddedField2
665 Index get_dimGriddedField2(void * data) {return static_cast<GriddedField2 *>(data) -> get_dim();}
666 Index get_grid_typeIndexGriddedField2(Index i, void * data) {return Index(static_cast<GriddedField2 *>(data) -> get_grid_type(i));}
667 Index get_grid_sizeGriddedField2(Index i, void * data) {return static_cast<GriddedField2 *>(data) -> get_grid_size(i);}
668 char * get_nameGriddedField2(void * data) {return const_cast<char *>(static_cast<GriddedField2 *>(data) -> get_name().data());}
669 void set_nameGriddedField2(void * data, char * newdata) {static_cast<GriddedField2 *>(data) -> set_name(newdata);}
670 char * get_grid_nameGriddedField2(Index i, void * data) {return const_cast<char *>(static_cast<GriddedField2 *>(data) -> get_grid_name(i).data());}
671 void set_grid_nameGriddedField2(Index i, void * data, char * newdata) {static_cast<GriddedField2 *>(data) -> set_grid_name(i, newdata);}
672 void * get_numeric_gridGriddedField2(Index i, void * data) {return &static_cast<GriddedField2 *>(data) -> get_numeric_grid(i);}
673 void * get_string_gridGriddedField2(Index i, void * data) {return &static_cast<GriddedField2 *>(data) -> get_string_grid(i);}
674 void set_gridGriddedField2(Index i, void * data, void * newdata, bool NumericType)
675 {
676  if (NumericType)
677  static_cast<GriddedField2 *>(data) -> set_grid(i, *static_cast<Vector *>(newdata));
678  else
679  static_cast<GriddedField2 *>(data) -> set_grid(i, *static_cast<ArrayOfString *>(newdata));
680 }
681 void * dataGriddedField2(void * data) {return &static_cast<GriddedField2 *>(data) -> data;}
682 bool checksizeGriddedField2(void * data) {return static_cast<GriddedField2 *>(data) -> checksize();}
683 
684 
685 // GriddedField3
694 Index get_dimGriddedField3(void * data) {return static_cast<GriddedField3 *>(data) -> get_dim();}
695 Index get_grid_typeIndexGriddedField3(Index i, void * data) {return Index(static_cast<GriddedField3 *>(data) -> get_grid_type(i));}
696 Index get_grid_sizeGriddedField3(Index i, void * data) {return static_cast<GriddedField3 *>(data) -> get_grid_size(i);}
697 char * get_nameGriddedField3(void * data) {return const_cast<char *>(static_cast<GriddedField3 *>(data) -> get_name().data());}
698 void set_nameGriddedField3(void * data, char * newdata) {static_cast<GriddedField3 *>(data) -> set_name(newdata);}
699 char * get_grid_nameGriddedField3(Index i, void * data) {return const_cast<char *>(static_cast<GriddedField3 *>(data) -> get_grid_name(i).data());}
700 void set_grid_nameGriddedField3(Index i, void * data, char * newdata) {static_cast<GriddedField3 *>(data) -> set_grid_name(i, newdata);}
701 void * get_numeric_gridGriddedField3(Index i, void * data) {return &static_cast<GriddedField3 *>(data) -> get_numeric_grid(i);}
702 void * get_string_gridGriddedField3(Index i, void * data) {return &static_cast<GriddedField3 *>(data) -> get_string_grid(i);}
703 void set_gridGriddedField3(Index i, void * data, void * newdata, bool NumericType)
704 {
705  if (NumericType)
706  static_cast<GriddedField3 *>(data) -> set_grid(i, *static_cast<Vector *>(newdata));
707  else
708  static_cast<GriddedField3 *>(data) -> set_grid(i, *static_cast<ArrayOfString *>(newdata));
709 }
710 void * dataGriddedField3(void * data) {return &static_cast<GriddedField3 *>(data) -> data;}
711 bool checksizeGriddedField3(void * data) {return static_cast<GriddedField3 *>(data) -> checksize();}
712 
713 
714 // GriddedField4
720 Index get_dimGriddedField4(void * data) {return static_cast<GriddedField4 *>(data) -> get_dim();}
721 Index get_grid_typeIndexGriddedField4(Index i, void * data) {return Index(static_cast<GriddedField4 *>(data) -> get_grid_type(i));}
722 Index get_grid_sizeGriddedField4(Index i, void * data) {return static_cast<GriddedField4 *>(data) -> get_grid_size(i);}
723 char * get_nameGriddedField4(void * data) {return const_cast<char *>(static_cast<GriddedField4 *>(data) -> get_name().data());}
724 void set_nameGriddedField4(void * data, char * newdata) {static_cast<GriddedField4 *>(data) -> set_name(newdata);}
725 char * get_grid_nameGriddedField4(Index i, void * data) {return const_cast<char *>(static_cast<GriddedField4 *>(data) -> get_grid_name(i).data());}
726 void set_grid_nameGriddedField4(Index i, void * data, char * newdata) {static_cast<GriddedField4 *>(data) -> set_grid_name(i, newdata);}
727 void * get_numeric_gridGriddedField4(Index i, void * data) {return &static_cast<GriddedField4 *>(data) -> get_numeric_grid(i);}
728 void * get_string_gridGriddedField4(Index i, void * data) {return &static_cast<GriddedField4 *>(data) -> get_string_grid(i);}
729 void set_gridGriddedField4(Index i, void * data, void * newdata, bool NumericType)
730 {
731  if (NumericType)
732  static_cast<GriddedField4 *>(data) -> set_grid(i, *static_cast<Vector *>(newdata));
733  else
734  static_cast<GriddedField4 *>(data) -> set_grid(i, *static_cast<ArrayOfString *>(newdata));
735 }
736 void * dataGriddedField4(void * data) {return &static_cast<GriddedField4 *>(data) -> data;}
737 bool checksizeGriddedField4(void * data) {return static_cast<GriddedField4 *>(data) -> checksize();}
738 
739 
740 // GriddedField5
743 Index get_dimGriddedField5(void * data) {return static_cast<GriddedField5 *>(data) -> get_dim();}
744 Index get_grid_typeIndexGriddedField5(Index i, void * data) {return Index(static_cast<GriddedField5 *>(data) -> get_grid_type(i));}
745 Index get_grid_sizeGriddedField5(Index i, void * data) {return static_cast<GriddedField5 *>(data) -> get_grid_size(i);}
746 char * get_nameGriddedField5(void * data) {return const_cast<char *>(static_cast<GriddedField5 *>(data) -> get_name().data());}
747 void set_nameGriddedField5(void * data, char * newdata) {static_cast<GriddedField5 *>(data) -> set_name(newdata);}
748 char * get_grid_nameGriddedField5(Index i, void * data) {return const_cast<char *>(static_cast<GriddedField5 *>(data) -> get_grid_name(i).data());}
749 void set_grid_nameGriddedField5(Index i, void * data, char * newdata) {static_cast<GriddedField5 *>(data) -> set_grid_name(i, newdata);}
750 void * get_numeric_gridGriddedField5(Index i, void * data) {return &static_cast<GriddedField5 *>(data) -> get_numeric_grid(i);}
751 void * get_string_gridGriddedField5(Index i, void * data) {return &static_cast<GriddedField5 *>(data) -> get_string_grid(i);}
752 void set_gridGriddedField5(Index i, void * data, void * newdata, bool NumericType)
753 {
754  if (NumericType)
755  static_cast<GriddedField5 *>(data) -> set_grid(i, *static_cast<Vector *>(newdata));
756  else
757  static_cast<GriddedField5 *>(data) -> set_grid(i, *static_cast<ArrayOfString *>(newdata));
758 }
759 void * dataGriddedField5(void * data) {return &static_cast<GriddedField5 *>(data) -> data;}
760 bool checksizeGriddedField5(void * data) {return static_cast<GriddedField5 *>(data) -> checksize();}
761 
762 
763 // GriddedField6
766 Index get_dimGriddedField6(void * data) {return static_cast<GriddedField6 *>(data) -> get_dim();}
767 Index get_grid_typeIndexGriddedField6(Index i, void * data) {return Index(static_cast<GriddedField6 *>(data) -> get_grid_type(i));}
768 Index get_grid_sizeGriddedField6(Index i, void * data) {return static_cast<GriddedField6 *>(data) -> get_grid_size(i);}
769 char * get_nameGriddedField6(void * data) {return const_cast<char *>(static_cast<GriddedField6 *>(data) -> get_name().data());}
770 void set_nameGriddedField6(void * data, char * newdata) {static_cast<GriddedField6 *>(data) -> set_name(newdata);}
771 char * get_grid_nameGriddedField6(Index i, void * data) {return const_cast<char *>(static_cast<GriddedField6 *>(data) -> get_grid_name(i).data());}
772 void set_grid_nameGriddedField6(Index i, void * data, char * newdata) {static_cast<GriddedField6 *>(data) -> set_grid_name(i, newdata);}
773 void * get_numeric_gridGriddedField6(Index i, void * data) {return &static_cast<GriddedField6 *>(data) -> get_numeric_grid(i);}
774 void * get_string_gridGriddedField6(Index i, void * data) {return &static_cast<GriddedField6 *>(data) -> get_string_grid(i);}
775 void set_gridGriddedField6(Index i, void * data, void * newdata, bool NumericType)
776 {
777  if (NumericType)
778  static_cast<GriddedField6 *>(data) -> set_grid(i, *static_cast<Vector *>(newdata));
779  else
780  static_cast<GriddedField6 *>(data) -> set_grid(i, *static_cast<ArrayOfString *>(newdata));
781 }
782 void * dataGriddedField6(void * data) {return &static_cast<GriddedField6 *>(data) -> data;}
783 bool checksizeGriddedField6(void * data) {return static_cast<GriddedField6 *>(data) -> checksize();}
784 
785 
786 // SpeciesAuxData
789 void initSpeciesAuxData(void * data) {static_cast<SpeciesAuxData *>(data) -> InitFromSpeciesData();}
790 bool validindexSpeciesAuxData(void * data, Index s, Index i) {return static_cast<SpeciesAuxData *>(data) -> validIndex(s, i);}
791 void * getDataSpeciesAuxData(void * data, Index s, Index i) {return &static_cast<SpeciesAuxData *>(data) -> Data(s, i);}
792 Index setTypeFromIndexSpeciesAuxData(void * data, Index s, Index i, Index t) {return static_cast<SpeciesAuxData *>(data) -> setParamType(s, i, t);}
793 Index getTypeSpeciesAuxData(void * data, Index s, Index i) {return Index(static_cast<SpeciesAuxData *>(data) -> getParamType(s, i));}
794 
795 
796 // CIARecord
803 Index getSpecies1CIARecord(void * data) {return static_cast<CIARecord *>(data) -> Species(0);}
804 Index getSpecies2CIARecord(void * data) {return static_cast<CIARecord *>(data) -> Species(1);}
805 void setSpeciesCIARecord(void * data, Index newval1, Index newval2) {return static_cast<CIARecord *>(data) -> SetSpecies(newval1, newval2);}
806 
807 
808 // Verbosity
811 Index getAgendaVerbosity(void * data) {return static_cast<Verbosity *>(data) -> get_agenda_verbosity();}
812 Index getScreenVerbosity(void * data) {return static_cast<Verbosity *>(data) -> get_screen_verbosity();}
813 Index getFileVerbosity(void * data) {return static_cast<Verbosity *>(data) -> get_file_verbosity();}
814 bool getMainVerbosity(void * data) {return static_cast<Verbosity *>(data) -> is_main_agenda();}
815 void setVerbosity(void * data, Index a, Index s, Index f, bool m) {
816  auto x = static_cast<Verbosity *>(data);
817  x -> set_agenda_verbosity(a);
818  x -> set_screen_verbosity(s);
819  x -> set_file_verbosity(f);
820  x -> set_main_agenda(m);
821 }
822 
823 
824 // TessemNN
825 void * createTessemNN() {return new TessemNN;}
826 void deleteTessemNN(void * data) {delete static_cast<TessemNN *>(data);}
827 void printTessemNN(void *) {std::cout << std::endl;}
829 VoidStructGetterCAPI(TessemNN, nb_inputs)
830 VoidStructGetterCAPI(TessemNN, nb_outputs)
840 
841 
842 // SingleScatteringData
860 
861 
862 // ScatteringMetaData
870 VoidStructGetterCAPI(ScatteringMetaData, diameter_volume_equ)
871 VoidStructGetterCAPI(ScatteringMetaData, diameter_area_equ_aerodynamical)
878 
879 
880 // Timer
881 void * createTimer() {return new Timer;}
882 void deleteTimer(void * data) {delete static_cast<Timer *>(data);}
883 void printTimer(void *) {std::cout << std::endl;}
885 bool getrunningTimer(void * data) {return static_cast<Timer *>(data) -> running;}
886 bool getfinishedTimer(void * data) {return static_cast<Timer *>(data) -> finished;}
888 {
889 #ifdef TIME_SUPPORT
890  return static_cast<Timer *>(data) -> cputime_start.tms_utime;
891 #else
892  return 0;
893 #endif
894 }
896 {
897 #ifdef TIME_SUPPORT
898  return static_cast<Timer *>(data) -> cputime_start.tms_stime;
899 #else
900  return 0;
901 #endif
902 }
904 {
905 #ifdef TIME_SUPPORT
906  return static_cast<Timer *>(data) -> cputime_start.tms_cutime;
907 #else
908  return 0;
909 #endif
910 }
912 {
913 #ifdef TIME_SUPPORT
914  return static_cast<Timer *>(data) -> cputime_start.tms_cstime;
915 #else
916  return 0;
917 #endif
918 }
920 {
921 #ifdef TIME_SUPPORT
922  return static_cast<Timer *>(data) -> realtime_start;
923 #else
924  return 0;
925 #endif
926 }
928 {
929 #ifdef TIME_SUPPORT
930  return static_cast<Timer *>(data) -> cputime_end.tms_utime;
931 #else
932  return 0;
933 #endif
934 }
936 {
937 #ifdef TIME_SUPPORT
938  return static_cast<Timer *>(data) -> cputime_end.tms_stime;
939 #else
940  return 0;
941 #endif
942 }
944 {
945 #ifdef TIME_SUPPORT
946  return static_cast<Timer *>(data) -> cputime_end.tms_cutime;
947 #else
948  return 0;
949 #endif
950 }
952 {
953 #ifdef TIME_SUPPORT
954  return static_cast<Timer *>(data) -> cputime_end.tms_cstime;
955 #else
956  return 0;
957 #endif
958 }
960 {
961 #ifdef TIME_SUPPORT
962  return static_cast<Timer *>(data) -> realtime_end;
963 #else
964  return 0;
965 #endif
966 }
967 void setrunningTimer(void * data, bool newdata) {static_cast<Timer *>(data) -> running = newdata;}
968 void setfinishedTimer(void * data, bool newdata) {static_cast<Timer *>(data) -> finished = newdata;}
970 {
971 #ifdef TIME_SUPPORT
972  static_cast<Timer *>(data) -> cputime_start.tms_utime = clock_t(newdata);
973 #endif
974 }
976 {
977 #ifdef TIME_SUPPORT
978  static_cast<Timer *>(data) -> cputime_start.tms_stime = clock_t(newdata);
979 #endif
980 }
982 {
983 #ifdef TIME_SUPPORT
984  static_cast<Timer *>(data) -> cputime_start.tms_cutime = clock_t(newdata);
985 #endif
986 }
988 {
989 #ifdef TIME_SUPPORT
990  static_cast<Timer *>(data) -> cputime_start.tms_cstime = clock_t(newdata);
991 #endif
992 }
994 {
995 #ifdef TIME_SUPPORT
996  static_cast<Timer *>(data) -> realtime_start = clock_t(newdata);
997 #endif
998 }
1000 {
1001 #ifdef TIME_SUPPORT
1002  static_cast<Timer *>(data) -> cputime_end.tms_utime = clock_t(newdata);
1003 #endif
1004 }
1006 {
1007 #ifdef TIME_SUPPORT
1008  static_cast<Timer *>(data) -> cputime_end.tms_stime = clock_t(newdata);
1009 #endif
1010 }
1012 {
1013 #ifdef TIME_SUPPORT
1014  static_cast<Timer *>(data) -> cputime_end.tms_cutime = clock_t(newdata);
1015 #endif
1016 }
1018 {
1019 #ifdef TIME_SUPPORT
1020  static_cast<Timer *>(data) -> cputime_end.tms_cstime = clock_t(newdata);
1021 #endif
1022 }
1023 void setrealtime_endTimer(void * data, Index newdata)
1024 {
1025 #ifdef TIME_SUPPORT
1026  static_cast<Timer *>(data) -> realtime_end = clock_t(newdata);
1027 #endif
1028 }
1029 bool supportTimer()
1030 {
1031 #ifdef TIME_SUPPORT
1032  return true;
1033 #else
1034  return false;
1035 #endif
1036 }
1037 Index tickTimer()
1038 {
1039 #ifdef TIME_SUPPORT
1040  return sysconf(_SC_CLK_TCK);
1041 #else
1042  return 0;
1043 #endif
1044 }
1045 
1046 
1047 // TelsemAtlas
1050 VoidGetterCAPI(TelsemAtlas, DataCount)
1051 VoidGetterCAPI(TelsemAtlas, ChannelCount)
1056 VoidGetterCAPI(TelsemAtlas, FirstCells)
1058 VoidGetterCAPI(TelsemAtlas, Emis_err)
1059 VoidGetterCAPI(TelsemAtlas, Correlations)
1060 VoidGetterCAPI(TelsemAtlas, Classes1)
1061 VoidGetterCAPI(TelsemAtlas, Classes2)
1062 VoidGetterCAPI(TelsemAtlas, Cellnumber)
1063 VoidGetterCAPI(TelsemAtlas, Correspondance)
1067 Numeric getA0_K0TelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> A0_K0(i);}
1068 Numeric getA0_K1TelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> A0_K1(i);}
1069 Numeric getA0_K2TelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> A0_K2(i);}
1070 Numeric getA0_EVEHTelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> A0_EVEH(i);}
1071 Numeric getA1_EVEHTelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> A1_EVEH(i);}
1072 Numeric getA2_EVEHTelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> A2_EVEH(i);}
1073 Numeric getA3_EVEHTelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> A3_EVEH(i);}
1074 Numeric getB0_EVEHTelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> B0_EVEH(i);}
1075 Numeric getB1_EVEHTelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> B1_EVEH(i);}
1076 Numeric getB2_EVEHTelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> B2_EVEH(i);}
1077 Numeric getB3_EVEHTelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> B3_EVEH(i);}
1078 Numeric getRAPPORT43_32TelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> RAPPORT43_32(i);}
1079 Numeric getRAPPORT54_43TelsemAtlas(Index i, void* data) {return static_cast<TelsemAtlas *>(data) -> RAPPORT54_43(i);}
1080 
1081 
1082 // MCAntenna
1090 Index getTypeMCAntenna(void * data) {return Index(static_cast<MCAntenna *>(data) -> Type());}
1091 Index setTypeMCAntenna(void * data, Index newval) {return Index(static_cast<MCAntenna *>(data) -> Type(AntennaType(newval)));}
1092 
1093 
1094 // GasAbsLookup
1098 VoidGetterCAPI(GasAbsLookup, NonLinearSpecies)
1100 VoidGetterCAPI(GasAbsLookup, FGPDefault)
1102 VoidGetterCAPI(GasAbsLookup, LogPgrid)
1106 VoidGetterCAPI(GasAbsLookup, NLSPert)
1108 
1109 
1110 // XsecRecord
1113 VoidGetterCAPI(XsecRecord, Coeffs)
1114 VoidGetterCAPI(XsecRecord, RefPressure)
1115 VoidGetterCAPI(XsecRecord, RefTemperature)
1116 VoidGetterCAPI(XsecRecord, Fgrids)
1117 VoidGetterCAPI(XsecRecord, Xsecs)
1118 VoidGetterCAPI(XsecRecord, TemperatureSlope)
1119 VoidGetterCAPI(XsecRecord, TemperatureIntersect)
1123 Index getSpeciesXsecRecord(void * data) {return static_cast<XsecRecord *>(data) -> Species();}
1124 void setSpeciesXsecRecord(void * data, Index newdata) {static_cast<XsecRecord *>(data) -> SetSpecies(newdata);}
1125 
1126 
1127 // Sparse
1133 void resizeSparse(Index nrows, Index ncols, void * data) {static_cast<Sparse *>(data) -> resize(nrows, ncols);}
1134 Index rowsSparse(void * data) {return static_cast<Sparse *>(data) -> nrows();}
1135 Index colsSparse(void * data) {return static_cast<Sparse *>(data) -> ncols();}
1136 Index sizeSparse(void * data) {return static_cast<Sparse *>(data) -> nnz();}
1137 int * rowsptrSparse(void * data) {return static_cast<Sparse *>(data) -> get_row_start_pointer();}
1138 int * colsptrSparse(void * data) {return static_cast<Sparse *>(data) -> get_column_index_pointer();}
1139 Numeric * getDataSparse(void * data) {return static_cast<Sparse *>(data) -> get_element_pointer();}
1140 void setDataSparse(void * data, Index r, Index c, Numeric v) {(static_cast<Sparse *>(data) -> rw(r, c)) = v;}
1141 
1142 
1143 // CovarianceMatrix
1146 Index sizeget_blocksCovarianceMatrix(void * data) { return static_cast<CovarianceMatrix *>(data) -> get_blocks().size(); }
1147 void resizeget_blocksCovarianceMatrix(Index n, void * data) { static_cast<CovarianceMatrix *>(data) -> get_blocks() = std::vector<Block>(n, Block(Range(joker), Range(joker), {0, 0}, std::make_shared<Matrix>(Matrix()))); }
1148 void * getelemget_blocksCovarianceMatrix(Index i, void * data) { return &static_cast<CovarianceMatrix *>(data) -> get_blocks()[i]; }
1149 Index sizeget_inverse_blocksCovarianceMatrix(void * data) { return static_cast<CovarianceMatrix *>(data) -> get_inverse_blocks().size(); }
1150 void resizeget_inverse_blocksCovarianceMatrix(Index n, void * data) { static_cast<CovarianceMatrix *>(data) -> get_inverse_blocks() = std::vector<Block>(n, Block(Range(joker), Range(joker), {0, 0}, std::make_shared<Matrix>(Matrix()))); }
1151 void * getelemget_inverse_blocksCovarianceMatrix(Index i, void * data) { return &static_cast<CovarianceMatrix *>(data) -> get_inverse_blocks()[i]; }
1152 
1153 
1154 // Any
1155 void * createAny() {return new Any;}
1156 void deleteAny(void * data) {delete static_cast<Any *>(data);}
1157 void printAny(void *) {std::cout << std::endl;}
1158 Index xmlreadAny(void *, char *) {return 1;}
1159 Index xmlsaveAny(void *, char *, Index, Index) {return 1;}
1160 
1161 
1162 // Agenda
1168 
1169 
1170 // RetrievalQuantity
1177 VoidGetterCAPI(RetrievalQuantity, Analytical)
1178 VoidGetterCAPI(RetrievalQuantity, Perturbation)
1180 VoidGetterCAPI(RetrievalQuantity, QuantumIdentity)
1181 VoidGetterCAPI(RetrievalQuantity, TransformationFunc)
1182 VoidGetterCAPI(RetrievalQuantity, TFuncParameters)
1183 VoidGetterCAPI(RetrievalQuantity, Transformation)
1189 Index getTypeRetrievalQuantity(void * data) {return Index(static_cast<RetrievalQuantity *>(data) -> Proptype());}
1190 Index setTypeRetrievalQuantity(void * data, Index newval) {return Index(static_cast<RetrievalQuantity *>(data) -> Proptype(JacPropMatType(newval)));}
1191 
1192 
1193 // Range
1194 void * createRange() {return new Range(joker);}
1195 void deleteRange(void * data) {delete static_cast<Range *>(data);}
1196 void printRange(void * data) {std::cout << (*static_cast<Range *>(data)) << std::endl;}
1197 Index get_startRange(void * data) {return static_cast<Range *>(data) -> get_start();}
1198 Index get_strideRange(void * data) {return static_cast<Range *>(data) -> get_stride();}
1199 Index get_extentRange(void * data) {return static_cast<Range *>(data) -> get_extent();}
1200 void setRange(void * data, Index start, Index extent, Index stride)
1201 {
1202  if (extent >= 0)
1203  static_cast<Range *>(data) -> operator=(Range(start, extent, stride));
1204  else
1205  static_cast<Range *>(data) -> operator=(Range(start, joker, stride));
1206 }
1207 
1208 
1209 // Block
1210 void * createBlock() {return new Block(Range(joker), Range(joker), {0, 0}, std::make_shared<Matrix>(Matrix()));}
1211 void deleteBlock(void * data) {delete static_cast<Block *>(data);}
1212 void printBlock(void *) {std::cout << std::endl;}
1213 VoidGetterCAPI(Block, get_row_range)
1214 VoidGetterCAPI(Block, get_column_range)
1215 VoidGetterCAPI(Block, get_dense)
1216 VoidGetterCAPI(Block, get_sparse)
1217 Index get_matrix_typeBlock(void * data) {return Index(static_cast<Block *>(data) -> get_matrix_type());}
1218 Index get_index1Block(void * data) {return static_cast<Block *>(data) -> get_indices().first;}
1219 Index get_index2Block(void * data) {return static_cast<Block *>(data) -> get_indices().second;}
1220 void set_indicesBlock(void * data, Index i1, Index i2) {static_cast<Block *>(data) -> set_indices(i1, i2);}
1221 void set_matrixBlock(void * data, void * newdata, bool dense)
1222 {
1223  auto x = static_cast<Block *>(data);
1224  if (dense) {
1225  x -> operator=(Block(x -> get_row_range(), x -> get_column_range(), x -> get_indices(), std::make_shared<Matrix>(*static_cast<Matrix *>(newdata))));
1226  } else {
1227  x -> operator=(Block(x -> get_row_range(), x -> get_column_range(), x -> get_indices(), std::make_shared<Sparse>(*static_cast<Sparse *>(newdata))));
1228  }
1229 }
1230 
1231 
1232 // Time
1242 void setTime(void * data, void * newdata) {*static_cast<Time *>(data) = *static_cast<Time *>(newdata);}
1243 bool equalTime(void * data, void * otherdata) {return *static_cast<Time *>(data) == *static_cast<Time *>(otherdata);}
1244 bool lessTime(void * data, void * otherdata) {return *static_cast<Time *>(data) < *static_cast<Time *>(otherdata);}
1245 
1246 
1247 // HitranRelaxationMatrixData
1268 
1269 
1270 // generic
1271 Index string2filetypeindex(char * data) { try { return Index(string2filetype(data)); } catch (std::runtime_error& e) { return -1; } }
1273 
1274 #undef BasicInterfaceCAPI
1275 #undef GetterSetterCAPI
1276 #undef EnumGetterSetterCAPI
1277 #undef VoidGetterCAPI
1278 #undef VoidStructGetterCAPI
1279 #undef BasicInputOutputCAPI
1280 #undef VoidArrayCAPI
1281 #undef VoidArrayElemCAPI
DLL_PUBLIC int * rowsptrSparse(void *)
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
DLL_PUBLIC Index get_extentRange(void *)
DLL_PUBLIC Numeric getA1_EVEHTelsemAtlas(Index, void *)
saa aag G DLL_PUBLIC Index getTypeMCAntenna(void *)
void *DLL_PUBLIC Index vitrinesTensor6(void *)
QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric CIASecond
DLL_PUBLIC Index getcputime_start_cutimeTimer(void *)
DLL_PUBLIC Index colsTensor4(void *)
DLL_PUBLIC void setRadiationVector(void *, Index, Index)
DLL_PUBLIC Index shelvesTensor7(void *)
Class to keep track of Transmission Matrices for Stokes Dim 1-4.
DLL_PUBLIC char * get_nameGriddedField1(void *data)
TemperatureModel string2temperaturemodel(const String &type)
Turns predefined strings into a TemperatureModel type.
Computations and data for a single absorption line.
DLL_PUBLIC void set_grid_nameGriddedField1(Index i, void *data, char *newdata)
DLL_PUBLIC void setrealtime_endTimer(void *, Index)
DLL_PUBLIC Index setTypeFromIndexSpeciesAuxData(void *data, Index s, Index i, Index t)
DLL_PUBLIC Index getcputime_start_cstimeTimer(void *)
DLL_PUBLIC void setcputime_start_stimeTimer(void *, Index)
DLL_PUBLIC Index get_grid_typeIndexGriddedField5(Index i, void *data)
DLL_PUBLIC void setcputime_start_utimeTimer(void *, Index)
DLL_PUBLIC Index getSpecies2CIARecord(void *)
DLL_PUBLIC Index booksTensor5(void *)
Main Zeeman Model.
Definition: zeemandata.h:358
The Agenda class.
Definition: agenda_class.h:44
MirroringType
Describes the type of mirroring line effects.
DLL_PUBLIC Numeric getB1_EVEHTelsemAtlas(Index, void *)
DLL_PUBLIC void set_nameGriddedField2(void *data, char *newdata)
QuantumIdentifier::QType Index LowerQuantumNumbers Species
Numeric void *DLL_PUBLIC bool equalTime(void *, void *)
DLL_PUBLIC Index azimuthsPropagationMatrix(void *)
void *DLL_PUBLIC Numeric * getVec2RadiationVector(Index, void *)
DLL_PUBLIC Index colsMatrix(void *)
DLL_PUBLIC Numeric getA0_K2TelsemAtlas(Index, void *)
DLL_PUBLIC Numeric * getDataVector(void *)
NormalizationType
Describes the type of normalization line effects.
G0 G2 FVC Y DV Numeric E0
#define VoidGetterCAPI(TYPE, VALUE)
DLL_PUBLIC Numeric * getDataMatrix(void *)
void printLineShapeModelParameters(void *data)
DLL_PUBLIC void * get_string_gridGriddedField5(Index i, void *data)
DLL_PUBLIC bool checksizeGriddedField6(void *data)
DLL_PUBLIC char * get_grid_nameGriddedField1(Index i, void *data)
DLL_PUBLIC Index get_grid_typeIndexGriddedField1(Index i, void *data)
DLL_PUBLIC void setSpeciesCIARecord(void *, Index, Index)
DLL_PUBLIC void setrunningTimer(void *, bool)
DLL_PUBLIC void setVerbosity(void *, Index, Index, Index, bool)
The Vector class.
Definition: matpackI.h:860
DLL_PUBLIC Index getrealtime_startTimer(void *)
Array< Ppath > ArrayOfPpath
An array of propagation paths.
Definition: ppath.h:90
DLL_PUBLIC void setcputime_end_utimeTimer(void *, Index)
G0 G2 FVC Y DV Numeric Numeric g_upp
bool Absorption::CutoffType Mirroring
DLL_PUBLIC Index frequenciesPropagationMatrix(void *)
bool Absorption::CutoffType Absorption::MirroringType Normalization
Class to handle time in ARTS.
Definition: artstime.h:40
DLL_PUBLIC void * dataGriddedField3(void *data)
The Sparse class.
Definition: matpackII.h:60
DLL_PUBLIC Index booksTensor6(void *)
DLL_PUBLIC void set_nameGriddedField6(void *data, char *newdata)
The Tensor4 class.
Definition: matpackIV.h:421
DLL_PUBLIC void setcputime_start_cutimeTimer(void *, Index)
Main line shape model class.
The range class.
Definition: matpackI.h:160
DLL_PUBLIC void * get_string_gridGriddedField3(Index i, void *data)
DLL_PUBLIC Index vitrinesTensor7(void *)
DLL_PUBLIC bool getOKStokesVector(void *)
This file contains all declarations of the ARTS C API class interface.
DLL_PUBLIC void * get_string_gridGriddedField1(Index i, void *data)
DLL_PUBLIC Index pagesTensor6(void *)
void *DLL_PUBLIC Index pagesTensor3(void *)
QuantumNumberType string2quantumnumbertype(const String &s)
Definition: quantum.h:101
DLL_PUBLIC void * get_numeric_gridGriddedField4(Index i, void *data)
DLL_PUBLIC Index pagesTensor5(void *)
DLL_PUBLIC void * get_string_gridGriddedField2(Index i, void *data)
DLL_PUBLIC Index rowsTensor6(void *)
#define BasicInputOutputCAPI(TYPE)
cmplx FADDEEVA() w(cmplx z, double relerr)
Definition: Faddeeva.cc:680
DLL_PUBLIC void set_gridGriddedField3(Index i, void *data, void *newdata, bool NumericType)
#define VoidArrayCAPI(TYPE)
DLL_PUBLIC bool checksizeGriddedField2(void *data)
This file contains private function declarations and template instantiation to handle XML data files...
This file contains basic functions to handle XML data files.
The Tensor7 class.
Definition: matpackVII.h:2382
DLL_PUBLIC Index rowsTensor4(void *)
DLL_PUBLIC Numeric * getDataTensor6(void *)
DLL_PUBLIC Index get_grid_typeIndexGriddedField6(Index i, void *data)
Contains the absorption namespace.
DLL_PUBLIC char * get_grid_nameGriddedField5(Index i, void *data)
DLL_PUBLIC void set_grid_nameGriddedField5(Index i, void *data, char *newdata)
Stokes vector is as Propagation matrix but only has 4 possible values.
DLL_PUBLIC bool getfinishedTimer(void *)
Index string2quantumnumbersindex(char *str)
DLL_PUBLIC Numeric * getDataTensor5(void *)
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
DLL_PUBLIC bool checksizeGriddedField3(void *data)
DLL_PUBLIC void set_nameGriddedField4(void *data, char *newdata)
#define EnumGetterSetterCAPI(TYPE, VALUE, ENUM)
DLL_PUBLIC Index colsTensor6(void *)
DLL_PUBLIC Numeric getA2_EVEHTelsemAtlas(Index, void *)
DLL_PUBLIC Index getStokesDimRadiationVector(void *)
DLL_PUBLIC void setcputime_end_stimeTimer(void *, Index)
DLL_PUBLIC Index pagesTensor4(void *)
DLL_PUBLIC void setrealtime_startTimer(void *, Index)
QuantumIdentifier::QType Index LowerQuantumNumbers Index Numeric Index Index char *DLL_PUBLIC Index validSpecies(Index)
DLL_PUBLIC void setcputime_start_cstimeTimer(void *, Index)
DLL_PUBLIC Numeric getB3_EVEHTelsemAtlas(Index, void *)
DLL_PUBLIC void set_gridGriddedField5(Index i, void *data, void *newdata, bool NumericType)
void setNumeric(void *data, Numeric newval)
DLL_PUBLIC char * getString(void *data)
DLL_PUBLIC Index pagesTensor7(void *)
DLL_PUBLIC void * dataGriddedField4(void *data)
void *DLL_PUBLIC Index rowsSparse(void *)
DLL_PUBLIC Index get_grid_sizeGriddedField2(Index i, void *data)
DLL_PUBLIC char * get_grid_nameGriddedField3(Index i, void *data)
CutoffType
Describes the type of cutoff calculations.
DLL_PUBLIC Index booksTensor7(void *)
const Array< SpeciesRecord > species_data
Species Data.
Structure to store a grid position.
Definition: interpolation.h:73
#define b2
Definition: complex.h:59
DLL_PUBLIC int * colsptrSparse(void *)
DLL_PUBLIC Index getFileVerbosity(void *)
Deals with internal derivatives, Jacobian definition, and OEM calculations.
Definition: jacobian.h:120
DLL_PUBLIC Index colsTensor5(void *)
DLL_PUBLIC Numeric getA3_EVEHTelsemAtlas(Index, void *)
DLL_PUBLIC Numeric * getDataSparse(void *)
#define VoidStructGetterCAPI(TYPE, VALUE)
void setIndex(void *data, Index newval)
JacPropMatType
List of Jacobian properties for analytical line shape related derivatives.
Definition: jacobian.h:46
DLL_PUBLIC Index get_grid_typeIndexGriddedField3(Index i, void *data)
Implements Zeeman modeling.
Definition: zeemandata.h:40
DLL_PUBLIC Index zenithsStokesVector(void *)
DLL_PUBLIC char * get_nameGriddedField2(void *data)
DLL_PUBLIC Index get_grid_sizeGriddedField4(Index i, void *data)
DLL_PUBLIC void * get_numeric_gridGriddedField5(Index i, void *data)
DLL_PUBLIC Index tickTimer()
Header files of CovarianceMatrix class.
The Tensor3 class.
Definition: matpackIII.h:339
DLL_PUBLIC void * get_list_of_all_workspace_classes()
Computations of line shape derived parameters.
DLL_PUBLIC Index isAbsorptionLinesOK(void *)
DLL_PUBLIC void set_nameGriddedField5(void *data, char *newdata)
DLL_PUBLIC void set_nameGriddedField3(void *data, char *newdata)
DLL_PUBLIC Index getFrequenciesRadiationVector(void *)
Numeric Nom
bool Absorption::CutoffType Absorption::MirroringType Absorption::NormalizationType CutoffFreqValue
DLL_PUBLIC bool supportTimer()
DLL_PUBLIC void set_gridGriddedField4(Index i, void *data, void *newdata, bool NumericType)
DLL_PUBLIC Index getrealtime_endTimer(void *)
Implements rational numbers to work with other ARTS types.
Definition: rational.h:54
DLL_PUBLIC Index setStokesVector(void *, Index, Index, Index, Index, Numeric)
DLL_PUBLIC Index get_grid_sizeGriddedField1(Index i, void *data)
EnergyLevelMapType
DLL_PUBLIC void set_gridGriddedField2(Index i, void *data, void *newdata, bool NumericType)
DLL_PUBLIC void set_matrixBlock(void *, void *, bool)
QuantumIdentifier::QType Isotopologue
DLL_PUBLIC void * getDataSpeciesAuxData(void *data, Index s, Index i)
DLL_PUBLIC Index setTypeRetrievalQuantity(void *, Index)
DLL_PUBLIC Index get_grid_sizeGriddedField6(Index i, void *data)
A tag group can consist of the sum of several of these.
DLL_PUBLIC void set_indicesBlock(void *, Index, Index)
DLL_PUBLIC Index getcputime_end_cstimeTimer(void *)
Index getLineShapeModelParametersType(char *data)
DLL_PUBLIC bool getOKPropagationMatrix(void *)
DLL_PUBLIC void * get_numeric_gridGriddedField6(Index i, void *data)
An absorption lookup table.
Class to identify and match lines by their quantum numbers.
Definition: quantum.h:390
DLL_PUBLIC Numeric getB2_EVEHTelsemAtlas(Index, void *)
DLL_PUBLIC Index getcputime_end_cutimeTimer(void *)
DLL_PUBLIC Index azimuthsStokesVector(void *)
DLL_PUBLIC void set_grid_nameGriddedField2(Index i, void *data, char *newdata)
DLL_PUBLIC Index validAllIsotopologues(Index, Index)
AntennaType
Definition: mc_antenna.h:41
const Joker joker
DLL_PUBLIC bool checksizeGriddedField4(void *data)
DLL_PUBLIC Index get_grid_typeIndexGriddedField4(Index i, void *data)
DLL_PUBLIC Index rowsTensor5(void *)
void *DLL_PUBLIC Index booksTensor4(void *)
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
DLL_PUBLIC bool validindexSpeciesAuxData(void *data, Index s, Index i)
The Matrix class.
Definition: matpackI.h:1193
idx idx dim constant start_pos start_lstep los lstep end_los nreal gp_p gp_lon void *DLL_PUBLIC Numeric * getMat2TransmissionMatrix(Index, void *)
Contains the line shape namespace.
bool Cutoff
Declarations required for the calculation of absorption coefficients.
DLL_PUBLIC void * get_numeric_gridGriddedField3(Index i, void *data)
DLL_PUBLIC Index get_strideRange(void *)
PopulationType
Describes the type of population level counter.
An Antenna object used by MCGeneral.
Definition: mc_antenna.h:51
DLL_PUBLIC Index getcputime_end_stimeTimer(void *)
DLL_PUBLIC void * getSpeciesNameAbsorptionLines(void *)
Declarations for supergeneric methods.
Radiation Vector for Stokes dimension 1-4.
DLL_PUBLIC void * get_numeric_gridGriddedField1(Index i, void *data)
DLL_PUBLIC void setSpeciesXsecRecord(void *, Index)
DLL_PUBLIC char * get_grid_nameGriddedField6(Index i, void *data)
DLL_PUBLIC Index colsSparse(void *)
Class to map energy levels.
DLL_PUBLIC Index sizeSparse(void *)
DLL_PUBLIC Numeric * getVec4RadiationVector(Index, void *)
DLL_PUBLIC Index colsTensor7(void *)
DLL_PUBLIC Index getcputime_end_utimeTimer(void *)
DLL_PUBLIC Index zenithsPropagationMatrix(void *)
Container class for Quantum Numbers.
Definition: quantum.h:222
Headers and class definition of Zeeman modeling.
DLL_PUBLIC Index get_grid_typeIndexGriddedField2(Index i, void *data)
DLL_PUBLIC Index getcputime_start_utimeTimer(void *)
This can be used to make arrays out of anything.
Definition: array.h:40
get_blocks MainTag SubSubTag Analytical Grids TransformationFunc Transformation Integration
DLL_PUBLIC Numeric * getMat4TransmissionMatrix(Index, void *)
G0 G2 FVC Y DV F0
DLL_PUBLIC Index validContinuum(Index, Index)
DLL_PUBLIC Index get_index2Block(void *)
const ArrayOfString wsv_group_names
The names associated with Wsv groups as Strings.
Definition: global_data.h:93
DLL_PUBLIC void setcputime_end_cstimeTimer(void *, Index)
A telsem atlas.
Definition: telsem.h:57
DLL_PUBLIC void set_nameGriddedField1(void *data, char *newdata)
DLL_PUBLIC void * dataGriddedField2(void *data)
DLL_PUBLIC Index get_grid_sizeGriddedField3(Index i, void *data)
DLL_PUBLIC Numeric getB0_EVEHTelsemAtlas(Index, void *)
DLL_PUBLIC char * get_nameGriddedField3(void *data)
DLL_PUBLIC Index getScreenVerbosity(void *)
DLL_PUBLIC Index getcputime_start_stimeTimer(void *)
DLL_PUBLIC void * get_string_gridGriddedField6(Index i, void *data)
The Tensor6 class.
Definition: matpackVI.h:1088
#define GetterSetterCAPI(TYPE, VALUE, BASETYPE)
DLL_PUBLIC void set_grid_nameGriddedField4(Index i, void *data, char *newdata)
DLL_PUBLIC Index colsTensor3(void *)
Index nelem(const Lines &l)
Number of lines.
DLL_PUBLIC Numeric * getDataTensor3(void *)
DLL_PUBLIC void * dataGriddedField1(void *data)
#define VoidArrayElemCAPI(TYPE, ELEM)
constexpr Rational start(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the lowest M for a polarization type of this transition.
Definition: zeemandata.h:77
DLL_PUBLIC void setcputime_end_cutimeTimer(void *, Index)
DLL_PUBLIC char * get_nameGriddedField4(void *data)
DLL_PUBLIC Numeric getRAPPORT43_32TelsemAtlas(Index, void *)
DLL_PUBLIC Index rowsTensor7(void *)
DLL_PUBLIC Index getStokesDimTransmissionMatrix(void *)
DLL_PUBLIC Index get_grid_sizeGriddedField5(Index i, void *data)
DLL_PUBLIC char * get_nameGriddedField5(void *data)
DLL_PUBLIC void setTransmissionMatrix(void *, Index, Index)
DLL_PUBLIC Index validIsotopologue(Index, Index)
CIA data for a single pair of molecules.
Definition: cia.h:67
DLL_PUBLIC Numeric * getVec3RadiationVector(Index, void *)
Structure to store a grid position for higher order interpolation.
void *DLL_PUBLIC Index nelemVector(void *)
QuantumIdentifier::QType Index LowerQuantumNumbers Index Uf
DLL_PUBLIC void set_gridGriddedField1(Index i, void *data, void *newdata, bool NumericType)
DLL_PUBLIC void set_gridGriddedField6(Index i, void *data, void *newdata, bool NumericType)
DLL_PUBLIC Numeric * getDataTensor7(void *)
DLL_PUBLIC bool getMainVerbosity(void *)
DLL_PUBLIC Index getFrequenciesTransmissionMatrix(void *)
DLL_PUBLIC void * get_numeric_gridGriddedField2(Index i, void *data)
DLL_PUBLIC Index setTypeMCAntenna(void *, Index)
NumericType
Definition: xml_io.h:43
DLL_PUBLIC void * dataGriddedField6(void *data)
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:48
DLL_PUBLIC bool checksizeGriddedField1(void *data)
Auxiliary data for isotopologues.
Definition: absorption.h:217
#define b1
Definition: complex.h:57
DLL_PUBLIC Index frequenciesStokesVector(void *)
#define BasicInterfaceCAPI(TYPE)
DLL_PUBLIC char * get_grid_nameGriddedField4(Index i, void *data)
DLL_PUBLIC Numeric * getDataTensor4(void *)
DLL_PUBLIC void set_grid_nameGriddedField3(Index i, void *data, char *newdata)
DLL_PUBLIC void setRange(void *, Index, Index, Index)
void *DLL_PUBLIC Index rowsMatrix(void *)
DLL_PUBLIC Numeric * getMat3TransmissionMatrix(Index, void *)
void *DLL_PUBLIC Index shelvesTensor5(void *)
DataCount Name Lat FirstCells Emis_err Classes1 Cellnumber void *DLL_PUBLIC Numeric getA0_K1TelsemAtlas(Index, void *)
DLL_PUBLIC Numeric getRAPPORT54_43TelsemAtlas(Index, void *)
DLL_PUBLIC Index rowsTensor3(void *)
char * newdata
invlib::Matrix< ArtsMatrix > Matrix
invlib wrapper type for ARTS matrices.
Definition: oem.h:34
Compute the line shape parameters for a single broadening species.
DLL_PUBLIC Numeric getA0_EVEHTelsemAtlas(Index, void *)
DLL_PUBLIC char * get_grid_nameGriddedField2(Index i, void *data)
DLL_PUBLIC void setDataSparse(void *, Index, Index, Numeric)
Index sizeQuantumNumbers()
DLL_PUBLIC Index shelvesTensor6(void *)
DLL_PUBLIC char * get_nameGriddedField6(void *data)
A placeholder for any type.
Definition: supergeneric.h:36
DLL_PUBLIC void setfinishedTimer(void *, bool)
DLL_PUBLIC void set_grid_nameGriddedField6(Index i, void *data, char *newdata)
void *DLL_PUBLIC Index librariesTensor7(void *)
DLL_PUBLIC Index get_index1Block(void *)
my_basic_string< char > String
The String type for ARTS.
Definition: mystring.h:280
DLL_PUBLIC void * dataGriddedField5(void *data)
DLL_PUBLIC Index setPropagationMatrix(void *, Index, Index, Index, Index, Numeric)
DLL_PUBLIC void * get_string_gridGriddedField4(Index i, void *data)
DLL_PUBLIC bool lessTime(void *, void *)
The Tensor5 class.
Definition: matpackV.h:506
DLL_PUBLIC bool checksizeGriddedField5(void *data)
FileType string2filetype(const String &file_format)
Definition: xml_io.h:79
DLL_PUBLIC Index getTypeSpeciesAuxData(void *data, Index s, Index i)