Nektar++
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Nektar::SolverUtils::SessionFunction Class Reference

#include <SessionFunction.h>

Public Member Functions

SOLVER_UTILS_EXPORT SessionFunction (const LibUtilities::SessionReaderSharedPtr &session, const MultiRegions::ExpListSharedPtr &field, std::string functionName, bool toCache=false)
 Representation of a FUNCTION defined in the session xml file. More...
 
SOLVER_UTILS_EXPORT void Evaluate (Array< OneD, Array< OneD, NekDouble > > &pArray, const NekDouble pTime=0.0, const int domain=0)
 Evaluates a function defined in the xml session file at each quadrature point. More...
 
SOLVER_UTILS_EXPORT void Evaluate (std::vector< std::string > pFieldNames, Array< OneD, Array< OneD, NekDouble > > &pArray, const NekDouble &pTime=0.0, const int domain=0)
 Evaluates a function defined in the xml session file at each quadrature point. More...
 
SOLVER_UTILS_EXPORT void Evaluate (std::vector< std::string > pFieldNames, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &pTime=0.0, const int domain=0)
 Evaluates a function defined in the xml session file at each quadrature point. More...
 
SOLVER_UTILS_EXPORT void Evaluate (std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
 
SOLVER_UTILS_EXPORT std::string Describe (std::string pFieldName, const int domain=0)
 Provide a description of a function for a given field name. More...
 
SOLVER_UTILS_EXPORT const LibUtilities::SessionReaderSharedPtrGetSession ()
 
SOLVER_UTILS_EXPORT const MultiRegions::ExpListSharedPtrGetExpansion ()
 

Private Member Functions

SOLVER_UTILS_EXPORT void EvaluateExp (std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
 
SOLVER_UTILS_EXPORT void EvaluateFld (std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
 
SOLVER_UTILS_EXPORT void EvaluatePts (std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
 Evaluates a function from pts file. More...
 
SOLVER_UTILS_EXPORT void PrintProgressbar (const int position, const int goal) const
 

Private Attributes

LibUtilities::SessionReaderSharedPtr m_session
 The session reader. More...
 
MultiRegions::ExpListSharedPtr m_field
 The expansion we want to evaluate this function for. More...
 
std::string m_name
 
bool m_toCache
 Store resulting arrays (and interpolators) More...
 
std::map< std::pair< std::string, int >, NekDoublem_lastCached
 Last time the cache for this variable & domain combo was updated. More...
 
std::map< std::string, FieldUtils::Interpolatorm_interpolators
 Interpolator for pts file input for a variable & domain combination. More...
 
std::map< std::pair< std::string, int >, Array< OneD, NekDouble > > m_arrays
 Cached result arrays. More...
 

Detailed Description

Definition at line 60 of file SessionFunction.h.

Constructor & Destructor Documentation

◆ SessionFunction()

Nektar::SolverUtils::SessionFunction::SessionFunction ( const LibUtilities::SessionReaderSharedPtr session,
const MultiRegions::ExpListSharedPtr field,
std::string  functionName,
bool  toCache = false 
)

Representation of a FUNCTION defined in the session xml file.

Representation of a FUNCTION defined in the session xml file.

Parameters
sessionThe session where the function was defined.
fieldThe field the function is defined on.
functionNameThe name of the function.
toCacheStore the evaluated function for later use.

Definition at line 58 of file SessionFunction.cpp.

62  : m_session(session), m_field(field), m_name(functionName), m_toCache(toCache)
63 {
64  ASSERTL0(m_session->DefinesFunction(m_name),
65  "Function '" + m_name + "' does not exist.");
66 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
MultiRegions::ExpListSharedPtr m_field
The expansion we want to evaluate this function for.
bool m_toCache
Store resulting arrays (and interpolators)
LibUtilities::SessionReaderSharedPtr m_session
The session reader.

References ASSERTL0, m_name, and m_session.

Member Function Documentation

◆ Describe()

std::string Nektar::SolverUtils::SessionFunction::Describe ( std::string  pFieldName,
const int  domain = 0 
)

Provide a description of a function for a given field name.

Parameters
pFieldNameField name.
domainThe domain to evaluate the function in.

Definition at line 210 of file SessionFunction.cpp.

211 {
212  std::string retVal;
213 
215  m_session->GetFunctionType(m_name, pFieldName, domain);
217  {
219  m_session->GetFunction(m_name, pFieldName, domain);
220  retVal = ffunc->GetExpression();
221  }
222  else if (vType == LibUtilities::eFunctionTypeFile ||
224  {
225  std::string filename =
226  m_session->GetFunctionFilename(m_name, pFieldName, domain);
227  retVal = "from file " + filename;
228  }
229  else
230  {
231  ASSERTL0(false, "unknown eFunctionType");
232  }
233 
234  return retVal;
235 }
std::shared_ptr< Equation > EquationSharedPtr
Definition: Equation.h:131

References ASSERTL0, Nektar::LibUtilities::eFunctionTypeExpression, Nektar::LibUtilities::eFunctionTypeFile, Nektar::LibUtilities::eFunctionTypeTransientFile, m_name, and m_session.

◆ Evaluate() [1/4]

void Nektar::SolverUtils::SessionFunction::Evaluate ( Array< OneD, Array< OneD, NekDouble > > &  pArray,
const NekDouble  pTime = 0.0,
const int  domain = 0 
)

Evaluates a function defined in the xml session file at each quadrature point.

Evaluates a function defined in the xml session file at each quadrature point.

Parameters
pArrayThe array into which to write the values.
pTimeThe time at which to evaluate the function.
domainThe domain to evaluate the function in.

Definition at line 75 of file SessionFunction.cpp.

78 {
79  std::vector<std::string> vFieldNames = m_session->GetVariables();
80 
81  for (int i = 0; i < vFieldNames.size(); i++)
82  {
83  Evaluate(vFieldNames[i], pArray[i], pTime, domain);
84  }
85 }
SOLVER_UTILS_EXPORT void Evaluate(Array< OneD, Array< OneD, NekDouble > > &pArray, const NekDouble pTime=0.0, const int domain=0)
Evaluates a function defined in the xml session file at each quadrature point.

References m_session.

Referenced by Evaluate().

◆ Evaluate() [2/4]

void Nektar::SolverUtils::SessionFunction::Evaluate ( std::string  pFieldName,
Array< OneD, NekDouble > &  pArray,
const NekDouble pTime = 0.0,
const int  domain = 0 
)

Evaluates a function defined in the xml session file at each quadrature point.

Parameters
pFieldNameThe name of the field to evaluate the function for.
pArrayThe array into which to write the values.
pTimeThe time at which to evaluate the function.
domainThe domain to evaluate the function in.

Definition at line 143 of file SessionFunction.cpp.

147 {
149  m_session->GetFunctionType(m_name, pFieldName, domain);
150 
151  unsigned int nq = m_field->GetNpoints();
152 
153  std::pair<std::string, int> key(pFieldName, domain);
154  // sorry
155  if ((m_arrays.find(key) != m_arrays.end()) &&
157  ((m_lastCached.find(key) != m_lastCached.end()) &&
158  (pTime - m_lastCached[key] < NekConstants::kNekZeroTol))))
159  {
160  // found cached field
161  if (pArray.size() < nq)
162  {
163  pArray = Array<OneD, NekDouble>(nq);
164  }
165  Vmath::Vcopy(nq, m_arrays[key], 1, pArray, 1);
166 
167  return;
168  }
169 
171  {
172  EvaluateExp(pFieldName, pArray, pTime, domain);
173  }
174  else if (vType == LibUtilities::eFunctionTypeFile ||
176  {
177  std::string filename =
178  m_session->GetFunctionFilename(m_name, pFieldName, domain);
179 
180  if (boost::filesystem::path(filename).extension() == ".pts" ||
181  boost::filesystem::path(filename).extension() == ".csv")
182  {
183  EvaluatePts(pFieldName, pArray, pTime, domain);
184  }
185  else
186  {
187  EvaluateFld(pFieldName, pArray, pTime, domain);
188  }
189  }
190  else
191  {
192  ASSERTL0(false, "unknown eFunctionType");
193  }
194 
195  if (m_toCache)
196  {
197  m_arrays[key] = Array<OneD, NekDouble>(nq);
198  Vmath::Vcopy(nq, pArray, 1, m_arrays[key], 1);
199 
200  m_lastCached[key] = pTime;
201  }
202 }
std::map< std::pair< std::string, int >, Array< OneD, NekDouble > > m_arrays
Cached result arrays.
SOLVER_UTILS_EXPORT void EvaluateFld(std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
SOLVER_UTILS_EXPORT void EvaluatePts(std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
Evaluates a function from pts file.
std::map< std::pair< std::string, int >, NekDouble > m_lastCached
Last time the cache for this variable & domain combo was updated.
SOLVER_UTILS_EXPORT void EvaluateExp(std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
static const NekDouble kNekZeroTol
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1199

References ASSERTL0, Nektar::LibUtilities::eFunctionTypeExpression, Nektar::LibUtilities::eFunctionTypeFile, Nektar::LibUtilities::eFunctionTypeTransientFile, EvaluateExp(), EvaluateFld(), EvaluatePts(), Nektar::NekConstants::kNekZeroTol, m_arrays, m_field, m_lastCached, m_name, m_session, m_toCache, and Vmath::Vcopy().

◆ Evaluate() [3/4]

void Nektar::SolverUtils::SessionFunction::Evaluate ( std::vector< std::string >  pFieldNames,
Array< OneD, Array< OneD, NekDouble > > &  pArray,
const NekDouble pTime = 0.0,
const int  domain = 0 
)

Evaluates a function defined in the xml session file at each quadrature point.

Evaluates a function defined in the xml session file at each quadrature point.

Parameters
pFieldNamesThe names of the fields to evaluate the function for.
pArrayThe array into which to write the values.
pTimeThe time at which to evaluate the function.
domainThe domain to evaluate the function in.

Definition at line 95 of file SessionFunction.cpp.

99 {
100  ASSERTL1(pFieldNames.size() == pArray.size(),
101  "Function '" + m_name +
102  "' variable list size mismatch with array storage.");
103 
104  for (int i = 0; i < pFieldNames.size(); i++)
105  {
106  Evaluate(pFieldNames[i], pArray[i], pTime, domain);
107  }
108 }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:250

References ASSERTL1, Evaluate(), and m_name.

◆ Evaluate() [4/4]

void Nektar::SolverUtils::SessionFunction::Evaluate ( std::vector< std::string >  pFieldNames,
Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields,
const NekDouble pTime = 0.0,
const int  domain = 0 
)

Evaluates a function defined in the xml session file at each quadrature point.

Evaluates a function defined in the xml session file at each quadrature point.

Parameters
pFieldNamesThe names of the fields to evaluate the function for.
pFieldsThe fields into which to write the values.
pTimeThe time at which to evaluate the function.
domainThe domain to evaluate the function in.

Definition at line 118 of file SessionFunction.cpp.

123 {
124  ASSERTL0(pFieldNames.size() == pFields.size(),
125  "Field list / name list size mismatch.");
126 
127  for (int i = 0; i < pFieldNames.size(); i++)
128  {
129  Evaluate(pFieldNames[i], pFields[i]->UpdatePhys(), pTime, domain);
130  pFields[i]->FwdTrans_IterPerExp(pFields[i]->GetPhys(),
131  pFields[i]->UpdateCoeffs());
132  }
133 }

References ASSERTL0, and Evaluate().

◆ EvaluateExp()

void Nektar::SolverUtils::SessionFunction::EvaluateExp ( std::string  pFieldName,
Array< OneD, NekDouble > &  pArray,
const NekDouble pTime = 0.0,
const int  domain = 0 
)
private

Evaluates a function from expression

Parameters
pFieldNameThe name of the field to evaluate the function for.
pArrayThe array into which to write the values.
pTimeThe time at which to evaluate the function.
domainThe domain to evaluate the function in.

Definition at line 245 of file SessionFunction.cpp.

249 {
250  unsigned int nq = m_field->GetNpoints();
251  if (pArray.size() < nq)
252  {
253  pArray = Array<OneD, NekDouble>(nq);
254  }
255 
256  Array<OneD, NekDouble> x0(nq);
257  Array<OneD, NekDouble> x1(nq);
258  Array<OneD, NekDouble> x2(nq);
259 
260  // Get the coordinates (assuming all fields have the same
261  // discretisation)
262  m_field->GetCoords(x0, x1, x2);
264  m_session->GetFunction(m_name, pFieldName, domain);
265 
266  ffunc->Evaluate(x0, x1, x2, pTime, pArray);
267 }

References m_field, m_name, and m_session.

Referenced by Evaluate().

◆ EvaluateFld()

void Nektar::SolverUtils::SessionFunction::EvaluateFld ( std::string  pFieldName,
Array< OneD, NekDouble > &  pArray,
const NekDouble pTime = 0.0,
const int  domain = 0 
)
private

Evaluates a function from fld file

Parameters
pFieldNameThe name of the field to evaluate the function for.
pArrayThe array into which to write the values.
pTimeThe time at which to evaluate the function.
domainThe domain to evaluate the function in.

Definition at line 277 of file SessionFunction.cpp.

281 {
282  unsigned int nq = m_field->GetNpoints();
283  if (pArray.size() < nq)
284  {
285  pArray = Array<OneD, NekDouble>(nq);
286  }
287 
288  std::string filename =
289  m_session->GetFunctionFilename(m_name, pFieldName, domain);
290  std::string fileVar =
291  m_session->GetFunctionFilenameVariable(m_name, pFieldName, domain);
292 
293  if (fileVar.length() == 0)
294  {
295  fileVar = pFieldName;
296  }
297 
298  // In case of eFunctionTypeTransientFile, generate filename from
299  // format string
301  m_session->GetFunctionType(m_name, pFieldName, domain);
303  {
304  try
305  {
306 #if (defined _WIN32 && _MSC_VER < 1900)
307  // We need this to make sure boost::format has always
308  // two digits in the exponents of Scientific notation.
309  unsigned int old_exponent_format;
310  old_exponent_format = _set_output_format(_TWO_DIGIT_EXPONENT);
311  filename = boost::str(boost::format(filename) % pTime);
312  _set_output_format(old_exponent_format);
313 #else
314  filename = boost::str(boost::format(filename) % pTime);
315 #endif
316  }
317  catch (...)
318  {
319  ASSERTL0(false,
320  "Invalid Filename in function \"" + m_name +
321  "\", variable \"" + fileVar + "\"")
322  }
323  }
324 
325  // Define list of global element ids
326  int numexp = m_field->GetExpSize();
327  Array<OneD, int> ElementGIDs(numexp);
328  for (int i = 0; i < numexp; ++i)
329  {
330  ElementGIDs[i] = m_field->GetExp(i)->GetGeom()->GetGlobalID();
331  }
332 
333  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
334  std::vector<std::vector<NekDouble> > FieldData;
337  fldIO->Import(filename,
338  FieldDef,
339  FieldData,
341  ElementGIDs);
342 
343  int idx = -1;
344  Array<OneD, NekDouble> vCoeffs(m_field->GetNcoeffs(), 0.0);
345  // Loop over all the expansions
346  for (int i = 0; i < FieldDef.size(); ++i)
347  {
348  // Find the index of the required field in the
349  // expansion segment
350  for (int j = 0; j < FieldDef[i]->m_fields.size(); ++j)
351  {
352  if (FieldDef[i]->m_fields[j] == fileVar)
353  {
354  idx = j;
355  }
356  }
357 
358  if (idx >= 0)
359  {
360  m_field->ExtractDataToCoeffs(
361  FieldDef[i], FieldData[i], FieldDef[i]->m_fields[idx], vCoeffs);
362  }
363  else
364  {
365  cout << "Field " + fileVar + " not found." << endl;
366  }
367  }
368 
369  m_field->BwdTrans_IterPerExp(vCoeffs, pArray);
370 }
static std::shared_ptr< FieldIO > CreateForFile(const LibUtilities::SessionReaderSharedPtr session, const std::string &filename)
Construct a FieldIO object for a given input filename.
Definition: FieldIO.cpp:226
std::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:306
static FieldMetaDataMap NullFieldMetaDataMap
Definition: FieldIO.h:53

References ASSERTL0, Nektar::LibUtilities::FieldIO::CreateForFile(), Nektar::LibUtilities::eFunctionTypeTransientFile, CellMLToNektar.pycml::format, m_field, m_name, m_session, and Nektar::LibUtilities::NullFieldMetaDataMap.

Referenced by Evaluate().

◆ EvaluatePts()

void Nektar::SolverUtils::SessionFunction::EvaluatePts ( std::string  pFieldName,
Array< OneD, NekDouble > &  pArray,
const NekDouble pTime = 0.0,
const int  domain = 0 
)
private

Evaluates a function from pts file.

Evaluates a function from pts file

Parameters
pFieldNameThe name of the field to evaluate the function for.
pArrayThe array into which to write the values.
pTimeThe time at which to evaluate the function.
domainThe domain to evaluate the function in.

Definition at line 380 of file SessionFunction.cpp.

384 {
385  unsigned int nq = m_field->GetNpoints();
386  if (pArray.size() < nq)
387  {
388  pArray = Array<OneD, NekDouble>(nq);
389  }
390 
391  std::string filename =
392  m_session->GetFunctionFilename(m_name, pFieldName, domain);
393  std::string fileVar =
394  m_session->GetFunctionFilenameVariable(m_name, pFieldName, domain);
395 
396  if (fileVar.length() == 0)
397  {
398  fileVar = pFieldName;
399  }
400 
401  // In case of eFunctionTypeTransientFile, generate filename from
402  // format string
404  m_session->GetFunctionType(m_name, pFieldName, domain);
406  {
407  try
408  {
409 #if (defined _WIN32 && _MSC_VER < 1900)
410  // We need this to make sure boost::format has always
411  // two digits in the exponents of Scientific notation.
412  unsigned int old_exponent_format;
413  old_exponent_format = _set_output_format(_TWO_DIGIT_EXPONENT);
414  filename = boost::str(boost::format(filename) % pTime);
415  _set_output_format(old_exponent_format);
416 #else
417  filename = boost::str(boost::format(filename) % pTime);
418 #endif
419  }
420  catch (...)
421  {
422  ASSERTL0(false,
423  "Invalid Filename in function \"" + m_name +
424  "\", variable \"" + fileVar + "\"")
425  }
426  }
427 
429  // check if we already loaded this file. For transient files,
430  // funcFilename != filename so we can make sure we only keep the
431  // latest pts field per funcFilename.
432  std::string funcFilename =
433  m_session->GetFunctionFilename(m_name, pFieldName, domain);
434 
436  if (boost::filesystem::path(filename).extension() == ".pts")
437  {
438  LibUtilities::PtsIO ptsIO(m_session->GetComm());
439  ptsIO.Import(filename, inPts);
440  }
441  else if (boost::filesystem::path(filename).extension() == ".csv")
442  {
443  LibUtilities::CsvIO csvIO(m_session->GetComm());
444  csvIO.Import(filename, inPts);
445  }
446  else
447  {
448  ASSERTL1(false, "Unsupported file type");
449  }
450 
451 
452  Array<OneD, Array<OneD, NekDouble> > pts(inPts->GetDim() +
453  inPts->GetNFields());
454  for (int i = 0; i < inPts->GetDim() + inPts->GetNFields(); ++i)
455  {
456  pts[i] = Array<OneD, NekDouble>(nq);
457  }
458  if (inPts->GetDim() == 1)
459  {
460  m_field->GetCoords(pts[0]);
461  }
462  else if (inPts->GetDim() == 2)
463  {
464  m_field->GetCoords(pts[0], pts[1]);
465  }
466  else if (inPts->GetDim() == 3)
467  {
468  m_field->GetCoords(pts[0], pts[1], pts[2]);
469  }
471  inPts->GetDim(), inPts->GetFieldNames(), pts);
472 
473  FieldUtils::Interpolator interp;
474  if (m_interpolators.find(funcFilename) != m_interpolators.end())
475  {
476  interp = m_interpolators[funcFilename];
477  }
478  else
479  {
480  interp = FieldUtils::Interpolator(LibUtilities::eShepard);
481  if (m_session->GetComm()->GetRank() == 0)
482  {
483  interp.SetProgressCallback(&SessionFunction::PrintProgressbar,
484  this);
485  }
486  interp.CalcWeights(inPts, outPts);
487  if (m_session->GetComm()->GetRank() == 0)
488  {
489  cout << endl;
490  if (m_session->DefinesCmdLineArgument("verbose"))
491  {
492  interp.PrintStatistics();
493  }
494  }
495  }
496 
497  if (m_toCache)
498  {
499  m_interpolators[funcFilename] = interp;
500  }
501 
502  // TODO: only interpolate the field we actually want
503  interp.Interpolate(inPts, outPts);
504 
505  int fieldInd;
506  vector<string> fieldNames = outPts->GetFieldNames();
507  for (fieldInd = 0; fieldInd < fieldNames.size(); ++fieldInd)
508  {
509  if (outPts->GetFieldName(fieldInd) == fileVar)
510  {
511  break;
512  }
513  }
514  ASSERTL0(fieldInd != fieldNames.size(), "field not found");
515 
516  pArray = outPts->GetPts(fieldInd + outPts->GetDim());
517 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
SOLVER_UTILS_EXPORT void PrintProgressbar(const int position, const int goal) const
std::map< std::string, FieldUtils::Interpolator > m_interpolators
Interpolator for pts file input for a variable & domain combination.
std::shared_ptr< PtsField > PtsFieldSharedPtr
Definition: PtsField.h:182

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, Nektar::LibUtilities::Interpolator::CalcWeights(), Nektar::LibUtilities::eFunctionTypeTransientFile, Nektar::LibUtilities::eShepard, CellMLToNektar.pycml::format, Nektar::LibUtilities::PtsIO::Import(), Nektar::FieldUtils::Interpolator::Interpolate(), m_field, m_interpolators, m_name, m_session, m_toCache, PrintProgressbar(), Nektar::LibUtilities::Interpolator::PrintStatistics(), and Nektar::LibUtilities::Interpolator::SetProgressCallback().

Referenced by Evaluate().

◆ GetExpansion()

SOLVER_UTILS_EXPORT const MultiRegions::ExpListSharedPtr& Nektar::SolverUtils::SessionFunction::GetExpansion ( )
inline

Definition at line 105 of file SessionFunction.h.

106  {
107  return m_field;
108  }

References m_field.

◆ GetSession()

SOLVER_UTILS_EXPORT const LibUtilities::SessionReaderSharedPtr& Nektar::SolverUtils::SessionFunction::GetSession ( )
inline

Definition at line 100 of file SessionFunction.h.

101  {
102  return m_session;
103  }

References m_session.

◆ PrintProgressbar()

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::SessionFunction::PrintProgressbar ( const int  position,
const int  goal 
) const
inlineprivate

Definition at line 144 of file SessionFunction.h.

146  {
147  LibUtilities::PrintProgressbar(position, goal, "Interpolating");
148  }
int PrintProgressbar(const int position, const int goal, const std::string message, int lastprogress=-1)
Prints a progressbar.
Definition: Progressbar.hpp:67

References Nektar::LibUtilities::PrintProgressbar().

Referenced by EvaluatePts().

Member Data Documentation

◆ m_arrays

std::map<std::pair<std::string, int>, Array<OneD, NekDouble> > Nektar::SolverUtils::SessionFunction::m_arrays
private

Cached result arrays.

Definition at line 124 of file SessionFunction.h.

Referenced by Evaluate().

◆ m_field

MultiRegions::ExpListSharedPtr Nektar::SolverUtils::SessionFunction::m_field
private

The expansion we want to evaluate this function for.

Definition at line 114 of file SessionFunction.h.

Referenced by Evaluate(), EvaluateExp(), EvaluateFld(), EvaluatePts(), and GetExpansion().

◆ m_interpolators

std::map<std::string, FieldUtils::Interpolator> Nektar::SolverUtils::SessionFunction::m_interpolators
private

Interpolator for pts file input for a variable & domain combination.

Definition at line 122 of file SessionFunction.h.

Referenced by EvaluatePts().

◆ m_lastCached

std::map<std::pair<std::string, int>, NekDouble> Nektar::SolverUtils::SessionFunction::m_lastCached
private

Last time the cache for this variable & domain combo was updated.

Definition at line 120 of file SessionFunction.h.

Referenced by Evaluate().

◆ m_name

std::string Nektar::SolverUtils::SessionFunction::m_name
private

◆ m_session

LibUtilities::SessionReaderSharedPtr Nektar::SolverUtils::SessionFunction::m_session
private

The session reader.

Definition at line 112 of file SessionFunction.h.

Referenced by Describe(), Evaluate(), EvaluateExp(), EvaluateFld(), EvaluatePts(), GetSession(), and SessionFunction().

◆ m_toCache

bool Nektar::SolverUtils::SessionFunction::m_toCache
private

Store resulting arrays (and interpolators)

Definition at line 118 of file SessionFunction.h.

Referenced by Evaluate(), and EvaluatePts().