ARTS  2.4.0(git:4fb77825)
m_wigner.cc
Go to the documentation of this file.
1 /* Copyright (C) 2018
2  * Richard Larsson <ric.larsson@gmail.com>
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2, or (at your option) any
7  * later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17  * USA. */
18 
27 #include "messages.h"
28 #include "wigner_functions.h"
29 
30 /* Workspace method: Doxygen documentation will be auto-generated */
32  const Index& fast_wigner_stored_symbols,
33  const Index& largest_wigner_symbol_parameter,
34  const Verbosity&) {
35  wigner_initialized = make_wigner_ready(int(largest_wigner_symbol_parameter), int(fast_wigner_stored_symbols), 6);
36 }
37 
38 /* Workspace method: Doxygen documentation will be auto-generated */
40  const Index& fast_wigner_stored_symbols,
41  const Index& largest_wigner_symbol_parameter,
42  const Verbosity&) {
43  wigner_initialized = make_wigner_ready(int(largest_wigner_symbol_parameter), int(fast_wigner_stored_symbols), 3);
44 }
45 
46 /* Workspace method: Doxygen documentation will be auto-generated */
48  if (not wigner_initialized)
49  throw std::runtime_error("Must first initialize wigner...");
50 
51 #if DO_FAST_WIGNER
52  fastwigxj_print_stats();
53 #else
54  throw std::runtime_error(
55  "You cannot do this without having compiled with fast wigner.");
56 #endif
57 }
58 
59 /* Workspace method: Doxygen documentation will be auto-generated */
61  if (not wigner_initialized)
62  throw std::runtime_error("Must first initialize wigner...");
64 
65 #if DO_FAST_WIGNER
66  fastwigxj_unload(3);
67  fastwigxj_unload(6);
68 #endif
69  wig_table_free();
70 }
71 
72 /* Workspace method: Doxygen documentation will be auto-generated */
74  if (not wigner_initialized)
75  throw std::runtime_error("Must first initialize wigner...");
77 
78 #if DO_FAST_WIGNER
79  fastwigxj_unload(3);
80 #endif
81  wig_table_free();
82 }
wigner_functions.h
Wigner symbol interactions.
WignerFastInfoPrint
void WignerFastInfoPrint(const Index &wigner_initialized, const Verbosity &)
WORKSPACE METHOD: WignerFastInfoPrint.
Definition: m_wigner.cc:47
make_wigner_ready
Index make_wigner_ready(int largest, [[maybe_unused]] int fastest, int size)
Definition: wigner_functions.cc:276
Wigner3Unload
void Wigner3Unload(Index &wigner_initialized, const Verbosity &)
WORKSPACE METHOD: Wigner3Unload.
Definition: m_wigner.cc:73
messages.h
Declarations having to do with the four output streams.
ARTS::Var::wigner_initialized
Index wigner_initialized(Workspace &ws) noexcept
Definition: autoarts.h:7193
Wigner6Init
void Wigner6Init(Index &wigner_initialized, const Index &fast_wigner_stored_symbols, const Index &largest_wigner_symbol_parameter, const Verbosity &)
WORKSPACE METHOD: Wigner6Init.
Definition: m_wigner.cc:31
Verbosity
Definition: messages.h:49
Wigner3Init
void Wigner3Init(Index &wigner_initialized, const Index &fast_wigner_stored_symbols, const Index &largest_wigner_symbol_parameter, const Verbosity &)
WORKSPACE METHOD: Wigner3Init.
Definition: m_wigner.cc:39
Wigner6Unload
void Wigner6Unload(Index &wigner_initialized, const Verbosity &)
WORKSPACE METHOD: Wigner6Unload.
Definition: m_wigner.cc:60
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39