SpECTRE  2021.08.02
domain::FunctionsOfTime Namespace Reference

Contains functions of time to support the dual frame system. More...

Classes

class  FixedSpeedCubic
 Sets \(f(t)\) and derivatives using cubic rational functions, such that the first derivative approaches a constant and the second derivative approaches zero. More...
 
class  FunctionOfTime
 Base class for FunctionsOfTime. More...
 
class  PiecewisePolynomial
 A function that has a piecewise-constant MaxDerivth derivative. More...
 
class  SettleToConstant
 Given an initial function of time, transitions the map to a constant-in-time value. More...
 

Functions

bool operator!= (const FixedSpeedCubic &lhs, const FixedSpeedCubic &rhs) noexcept
 
template<size_t MaxDeriv>
bool operator!= (const PiecewisePolynomial< MaxDeriv > &lhs, const PiecewisePolynomial< MaxDeriv > &rhs) noexcept
 
template<size_t MaxDeriv>
void read_spec_piecewise_polynomial (gsl::not_null< std::unordered_map< std::string, domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv > > * > spec_functions_of_time, const std::string &file_name, const std::map< std::string, std::string > &dataset_name_map) noexcept
 Import SpEC FunctionOfTime data from an H5 file. More...
 
void register_derived_with_charm () noexcept
 
bool operator!= (const SettleToConstant &lhs, const SettleToConstant &rhs) noexcept
 

Detailed Description

Contains functions of time to support the dual frame system.

Function Documentation

◆ read_spec_piecewise_polynomial()

template<size_t MaxDeriv>
void domain::FunctionsOfTime::read_spec_piecewise_polynomial ( gsl::not_null< std::unordered_map< std::string, domain::FunctionsOfTime::PiecewisePolynomial< MaxDeriv > > * >  spec_functions_of_time,
const std::string file_name,
const std::map< std::string, std::string > &  dataset_name_map 
)
noexcept

Import SpEC FunctionOfTime data from an H5 file.

Columns in the file to be read must have the following form:

  • 0 = time
  • 1 = time of last update
  • 2 = number of components
  • 3 = maximum derivative order
  • 4 = version
  • 5 = function
  • 6 = d/dt (function)
  • 7 = d^2/dt^2 (function)
  • 8 = d^3/dt^3 (function)

If the function has more than one component, columns 5-8 give the first component and its derivatives, columns 9-12 give the second component and its derivatives, etc.

Currently, only support order 3 piecewise polynomials. This could be generalized later, but the SpEC functions of time that we will read in with this action will always be 3rd-order piecewise polynomials.