diff --git a/source/adios2/engine/campaign/CampaignReader.cpp b/source/adios2/engine/campaign/CampaignReader.cpp index bd56f12b75..35f238412f 100644 --- a/source/adios2/engine/campaign/CampaignReader.cpp +++ b/source/adios2/engine/campaign/CampaignReader.cpp @@ -429,6 +429,18 @@ bool CampaignReader::VariableMinMax(const VariableBase &Var, const size_t Step, return false; } +std::string CampaignReader::VariableExprStr(const VariableBase &Var) +{ + auto it = m_VarInternalInfo.find(Var.m_Name); + if (it != m_VarInternalInfo.end()) + { + VariableBase *vb = reinterpret_cast(it->second.originalVar); + Engine *e = m_Engines[it->second.engineIdx]; + return e->VariableExprStr(*vb); + } + return ""; +} + #define declare_type(T) \ void CampaignReader::DoGetSync(Variable &variable, T *data) \ { \ diff --git a/source/adios2/engine/campaign/CampaignReader.h b/source/adios2/engine/campaign/CampaignReader.h index d56475bf20..8dca23ebbe 100644 --- a/source/adios2/engine/campaign/CampaignReader.h +++ b/source/adios2/engine/campaign/CampaignReader.h @@ -52,6 +52,7 @@ class CampaignReader : public Engine MinVarInfo *MinBlocksInfo(const VariableBase &, const size_t Step) const; bool VarShape(const VariableBase &Var, const size_t Step, Dims &Shape) const; bool VariableMinMax(const VariableBase &, const size_t Step, MinMaxStruct &MinMax); + std::string VariableExprStr(const VariableBase &Var); private: UserOptions::Campaign m_Options;