changed: allow subclasses to register additional functions for VTF output

This commit is contained in:
Arne Morten Kvarving 2020-12-02 10:34:18 +01:00
parent e209b75ebf
commit 5578028655
2 changed files with 10 additions and 1 deletions

View File

@ -1889,3 +1889,9 @@ bool SIMoutput::writeAddFuncs (int iStep, int& nBlock, int idBlock, double time)
return true;
}
void SIMoutput::addAddFunc(const std::string& name, RealFunc* f)
{
myAddScalars[name] = f;
}

View File

@ -293,10 +293,13 @@ public:
//! \brief Prints integrated solution norms to the log stream.
virtual void printNorms(const Vectors&, size_t = 36) const = 0;
protected:
//! \brief Writes out the additional functions to VTF-file.
virtual bool writeAddFuncs(int iStep, int& nBlock, int idBlock, double time);
protected:
//! \brief Add an additional function for VTF output.
void addAddFunc(const std::string& name, RealFunc* f);
private:
//! \brief Private helper to initialize patch for solution evaluation.
bool initPatchForEvaluation(int patchNo) const;