36 TagType type{TagType::FINAL};
40 Species cia_2nd_species{Species::FINAL};
44 Index cia_dataset_index{-1};
46 constexpr Tag()
noexcept =
default;
57 [[nodiscard]]
String Name()
const;
63 ARTS_ASSERT(ind < 0,
"Bad species extracted from: ", ir)
67 [[nodiscard]]
constexpr Numeric Mass()
const noexcept {
return Isotopologue().mass;}
73 [[nodiscard]]
String FullName()
const noexcept {
return Isotopologue().FullName();}
75 [[nodiscard]]
constexpr Species Spec()
const noexcept {
return Isotopologue().spec;}
77 [[nodiscard]]
constexpr TagType Type()
const noexcept {
return type;}
79 friend std::ostream&
operator<<(std::ostream& os,
const Tag& ot) {
return os << ot.Name();}
81 constexpr bool operator==(
const Tag& other)
const noexcept {
82 return other.spec_ind == spec_ind and
83 other.lower_freq == lower_freq and
84 other.upper_freq == upper_freq and
85 other.type == type and
86 other.cia_2nd_species == cia_2nd_species and
87 other.cia_dataset_index == cia_dataset_index;
90 constexpr bool operator!=(
const Tag& other)
const noexcept {
113 std::fill(this->begin(), this->end(), x);
117 this->resize(A.size());
118 std::copy(A.begin(), A.end(), this->begin());
130 for (
auto& x: ot) {
if (not first) os <<
' ';
else first =
false; os << x;}
136 ARTS_ASSERT(size() not_eq 0,
"Invalid ArrayOfSpeciesTag without any species")
142 ARTS_ASSERT(size() not_eq 0,
"Invalid ArrayOfSpeciesTag without any species")
143 return operator[](0).Type();
146 [[nodiscard]]
String Name() const;
148 [[nodiscard]]
bool Plain() const noexcept {
149 return std::any_of(cbegin(), cend(), [](
auto& spec){
return spec.Type() == Species::TagType::Plain;});
152 [[nodiscard]]
bool Zeeman() const noexcept {
153 return std::any_of(cbegin(), cend(), [](
auto& spec){
return spec.Type() == Species::TagType::Zeeman;});
156 [[nodiscard]]
bool RequireLines() const noexcept {
157 return Plain() or
Zeeman();
160 [[nodiscard]]
bool FreeElectrons() const noexcept {
161 return std::any_of(cbegin(), cend(), [](
auto& spec){
return spec.Type() == Species::TagType::FreeElectrons;});
164 [[nodiscard]]
bool Particles() const noexcept {
165 return std::any_of(cbegin(), cend(), [](
auto& spec){
return spec.Type() == Species::TagType::Particles;});
177 FreeElectrons{
false},
std::ostream & operator<<(std::ostream &os, AbsorptionCutoffTagTypeStatus val)
This file contains the definition of Array.
ArrayOfSpeciesTag() noexcept
ArrayOfSpeciesTag(ArrayOfSpeciesTag &&A) noexcept
ArrayOfSpeciesTag & operator=(SpeciesTag x)
ArrayOfSpeciesTag & operator=(ArrayOfSpeciesTag &&A) noexcept
friend std::ostream & operator<<(std::ostream &os, const ArrayOfSpeciesTag &ot)
ArrayOfSpeciesTag(const ArrayOfSpeciesTag &A)=default
Species::Species Species() const ARTS_NOEXCEPT
ArrayOfSpeciesTag(Index n, const SpeciesTag &fillvalue)
ArrayOfSpeciesTag(std::vector< SpeciesTag > x)
ArrayOfSpeciesTag & operator=(const ArrayOfSpeciesTag &A)
ArrayOfSpeciesTag(Index n)
This can be used to make arrays out of anything.
Array & operator=(base x)
const SpeciesTag & operator[](const Index n) const
#define ARTS_ASSERT(condition,...)
#define ENUMCLASS(ENUMTYPE, TYPE,...)
Implementation of Matrix, Vector, and such stuff.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
This file contains the definition of String, the ARTS string class.
constexpr bool is_predefined_model(const IsotopeRecord &ir) noexcept
constexpr std::array Isotopologues
A list of all ARTS isotopologues, note how the species enum class input HAS to be sorted.
Numeric first_vmr(const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &rtp_vmr, const Species spec) ARTS_NOEXCEPT
constexpr Index find_species_index(const Species spec, const std::string_view isot) noexcept
Implements Zeeman modeling.
constexpr bool operator!=(const Rational a, const Rational b) noexcept
Inequality.
constexpr bool operator==(const Rational a, const Rational b) noexcept
Equality.
Struct to test of an ArrayOfArrayOfSpeciesTag contains a tagtype.
Struct containing all information needed about one isotope.