Function utils::initPDFFromKey

Function Documentation

inline auto utils::initPDFFromKey(const toml::table &inputDeck, const std::string &key, const std::string &prefix = "") -> pdfs::PDF

Initialize a PDF from a toml key.

If the key resolves to a numerical value, this is interpreted as specifying a delta function at that value. If it resolves to a string, this is interpreted as supplying the name of the PDF file descriptor, with the path to the file resolved by utils::getFilePath. See ParseUtils.hpp’s initPDFFromString() for the closely-related string-driven counterpart to this function, used when there is a value to interpret but no toml table/key to read it from (e.g. SimControls’s own set* methods).

Parameters:
  • inputDeck – Input deck for simulation

  • key – Name of key

  • prefix – Prefix to look for PDF file relative to SLUG_DIR