ReadSpecThirdOrderPiecewisePolynomial.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 #include <map>
8 #include <string>
9 #include <unordered_map>
10 
11 namespace gsl {
12 template <class T>
13 class not_null;
14 } // namespace gsl
15 
16 namespace domain::FunctionsOfTime {
17 template <size_t max_deriv>
18 class PiecewisePolynomial;
19 
20 /// \brief Import SpEC `FunctionOfTime` data from an H5 file.
21 ///
22 /// Columns in the file to be read must have the following form:
23 /// - 0 = time
24 /// - 1 = time of last update
25 /// - 2 = number of components
26 /// - 3 = maximum derivative order
27 /// - 4 = version
28 /// - 5 = function
29 /// - 6 = d/dt (function)
30 /// - 7 = d^2/dt^2 (function)
31 /// - 8 = d^3/dt^3 (function)
32 ///
33 /// If the function has more than one component, columns 5-8 give
34 /// the first component and its derivatives, columns 9-12 give the second
35 /// component and its derivatives, etc.
36 ///
37 /// Currently, only support order 3 piecewise polynomials.
38 /// This could be generalized later, but the SpEC functions of time
39 /// that we will read in with this action will always be 3rd-order
40 /// piecewise polynomials.
41 ///
45  spec_functions_of_time,
46  const std::string& file_name,
47  const std::map<std::string, std::string>& dataset_name_map) noexcept;
48 } // namespace domain::FunctionsOfTime
std::string
domain::FunctionsOfTime::read_spec_third_order_piecewise_polynomial
void read_spec_third_order_piecewise_polynomial(gsl::not_null< std::unordered_map< std::string, domain::FunctionsOfTime::PiecewisePolynomial< 3 >> * > 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.
domain::FunctionsOfTime::PiecewisePolynomial
A function that has a piecewise-constant MaxDerivth derivative.
Definition: PiecewisePolynomial.hpp:22
domain::FunctionsOfTime
Contains functions of time to support the dual frame system.
Definition: FunctionOfTime.hpp:17
cstddef
map
unordered_map
gsl
Implementations from the Guideline Support Library.
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:11
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:13
string