The SKIRT project
advanced radiative transfer for astrophysics
AtomUtils Class Referencefinal

#include <AtomUtils.hpp>

Static Public Member Functions

static short atomToZ (string element)
static int ionIndex (int Z, int N)
static double mass (short Z)
static std::pair< short, short > parseIon (string ion)

Detailed Description

This static class provides utility functions related to the treatment of atomic and ionic species.

Member Function Documentation

◆ atomToZ()

short AtomUtils::atomToZ ( string element)
static

This function returns the atomic number of the specified elements.

◆ mass()

double AtomUtils::mass ( short Z)
static

This function returns the mass of the specified atomic number in SI units.

◆ parseIon()

std::pair< short, short > AtomUtils::parseIon ( string ion)
static

This function returns a pair of the atomic number and number of electrons (Z,N) of the specified ion string. The ion string can have the following formats, as listed in the table below. Any other format will throw an error.

FormatReturns
'Z'\((Z,N)=(Z,Z)\)
'Z+'\((Z,N)=(Z,Z-1)\)
'Z+I'\((Z,N)=(Z,Z-I)\)

The number of electrons, N, can range from 0 to Z, any other value will result in an error.


The documentation for this class was generated from the following file: