ARTS  2.4.0(git:4fb77825)
interactive_workspace.cc
Go to the documentation of this file.
2 #include "matpackI.h"
3 #include "matpackII.h"
4 #include "matpackIII.h"
5 #include "matpackIV.h"
6 #include "matpackV.h"
7 #include "matpackVI.h"
8 #include "matpackVII.h"
9 #include "methods.h"
11 #include "agenda_class.h"
12 #include "agenda_record.h"
13 
15 extern std::string string_buffer;
16 
17 namespace global_data {
18 extern map<String, Index> AgendaMap;
20 extern map<String, Index> WsvGroupMap;
22 }
23 
26 
27 Index get_wsv_id(const char *);
28 
30 std::vector<Callback *> InteractiveWorkspace::callbacks_{};
31 
32 void callback_getaway(Workspace &ws, const MRecord &mr) {
33  InteractiveWorkspace &iws = *reinterpret_cast<InteractiveWorkspace *>(&ws);
34 #pragma omp critical
35  { iws.execute_callback(static_cast<Index>(mr.SetValue())); }
36 }
37 
38 MdRecord callback_mr = MdRecord("APICallback",
39  "",
40  ArrayOfString(),
41  ArrayOfString(),
42  ArrayOfString(),
43  ArrayOfString(),
44  ArrayOfString(),
45  ArrayOfString(),
46  ArrayOfString(),
47  ArrayOfString(),
48  ArrayOfString(),
49  ArrayOfString(),
50  false,
51  false,
52  false,
53  false,
54  false);
55 
57  const Index agenda_verbosity)
58  : Workspace() {
61  verbosity_at_launch.set_agenda_verbosity(agenda_verbosity);
62  // No report file is used for the C interface
64 
65  // Set names of agendas.
68  const Index WsvAgendaGroupIndex = WsvGroupMap.find("Agenda")->second;
69  for (const auto & agenda_iterator : AgendaMap) {
70  const auto & wsv_iterator = Workspace::WsvMap.find(agenda_iterator.first);
71  if (!(wsv_iterator == Workspace::WsvMap.end())
72  && (wsv_data[wsv_iterator->second].Group() == WsvAgendaGroupIndex)) {
73  Agenda &agenda = *reinterpret_cast<Agenda *>(this->operator[](wsv_iterator->second));
74  agenda.set_name(agenda_iterator.first);
75  }
76  }
77 }
78 
85  define_md_map();
89  assert(check_agenda_data());
93 
94  // Add getaway for callbacks.
95  size_t n_methods = md_data.size();
96  getaways[n_methods] = &callback_getaway;
97  md_data.push_back(callback_mr);
98 }
99 
101  // Need to check size of stack as agenda definitions may have
102  // added variables.
103  if (wsv_data.size() != ws.size()) {
104  resize();
105  }
106  try {
107  a->execute(*this);
108  } catch (const std::exception &e) {
109  string_buffer = e.what();
110  return string_buffer.c_str();
111  }
112  return nullptr;
113 }
114 
116  long id, const ArrayOfIndex &output, const ArrayOfIndex &input) {
117  const MdRecord &m = md_data[id];
118 
119  // Need to check size of stack as agenda definitions may have
120  // added variables.
121  if (wsv_data.size() != ws.size()) {
122  resize();
123  }
124 
125  // Check if all input variables are initialized.
126  for (Index i : input) {
127  if (!is_initialized(i)) {
128  string_buffer = "Method " + m.Name() + " needs input " +
129  wsv_data[i].Name() + " but it is uninitialized.";
130  return string_buffer.c_str();
131  }
132  }
133 
134  // Make sure verbosity is set.
135  Index wsv_id_verbosity = get_wsv_id("verbosity");
136  Verbosity &verbosity = *((Verbosity *)this->operator[](wsv_id_verbosity));
137  verbosity.set_main_agenda(true);
138 
139  CREATE_OUTS;
140 
141  if (m.SetMethod()) {
142  swap(output[0], input[0]);
143  return nullptr;
144  }
145 
146  TokVal t{};
147  Agenda a{};
148  try {
149  MRecord mr(id, output, input, t, a);
150  if (mr.isInternal()) {
151  out3 << "- " + m.Name() + "\n";
152  } else {
153  out1 << "- " + m.Name() + "\n";
154  }
155  getaways[id](*this, mr);
156  } catch (const std::exception &e) {
157  string_buffer = e.what();
158  return string_buffer.c_str();
159  }
160  return nullptr;
161 }
162 
165  Agenda &dst = *reinterpret_cast<Agenda *>(this->operator[](id));
166  String old_name = dst.name();
167  dst = src;
168  if (old_name != "") {
169  dst.set_name(old_name);
170  }
171  dst.check(*this, verbosity_at_launch);
172 }
173 
175  *reinterpret_cast<Index *>(this->operator[](id)) = src;
176 }
177 
179  *reinterpret_cast<Numeric *>(this->operator[](id)) = src;
180 }
181 
183  *reinterpret_cast<String *>(this->operator[](id)) = src;
184 }
185 
187  Index id, size_t n, const char *const *src) {
188  ArrayOfString *dst = reinterpret_cast<ArrayOfString *>(this->operator[](id));
189  dst->resize(n);
190  for (size_t i = 0; i < n; ++i) {
191  dst->operator[](i) = String(src[i]);
192  }
193 }
194 
196  size_t n,
197  const Index *src) {
198  ArrayOfIndex *dst = reinterpret_cast<ArrayOfIndex *>(this->operator[](id));
199  dst->resize(n);
200  for (size_t i = 0; i < n; ++i) {
201  dst->operator[](i) = src[i];
202  }
203 }
204 
206  size_t n,
207  const Numeric *src) {
208  Vector *dst = reinterpret_cast<Vector *>(this->operator[](id));
209  dst->resize(n);
210  for (size_t i = 0; i < n; ++i) {
211  dst->operator[](i) = src[i];
212  }
213 }
214 
216  size_t m,
217  size_t n,
218  const Numeric *src) {
219  Matrix *dst = reinterpret_cast<Matrix *>(this->operator[](id));
220  dst->resize(m, n);
221  for (size_t i = 0; i < n * m; ++i) {
222  dst->get_c_array()[i] = src[i];
223  }
224 }
225 
227  Index id, size_t l, size_t m, size_t n, const Numeric *src) {
228  Tensor3 *dst = reinterpret_cast<Tensor3 *>(this->operator[](id));
229  dst->resize(l, m, n);
230  for (size_t i = 0; i < l * n * m; ++i) {
231  dst->get_c_array()[i] = src[i];
232  }
233 }
234 
236  Index id, size_t k, size_t l, size_t m, size_t n, const Numeric *src) {
237  Tensor4 *dst = reinterpret_cast<Tensor4 *>(this->operator[](id));
238  dst->resize(k, l, m, n);
239  for (size_t i = 0; i < k * l * m * n; ++i) {
240  dst->get_c_array()[i] = src[i];
241  }
242 }
243 
245  size_t k,
246  size_t l,
247  size_t m,
248  size_t n,
249  size_t o,
250  const Numeric *src) {
251  Tensor5 *dst = reinterpret_cast<Tensor5 *>(this->operator[](id));
252  dst->resize(k, l, m, n, o);
253  for (size_t i = 0; i < k * l * m * n * o; ++i) {
254  dst->get_c_array()[i] = src[i];
255  }
256 }
257 
259  size_t k,
260  size_t l,
261  size_t m,
262  size_t n,
263  size_t o,
264  size_t p,
265  const Numeric *src) {
266  Tensor6 *dst = reinterpret_cast<Tensor6 *>(this->operator[](id));
267  dst->resize(k, l, m, n, o, p);
268  for (size_t i = 0; i < k * l * m * n * o * p; ++i) {
269  dst->get_c_array()[i] = src[i];
270  }
271 }
272 
274  size_t k,
275  size_t l,
276  size_t m,
277  size_t n,
278  size_t o,
279  size_t p,
280  size_t q,
281  const Numeric *src) {
282  Tensor7 *dst = reinterpret_cast<Tensor7 *>(this->operator[](id));
283  dst->resize(k, l, m, n, o, p, q);
284  for (size_t i = 0; i < k * l * m * n * o * p * q; ++i) {
285  dst->get_c_array()[i] = src[i];
286  }
287 }
288 
290  Index m,
291  Index n,
292  Index nnz,
293  const Numeric *src,
294  const int *row_inds,
295  const int *col_inds) {
296  Sparse *dst = reinterpret_cast<Sparse *>(this->operator[](id));
297  *dst = Sparse(m, n);
298 
299  Vector elements(nnz);
300  ArrayOfIndex row_indices(nnz), column_indices(nnz);
301 
302  for (size_t i = 0; i < (size_t)nnz; ++i) {
303  elements[i] = src[i];
304  row_indices[i] = row_inds[i];
305  column_indices[i] = col_inds[i];
306  }
307 
308  dst->insert_elements(nnz, row_indices, column_indices, elements);
309 }
310 
313  std::copy(ws.begin(), ws.end(), ws_new.begin());
314  std::swap(ws, ws_new);
315 }
316 
318  this->operator[](i);
319  this->pop_free(i);
320  this->operator[](i);
321 }
322 
323 Index InteractiveWorkspace::add_variable(Index group_id, const char *name) {
324 
325  if (wsv_data.size() != ws.size()) {
326  resize();
327  }
328 
329  Index id = static_cast<Index>(ws.size());
330 
331  ws.push_back(stack<WsvStruct *>());
332  push(ws.size() - 1, nullptr);
333  ws.back().top()->wsv = workspace_memory_handler.allocate(group_id);
334  ws.back().top()->auto_allocated = true;
335  ws.back().top()->initialized = false;
336 
337  String s;
338  if (name) {
339  s = String(name);
340  } else {
341  std::stringstream stream;
342  stream << "anonymous_variable_" << n_anonymous_variables_;
343  s = stream.str();
344  }
345 
346  wsv_data.push_back(WsvRecord(s.c_str(), "Created by C API.", group_id));
347  WsvMap[s] = id;
348 
350  return id;
351 }
352 
354  WsvStruct *wsvs;
355  while (ws[i].size()) {
356  wsvs = ws[i].top();
357  if (wsvs->auto_allocated && wsvs->wsv) {
358  workspace_memory_handler.deallocate(group_id, wsvs->wsv);
359  }
360  delete (wsvs);
361  ws[i].pop();
362  }
363  ws.erase(ws.begin() + i);
364 
365  WsvMap.erase(wsv_data[i].Name());
366  wsv_data.erase(wsv_data.begin() + i);
368 }
369 
371  if (is_initialized(i) && is_initialized(j)) {
372  std::swap(ws[i], ws[j]);
373  } else if (!is_initialized(i) && is_initialized(j)) {
374  ws[i].push(ws[j].top());
375  ws[j].pop();
376  } else if (is_initialized(i) && !is_initialized(j)) {
377  ws[j].push(ws[i].top());
378  ws[i].pop();
379  }
380 }
agenda_record.h
Declarations for AgRecord, storing lookup information for one agenda.
MRecord::isInternal
bool isInternal() const
Indicates the origin of this method.
Definition: agenda_class.h:169
Matrix
The Matrix class.
Definition: matpackI.h:1193
InteractiveWorkspace::set_string_variable
void set_string_variable(Index id, const char *src)
Deep-copy of String variable into workspace.
Definition: interactive_workspace.cc:182
WorkspaceMemoryHandler
Handling of workspace memory.
Definition: workspace_memory_handler.h:36
ARTS::Group::Sparse
Sparse Sparse
Definition: autoarts.h:99
define_species_map
void define_species_map()
Definition: species_data.cc:1069
Tensor4::resize
void resize(Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackIV.cc:1064
Workspace::wsv_data
static Array< WsvRecord > wsv_data
Global WSV data.
Definition: workspace_ng.h:58
Tensor6::resize
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackVI.cc:2175
InteractiveWorkspace::execute_agenda
const char * execute_agenda(const Agenda *a)
Execute agenda.
Definition: interactive_workspace.cc:100
TokVal
This stores arbitrary token values and remembers the type.
Definition: token.h:40
define_agenda_data
void define_agenda_data()
Definition: agendas.cc:44
Tensor3
The Tensor3 class.
Definition: matpackIII.h:339
Agenda::execute
void execute(Workspace &ws) const
Execute an agenda.
Definition: agenda_class.cc:148
Workspace::WsvStruct
Definition: workspace_ng.h:42
callback_mr
MdRecord callback_mr
Definition: interactive_workspace.cc:38
ARTS::Var::verbosity
Verbosity verbosity(Workspace &ws) noexcept
Definition: autoarts.h:7112
WorkspaceMemoryHandler::initialize
void initialize()
Initialization dispatch functions.
Definition: workspace_memory_handler.cc:838
swap
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
Definition: complex.cc:731
Sparse
The Sparse class.
Definition: matpackII.h:60
global_data::AgendaMap
map< String, Index > AgendaMap
The map associated with agenda_data.
Definition: agenda_record.cc:35
InteractiveWorkspace::initialize_variable
void initialize_variable(Index id)
Initialize workspace variable.
Definition: interactive_workspace.cc:317
MRecord
Method runtime data.
Definition: agenda_class.h:121
Vector::resize
void resize(Index n)
Resize function.
Definition: matpackI.cc:404
InteractiveWorkspace::set_tensor7_variable
void set_tensor7_variable(Index id, size_t k, size_t l, size_t m, size_t n, size_t o, size_t p, size_t q, const Numeric *src)
Deep-copy of Tensor5 variable into workspace.
Definition: interactive_workspace.cc:273
get_wsv_id
Index get_wsv_id(const char *)
Get index of WSV.
Definition: workspace.cc:5771
MdRecord::SetMethod
bool SetMethod() const
Definition: methods.h:105
InteractiveWorkspace::set_agenda_variable
void set_agenda_variable(Index id, const Agenda &src)
Set agenda variable into workspace.
Definition: interactive_workspace.cc:163
Tensor4
The Tensor4 class.
Definition: matpackIV.h:421
workspace_memory_handler.h
The WorkspaceMemoryHandler.
Workspace::ws
Array< stack< WsvStruct * > > ws
Workspace variable container.
Definition: workspace_ng.h:49
Tensor3::resize
void resize(Index p, Index r, Index c)
Resize function.
Definition: matpackIII.cc:664
Agenda
The Agenda class.
Definition: agenda_class.h:44
InteractiveWorkspace::set_matrix_variable
void set_matrix_variable(Index id, size_t m, size_t n, const Numeric *src)
Deep-copy of Matrix variable into workspace.
Definition: interactive_workspace.cc:215
InteractiveWorkspace::resize
void resize()
Resize workspace stack.
Definition: interactive_workspace.cc:311
matpackIV.h
InteractiveWorkspace::n_anonymous_variables_
static size_t n_anonymous_variables_
Definition: interactive_workspace.h:334
matpackI.h
Implementation of Matrix, Vector, and such stuff.
InteractiveWorkspace::set_index_variable
void set_index_variable(Index id, const Index &src)
Deep-copy of Index variable into workspace.
Definition: interactive_workspace.cc:174
Array
This can be used to make arrays out of anything.
Definition: array.h:108
Sparse::insert_elements
void insert_elements(Index nnz, const ArrayOfIndex &rowind, const ArrayOfIndex &colind, ConstVectorView data)
Insert vector of elements with given row and column indices.
Definition: matpackII.cc:337
InteractiveWorkspace::set_vector_variable
void set_vector_variable(Index id, size_t n, const Numeric *src)
Deep-copy of Vector variable into workspace.
Definition: interactive_workspace.cc:205
agenda_class.h
Declarations for agendas.
Tensor7::resize
void resize(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackVII.cc:5484
WorkspaceMemoryHandler::deallocate
void deallocate(Index group_index, void *ptr)
Getaway function to call the deallocation function for the WSV group with the given Index.
Definition: workspace_memory_handler.h:53
Tensor5::resize
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackV.cc:1743
InteractiveWorkspace::InteractiveWorkspace
InteractiveWorkspace(const Index verbosity=1, const Index agenda_verbosity=0)
Definition: interactive_workspace.cc:56
InteractiveWorkspace::initialize
static void initialize()
Workspace intialization.
Definition: interactive_workspace.cc:79
InteractiveWorkspace::set_array_of_index_variable
void set_array_of_index_variable(Index id, size_t n, const Index *src)
Deep-copy of ArrayOfIndex variable into workspace.
Definition: interactive_workspace.cc:195
global_data::workspace_memory_handler
WorkspaceMemoryHandler workspace_memory_handler
The workspace memory handler Defined in workspace_ng.cc.
Definition: interactive_workspace.cc:21
my_basic_string< char >
ArrayOfString
Array< String > ArrayOfString
An array of Strings.
Definition: mystring.h:283
string_buffer
std::string string_buffer
Definition: arts_api.cc:22
Tensor5View::get_c_array
const Numeric * get_c_array() const
Conversion to plain C-array.
Definition: matpackV.cc:675
InteractiveWorkspace::set_tensor5_variable
void set_tensor5_variable(Index id, size_t k, size_t l, size_t m, size_t n, size_t o, const Numeric *src)
Deep-copy of Tensor5 variable into workspace.
Definition: interactive_workspace.cc:244
Workspace::WsvStruct::auto_allocated
bool auto_allocated
Definition: workspace_ng.h:45
MRecord::SetValue
const TokVal & SetValue() const
Definition: agenda_class.h:158
Agenda::name
String name() const
Agenda name.
Definition: agenda_class.cc:658
Workspace::define_wsv_data
static void define_wsv_data()
Define workspace variables.
Definition: workspace.cc:39
Workspace::WsvStruct::wsv
void * wsv
Definition: workspace_ng.h:43
InteractiveWorkspace::set_numeric_variable
void set_numeric_variable(Index id, const Numeric &src)
Deep-copy of Numeric variable into workspace.
Definition: interactive_workspace.cc:178
WorkspaceMemoryHandler::allocate
void * allocate(Index group_index)
Allocate workspace WSV of given group.
Definition: workspace_memory_handler.h:44
Workspace::operator[]
void * operator[](Index i)
Retrieve a pointer to the given WSV.
Definition: workspace_ng.cc:169
expand_md_data_raw_to_md_data
void expand_md_data_raw_to_md_data()
Expand supergeneric methods.
Definition: methods_aux.cc:410
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Verbosity
Definition: messages.h:49
Verbosity::set_agenda_verbosity
void set_agenda_verbosity(Index v)
Definition: messages.h:70
define_wsv_group_names
void define_wsv_group_names()
Define the array of workspace variable group names.
Definition: groups.cc:77
matpackIII.h
InteractiveWorkspace::set_tensor3_variable
void set_tensor3_variable(Index id, size_t l, size_t m, size_t n, const Numeric *src)
Deep-copy of Tensor3 variable into workspace.
Definition: interactive_workspace.cc:226
InteractiveWorkspace::set_sparse_variable
void set_sparse_variable(Index id, Index m, Index n, Index nnz, const Numeric *src, const int *row_indices, const int *column_indices)
Deep-copy of Sparse matrix into workspace.
Definition: interactive_workspace.cc:289
Tensor7View::get_c_array
const Numeric * get_c_array() const
Conversion to plain C-array.
Definition: matpackVII.cc:5012
Tensor6View::get_c_array
const Numeric * get_c_array() const
Conversion to plain C-array.
Definition: matpackVI.cc:1734
MdRecord::Name
const String & Name() const
Definition: methods.h:88
global_data::WsvGroupMap
const map< String, Index > WsvGroupMap
The map associated with wsv_group_names.
Definition: groups.cc:41
Matrix::resize
void resize(Index r, Index c)
Resize function.
Definition: matpackI.cc:1056
InteractiveWorkspace::set_tensor6_variable
void set_tensor6_variable(Index id, size_t k, size_t l, size_t m, size_t n, size_t o, size_t p, const Numeric *src)
Deep-copy of Tensor6 variable into workspace.
Definition: interactive_workspace.cc:258
check_agenda_data
bool check_agenda_data()
Check that agendas.cc and workspace.cc are consistent.
Definition: agenda_record.cc:115
Workspace::pop_free
void pop_free(Index i)
Remove the topmost WSV from its stack and free its memory.
Definition: workspace_ng.cc:141
Agenda::check
void check(Workspace &ws, const Verbosity &verbosity)
Checks consistency of an agenda.
Definition: agenda_class.cc:80
Zeeman::end
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
Definition: zeemandata.h:108
Workspace::push
void push(Index i, void *wsv)
Push a new WSV onto its stack.
Definition: workspace_ng.cc:153
Workspace::initialize
void initialize()
Reset the size of the workspace.
Definition: workspace_ng.h:111
global_data::md_data
const Array< MdRecord > md_data
Lookup information for workspace methods.
Definition: interactive_workspace.cc:19
Tensor5
The Tensor5 class.
Definition: matpackV.h:506
InteractiveWorkspace::callbacks_
static std::vector< Callback * > callbacks_
Definition: interactive_workspace.h:335
define_agenda_map
void define_agenda_map()
Definition: agenda_record.cc:95
InteractiveWorkspace::execute_workspace_method
const char * execute_workspace_method(long id, const ArrayOfIndex &output, const ArrayOfIndex &input)
Execute workspace method.
Definition: interactive_workspace.cc:115
q
#define q
Definition: legacy_continua.cc:21712
InteractiveWorkspace::set_tensor4_variable
void set_tensor4_variable(Index id, size_t k, size_t l, size_t m, size_t n, const Numeric *src)
Deep-copy of Tensor4 variable into workspace.
Definition: interactive_workspace.cc:235
matpackV.h
define_md_raw_map
void define_md_raw_map()
Define MdRawMap.
Definition: methods_aux.cc:509
WsvRecord
This class contains all static information for one workspace variable.
Definition: wsv_aux.h:56
InteractiveWorkspace::set_array_of_string_variable
void set_array_of_string_variable(Index id, size_t n, const char *const *src)
Deep-copy of ArrayOfString variable into workspace.
Definition: interactive_workspace.cc:186
MdRecord
All information for one workspace method.
Definition: methods.h:41
global_data
Definition: agenda_record.cc:33
InteractiveWorkspace::erase_variable
void erase_variable(Index i, Index group_id)
Remove a variable stack from the workspace.
Definition: interactive_workspace.cc:353
String
my_basic_string< char > String
The String type for ARTS.
Definition: mystring.h:280
Workspace::WsvMap
static map< String, Index > WsvMap
Global map associated with wsv_data.
Definition: workspace_ng.h:61
Verbosity::set_file_verbosity
void set_file_verbosity(Index v)
Definition: messages.h:72
Workspace
Workspace class.
Definition: workspace_ng.h:40
matpackII.h
Header file for sparse matrices.
copy
void copy(ConstComplexIterator1D origin, const ConstComplexIterator1D &end, ComplexIterator1D target)
Copy data between begin and end to target.
Definition: complex.cc:478
Agenda::set_name
void set_name(const String &nname)
Set agenda name.
Definition: agenda_class.cc:647
getaways
void(* getaways[])(Workspace &, const MRecord &)
Definition: auto_md.cc:21496
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
define_species_data
void define_species_data()
Definition: species_data.cc:158
define_md_map
void define_md_map()
Define MdMap.
Definition: methods_aux.cc:473
Tensor6
The Tensor6 class.
Definition: matpackVI.h:1088
Workspace::define_wsv_map
static void define_wsv_map()
Map WSV names to indices.
Definition: workspace_ng.cc:48
verbosity_at_launch
Verbosity verbosity_at_launch
The global message verbosity settings:
Definition: messages.cc:34
MatrixView::get_c_array
const Numeric * get_c_array() const
Conversion to plain C-array.
Definition: matpackI.cc:735
callback_getaway
void callback_getaway(Workspace &ws, const MRecord &mr)
Definition: interactive_workspace.cc:32
Tensor3View::get_c_array
const Numeric * get_c_array() const
Conversion to plain C-array.
Definition: matpackIII.cc:321
Vector
The Vector class.
Definition: matpackI.h:860
InteractiveWorkspace::swap
void swap(Index i, Index j)
Remove a variable stack from the workspace.
Definition: interactive_workspace.cc:370
Verbosity::set_screen_verbosity
void set_screen_verbosity(Index v)
Definition: messages.h:71
InteractiveWorkspace::is_initialized
bool is_initialized(Index i)
Checks existence of the given WSV.
Definition: workspace_ng.h:118
Tensor4View::get_c_array
const Numeric * get_c_array() const
Conversion to plain C-array.
Definition: matpackIV.cc:358
Array::nelem
Index nelem() const
Number of elements.
Definition: array.h:195
interactive_workspace.h
This file contains all declarations of the ARTS C API.
methods.h
Declaration of the class MdRecord.
matpackVI.h
define_md_data_raw
void define_md_data_raw()
Definition: methods.cc:191
Tensor7
The Tensor7 class.
Definition: matpackVII.h:2382
matpackVII.h
InteractiveWorkspace::add_variable
Index add_variable(Index group_id, const char *name)
Push a stack for a new variable to the workspace.
Definition: interactive_workspace.cc:323
CREATE_OUTS
#define CREATE_OUTS
Definition: messages.h:209
InteractiveWorkspace
Interactive ARTS workspace.
Definition: interactive_workspace.h:84
InteractiveWorkspace::execute_callback
void execute_callback(Index callback_id)
Definition: interactive_workspace.h:265