30#include <fmt/format.h>
37namespace triqs::mesh {
70 class C2PY_RENAME(MeshReTime)
retime :
public detail::linear<retime, double> {
83 C2PY_DEPRECATED_PARAMETER_NAME(n_max : n_t)
93 retime(std::pair<double, double> window,
int n_t) :
retime(window.first, window.second, n_t) {}
96 [[nodiscard]] C2PY_PROPERTY_GET(
t_min)
double t_min() const noexcept {
return a_; }
99 [[nodiscard]] C2PY_PROPERTY_GET(
t_max)
double t_max() const noexcept {
return b_; }
102 [[nodiscard]]
static std::string
hdf5_format() {
return "MeshReTime"; }
130 return sout << fmt::format(
"Real time mesh with t_min = {}, t_max = {}, N = {}", m.a_, m.b_, m.N_);
145 auto evaluate(
retime const &m,
auto const &f,
double t) {
return m.
evaluate(f, t); }
retime(double t_min=0.0, double t_max=0.0, long n_t=0)
Construct a real time mesh on the interval with equally spaced mesh points.
Mesh point of a triqs::mesh::detail::linear mesh.
auto evaluate(auto const &f, double x) const
Linear interpolation of a function defined on a triqs::mesh::detail::linear mesh at a value .
void h5_write_impl(h5::group g, std::string const &name, const char *format) const
Write the mesh to HDF5.
void h5_read_impl(h5::group g, std::string const &name, const char *exp_format)
Read the mesh from HDF5.
retime(std::pair< double, double > window, int n_t)
Construct a real time mesh on the interval with equally spaced mesh points.
double t_min() const noexcept
Get the lower bound of the interval , i.e. the value of the first mesh point.
friend std::ostream & operator<<(std::ostream &sout, retime const &m)
Write a triqs::mesh::retime mesh to a std::ostream.
friend void h5_write(h5::group g, std::string const &name, retime const &m)
Write a triqs::mesh::retime mesh to HDF5.
retime(double t_min=0.0, double t_max=0.0, long n_t=0)
Construct a real time mesh on the interval with equally spaced mesh points.
static std::string hdf5_format()
Get the HDF5 format tag.
detail::linear< retime, double >::mesh_point_t mesh_point_t
Mesh point type of a triqs::mesh::retime mesh (see triqs::mesh::detail::linear::mesh_point_t).
double t_max() const noexcept
Get the upper bound of the interval , i.e. the value of the last mesh point.
friend void h5_read(h5::group g, std::string const &name, retime &m)
Read a triqs::mesh::retime mesh from HDF5.
Provides a linear mesh type with equally spaced mesh points on an interval.
Common macros used in TRIQS.