mirror of
https://github.com/triqs/dft_tools
synced 2024-10-31 11:13:46 +01:00
gfs: change the name of the mesh -> gf_mesh for gcc
gcc has a pb because the template mesh<Variable,Opt> has the name same as the gf mesh method (!). Clang is fine however on this... Solution : rename the template mesh<...> to gf_mesh... Not very elegant, but ok.
This commit is contained in:
parent
0f524b26fc
commit
b45045e81c
@ -5,7 +5,7 @@ cdef extern from "triqs/gfs/imfreq.hpp" namespace "triqs::gfs" :
|
|||||||
statistic_enum statistic
|
statistic_enum statistic
|
||||||
imfreq_domain ()
|
imfreq_domain ()
|
||||||
|
|
||||||
cdef cppclass mesh_imfreq "triqs::gfs::mesh<triqs::gfs::imfreq>" :
|
cdef cppclass mesh_imfreq "triqs::gfs::gf_mesh<triqs::gfs::imfreq>" :
|
||||||
mesh_imfreq ()
|
mesh_imfreq ()
|
||||||
mesh_imfreq (mesh_imfreq &)
|
mesh_imfreq (mesh_imfreq &)
|
||||||
imfreq_domain & domain()
|
imfreq_domain & domain()
|
||||||
@ -13,7 +13,7 @@ cdef extern from "triqs/gfs/imfreq.hpp" namespace "triqs::gfs" :
|
|||||||
long size()
|
long size()
|
||||||
bint operator ==( mesh_imfreq &)
|
bint operator ==( mesh_imfreq &)
|
||||||
|
|
||||||
cdef mesh_imfreq make_mesh_imfreq "triqs::gfs::mesh<triqs::gfs::imfreq>" (double beta, statistic_enum S, size_t n_max)
|
cdef mesh_imfreq make_mesh_imfreq "triqs::gfs::gf_mesh<triqs::gfs::imfreq>" (double beta, statistic_enum S, size_t n_max)
|
||||||
#cdef mesh_imfreq make_mesh_imfreq "triqs::gfs::gf_implementation::gf_factories<triqs::gfs::imfreq,triqs::gfs::matrix>::make_mesh" (double beta, statistic_enum S, size_t n_max)
|
#cdef mesh_imfreq make_mesh_imfreq "triqs::gfs::gf_implementation::gf_factories<triqs::gfs::imfreq,triqs::gfs::matrix>::make_mesh" (double beta, statistic_enum S, size_t n_max)
|
||||||
|
|
||||||
cdef cppclass gf_imfreq "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::imfreq> >" :
|
cdef cppclass gf_imfreq "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::imfreq> >" :
|
||||||
|
@ -5,7 +5,7 @@ cdef extern from "triqs/gfs/imtime.hpp" namespace "triqs::gfs" :
|
|||||||
statistic_enum statistic
|
statistic_enum statistic
|
||||||
imtime_domain ()
|
imtime_domain ()
|
||||||
|
|
||||||
cdef cppclass mesh_imtime "triqs::gfs::mesh<triqs::gfs::imtime>" :
|
cdef cppclass mesh_imtime "triqs::gfs::gf_mesh<triqs::gfs::imtime>" :
|
||||||
mesh_imtime ()
|
mesh_imtime ()
|
||||||
mesh_imtime (mesh_imtime &)
|
mesh_imtime (mesh_imtime &)
|
||||||
imtime_domain & domain()
|
imtime_domain & domain()
|
||||||
@ -14,7 +14,7 @@ cdef extern from "triqs/gfs/imtime.hpp" namespace "triqs::gfs" :
|
|||||||
long kind()
|
long kind()
|
||||||
bint operator ==( mesh_imtime &)
|
bint operator ==( mesh_imtime &)
|
||||||
|
|
||||||
cdef mesh_imtime make_mesh_imtime "triqs::gfs::mesh<triqs::gfs::imtime>" (double beta, statistic_enum S, size_t n_time_slices, mesh_enum mk)
|
cdef mesh_imtime make_mesh_imtime "triqs::gfs::gf_mesh<triqs::gfs::imtime>" (double beta, statistic_enum S, size_t n_time_slices, mesh_enum mk)
|
||||||
#cdef mesh_imtime make_mesh_imtime "triqs::gfs::gf_factories<triqs::gfs::imtime>::make_mesh" (double beta, statistic_enum S, size_t n_time_slices, mesh_enum mk)
|
#cdef mesh_imtime make_mesh_imtime "triqs::gfs::gf_factories<triqs::gfs::imtime>::make_mesh" (double beta, statistic_enum S, size_t n_time_slices, mesh_enum mk)
|
||||||
|
|
||||||
cdef cppclass gf_imtime "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::imtime>>" :
|
cdef cppclass gf_imtime "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::imtime>>" :
|
||||||
|
@ -6,14 +6,14 @@ cdef extern from "triqs/gfs/legendre.hpp" namespace "triqs::gfs" :
|
|||||||
statistic_enum statistic
|
statistic_enum statistic
|
||||||
legendre_domain ()
|
legendre_domain ()
|
||||||
|
|
||||||
cdef cppclass mesh_legendre "triqs::gfs::mesh<triqs::gfs::legendre>" :
|
cdef cppclass mesh_legendre "triqs::gfs::gf_mesh<triqs::gfs::legendre>" :
|
||||||
mesh_legendre ()
|
mesh_legendre ()
|
||||||
mesh_legendre (mesh_legendre &)
|
mesh_legendre (mesh_legendre &)
|
||||||
legendre_domain & domain()
|
legendre_domain & domain()
|
||||||
long size()
|
long size()
|
||||||
bint operator == (mesh_legendre &)
|
bint operator == (mesh_legendre &)
|
||||||
|
|
||||||
cdef mesh_legendre make_mesh_legendre "triqs::gfs::mesh<triqs::gfs::legendre>" (double beta, statistic_enum S, size_t n_leg)
|
cdef mesh_legendre make_mesh_legendre "triqs::gfs::gf_mesh<triqs::gfs::legendre>" (double beta, statistic_enum S, size_t n_leg)
|
||||||
#cdef mesh_legendre make_mesh_legendre "triqs::gfs::gf_factories<triqs::gfs::legendre>::make_mesh" (double beta, statistic_enum S, size_t n_leg)
|
#cdef mesh_legendre make_mesh_legendre "triqs::gfs::gf_factories<triqs::gfs::legendre>::make_mesh" (double beta, statistic_enum S, size_t n_leg)
|
||||||
|
|
||||||
cdef cppclass gf_legendre "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::legendre>>" :
|
cdef cppclass gf_legendre "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::legendre>>" :
|
||||||
|
@ -3,7 +3,7 @@ cdef extern from "triqs/gfs/refreq.hpp" namespace "triqs::gfs" :
|
|||||||
cdef cppclass refreq_domain :
|
cdef cppclass refreq_domain :
|
||||||
refreq_domain()
|
refreq_domain()
|
||||||
|
|
||||||
cdef cppclass mesh_refreq "triqs::gfs::mesh<triqs::gfs::refreq>" :
|
cdef cppclass mesh_refreq "triqs::gfs::gf_mesh<triqs::gfs::refreq>" :
|
||||||
mesh_refreq ()
|
mesh_refreq ()
|
||||||
mesh_refreq (mesh_refreq &)
|
mesh_refreq (mesh_refreq &)
|
||||||
refreq_domain & domain()
|
refreq_domain & domain()
|
||||||
@ -13,7 +13,7 @@ cdef extern from "triqs/gfs/refreq.hpp" namespace "triqs::gfs" :
|
|||||||
double kind()
|
double kind()
|
||||||
bint operator ==( mesh_refreq &)
|
bint operator ==( mesh_refreq &)
|
||||||
|
|
||||||
cdef mesh_refreq make_mesh_refreq "triqs::gfs::mesh<triqs::gfs::refreq>" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk)
|
cdef mesh_refreq make_mesh_refreq "triqs::gfs::gf_mesh<triqs::gfs::refreq>" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk)
|
||||||
#cdef mesh_refreq make_mesh_refreq "triqs::gfs::gf_factories<triqs::gfs::refreq>::make_mesh" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk)
|
#cdef mesh_refreq make_mesh_refreq "triqs::gfs::gf_factories<triqs::gfs::refreq>::make_mesh" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk)
|
||||||
|
|
||||||
cdef cppclass gf_refreq "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::refreq>>" :
|
cdef cppclass gf_refreq "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::refreq>>" :
|
||||||
|
@ -3,7 +3,7 @@ cdef extern from "triqs/gfs/retime.hpp" namespace "triqs::gfs" :
|
|||||||
cdef cppclass retime_domain :
|
cdef cppclass retime_domain :
|
||||||
retime_domain()
|
retime_domain()
|
||||||
|
|
||||||
cdef cppclass mesh_retime "triqs::gfs::mesh<triqs::gfs::retime>" :
|
cdef cppclass mesh_retime "triqs::gfs::gf_mesh<triqs::gfs::retime>" :
|
||||||
mesh_retime ()
|
mesh_retime ()
|
||||||
mesh_retime (mesh_retime &)
|
mesh_retime (mesh_retime &)
|
||||||
retime_domain & domain()
|
retime_domain & domain()
|
||||||
@ -13,7 +13,7 @@ cdef extern from "triqs/gfs/retime.hpp" namespace "triqs::gfs" :
|
|||||||
double kind()
|
double kind()
|
||||||
bint operator ==( mesh_retime &)
|
bint operator ==( mesh_retime &)
|
||||||
|
|
||||||
cdef mesh_retime make_mesh_retime "triqs::gfs::mesh<triqs::gfs::retime>" (double t_min, double t_max, size_t n_freq, mesh_enum mk)
|
cdef mesh_retime make_mesh_retime "triqs::gfs::gf_mesh<triqs::gfs::retime>" (double t_min, double t_max, size_t n_freq, mesh_enum mk)
|
||||||
#cdef mesh_retime make_mesh_retime "triqs::gfs::gf_factories<triqs::gfs::retime>::make_mesh" (double t_min, double t_max, size_t n_freq, mesh_enum mk)
|
#cdef mesh_retime make_mesh_retime "triqs::gfs::gf_factories<triqs::gfs::retime>::make_mesh" (double t_min, double t_max, size_t n_freq, mesh_enum mk)
|
||||||
|
|
||||||
cdef cppclass gf_retime "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::retime>>" :
|
cdef cppclass gf_retime "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::retime>>" :
|
||||||
|
@ -3,7 +3,7 @@ cdef extern from "triqs/gfs/two_real_times.hpp" namespace "triqs::gfs" :
|
|||||||
cdef cppclass two_real_times_domain :
|
cdef cppclass two_real_times_domain :
|
||||||
two_real_times_domain()
|
two_real_times_domain()
|
||||||
|
|
||||||
cdef cppclass mesh_two_real_times "triqs::gfs::mesh<triqs::gfs::two_real_times>" :
|
cdef cppclass mesh_two_real_times "triqs::gfs::gf_mesh<triqs::gfs::two_real_times>" :
|
||||||
mesh_two_real_times ()
|
mesh_two_real_times ()
|
||||||
mesh_two_real_times (mesh_two_real_times &)
|
mesh_two_real_times (mesh_two_real_times &)
|
||||||
two_real_times_domain & domain()
|
two_real_times_domain & domain()
|
||||||
@ -13,7 +13,7 @@ cdef extern from "triqs/gfs/two_real_times.hpp" namespace "triqs::gfs" :
|
|||||||
double kind()
|
double kind()
|
||||||
bint operator ==( mesh_two_real_times &)
|
bint operator ==( mesh_two_real_times &)
|
||||||
|
|
||||||
cdef mesh_two_real_times make_mesh_two_real_times "triqs::gfs::mesh<triqs::gfs::two_real_times>" (double t_max, double n_time_slices)
|
cdef mesh_two_real_times make_mesh_two_real_times "triqs::gfs::gf_mesh<triqs::gfs::two_real_times>" (double t_max, double n_time_slices)
|
||||||
|
|
||||||
cdef mesh_retime & get_1d_mesh_from_2times_mesh "triqs::gfs::get_1d_mesh_from_2times_mesh" (mesh_two_real_times &)
|
cdef mesh_retime & get_1d_mesh_from_2times_mesh "triqs::gfs::get_1d_mesh_from_2times_mesh" (mesh_two_real_times &)
|
||||||
|
|
||||||
|
@ -34,11 +34,11 @@ try {
|
|||||||
auto G_w_tau= make_gf<refreq_imtime, scalar_valued>(wmin, wmax, n_re_freq, beta, Fermion, n_im_time);
|
auto G_w_tau= make_gf<refreq_imtime, scalar_valued>(wmin, wmax, n_re_freq, beta, Fermion, n_im_time);
|
||||||
auto G_w= make_gf<refreq, scalar_valued>(wmin, wmax, n_re_freq);
|
auto G_w= make_gf<refreq, scalar_valued>(wmin, wmax, n_re_freq);
|
||||||
|
|
||||||
auto G_t_tau= make_gf<cartesian_product<retime,imtime>, scalar_valued>(mesh<retime>(tmin, tmax, n_re_time), mesh<imtime>(beta, Fermion, n_im_time));
|
auto G_t_tau= make_gf<cartesian_product<retime,imtime>, scalar_valued>(gf_mesh<retime>(tmin, tmax, n_re_time), gf_mesh<imtime>(beta, Fermion, n_im_time));
|
||||||
//auto G_t_tau_N= make_gf<cartesian_product<retime,imtime>, scalar_valued>( {tmin, tmax, n_re_time}, {beta, Fermion, n_im_time});
|
//auto G_t_tau_N= make_gf<cartesian_product<retime,imtime>, scalar_valued>( {tmin, tmax, n_re_time}, {beta, Fermion, n_im_time});
|
||||||
|
|
||||||
auto G_w_wn2 = make_gf<cartesian_product<refreq,imfreq>, scalar_valued>( mesh<refreq>(wmin, wmax, n_re_freq), mesh<imfreq>(beta, Fermion, n_im_freq));
|
auto G_w_wn2 = make_gf<cartesian_product<refreq,imfreq>, scalar_valued>( gf_mesh<refreq>(wmin, wmax, n_re_freq), gf_mesh<imfreq>(beta, Fermion, n_im_freq));
|
||||||
auto G_w_tau2 = make_gf<cartesian_product<refreq,imtime>, scalar_valued>( mesh<refreq>(wmin, wmax, n_re_freq), mesh<imtime>(beta, Fermion, n_im_time,full_bins));
|
auto G_w_tau2 = make_gf<cartesian_product<refreq,imtime>, scalar_valued>( gf_mesh<refreq>(wmin, wmax, n_re_freq), gf_mesh<imtime>(beta, Fermion, n_im_time,full_bins));
|
||||||
|
|
||||||
|
|
||||||
//auto g_tau = slice_mesh1(G_w_tau(),1);
|
//auto g_tau = slice_mesh1(G_w_tau(),1);
|
||||||
|
@ -29,9 +29,9 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
struct block_index {};
|
struct block_index {};
|
||||||
|
|
||||||
template<typename Opt> struct mesh<block_index,Opt> : discrete_mesh<discrete_domain> {
|
template<typename Opt> struct gf_mesh<block_index,Opt> : discrete_mesh<discrete_domain> {
|
||||||
mesh() = default;
|
gf_mesh() = default;
|
||||||
mesh(size_t s) : discrete_mesh<discrete_domain>(s) {}
|
gf_mesh(size_t s) : discrete_mesh<discrete_domain>(s) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace gfs_implementation {
|
namespace gfs_implementation {
|
||||||
@ -66,7 +66,7 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
template<typename Target, typename Opt>
|
template<typename Target, typename Opt>
|
||||||
struct factories<block_index,Target,Opt> {
|
struct factories<block_index,Target,Opt> {
|
||||||
typedef mesh<block_index, Opt> mesh_t;
|
typedef gf_mesh<block_index, Opt> mesh_t;
|
||||||
typedef gf<block_index,Target> gf_t;
|
typedef gf<block_index,Target> gf_t;
|
||||||
typedef gf_view<block_index,Target> gf_view_t;
|
typedef gf_view<block_index,Target> gf_view_t;
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ namespace triqs { namespace gfs {
|
|||||||
Opt>
|
Opt>
|
||||||
curry (gf_impl<cartesian_product<Ms...>, Target,Opt,B> const & g) {
|
curry (gf_impl<cartesian_product<Ms...>, Target,Opt,B> const & g) {
|
||||||
auto comp = pv_<cartesian_product<Ms...>,pos...>::m(std::make_tuple(),g.mesh().components());
|
auto comp = pv_<cartesian_product<Ms...>,pos...>::m(std::make_tuple(),g.mesh().components());
|
||||||
typedef mesh< typename pv_<cartesian_product<Ms...>,pos...>::type,Opt> m_t;
|
typedef gf_mesh< typename pv_<cartesian_product<Ms...>,pos...>::type,Opt> m_t;
|
||||||
return {triqs::tuple::apply_construct<m_t>(comp),curry_polymorphic_lambda<gf_view<cartesian_product<Ms...>, Target,Opt>, pos ...>{g}, nothing(), nothing()};
|
return {triqs::tuple::apply_construct<m_t>(comp),curry_polymorphic_lambda<gf_view<cartesian_product<Ms...>, Target,Opt>, pos ...>{g}, nothing(), nothing()};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace triqs { namespace gfs {
|
|||||||
using arrays::make_shape;
|
using arrays::make_shape;
|
||||||
|
|
||||||
// GENERALISE matrxi TO DEFAULT
|
// GENERALISE matrxi TO DEFAULT
|
||||||
template<typename Variable, typename Opt=void> struct mesh;
|
template<typename Variable, typename Opt=void> struct gf_mesh;
|
||||||
template<typename Variable, typename Target=matrix_valued, typename Opt=void> class gf; // the regular type
|
template<typename Variable, typename Target=matrix_valued, typename Opt=void> class gf; // the regular type
|
||||||
template<typename Variable, typename Target=matrix_valued, typename Opt=void> class gf_view; // the view type
|
template<typename Variable, typename Target=matrix_valued, typename Opt=void> class gf_view; // the view type
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ namespace triqs { namespace gfs {
|
|||||||
typedef Variable variable_t;
|
typedef Variable variable_t;
|
||||||
typedef Opt option_t;
|
typedef Opt option_t;
|
||||||
|
|
||||||
typedef mesh<Variable,Opt> mesh_t;
|
typedef gf_mesh<Variable,Opt> mesh_t;
|
||||||
typedef typename mesh_t::domain_t domain_t;
|
typedef typename mesh_t::domain_t domain_t;
|
||||||
typedef typename mesh_t::mesh_point_t mesh_point_t;
|
typedef typename mesh_t::mesh_point_t mesh_point_t;
|
||||||
typedef typename mesh_t::index_t mesh_index_t;
|
typedef typename mesh_t::index_t mesh_index_t;
|
||||||
|
@ -29,11 +29,11 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
struct imfreq {};
|
struct imfreq {};
|
||||||
|
|
||||||
template<typename Opt> struct mesh<imfreq,Opt> : linear_mesh<matsubara_domain<true>> {
|
template<typename Opt> struct gf_mesh<imfreq,Opt> : linear_mesh<matsubara_domain<true>> {
|
||||||
typedef linear_mesh<matsubara_domain<true>> B;
|
typedef linear_mesh<matsubara_domain<true>> B;
|
||||||
static double m1(double beta) { return std::acos(-1)/beta;}
|
static double m1(double beta) { return std::acos(-1)/beta;}
|
||||||
mesh() = default;
|
gf_mesh() = default;
|
||||||
mesh (double beta, statistic_enum S, size_t Nmax = 1025) :
|
gf_mesh (double beta, statistic_enum S, size_t Nmax = 1025) :
|
||||||
B(typename B::domain_t(beta,S), S==Fermion?m1(beta):0, S==Fermion?(2*Nmax+1)*m1(beta): 2*Nmax*m1(beta), Nmax, without_last){}
|
B(typename B::domain_t(beta,S), S==Fermion?m1(beta):0, S==Fermion?(2*Nmax+1)*m1(beta): 2*Nmax*m1(beta), Nmax, without_last){}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -76,13 +76,13 @@ namespace triqs { namespace gfs {
|
|||||||
return gf_t ( std::forward<MeshType>(m), std::move(A), t, nothing() ) ;
|
return gf_t ( std::forward<MeshType>(m), std::move(A), t, nothing() ) ;
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape) {
|
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape) {
|
||||||
return make_gf(mesh<imfreq,Opt>(beta,S), shape, local::tail(shape));
|
return make_gf(gf_mesh<imfreq,Opt>(beta,S), shape, local::tail(shape));
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t Nmax) {
|
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t Nmax) {
|
||||||
return make_gf(mesh<imfreq,Opt>(beta,S,Nmax), shape, local::tail(shape));
|
return make_gf(gf_mesh<imfreq,Opt>(beta,S,Nmax), shape, local::tail(shape));
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t Nmax, local::tail_view const & t) {
|
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t Nmax, local::tail_view const & t) {
|
||||||
return make_gf(mesh<imfreq,Opt>(beta,S,Nmax), shape, t);
|
return make_gf(gf_mesh<imfreq,Opt>(beta,S,Nmax), shape, t);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -96,13 +96,13 @@ namespace triqs { namespace gfs {
|
|||||||
return gf_t ( std::forward<MeshType>(m), std::move(A), t, nothing() ) ;
|
return gf_t ( std::forward<MeshType>(m), std::move(A), t, nothing() ) ;
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S) {
|
static gf_t make_gf(double beta, statistic_enum S) {
|
||||||
return make_gf(mesh<imfreq,Opt>(beta,S), local::tail(tqa::mini_vector<size_t,2> (1,1)));
|
return make_gf(gf_mesh<imfreq,Opt>(beta,S), local::tail(tqa::mini_vector<size_t,2> (1,1)));
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S, size_t Nmax) {
|
static gf_t make_gf(double beta, statistic_enum S, size_t Nmax) {
|
||||||
return make_gf(mesh<imfreq,Opt>(beta,S,Nmax), local::tail(tqa::mini_vector<size_t,2> (1,1)));
|
return make_gf(gf_mesh<imfreq,Opt>(beta,S,Nmax), local::tail(tqa::mini_vector<size_t,2> (1,1)));
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S, size_t Nmax, local::tail_view const & t) {
|
static gf_t make_gf(double beta, statistic_enum S, size_t Nmax, local::tail_view const & t) {
|
||||||
return make_gf(mesh<imfreq,Opt>(beta,S,Nmax), t);
|
return make_gf(gf_mesh<imfreq,Opt>(beta,S,Nmax), t);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // gfs_implementation
|
} // gfs_implementation
|
||||||
|
@ -30,11 +30,11 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
struct imtime {};
|
struct imtime {};
|
||||||
|
|
||||||
// mesh type and its factories
|
// gf_mesh type and its factories
|
||||||
template<typename Opt> struct mesh<imtime,Opt> : linear_mesh<matsubara_domain<false>> {
|
template<typename Opt> struct gf_mesh<imtime,Opt> : linear_mesh<matsubara_domain<false>> {
|
||||||
typedef linear_mesh<matsubara_domain<false>> B;
|
typedef linear_mesh<matsubara_domain<false>> B;
|
||||||
mesh() = default;
|
gf_mesh() = default;
|
||||||
mesh (double beta, statistic_enum S, size_t n_time_slices, mesh_kind mk=half_bins):
|
gf_mesh (double beta, statistic_enum S, size_t n_time_slices, mesh_kind mk=half_bins):
|
||||||
B( typename B::domain_t(beta,S), 0, beta, n_time_slices, mk){}
|
B( typename B::domain_t(beta,S), 0, beta, n_time_slices, mk){}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -134,10 +134,10 @@ namespace triqs { namespace gfs {
|
|||||||
return gf_t (std::forward<MeshType>(m), std::move(A), t, nothing(), evaluator<imtime,matrix_valued,Opt>(shape[0],shape[1]) ) ;
|
return gf_t (std::forward<MeshType>(m), std::move(A), t, nothing(), evaluator<imtime,matrix_valued,Opt>(shape[0],shape[1]) ) ;
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t Nmax=1025, mesh_kind mk= half_bins) {
|
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t Nmax=1025, mesh_kind mk= half_bins) {
|
||||||
return make_gf(mesh<imtime,Opt>(beta,S,Nmax,mk), shape, local::tail(shape));
|
return make_gf(gf_mesh<imtime,Opt>(beta,S,Nmax,mk), shape, local::tail(shape));
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t Nmax, mesh_kind mk, local::tail_view const & t) {
|
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t Nmax, mesh_kind mk, local::tail_view const & t) {
|
||||||
return make_gf(mesh<imtime,Opt>(beta,S,Nmax,mk), shape, t);
|
return make_gf(gf_mesh<imtime,Opt>(beta,S,Nmax,mk), shape, t);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -150,10 +150,10 @@ namespace triqs { namespace gfs {
|
|||||||
return gf_t (std::forward<MeshType>(m), std::move(A), t, nothing());
|
return gf_t (std::forward<MeshType>(m), std::move(A), t, nothing());
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S, size_t Nmax=1025, mesh_kind mk= half_bins) {
|
static gf_t make_gf(double beta, statistic_enum S, size_t Nmax=1025, mesh_kind mk= half_bins) {
|
||||||
return make_gf(mesh<imtime,Opt>(beta,S,Nmax,mk), local::tail(tqa::mini_vector<size_t,2> (1,1)));
|
return make_gf(gf_mesh<imtime,Opt>(beta,S,Nmax,mk), local::tail(tqa::mini_vector<size_t,2> (1,1)));
|
||||||
}
|
}
|
||||||
static gf_t make_gf(double beta, statistic_enum S, size_t Nmax, mesh_kind mk, local::tail_view const & t) {
|
static gf_t make_gf(double beta, statistic_enum S, size_t Nmax, mesh_kind mk, local::tail_view const & t) {
|
||||||
return make_gf(mesh<imtime,Opt>(beta,S,Nmax,mk), t);
|
return make_gf(gf_mesh<imtime,Opt>(beta,S,Nmax,mk), t);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // gfs_implementation.
|
} // gfs_implementation.
|
||||||
|
@ -31,10 +31,10 @@ namespace triqs { namespace gfs {
|
|||||||
struct legendre {};
|
struct legendre {};
|
||||||
|
|
||||||
// mesh type and its factories
|
// mesh type and its factories
|
||||||
template<typename Opt> struct mesh<legendre,Opt> :discrete_mesh<legendre_domain> {
|
template<typename Opt> struct gf_mesh<legendre,Opt> :discrete_mesh<legendre_domain> {
|
||||||
typedef discrete_mesh<legendre_domain> B;
|
typedef discrete_mesh<legendre_domain> B;
|
||||||
mesh() = default;
|
gf_mesh() = default;
|
||||||
mesh(double beta, statistic_enum S, size_t n_leg) : B(typename B::domain_t(beta,S,n_leg)) {}
|
gf_mesh(double beta, statistic_enum S, size_t n_leg) : B(typename B::domain_t(beta,S,n_leg)) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace gfs_implementation {
|
namespace gfs_implementation {
|
||||||
@ -62,11 +62,11 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
template<typename Opt> struct factories<legendre, matrix_valued,Opt> {
|
template<typename Opt> struct factories<legendre, matrix_valued,Opt> {
|
||||||
typedef gf<legendre, matrix_valued,Opt> gf_t;
|
typedef gf<legendre, matrix_valued,Opt> gf_t;
|
||||||
typedef typename mesh<legendre, Opt>::type mesh_t;
|
typedef typename gf_mesh<legendre, Opt>::type mesh_t;
|
||||||
|
|
||||||
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t n_leg) {
|
static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector<size_t,2> shape, size_t n_leg) {
|
||||||
typename gf_t::data_regular_t A(shape.front_append(n_leg)); A() = 0;
|
typename gf_t::data_regular_t A(shape.front_append(n_leg)); A() = 0;
|
||||||
return gf_t(mesh<legendre,Opt>(beta, S, n_leg), std::move(A), nothing(), nothing());
|
return gf_t(gf_mesh<legendre,Opt>(beta, S, n_leg), std::move(A), nothing(), nothing());
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -32,10 +32,10 @@ namespace triqs { namespace gfs {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// the mesh is simply a cartesian product
|
// the mesh is simply a cartesian product
|
||||||
template<typename Opt, typename ... Ms> struct mesh<cartesian_product<Ms...>,Opt> : mesh_product< mesh<Ms,Opt> ... > {
|
template<typename Opt, typename ... Ms> struct gf_mesh<cartesian_product<Ms...>,Opt> : mesh_product< gf_mesh<Ms,Opt> ... > {
|
||||||
typedef mesh_product< mesh<Ms,Opt> ... > B;
|
typedef mesh_product< gf_mesh<Ms,Opt> ... > B;
|
||||||
typedef std::tuple<Ms...> mesh_name_t;
|
typedef std::tuple<Ms...> mesh_name_t;
|
||||||
mesh (mesh<Ms,Opt> ... ms) : B {std::move(ms)...} {}
|
gf_mesh (gf_mesh<Ms,Opt> ... ms) : B {std::move(ms)...} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace gfs_implementation {
|
namespace gfs_implementation {
|
||||||
@ -160,7 +160,7 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
template<typename ... Meshes>
|
template<typename ... Meshes>
|
||||||
static gf_t make_gf(Meshes && ... meshes) {
|
static gf_t make_gf(Meshes && ... meshes) {
|
||||||
auto m = mesh<cartesian_product<Ms...>,Opt>(meshes...);
|
auto m = gf_mesh<cartesian_product<Ms...>,Opt>(meshes...);
|
||||||
typename gf_t::data_regular_t A(m.size());
|
typename gf_t::data_regular_t A(m.size());
|
||||||
A() =0;
|
A() =0;
|
||||||
return gf_t (m, std::move(A), nothing(), nothing());
|
return gf_t (m, std::move(A), nothing(), nothing());
|
||||||
|
@ -31,12 +31,12 @@ namespace triqs { namespace gfs {
|
|||||||
struct re_im_freq {};
|
struct re_im_freq {};
|
||||||
|
|
||||||
// the mesh
|
// the mesh
|
||||||
template<typename Opt> struct mesh<re_im_freq,Opt> : mesh_product<mesh<refreq,Opt>,mesh<imfreq,Opt>> {
|
template<typename Opt> struct gf_mesh<re_im_freq,Opt> : mesh_product<gf_mesh<refreq,Opt>,gf_mesh<imfreq,Opt>> {
|
||||||
typedef mesh<refreq,Opt> m1_t;
|
typedef gf_mesh<refreq,Opt> m1_t;
|
||||||
typedef mesh<imfreq,Opt> m2_t;
|
typedef gf_mesh<imfreq,Opt> m2_t;
|
||||||
typedef mesh_product<m1_t,m2_t> B;
|
typedef mesh_product<m1_t,m2_t> B;
|
||||||
mesh (double wmin, double wmax, size_t n_freq_re, double beta, statistic_enum S, size_t n_freq_im) :
|
gf_mesh (double wmin, double wmax, size_t n_freq_re, double beta, statistic_enum S, size_t n_freq_im) :
|
||||||
B { mesh<refreq,Opt>(wmin,wmax,n_freq_re,full_bins), mesh<imfreq,Opt>(beta, S, n_freq_im)} {}
|
B { gf_mesh<refreq,Opt>(wmin,wmax,n_freq_re,full_bins), gf_mesh<imfreq,Opt>(beta, S, n_freq_im)} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace gfs_implementation {
|
namespace gfs_implementation {
|
||||||
@ -72,10 +72,10 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
template<typename Opt> struct factories<re_im_freq, scalar_valued,Opt> {
|
template<typename Opt> struct factories<re_im_freq, scalar_valued,Opt> {
|
||||||
typedef gf<re_im_freq, scalar_valued,Opt> gf_t;
|
typedef gf<re_im_freq, scalar_valued,Opt> gf_t;
|
||||||
// typedef typename mesh<re_im_freq, Opt>::type mesh_t;
|
// typedef typename gf_mesh<re_im_freq, Opt>::type mesh_t;
|
||||||
|
|
||||||
static gf_t make_gf(double wmin, double wmax, size_t nw, double beta, statistic_enum S, size_t nwn) {
|
static gf_t make_gf(double wmin, double wmax, size_t nw, double beta, statistic_enum S, size_t nwn) {
|
||||||
auto m = mesh<re_im_freq,Opt>(wmin, wmax, nw, beta, S, nwn);
|
auto m = gf_mesh<re_im_freq,Opt>(wmin, wmax, nw, beta, S, nwn);
|
||||||
typename gf_t::data_regular_t A(m.size());
|
typename gf_t::data_regular_t A(m.size());
|
||||||
A() =0;
|
A() =0;
|
||||||
return gf_t (m, std::move(A), gfs::make_gf<refreq,scalar_valued>(wmin, wmax, nw), nothing() ) ;
|
return gf_t (m, std::move(A), gfs::make_gf<refreq,scalar_valued>(wmin, wmax, nw), nothing() ) ;
|
||||||
|
@ -30,13 +30,13 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
struct re_im_time {};
|
struct re_im_time {};
|
||||||
|
|
||||||
// the mesh
|
// the gf_mesh
|
||||||
template<typename Opt> struct mesh<re_im_time,Opt> : mesh_product<mesh<retime,Opt>,mesh<imtime,Opt>> {
|
template<typename Opt> struct gf_mesh<re_im_time,Opt> : mesh_product<gf_mesh<retime,Opt>,gf_mesh<imtime,Opt>> {
|
||||||
typedef mesh<retime,Opt> m1_t;
|
typedef gf_mesh<retime,Opt> m1_t;
|
||||||
typedef mesh<imtime,Opt> m2_t;
|
typedef gf_mesh<imtime,Opt> m2_t;
|
||||||
typedef mesh_product<m1_t,m2_t> B;
|
typedef mesh_product<m1_t,m2_t> B;
|
||||||
mesh (double tmin, double tmax, size_t nt, double beta, statistic_enum S, size_t ntau, mesh_kind mk=full_bins) :
|
gf_mesh (double tmin, double tmax, size_t nt, double beta, statistic_enum S, size_t ntau, mesh_kind mk=full_bins) :
|
||||||
B {mesh<retime,Opt>(tmin,tmax,nt), mesh<imtime,Opt>(beta,S, ntau, mk)} {}
|
B {gf_mesh<retime,Opt>(tmin,tmax,nt), gf_mesh<imtime,Opt>(beta,S, ntau, mk)} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace gfs_implementation {
|
namespace gfs_implementation {
|
||||||
@ -86,7 +86,7 @@ namespace triqs { namespace gfs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gf_t make_gf(double tmin, double tmax, size_t nt, double beta, statistic_enum S, size_t ntau, mesh_kind mk=full_bins) {
|
static gf_t make_gf(double tmin, double tmax, size_t nt, double beta, statistic_enum S, size_t ntau, mesh_kind mk=full_bins) {
|
||||||
auto m = mesh<re_im_time,Opt>(tmin,tmax, nt, beta, S, ntau, mk);
|
auto m = gf_mesh<re_im_time,Opt>(tmin,tmax, nt, beta, S, ntau, mk);
|
||||||
typename gf_t::data_regular_t A(m.size());
|
typename gf_t::data_regular_t A(m.size());
|
||||||
A() =0;
|
A() =0;
|
||||||
return gf_t (m, std::move(A), nothing(), nothing());
|
return gf_t (m, std::move(A), nothing(), nothing());
|
||||||
|
@ -30,10 +30,10 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
struct refreq {};
|
struct refreq {};
|
||||||
|
|
||||||
template<typename Opt> struct mesh<refreq,Opt> : linear_mesh<R_domain> {
|
template<typename Opt> struct gf_mesh<refreq,Opt> : linear_mesh<R_domain> {
|
||||||
typedef linear_mesh<R_domain> B;
|
typedef linear_mesh<R_domain> B;
|
||||||
mesh() = default;
|
gf_mesh() = default;
|
||||||
mesh (double wmin, double wmax, size_t n_freq, mesh_kind mk=full_bins) :
|
gf_mesh (double wmin, double wmax, size_t n_freq, mesh_kind mk=full_bins) :
|
||||||
B(typename B::domain_t(), wmin, wmax, n_freq, mk){}
|
B(typename B::domain_t(), wmin, wmax, n_freq, mk){}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -82,12 +82,12 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
static gf_t make_gf(double wmin, double wmax, size_t n_freq, tqa::mini_vector<size_t,2> shape) {
|
static gf_t make_gf(double wmin, double wmax, size_t n_freq, tqa::mini_vector<size_t,2> shape) {
|
||||||
typename gf_t::data_regular_t A(shape.front_append(n_freq)); A() =0;
|
typename gf_t::data_regular_t A(shape.front_append(n_freq)); A() =0;
|
||||||
return gf_t(mesh<refreq,Opt>(wmin, wmax, n_freq, full_bins), std::move(A), local::tail(shape), nothing());
|
return gf_t(gf_mesh<refreq,Opt>(wmin, wmax, n_freq, full_bins), std::move(A), local::tail(shape), nothing());
|
||||||
}
|
}
|
||||||
|
|
||||||
static gf_t make_gf(double wmin, double wmax, size_t n_freq, tqa::mini_vector<size_t,2> shape, mesh_kind mk) {
|
static gf_t make_gf(double wmin, double wmax, size_t n_freq, tqa::mini_vector<size_t,2> shape, mesh_kind mk) {
|
||||||
typename gf_t::data_regular_t A(shape.front_append(n_freq)); A() =0;
|
typename gf_t::data_regular_t A(shape.front_append(n_freq)); A() =0;
|
||||||
return gf_t(mesh<refreq,Opt>(wmin, wmax, n_freq, mk), std::move(A), local::tail(shape), nothing());
|
return gf_t(gf_mesh<refreq,Opt>(wmin, wmax, n_freq, mk), std::move(A), local::tail(shape), nothing());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -103,12 +103,12 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
static gf_t make_gf(double wmin, double wmax, size_t n_freq) {
|
static gf_t make_gf(double wmin, double wmax, size_t n_freq) {
|
||||||
typename gf_t::data_regular_t A(n_freq); A() =0;
|
typename gf_t::data_regular_t A(n_freq); A() =0;
|
||||||
return gf_t(mesh<refreq,Opt>(wmin, wmax, n_freq), std::move(A), local::tail(tqa::mini_vector<size_t,2>(1,1)), nothing());
|
return gf_t(gf_mesh<refreq,Opt>(wmin, wmax, n_freq), std::move(A), local::tail(tqa::mini_vector<size_t,2>(1,1)), nothing());
|
||||||
}
|
}
|
||||||
|
|
||||||
static gf_t make_gf(double wmin, double wmax, size_t n_freq, mesh_kind mk) {
|
static gf_t make_gf(double wmin, double wmax, size_t n_freq, mesh_kind mk) {
|
||||||
typename gf_t::data_regular_t A(n_freq); A() =0;
|
typename gf_t::data_regular_t A(n_freq); A() =0;
|
||||||
return gf_t(mesh<refreq,Opt>(wmin, wmax, n_freq, mk), std::move(A), local::tail(tqa::mini_vector<size_t,2>(1,1)), nothing());
|
return gf_t(gf_mesh<refreq,Opt>(wmin, wmax, n_freq, mk), std::move(A), local::tail(tqa::mini_vector<size_t,2>(1,1)), nothing());
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -31,12 +31,12 @@ namespace triqs { namespace gfs {
|
|||||||
struct refreq_imtime {};
|
struct refreq_imtime {};
|
||||||
|
|
||||||
// the mesh
|
// the mesh
|
||||||
template<typename Opt> struct mesh<refreq_imtime,Opt> :mesh_product<mesh<refreq,Opt>,mesh<imtime,Opt>> {
|
template<typename Opt> struct gf_mesh<refreq_imtime,Opt> :mesh_product<gf_mesh<refreq,Opt>,gf_mesh<imtime,Opt>> {
|
||||||
typedef mesh<refreq,Opt> m1_t;
|
typedef gf_mesh<refreq,Opt> m1_t;
|
||||||
typedef mesh<imtime,Opt> m2_t;
|
typedef gf_mesh<imtime,Opt> m2_t;
|
||||||
typedef mesh_product<m1_t,m2_t> B;
|
typedef mesh_product<m1_t,m2_t> B;
|
||||||
mesh (double wmin, double wmax, size_t n_freq, double beta, statistic_enum S, size_t nt, mesh_kind mk=full_bins ) :
|
gf_mesh (double wmin, double wmax, size_t n_freq, double beta, statistic_enum S, size_t nt, mesh_kind mk=full_bins ) :
|
||||||
B {mesh<refreq,Opt>(wmin,wmax,n_freq), mesh<imtime,Opt>(beta,S,nt,mk)} {}
|
B {gf_mesh<refreq,Opt>(wmin,wmax,n_freq), gf_mesh<imtime,Opt>(beta,S,nt,mk)} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace gfs_implementation {
|
namespace gfs_implementation {
|
||||||
@ -87,7 +87,7 @@ namespace triqs { namespace gfs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gf_t make_gf(double wmin, double wmax, size_t n_freq, double beta, statistic_enum S, size_t nt, mesh_kind mk=full_bins) {
|
static gf_t make_gf(double wmin, double wmax, size_t n_freq, double beta, statistic_enum S, size_t nt, mesh_kind mk=full_bins) {
|
||||||
auto m = mesh<refreq_imtime,Opt>(wmin, wmax, n_freq, beta,S, nt, mk);
|
auto m = gf_mesh<refreq_imtime,Opt>(wmin, wmax, n_freq, beta,S, nt, mk);
|
||||||
typename gf_t::data_regular_t A(m.size());
|
typename gf_t::data_regular_t A(m.size());
|
||||||
A() =0;
|
A() =0;
|
||||||
return gf_t (m, std::move(A), nothing(), nothing() ) ;
|
return gf_t (m, std::move(A), nothing(), nothing() ) ;
|
||||||
|
@ -30,10 +30,10 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
struct retime {};
|
struct retime {};
|
||||||
|
|
||||||
template<typename Opt> struct mesh<retime,Opt> : linear_mesh<R_domain> {
|
template<typename Opt> struct gf_mesh<retime,Opt> : linear_mesh<R_domain> {
|
||||||
typedef linear_mesh<R_domain> B;
|
typedef linear_mesh<R_domain> B;
|
||||||
mesh() = default;
|
gf_mesh() = default;
|
||||||
mesh(double tmin, double tmax, size_t n_points, mesh_kind mk=full_bins) : B (typename B::domain_t(), tmin, tmax, n_points, mk){}
|
gf_mesh(double tmin, double tmax, size_t n_points, mesh_kind mk=full_bins) : B (typename B::domain_t(), tmin, tmax, n_points, mk){}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace gfs_implementation {
|
namespace gfs_implementation {
|
||||||
@ -81,12 +81,12 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
static gf_t make_gf(double tmin, double tmax, size_t n_points, tqa::mini_vector<size_t,2> shape, mesh_kind mk) {
|
static gf_t make_gf(double tmin, double tmax, size_t n_points, tqa::mini_vector<size_t,2> shape, mesh_kind mk) {
|
||||||
typename gf_t::data_regular_t A(shape.front_append(n_points)); A() =0;
|
typename gf_t::data_regular_t A(shape.front_append(n_points)); A() =0;
|
||||||
return gf_t(mesh<retime,Opt>(tmin, tmax, n_points,mk), std::move(A), local::tail(shape), nothing());
|
return gf_t(gf_mesh<retime,Opt>(tmin, tmax, n_points,mk), std::move(A), local::tail(shape), nothing());
|
||||||
}
|
}
|
||||||
|
|
||||||
static gf_t make_gf(double tmin, double tmax, size_t n_points, tqa::mini_vector<size_t,2> shape) {
|
static gf_t make_gf(double tmin, double tmax, size_t n_points, tqa::mini_vector<size_t,2> shape) {
|
||||||
typename gf_t::data_regular_t A(shape.front_append(n_points)); A() =0;
|
typename gf_t::data_regular_t A(shape.front_append(n_points)); A() =0;
|
||||||
return gf_t(mesh<retime,Opt>(tmin, tmax, n_points), std::move(A), local::tail(shape), nothing());
|
return gf_t(gf_mesh<retime,Opt>(tmin, tmax, n_points), std::move(A), local::tail(shape), nothing());
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -103,12 +103,12 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
static gf_t make_gf(double tmin, double tmax, size_t n_points, mesh_kind mk) {
|
static gf_t make_gf(double tmin, double tmax, size_t n_points, mesh_kind mk) {
|
||||||
typename gf_t::data_regular_t A(n_points); A() =0;
|
typename gf_t::data_regular_t A(n_points); A() =0;
|
||||||
return gf_t(mesh<retime,Opt>(tmin, tmax, n_points,mk), std::move(A), local::tail(tqa::mini_vector<size_t,2>(1,1)), nothing());
|
return gf_t(gf_mesh<retime,Opt>(tmin, tmax, n_points,mk), std::move(A), local::tail(tqa::mini_vector<size_t,2>(1,1)), nothing());
|
||||||
}
|
}
|
||||||
|
|
||||||
static gf_t make_gf(double tmin, double tmax, size_t n_points) {
|
static gf_t make_gf(double tmin, double tmax, size_t n_points) {
|
||||||
typename gf_t::data_regular_t A(n_points); A() =0;
|
typename gf_t::data_regular_t A(n_points); A() =0;
|
||||||
return gf_t(mesh<retime,Opt>(tmin, tmax, n_points), std::move(A), local::tail(tqa::mini_vector<size_t,2>(1,1)), nothing());
|
return gf_t(gf_mesh<retime,Opt>(tmin, tmax, n_points), std::move(A), local::tail(tqa::mini_vector<size_t,2>(1,1)), nothing());
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -30,12 +30,12 @@ namespace triqs { namespace gfs {
|
|||||||
struct two_real_times {};
|
struct two_real_times {};
|
||||||
|
|
||||||
// the mesh
|
// the mesh
|
||||||
template<typename Opt> struct mesh<two_real_times,Opt> :mesh_product<mesh<retime,Opt> ,mesh<retime,Opt> > {
|
template<typename Opt> struct gf_mesh<two_real_times,Opt> :mesh_product<gf_mesh<retime,Opt> ,gf_mesh<retime,Opt> > {
|
||||||
typedef mesh_product<mesh<retime,Opt> ,mesh<retime,Opt> > B;
|
typedef mesh_product<gf_mesh<retime,Opt> ,gf_mesh<retime,Opt> > B;
|
||||||
mesh() = default;
|
gf_mesh() = default;
|
||||||
mesh (double tmax, double n_time_slices) :
|
gf_mesh (double tmax, double n_time_slices) :
|
||||||
B(mesh<retime,Opt> ( 0, tmax,n_time_slices, full_bins),
|
B(gf_mesh<retime,Opt> ( 0, tmax,n_time_slices, full_bins),
|
||||||
mesh<retime,Opt> ( 0, tmax,n_time_slices, full_bins) ) {}
|
gf_mesh<retime,Opt> ( 0, tmax,n_time_slices, full_bins) ) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace gfs_implementation {
|
namespace gfs_implementation {
|
||||||
@ -47,7 +47,7 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
template<typename Opt>
|
template<typename Opt>
|
||||||
struct get_closest_point <two_real_times,matrix_valued,Opt> {
|
struct get_closest_point <two_real_times,matrix_valued,Opt> {
|
||||||
typedef typename mesh<two_real_times, Opt>::type mesh_t;
|
typedef typename gf_mesh<two_real_times, Opt>::type mesh_t;
|
||||||
|
|
||||||
// // NOT FINISHED, NOT TESTED
|
// // NOT FINISHED, NOT TESTED
|
||||||
// template<typename G, typename T>
|
// template<typename G, typename T>
|
||||||
@ -84,10 +84,10 @@ namespace triqs { namespace gfs {
|
|||||||
|
|
||||||
template<typename Opt> struct factories<two_real_times, matrix_valued,Opt> {
|
template<typename Opt> struct factories<two_real_times, matrix_valued,Opt> {
|
||||||
typedef gf<two_real_times, matrix_valued,Opt> gf_t;
|
typedef gf<two_real_times, matrix_valued,Opt> gf_t;
|
||||||
typedef mesh<two_real_times, Opt> mesh_t;
|
typedef gf_mesh<two_real_times, Opt> mesh_t;
|
||||||
|
|
||||||
static gf_t make_gf(double tmax, double n_time_slices, tqa::mini_vector<size_t,2> shape) {
|
static gf_t make_gf(double tmax, double n_time_slices, tqa::mini_vector<size_t,2> shape) {
|
||||||
auto m = mesh<two_real_times,Opt>(tmax, n_time_slices);
|
auto m = gf_mesh<two_real_times,Opt>(tmax, n_time_slices);
|
||||||
typename gf_t::data_regular_t A(shape.front_append(m.size())); A() =0;
|
typename gf_t::data_regular_t A(shape.front_append(m.size())); A() =0;
|
||||||
return gf_t (m, std::move(A), nothing(), nothing() ) ;
|
return gf_t (m, std::move(A), nothing(), nothing() ) ;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user