Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
#pragma once
#include "fourdst/composition/composition.h"
#include "fourdst/atomic/atomicSpecies.h"
#include <vector>
#include <optional>
#include <string>
namespace fourdst::composition {
Composition buildCompositionFromMassFractions(
const std::vector<std::string>& symbols,
const std::vector<double>& massFractions
);
Composition buildCompositionFromMassFractions(
const std::vector<atomic::Species>& species,
const std::vector<double>& massFractions
);
Composition buildCompositionFromMassFractions(
const std::set<atomic::Species>& species,
const std::vector<double>& massFractions
);
Composition buildCompositionFromMassFractions(
const std::unordered_map<atomic::Species, double>& massFractionsMap
);
Composition buildCompositionFromMassFractions(
const std::unordered_map<std::string, double>& massFractions
);
Composition buildCompositionFromMassFractions(
std::map<atomic::Species, double> massFractions
);
Composition buildCompositionFromMassFractions(
std::map<std::string, double> massFractions
);
std::optional<fourdst::atomic::Species> getSpecies(const std::string& symbol);
}
atomicSpecies.h
fourdst::composition::Composition
Manages a collection of chemical species and their abundances.
Definition composition.h:99
composition.h
fourdst::composition
Utilities and types for representing and manipulating chemical compositions.
fourdst::composition::buildCompositionFromMassFractions
Composition buildCompositionFromMassFractions(const std::vector< std::string > &symbols, const std::vector< double > &massFractions)
Build a Composition object from symbols and their corresponding mass fractions.
Definition utils.cpp:77
fourdst::composition::getSpecies
std::optional< fourdst::atomic::Species > getSpecies(const std::string &symbol)
Definition utils.cpp:189