31#include <fmt/format.h>
38namespace triqs::mesh {
72 class C2PY_RENAME(MeshReFreq)
refreq :
public detail::linear<refreq, double>,
public tail_fitter_handle {
85 C2PY_DEPRECATED_PARAMETER_NAME(n_max : n_w)
95 refreq(std::pair<double, double> window,
int n_w) :
refreq(window.first, window.second, n_w) {}
101 [[nodiscard]] C2PY_PROPERTY_GET(
w_min)
double w_min()
const {
return a_; }
104 [[nodiscard]] C2PY_PROPERTY_GET(
w_max)
double w_max()
const {
return b_; }
107 [[nodiscard]]
static std::string
hdf5_format() {
return "MeshReFreq"; }
135 return sout << fmt::format(
"Real frequency mesh with w_min = {}, w_max = {}, N = {}", m.a_, m.b_, m.N_);
150 auto evaluate(
refreq const &m,
auto const &f,
double w) {
return m.
evaluate(f, w); }
refreq(double w_min=0.0, double w_max=0.0, long n_w=0)
Construct a real frequency 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.
Real frequency mesh type.
static std::string hdf5_format()
Get the HDF5 format tag.
friend std::ostream & operator<<(std::ostream &sout, refreq const &m)
Write a triqs::mesh::refreq mesh to a std::ostream.
detail::linear< refreq, double >::mesh_point_t mesh_point_t
Mesh point type of a triqs::mesh::refreq mesh (see triqs::mesh::detail::linear::mesh_point_t).
friend void h5_write(h5::group g, std::string const &name, refreq const &m)
Write a triqs::mesh::refreq mesh to HDF5.
friend void h5_read(h5::group g, std::string const &name, refreq &m)
Read a triqs::mesh::refreq mesh from HDF5.
double w_min() const
Get the lower bound of the interval , i.e. the value of the first mesh point.
refreq(std::pair< double, double > window, int n_w)
Construct a real frequency mesh on the interval with equally spaced mesh points.
double w_max() const
Get the upper bound of the interval , i.e. the value of the last mesh point.
refreq(double w_min=0.0, double w_max=0.0, long n_w=0)
Construct a real frequency mesh on the interval with equally spaced mesh points.
static constexpr bool positive_only()
Is the mesh restricted to positive frequencies?
Provides a linear mesh type with equally spaced mesh points on an interval.
Common macros used in TRIQS.
Provides tail fitting for functions defined on frequency meshes.