ARTS 2.5.11 (git: 6827797f)
lineshapemodel.cc File Reference

Contains the line shape namespace. More...

#include "arts_conversions.h"
#include "debug.h"
#include "lineshapemodel.h"
#include "matpack_data.h"
#include "matpack_math.h"
#include <limits>

Go to the source code of this file.

Namespaces

namespace  LineShape
 Computations of line shape derived parameters.
 
namespace  LineShape::LegacyLineFunctionData
 Legacy dealing with reading old LineFunctionData.
 
namespace  LineShape::LegacyLineMixingData
 Legacy dealing with reading old LineMixingData.
 
namespace  LineShape::LegacyPressureBroadeningData
 Legacy dealing with reading old PressureBroadeningData.
 

Macros

#define ReturnJacPropMatType(ID)
 
#define FourParams(A, B, p)
 
#define NineVars(A, p)
 
#define FUNC(X, PVAR)
 
#define FUNC(X, PVAR)
 

Functions

Jacobian::Line select_derivativeLineShape (const String &var, const String &coeff)
 Return the derivative type based on string input.
 
std::ostream & LineShape::operator<< (std::ostream &os, const Model &m)
 
std::istream & LineShape::operator>> (std::istream &is, Model &m)
 
String LineShape::ModelShape2MetaData (const Model &m)
 
Model LineShape::MetaData2ModelShape (const String &s)
 
String LineShape::modelparameters2metadata (const ModelParameters mp, const Numeric T0)
 
ArrayOfString LineShape::ModelMetaDataArray (const LineShape::Model &m, const bool self, const ArrayOfSpecies &sts, const Numeric T0)
 
Numeric & LineShape::SingleModelParameter (ModelParameters &mp, const String &type)
 Get a coefficient from ModelParameters by name.
 
std::ostream & LineShape::operator<< (std::ostream &os, const ModelParameters &mp)
 
std::istream & LineShape::operator>> (std::istream &is, ModelParameters &mp)
 
std::ostream & LineShape::operator<< (std::ostream &os, const SingleSpeciesModel &ssm)
 
std::istream & LineShape::operator>> (std::istream &is, SingleSpeciesModel &ssm)
 
std::ostream & LineShape::operator<< (std::ostream &os, Output x)
 
Model LineShape::hitran_model (Numeric sgam, Numeric nself, Numeric agam, Numeric nair, Numeric psf)
 
Model LineShape::lblrtm_model (Numeric sgam, Numeric nself, Numeric agam, Numeric nair, Numeric psf, std::array< Numeric, 12 > aer_interp)
 
std::vector< Variable > LineShape::LegacyLineFunctionData::lineshapetag2variablesvector (String type)
 Line shape models from string.
 
std::vector< Variable > LineShape::LegacyLineFunctionData::linemixingtag2variablesvector (String type)
 Line mixing models from string.
 
LegacyLineMixingData::TypeLM LineShape::LegacyLineMixingData::string2typelm (String type)
 Line mixing types from string.
 
LegacyPressureBroadeningData::TypePB LineShape::LegacyPressureBroadeningData::string2typepb (String type)
 Pressure broadening types from string.
 
Index LineShape::LegacyPressureBroadeningData::self_listed (const QuantumIdentifier &qid, LegacyPressureBroadeningData::TypePB t)
 Pressure broadening if self exist.
 

Detailed Description

Contains the line shape namespace.

Author
Richard Larsson
Date
2018-09-19

Implementations of lineshapemodel.h

This mostly contains functions that either did not compile while placed in the header or for other reasons are not there. This means most of the real work happens in the header file and not here

Definition in file lineshapemodel.cc.

Macro Definition Documentation

◆ FourParams

#define FourParams (   A,
  B,
 
)
Value:
case Shape##A##B: \
return p * A().d##B(T, T0)

◆ FUNC [1/2]

#define FUNC (   X,
  PVAR 
)
Value:
Numeric Model::X(Numeric T, Numeric T0, Numeric P [[maybe_unused]], \
const Vector &vmrs) const ARTS_NOEXCEPT { \
ARTS_ASSERT(nelem() == vmrs.nelem()) \
\
return PVAR * std::transform_reduce(begin(), end(), vmrs.data_handle(), \
0.0, std::plus<>(), \
[T, T0](auto &ls, auto &xi) { \
return xi * ls.X().at(T, T0); \
}); \
}
#define ARTS_NOEXCEPT
Definition: debug.h:81

Definition at line 1008 of file lineshapemodel.cc.

◆ FUNC [2/2]

#define FUNC (   X,
  PVAR 
)
Value:
Numeric Model::d##X##dT(Numeric T, Numeric T0, Numeric P [[maybe_unused]], \
const Vector &vmrs) const ARTS_NOEXCEPT { \
ARTS_ASSERT(nelem() == vmrs.nelem()) \
\
return PVAR * std::transform_reduce(begin(), end(), vmrs.data_handle(), \
0.0, std::plus<>(), \
[T, T0](auto &ls, auto &xi) { \
return xi * ls.X().dT(T, T0); \
}); \
}

Definition at line 1008 of file lineshapemodel.cc.

◆ NineVars

#define NineVars (   A,
 
)
Value:
FourParams(A, X0, p); \
FourParams(A, X1, p); \
FourParams(A, X2, p); \
FourParams(A, X3, p)
#define FourParams(A, B, p)

◆ ReturnJacPropMatType

#define ReturnJacPropMatType (   ID)
Value:
case LineShape::Variable::ID: \
switch (coeff_type) { \
case Options::LineShapeCoeff::X0: \
return Jacobian::Line::Shape##ID##X0; \
case Options::LineShapeCoeff::X1: \
return Jacobian::Line::Shape##ID##X1; \
case Options::LineShapeCoeff::X2: \
return Jacobian::Line::Shape##ID##X2; \
case Options::LineShapeCoeff::X3: \
return Jacobian::Line::Shape##ID##X3; \
case Options::LineShapeCoeff::FINAL: \
return Jacobian::Line::FINAL; \
} break

Function Documentation

◆ select_derivativeLineShape()

Jacobian::Line select_derivativeLineShape ( const String var,
const String coeff 
)

Return the derivative type based on string input.

Parameters
[in]varVariable good with LineShape::toVariable()
[in]coeffCoefficient good with Options::toLineShapeCoeff()
Returns
Derivative type

Definition at line 21 of file lineshapemodel.cc.

References ReturnJacPropMatType.

Referenced by jacobianAddShapeCatalogParameter().