MCPcopy Create free account
hub / github.com/Cantera/cantera / getAuxiliary

Method getAuxiliary

src/base/SolutionArray.cpp:852–878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

850}
851
852AnyMap SolutionArray::getAuxiliary(int loc)
853{
854 setLoc(loc);
855 AnyMap out;
856 for (const auto& [key, extra] : *m_extra) {
857 if (extra.is<void>()) {
858 out[key] = extra;
859 } else if (extra.isVector<long int>()) {
860 out[key] = extra.asVector<long int>()[m_loc];
861 } else if (extra.isVector<double>()) {
862 out[key] = extra.asVector<double>()[m_loc];
863 } else if (extra.isVector<string>()) {
864 out[key] = extra.asVector<string>()[m_loc];
865 } else if (extra.isVector<vector<long int>>()) {
866 out[key] = extra.asVector<vector<long int>>()[m_loc];
867 } else if (extra.isVector<vector<double>>()) {
868 out[key] = extra.asVector<vector<double>>()[m_loc];
869 } else if (extra.isVector<vector<string>>()) {
870 out[key] = extra.asVector<vector<string>>()[m_loc];
871 } else {
872 throw NotImplementedError("SolutionArray::getAuxiliary",
873 "Unable to retrieve data for component '{}' with type '{}'.",
874 key, extra.type_str());
875 }
876 }
877 return out;
878}
879
880void SolutionArray::setAuxiliary(int loc, const AnyMap& data)
881{

Callers 4

TESTFunction · 0.80
testSingleColFunction · 0.80
testMultiColFunction · 0.80
fromArrayMethod · 0.80

Calls 2

NotImplementedErrorClass · 0.85
type_strMethod · 0.80

Tested by 3

TESTFunction · 0.64
testSingleColFunction · 0.64
testMultiColFunction · 0.64