Go to the documentation of this file.
57 const Index agenda_verbosity)
69 for (
const auto & agenda_iterator :
AgendaMap) {
72 && (
wsv_data[wsv_iterator->second].Group() == WsvAgendaGroupIndex)) {
74 agenda.
set_name(agenda_iterator.first);
95 size_t n_methods =
md_data.size();
108 }
catch (
const std::exception &e) {
126 for (
Index i : input) {
129 wsv_data[i].Name() +
" but it is uninitialized.";
142 swap(output[0], input[0]);
149 MRecord mr(
id, output, input, t, a);
151 out3 <<
"- " + m.
Name() +
"\n";
153 out1 <<
"- " + m.
Name() +
"\n";
156 }
catch (
const std::exception &e) {
168 if (old_name !=
"") {
187 Index id,
size_t n,
const char *
const *src) {
190 for (
size_t i = 0; i < n; ++i) {
191 dst->operator[](i) =
String(src[i]);
200 for (
size_t i = 0; i < n; ++i) {
201 dst->operator[](i) = src[i];
210 for (
size_t i = 0; i < n; ++i) {
211 dst->operator[](i) = src[i];
221 for (
size_t i = 0; i < n * m; ++i) {
227 Index id,
size_t l,
size_t m,
size_t n,
const Numeric *src) {
230 for (
size_t i = 0; i < l * n * m; ++i) {
236 Index id,
size_t k,
size_t l,
size_t m,
size_t n,
const Numeric *src) {
239 for (
size_t i = 0; i < k * l * m * n; ++i) {
252 dst->
resize(k, l, m, n, o);
253 for (
size_t i = 0; i < k * l * m * n * o; ++i) {
267 dst->
resize(k, l, m, n, o, p);
268 for (
size_t i = 0; i < k * l * m * n * o * p; ++i) {
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) {
295 const int *col_inds) {
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];
331 ws.push_back(stack<WsvStruct *>());
332 push(
ws.size() - 1,
nullptr);
334 ws.back().top()->auto_allocated =
true;
335 ws.back().top()->initialized =
false;
341 std::stringstream stream;
355 while (
ws[i].size()) {
363 ws.erase(
ws.begin() + i);
374 ws[i].push(
ws[j].top());
377 ws[j].push(
ws[i].top());
Declarations for AgRecord, storing lookup information for one agenda.
bool isInternal() const
Indicates the origin of this method.
void set_string_variable(Index id, const char *src)
Deep-copy of String variable into workspace.
Handling of workspace memory.
void define_species_map()
void resize(Index b, Index p, Index r, Index c)
Resize function.
static Array< WsvRecord > wsv_data
Global WSV data.
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
const char * execute_agenda(const Agenda *a)
Execute agenda.
This stores arbitrary token values and remembers the type.
void define_agenda_data()
void execute(Workspace &ws) const
Execute an agenda.
Verbosity verbosity(Workspace &ws) noexcept
void initialize()
Initialization dispatch functions.
void swap(ComplexVector &v1, ComplexVector &v2)
Swaps two objects.
map< String, Index > AgendaMap
The map associated with agenda_data.
void initialize_variable(Index id)
Initialize workspace variable.
void resize(Index n)
Resize function.
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.
Index get_wsv_id(const char *)
Get index of WSV.
void set_agenda_variable(Index id, const Agenda &src)
Set agenda variable into workspace.
The WorkspaceMemoryHandler.
Array< stack< WsvStruct * > > ws
Workspace variable container.
void resize(Index p, Index r, Index c)
Resize function.
void set_matrix_variable(Index id, size_t m, size_t n, const Numeric *src)
Deep-copy of Matrix variable into workspace.
void resize()
Resize workspace stack.
static size_t n_anonymous_variables_
Implementation of Matrix, Vector, and such stuff.
void set_index_variable(Index id, const Index &src)
Deep-copy of Index variable into workspace.
This can be used to make arrays out of anything.
void insert_elements(Index nnz, const ArrayOfIndex &rowind, const ArrayOfIndex &colind, ConstVectorView data)
Insert vector of elements with given row and column indices.
void set_vector_variable(Index id, size_t n, const Numeric *src)
Deep-copy of Vector variable into workspace.
Declarations for agendas.
void resize(Index l, Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
void deallocate(Index group_index, void *ptr)
Getaway function to call the deallocation function for the WSV group with the given Index.
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
InteractiveWorkspace(const Index verbosity=1, const Index agenda_verbosity=0)
static void initialize()
Workspace intialization.
void set_array_of_index_variable(Index id, size_t n, const Index *src)
Deep-copy of ArrayOfIndex variable into workspace.
WorkspaceMemoryHandler workspace_memory_handler
The workspace memory handler Defined in workspace_ng.cc.
Array< String > ArrayOfString
An array of Strings.
std::string string_buffer
const Numeric * get_c_array() const
Conversion to plain C-array.
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.
const TokVal & SetValue() const
String name() const
Agenda name.
static void define_wsv_data()
Define workspace variables.
void set_numeric_variable(Index id, const Numeric &src)
Deep-copy of Numeric variable into workspace.
void * allocate(Index group_index)
Allocate workspace WSV of given group.
void * operator[](Index i)
Retrieve a pointer to the given WSV.
void expand_md_data_raw_to_md_data()
Expand supergeneric methods.
NUMERIC Numeric
The type to use for all floating point numbers.
void set_agenda_verbosity(Index v)
void define_wsv_group_names()
Define the array of workspace variable group names.
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.
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.
const Numeric * get_c_array() const
Conversion to plain C-array.
const Numeric * get_c_array() const
Conversion to plain C-array.
const String & Name() const
const map< String, Index > WsvGroupMap
The map associated with wsv_group_names.
void resize(Index r, Index c)
Resize function.
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.
bool check_agenda_data()
Check that agendas.cc and workspace.cc are consistent.
void pop_free(Index i)
Remove the topmost WSV from its stack and free its memory.
void check(Workspace &ws, const Verbosity &verbosity)
Checks consistency of an agenda.
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
void push(Index i, void *wsv)
Push a new WSV onto its stack.
void initialize()
Reset the size of the workspace.
const Array< MdRecord > md_data
Lookup information for workspace methods.
static std::vector< Callback * > callbacks_
const char * execute_workspace_method(long id, const ArrayOfIndex &output, const ArrayOfIndex &input)
Execute workspace method.
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.
void define_md_raw_map()
Define MdRawMap.
This class contains all static information for one workspace variable.
void set_array_of_string_variable(Index id, size_t n, const char *const *src)
Deep-copy of ArrayOfString variable into workspace.
All information for one workspace method.
void erase_variable(Index i, Index group_id)
Remove a variable stack from the workspace.
my_basic_string< char > String
The String type for ARTS.
static map< String, Index > WsvMap
Global map associated with wsv_data.
void set_file_verbosity(Index v)
Header file for sparse matrices.
void copy(ConstComplexIterator1D origin, const ConstComplexIterator1D &end, ComplexIterator1D target)
Copy data between begin and end to target.
void set_name(const String &nname)
Set agenda name.
void(* getaways[])(Workspace &, const MRecord &)
INDEX Index
The type to use for all integer numbers and indices.
void define_species_data()
void define_md_map()
Define MdMap.
static void define_wsv_map()
Map WSV names to indices.
Verbosity verbosity_at_launch
The global message verbosity settings:
const Numeric * get_c_array() const
Conversion to plain C-array.
void callback_getaway(Workspace &ws, const MRecord &mr)
const Numeric * get_c_array() const
Conversion to plain C-array.
void swap(Index i, Index j)
Remove a variable stack from the workspace.
void set_screen_verbosity(Index v)
bool is_initialized(Index i)
Checks existence of the given WSV.
const Numeric * get_c_array() const
Conversion to plain C-array.
Index nelem() const
Number of elements.
This file contains all declarations of the ARTS C API.
Declaration of the class MdRecord.
void define_md_data_raw()
Index add_variable(Index group_id, const char *name)
Push a stack for a new variable to the workspace.
Interactive ARTS workspace.
void execute_callback(Index callback_id)