mirror of
https://github.com/triqs/dft_tools
synced 2024-12-24 13:23:37 +01:00
[API BREAK] gf : rename namespace gf->gfs
- necessary otherwise the class gf and the namespace have the same name, leading to some confusion, and need to qualify some functions (specially on gcc). Same naming conventions as arrays.
This commit is contained in:
parent
54f12f9fc0
commit
40f8cb5c18
@ -8,8 +8,8 @@ from h5 cimport *
|
||||
|
||||
# -------------------- Some generic tools -------------------------------
|
||||
|
||||
cdef extern from "triqs/gf/tools.hpp" namespace "triqs::gf" :
|
||||
cdef enum statistic_enum "triqs::gf::statistic_enum" :
|
||||
cdef extern from "triqs/gf/tools.hpp" namespace "triqs::gfs" :
|
||||
cdef enum statistic_enum "triqs::gfs::statistic_enum" :
|
||||
Boson,Fermion
|
||||
|
||||
cdef cppclass nothing :
|
||||
@ -18,7 +18,7 @@ cdef extern from "triqs/gf/tools.hpp" namespace "triqs::gf" :
|
||||
cdef cppclass freq_infty:
|
||||
freq_infty ()
|
||||
|
||||
cdef cppclass mesh_pt_generator "triqs::gf::mesh_pt_generator" [MeshType] :
|
||||
cdef cppclass mesh_pt_generator "triqs::gfs::mesh_pt_generator" [MeshType] :
|
||||
mesh_pt_generator( MeshType * )
|
||||
mesh_pt_generator()
|
||||
complex to_point()
|
||||
@ -33,12 +33,12 @@ cdef extern from "triqs/gf/tools.hpp" namespace "triqs::gf" :
|
||||
vector[vector[std_string]] & operator()()
|
||||
bint same()
|
||||
|
||||
cdef extern from "triqs/gf/meshes/linear.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/meshes/linear.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef enum mesh_enum "triqs::gf::mesh_kind":
|
||||
cdef enum mesh_enum "triqs::gfs::mesh_kind":
|
||||
half_bins, full_bins, without_last
|
||||
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass discrete_domain :
|
||||
discrete_domain ()
|
||||
|
@ -1,12 +1,12 @@
|
||||
cdef extern from "triqs/gf/imfreq.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/imfreq.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass imfreq_domain :
|
||||
double beta
|
||||
statistic_enum statistic
|
||||
imfreq_domain ()
|
||||
|
||||
#cdef cppclass mesh_imfreq "triqs::gf::linear_mesh<triqs::gf::imfreq::domain_t>" :
|
||||
cdef cppclass mesh_imfreq "triqs::gf::linear_mesh<triqs::gf::matsubara_domain<true>>" :
|
||||
#cdef cppclass mesh_imfreq "triqs::gfs::linear_mesh<triqs::gfs::imfreq::domain_t>" :
|
||||
cdef cppclass mesh_imfreq "triqs::gfs::linear_mesh<triqs::gfs::matsubara_domain<true>>" :
|
||||
mesh_imfreq ()
|
||||
mesh_imfreq (mesh_imfreq &)
|
||||
imfreq_domain & domain()
|
||||
@ -14,10 +14,10 @@ cdef extern from "triqs/gf/imfreq.hpp" namespace "triqs::gf" :
|
||||
long size()
|
||||
bint operator ==( mesh_imfreq &)
|
||||
|
||||
cdef mesh_imfreq make_mesh_imfreq "triqs::gf::make_gf_mesh<triqs::gf::imfreq>" (double beta, statistic_enum S, size_t n_max)
|
||||
#cdef mesh_imfreq make_mesh_imfreq "triqs::gf::gf_implementation::gf_factories<triqs::gf::imfreq,triqs::gf::matrix>::make_mesh" (double beta, statistic_enum S, size_t n_max)
|
||||
cdef mesh_imfreq make_mesh_imfreq "triqs::gfs::make_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 cppclass gf_imfreq "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::imfreq> >" :
|
||||
cdef cppclass gf_imfreq "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::imfreq> >" :
|
||||
gf_imfreq()
|
||||
gf_imfreq(gf_imfreq &)
|
||||
# The constructor must be no_except, or the cython code won't be correct...
|
||||
@ -42,14 +42,14 @@ cdef make_GfImFreq (gf_imfreq x, indices_pack=*, name=*)
|
||||
|
||||
############### Blocks of Im Freq #########################
|
||||
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass gf_block_imfreq "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::imfreq>>>" :
|
||||
cdef cppclass gf_block_imfreq "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::imfreq>>>" :
|
||||
gf_block_imfreq()
|
||||
gf_imfreq & operator [](int)
|
||||
discrete_mesh & mesh()
|
||||
|
||||
cdef gf_block_imfreq make_gf_block_imfreq "triqs::gf::make_gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::imfreq>>" ( vector[gf_imfreq] &)
|
||||
cdef gf_block_imfreq make_gf_block_imfreq "triqs::gfs::make_gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::imfreq>>" ( vector[gf_imfreq] &)
|
||||
|
||||
cdef gf_block_imfreq as_gf_block_imfreq (G) except +
|
||||
cdef make_BlockGfImFreq (gf_block_imfreq G, block_indices_pack=*, name=*)
|
||||
|
@ -1,12 +1,12 @@
|
||||
cdef extern from "triqs/gf/imtime.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/imtime.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass imtime_domain :
|
||||
double beta
|
||||
statistic_enum statistic
|
||||
imtime_domain ()
|
||||
|
||||
#cdef cppclass mesh_imtime "triqs::gf::linear_mesh<triqs::gf::imtime::domain_t>" :
|
||||
cdef cppclass mesh_imtime "triqs::gf::linear_mesh<triqs::gf::matsubara_domain<false>>" :
|
||||
#cdef cppclass mesh_imtime "triqs::gfs::linear_mesh<triqs::gfs::imtime::domain_t>" :
|
||||
cdef cppclass mesh_imtime "triqs::gfs::linear_mesh<triqs::gfs::matsubara_domain<false>>" :
|
||||
mesh_imtime ()
|
||||
mesh_imtime (mesh_imtime &)
|
||||
imtime_domain & domain()
|
||||
@ -15,10 +15,10 @@ cdef extern from "triqs/gf/imtime.hpp" namespace "triqs::gf" :
|
||||
long kind()
|
||||
bint operator ==( mesh_imtime &)
|
||||
|
||||
cdef mesh_imtime make_mesh_imtime "triqs::gf::make_gf_mesh<triqs::gf::imtime>" (double beta, statistic_enum S, size_t n_time_slices, mesh_enum mk)
|
||||
#cdef mesh_imtime make_mesh_imtime "triqs::gf::gf_factories<triqs::gf::imtime>::make_mesh" (double beta, statistic_enum S, size_t n_time_slices, mesh_enum mk)
|
||||
cdef mesh_imtime make_mesh_imtime "triqs::gfs::make_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 cppclass gf_imtime "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::imtime>>" :
|
||||
cdef cppclass gf_imtime "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::imtime>>" :
|
||||
gf_imtime()
|
||||
gf_imtime(gf_imtime &)
|
||||
# The constructor must be no_except, or the cython code won't be correct...
|
||||
@ -43,14 +43,14 @@ cdef make_GfImTime (gf_imtime x, indices_pack=*, name=*)
|
||||
|
||||
############### Blocks of Im Time #########################
|
||||
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass gf_block_imtime "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::imtime>>>" :
|
||||
cdef cppclass gf_block_imtime "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::imtime>>>" :
|
||||
gf_block_imtime()
|
||||
gf_imtime & operator [](int)
|
||||
discrete_mesh & mesh()
|
||||
|
||||
cdef gf_block_imtime make_gf_block_imtime "triqs::gf::make_gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::imtime>>" ( vector[gf_imtime] &)
|
||||
cdef gf_block_imtime make_gf_block_imtime "triqs::gfs::make_gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::imtime>>" ( vector[gf_imtime] &)
|
||||
|
||||
cdef gf_block_imtime as_gf_block_imtime (G) except +
|
||||
cdef make_BlockGfImTime (gf_block_imtime G, block_indices_pack=*, name=*)
|
||||
|
@ -1,4 +1,4 @@
|
||||
cdef extern from "triqs/gf/legendre.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/legendre.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass legendre_domain :
|
||||
size_t Nmax
|
||||
@ -6,18 +6,18 @@ cdef extern from "triqs/gf/legendre.hpp" namespace "triqs::gf" :
|
||||
statistic_enum statistic
|
||||
legendre_domain ()
|
||||
|
||||
#cdef cppclass mesh_legendre "triqs::gf::discrete_mesh<triqs::gf::legendre::domain_t>":
|
||||
cdef cppclass mesh_legendre "triqs::gf::discrete_mesh<triqs::gf::legendre_domain>":
|
||||
#cdef cppclass mesh_legendre "triqs::gfs::discrete_mesh<triqs::gfs::legendre::domain_t>":
|
||||
cdef cppclass mesh_legendre "triqs::gfs::discrete_mesh<triqs::gfs::legendre_domain>":
|
||||
mesh_legendre ()
|
||||
mesh_legendre (mesh_legendre &)
|
||||
legendre_domain & domain()
|
||||
long size()
|
||||
bint operator == (mesh_legendre &)
|
||||
|
||||
cdef mesh_legendre make_mesh_legendre "triqs::gf::make_gf_mesh<triqs::gf::legendre>" (double beta, statistic_enum S, size_t n_leg)
|
||||
#cdef mesh_legendre make_mesh_legendre "triqs::gf::gf_factories<triqs::gf::legendre>::make_mesh" (double beta, statistic_enum S, size_t n_leg)
|
||||
cdef mesh_legendre make_mesh_legendre "triqs::gfs::make_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 cppclass gf_legendre "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::legendre>>" :
|
||||
cdef cppclass gf_legendre "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::legendre>>" :
|
||||
gf_legendre()
|
||||
gf_legendre(gf_legendre &)
|
||||
gf_legendre(mesh_legendre, array_view[double, THREE], nothing, nothing) #except +
|
||||
@ -40,14 +40,14 @@ cdef make_GfLegendre(gf_legendre x, indices_pack=*, name=*)
|
||||
|
||||
############### Blocks of Im Time #########################
|
||||
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass gf_block_legendre "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::legendre>>>" :
|
||||
cdef cppclass gf_block_legendre "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::legendre>>>" :
|
||||
gf_block_legendre()
|
||||
gf_legendre & operator [](int)
|
||||
discrete_mesh & mesh()
|
||||
|
||||
cdef gf_block_legendre make_gf_block_legendre "triqs::gf::make_gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::legendre>>" ( vector[gf_legendre] &)
|
||||
cdef gf_block_legendre make_gf_block_legendre "triqs::gfs::make_gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::legendre>>" ( vector[gf_legendre] &)
|
||||
|
||||
cdef gf_block_legendre as_gf_block_legendre (G) except +
|
||||
cdef make_BlockGfLegendre (gf_block_legendre G, block_indices_pack=*, name=*)
|
||||
|
@ -1,10 +1,10 @@
|
||||
cdef extern from "triqs/gf/refreq.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/refreq.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass refreq_domain :
|
||||
refreq_domain()
|
||||
|
||||
#cdef cppclass mesh_refreq "triqs::gf::linear_mesh<triqs::gf::refreq::domain_t>" :
|
||||
cdef cppclass mesh_refreq "triqs::gf::linear_mesh<triqs::gf::R_domain>" :
|
||||
#cdef cppclass mesh_refreq "triqs::gfs::linear_mesh<triqs::gfs::refreq::domain_t>" :
|
||||
cdef cppclass mesh_refreq "triqs::gfs::linear_mesh<triqs::gfs::R_domain>" :
|
||||
mesh_refreq ()
|
||||
mesh_refreq (mesh_refreq &)
|
||||
refreq_domain & domain()
|
||||
@ -14,10 +14,10 @@ cdef extern from "triqs/gf/refreq.hpp" namespace "triqs::gf" :
|
||||
double kind()
|
||||
bint operator ==( mesh_refreq &)
|
||||
|
||||
cdef mesh_refreq make_mesh_refreq "triqs::gf::make_gf_mesh<triqs::gf::refreq>" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk)
|
||||
#cdef mesh_refreq make_mesh_refreq "triqs::gf::gf_factories<triqs::gf::refreq>::make_mesh" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk)
|
||||
cdef mesh_refreq make_mesh_refreq "triqs::gfs::make_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 cppclass gf_refreq "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::refreq>>" :
|
||||
cdef cppclass gf_refreq "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::refreq>>" :
|
||||
gf_refreq()
|
||||
gf_refreq(gf_refreq &)
|
||||
# The constructor must be no_except, or the cython code won't be correct...
|
||||
@ -42,14 +42,14 @@ cdef make_GfReFreq (gf_refreq x, indices_pack=*, name=*)
|
||||
|
||||
############### Blocks of Im Time #########################
|
||||
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass gf_block_refreq "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::refreq>>>" :
|
||||
cdef cppclass gf_block_refreq "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::refreq>>>" :
|
||||
gf_block_refreq()
|
||||
gf_refreq & operator [](int)
|
||||
discrete_mesh & mesh()
|
||||
|
||||
cdef gf_block_refreq make_gf_block_refreq "triqs::gf::make_gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::refreq>>" ( vector[gf_refreq] &)
|
||||
cdef gf_block_refreq make_gf_block_refreq "triqs::gfs::make_gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::refreq>>" ( vector[gf_refreq] &)
|
||||
|
||||
cdef gf_block_refreq as_gf_block_refreq (G) except +
|
||||
cdef make_BlockGfReFreq (gf_block_refreq G, block_indices_pack=*, name=*)
|
||||
|
@ -1,10 +1,10 @@
|
||||
cdef extern from "triqs/gf/retime.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/retime.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass retime_domain :
|
||||
retime_domain()
|
||||
|
||||
#cdef cppclass mesh_retime "triqs::gf::linear_mesh<triqs::gf::retime::domain_t>" :
|
||||
cdef cppclass mesh_retime "triqs::gf::linear_mesh<triqs::gf::R_domain>" :
|
||||
#cdef cppclass mesh_retime "triqs::gfs::linear_mesh<triqs::gfs::retime::domain_t>" :
|
||||
cdef cppclass mesh_retime "triqs::gfs::linear_mesh<triqs::gfs::R_domain>" :
|
||||
mesh_retime ()
|
||||
mesh_retime (mesh_retime &)
|
||||
retime_domain & domain()
|
||||
@ -14,10 +14,10 @@ cdef extern from "triqs/gf/retime.hpp" namespace "triqs::gf" :
|
||||
double kind()
|
||||
bint operator ==( mesh_retime &)
|
||||
|
||||
cdef mesh_retime make_mesh_retime "triqs::gf::make_gf_mesh<triqs::gf::retime>" (double t_min, double t_max, size_t n_freq, mesh_enum mk)
|
||||
#cdef mesh_retime make_mesh_retime "triqs::gf::gf_factories<triqs::gf::retime>::make_mesh" (double t_min, double t_max, size_t n_freq, mesh_enum mk)
|
||||
cdef mesh_retime make_mesh_retime "triqs::gfs::make_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 cppclass gf_retime "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::retime>>" :
|
||||
cdef cppclass gf_retime "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::retime>>" :
|
||||
gf_retime()
|
||||
gf_retime(gf_retime &)
|
||||
# The constructor must be no_except, or the cython code won't be correct...
|
||||
@ -42,14 +42,14 @@ cdef make_GfReTime (gf_retime x, indices_pack=*, name=*)
|
||||
|
||||
############### Blocks of Im Time #########################
|
||||
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass gf_block_retime "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::retime>>>" :
|
||||
cdef cppclass gf_block_retime "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::retime>>>" :
|
||||
gf_block_retime()
|
||||
gf_retime & operator [](int)
|
||||
discrete_mesh & mesh()
|
||||
|
||||
cdef gf_block_retime make_gf_block_retime "triqs::gf::make_gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::retime>>" ( vector[gf_retime] &)
|
||||
cdef gf_block_retime make_gf_block_retime "triqs::gfs::make_gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::retime>>" ( vector[gf_retime] &)
|
||||
|
||||
cdef gf_block_retime as_gf_block_retime (G) except +
|
||||
cdef make_BlockGfReTime (gf_block_retime G, block_indices_pack=*, name=*)
|
||||
|
@ -1,7 +1,7 @@
|
||||
from dcomplex cimport *
|
||||
from arrays cimport *
|
||||
cdef extern from "triqs/gf/local/tail.hpp" :
|
||||
cdef cppclass tail "triqs::python_tools::cython_proxy<triqs::gf::local::tail_view>" :
|
||||
cdef cppclass tail "triqs::python_tools::cython_proxy<triqs::gfs::local::tail_view>" :
|
||||
tail()
|
||||
tail(array_view[dcomplex,THREE], int, array_view[long,TWO]) except +
|
||||
matrix_view[dcomplex] operator()(int) except +
|
||||
|
@ -1,10 +1,10 @@
|
||||
cdef extern from "triqs/gf/two_real_times.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/two_real_times.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass two_real_times_domain :
|
||||
two_real_times_domain()
|
||||
|
||||
#cdef cppclass mesh_retime "triqs::gf::linear_mesh<triqs::gf::retime::domain_t>" :
|
||||
cdef cppclass mesh_two_real_times "triqs::gf::mesh_product<triqs::gf::linear_mesh<triqs::gf::R_domain>,triqs::gf::linear_mesh<triqs::gf::R_domain>>" :
|
||||
#cdef cppclass mesh_retime "triqs::gfs::linear_mesh<triqs::gfs::retime::domain_t>" :
|
||||
cdef cppclass mesh_two_real_times "triqs::gfs::mesh_product<triqs::gfs::linear_mesh<triqs::gfs::R_domain>,triqs::gfs::linear_mesh<triqs::gfs::R_domain>>" :
|
||||
mesh_two_real_times ()
|
||||
mesh_two_real_times (mesh_two_real_times &)
|
||||
two_real_times_domain & domain()
|
||||
@ -14,11 +14,11 @@ cdef extern from "triqs/gf/two_real_times.hpp" namespace "triqs::gf" :
|
||||
double kind()
|
||||
bint operator ==( mesh_two_real_times &)
|
||||
|
||||
cdef mesh_two_real_times make_mesh_two_real_times "triqs::gf::make_gf_mesh<triqs::gf::two_real_times>" (double t_max, double n_time_slices)
|
||||
cdef mesh_two_real_times make_mesh_two_real_times "triqs::gfs::make_gf_mesh<triqs::gfs::two_real_times>" (double t_max, double n_time_slices)
|
||||
|
||||
cdef mesh_retime & get_1d_mesh_from_2times_mesh "triqs::gf::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 &)
|
||||
|
||||
cdef cppclass gf_two_real_times "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::two_real_times>>" :
|
||||
cdef cppclass gf_two_real_times "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::two_real_times>>" :
|
||||
gf_two_real_times()
|
||||
gf_two_real_times(gf_two_real_times &)
|
||||
# The constructor must be no_except, or the cython code won't be correct...
|
||||
@ -28,7 +28,7 @@ cdef extern from "triqs/gf/two_real_times.hpp" namespace "triqs::gf" :
|
||||
array_view[dcomplex, THREE] data()
|
||||
tail singularity()
|
||||
|
||||
cdef gf_retime slice1d "triqs::gf::slice" (gf_two_real_times &, double t) except +
|
||||
cdef gf_retime slice1d "triqs::gfs::slice" (gf_two_real_times &, double t) except +
|
||||
|
||||
cdef extern from "triqs/gf/two_real_times.hpp" :
|
||||
cdef void h5_write (h5_group, char *, gf_two_real_times &)
|
||||
@ -45,14 +45,14 @@ cdef make_GfTwoRealTime (gf_two_real_times x, indices_pack=*, name=*)
|
||||
|
||||
############### Blocks of Im Time #########################
|
||||
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gf" :
|
||||
cdef extern from "triqs/gf/block.hpp" namespace "triqs::gfs" :
|
||||
|
||||
cdef cppclass gf_block_two_real_times "triqs::python_tools::cython_proxy<triqs::gf::gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::two_real_times>>>" :
|
||||
cdef cppclass gf_block_two_real_times "triqs::python_tools::cython_proxy<triqs::gfs::gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::two_real_times>>>" :
|
||||
gf_block_two_real_times()
|
||||
gf_two_real_times & operator [](int)
|
||||
discrete_mesh & mesh()
|
||||
|
||||
cdef gf_block_two_real_times make_gf_block_two_real_times "triqs::gf::make_gf_view<triqs::gf::block_index,triqs::gf::gf<triqs::gf::two_real_times>>" ( vector[gf_two_real_times] &)
|
||||
cdef gf_block_two_real_times make_gf_block_two_real_times "triqs::gfs::make_gf_view<triqs::gfs::block_index,triqs::gfs::gf<triqs::gfs::two_real_times>>" ( vector[gf_two_real_times] &)
|
||||
|
||||
cdef gf_block_two_real_times as_gf_block_two_real_times (G) except +
|
||||
cdef make_BlockGfTwoRealTime (gf_block_two_real_times G, block_indices_pack=*, name=*)
|
||||
|
@ -8,10 +8,10 @@ namespace tql= triqs::clef;
|
||||
namespace tqa= triqs::arrays;
|
||||
using tqa::range;
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::Fermion;
|
||||
using triqs::gf::imfreq;
|
||||
using triqs::gf::imtime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gfs::Fermion;
|
||||
using triqs::gfs::imfreq;
|
||||
using triqs::gfs::imtime;
|
||||
using triqs::gfs::make_gf;
|
||||
|
||||
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
||||
|
||||
|
@ -8,15 +8,15 @@ namespace tql= triqs::clef;
|
||||
namespace tqa= triqs::arrays;
|
||||
using tqa::range;
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::gf;
|
||||
using triqs::gf::gf_view;
|
||||
using triqs::gf::block_index;
|
||||
using triqs::gf::Fermion;
|
||||
using triqs::gf::imfreq;
|
||||
using triqs::gf::imtime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gf::make_block_gf;
|
||||
using triqs::gf::make_gf_view;
|
||||
using triqs::gfs::gf;
|
||||
using triqs::gfs::gf_view;
|
||||
using triqs::gfs::block_index;
|
||||
using triqs::gfs::Fermion;
|
||||
using triqs::gfs::imfreq;
|
||||
using triqs::gfs::imtime;
|
||||
using triqs::gfs::make_gf;
|
||||
using triqs::gfs::make_block_gf;
|
||||
using triqs::gfs::make_gf_view;
|
||||
|
||||
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
||||
|
||||
|
@ -8,16 +8,16 @@ namespace tql= triqs::clef;
|
||||
namespace tqa= triqs::arrays;
|
||||
using tqa::range;
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::Fermion;
|
||||
using triqs::gf::imfreq;
|
||||
using triqs::gf::imtime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gfs::Fermion;
|
||||
using triqs::gfs::imfreq;
|
||||
using triqs::gfs::imtime;
|
||||
using triqs::gfs::make_gf;
|
||||
|
||||
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
||||
|
||||
int main() {
|
||||
|
||||
triqs::gf::freq_infty inf;
|
||||
triqs::gfs::freq_infty inf;
|
||||
|
||||
double beta =1;
|
||||
auto G = make_gf<imfreq> (beta, Fermion, make_shape(2,2));
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#include <triqs/gf/two_real_times.hpp>
|
||||
|
||||
//using namespace triqs::gf::local;
|
||||
using namespace triqs::gf;
|
||||
//using namespace triqs::gfss::local;
|
||||
using namespace triqs::gfs;
|
||||
namespace tql= triqs::clef;
|
||||
//namespace tqa= triqs::arrays;
|
||||
using tqa::range;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <triqs/gf/gf.hpp>
|
||||
#include <triqs/gf/two_real_times.hpp>
|
||||
#include <complex>
|
||||
using namespace triqs::gf;
|
||||
using namespace triqs::gfs;
|
||||
using namespace std;
|
||||
using triqs::arrays::make_shape;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <triqs/arrays.hpp>
|
||||
|
||||
namespace tql= triqs::clef;
|
||||
using namespace triqs::gf;
|
||||
using namespace triqs::gfs;
|
||||
|
||||
int main() {
|
||||
|
||||
|
@ -7,11 +7,11 @@ namespace tql= triqs::clef;
|
||||
namespace tqa= triqs::arrays;
|
||||
using tqa::range;
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::scalar_valued;
|
||||
using triqs::gf::Fermion;
|
||||
using triqs::gf::refreq;
|
||||
using triqs::gf::retime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gfs::scalar_valued;
|
||||
using triqs::gfs::Fermion;
|
||||
using triqs::gfs::refreq;
|
||||
using triqs::gfs::retime;
|
||||
using triqs::gfs::make_gf;
|
||||
|
||||
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
||||
|
||||
|
@ -8,10 +8,10 @@ namespace tql= triqs::clef;
|
||||
namespace tqa= triqs::arrays;
|
||||
using tqa::range;
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::Fermion;
|
||||
using triqs::gf::imfreq;
|
||||
using triqs::gf::imtime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gfs::Fermion;
|
||||
using triqs::gfs::imfreq;
|
||||
using triqs::gfs::imtime;
|
||||
using triqs::gfs::make_gf;
|
||||
|
||||
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
||||
|
||||
@ -23,7 +23,7 @@ using triqs::gf::make_gf;
|
||||
|
||||
int main() {
|
||||
|
||||
triqs::gf::freq_infty inf;
|
||||
triqs::gfs::freq_infty inf;
|
||||
|
||||
double beta =1;
|
||||
auto G = make_gf<imfreq> (beta, Fermion, make_shape(2,2));
|
||||
@ -125,7 +125,7 @@ int main() {
|
||||
TEST( t(1));
|
||||
|
||||
//tqa::array<double,9> A(1,2,3,4,5,6,7,8,9); A()=0;
|
||||
//auto x = local::impl::gf_impl<triqs::gf::meshes::imfreq, true>::wrap_infty (G.tail_view()) + 2.0;
|
||||
//auto x = local::impl::gf_impl<triqs::gfs::meshes::imfreq, true>::wrap_infty (G.tail_view()) + 2.0;
|
||||
|
||||
// test hdf5
|
||||
H5::H5File file("ess_gf.h5", H5F_ACC_TRUNC );
|
||||
|
@ -11,12 +11,12 @@ namespace tql= triqs::clef;
|
||||
namespace tqa= triqs::arrays;
|
||||
using tqa::range;
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::Fermion;
|
||||
using triqs::gf::imfreq;
|
||||
using triqs::gf::imtime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gf::gf;
|
||||
using triqs::gf::block_index;
|
||||
using triqs::gfs::Fermion;
|
||||
using triqs::gfs::imfreq;
|
||||
using triqs::gfs::imtime;
|
||||
using triqs::gfs::make_gf;
|
||||
using triqs::gfs::gf;
|
||||
using triqs::gfs::block_index;
|
||||
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <triqs/gf/gf.hpp>
|
||||
#include <triqs/gf/two_real_times.hpp>
|
||||
#include <complex>
|
||||
using namespace triqs::gf;
|
||||
using namespace triqs::gfs;
|
||||
using namespace std;
|
||||
using triqs::arrays::make_shape;
|
||||
|
||||
|
@ -8,10 +8,10 @@ namespace tql= triqs::clef;
|
||||
namespace tqa= triqs::arrays;
|
||||
using tqa::range;
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::Fermion;
|
||||
using triqs::gf::imfreq;
|
||||
using triqs::gf::imtime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gfs::Fermion;
|
||||
using triqs::gfs::imfreq;
|
||||
using triqs::gfs::imtime;
|
||||
using triqs::gfs::make_gf;
|
||||
|
||||
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
||||
|
||||
|
@ -8,10 +8,10 @@ namespace tql= triqs::clef;
|
||||
// namespace tqa= triqs::arrays;
|
||||
// using tqa::range;
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::Fermion;
|
||||
using triqs::gf::imfreq;
|
||||
using triqs::gf::imtime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gfs::Fermion;
|
||||
using triqs::gfs::imfreq;
|
||||
using triqs::gfs::imtime;
|
||||
using triqs::gfs::make_gf;
|
||||
using triqs::arrays::range;
|
||||
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
||||
|
||||
@ -32,7 +32,7 @@ int main() {
|
||||
h5_write(file, "Gw1", Gw1); // the original lorentzian
|
||||
|
||||
auto Gt1 = make_gf<imtime> (beta, Fermion, make_shape(1,1), N);
|
||||
inverse_fourier_impl( Gt1, Gw1, triqs::gf::matrix_valued() );
|
||||
inverse_fourier_impl( Gt1, Gw1, triqs::gfs::matrix_valued() );
|
||||
// for(auto const& t:Gt1.mesh()){
|
||||
// std::cout<<"t="<<t<<", expected="<<exp(-E*t) * ( (t>0?-1:0)+1/(1+exp(E*beta)) )<<std::endl;
|
||||
// }
|
||||
@ -40,7 +40,7 @@ int main() {
|
||||
|
||||
///verification that TF(TF^-1)=Id
|
||||
auto Gw1b = make_gf<imfreq> (beta, Fermion, make_shape(1,1), N);
|
||||
fourier_impl(Gw1b, Gt1, triqs::gf::matrix_valued());
|
||||
fourier_impl(Gw1b, Gt1, triqs::gfs::matrix_valued());
|
||||
for(auto const& w:Gw1.mesh()){
|
||||
// std::cout<<"w="<<std::complex<double>(w)<<",Gw1b=" << Gw1b(w)(0,0)<<std::endl;
|
||||
// std::cout<<"w="<<std::complex<double>(w)<<",Delta Gw1b=" << Gw1b(w)(0,0)-Gw1(w)(0,0)<<std::endl;
|
||||
|
@ -6,9 +6,9 @@
|
||||
#include <triqs/arrays.hpp>
|
||||
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::refreq;
|
||||
using triqs::gf::retime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gfs::refreq;
|
||||
using triqs::gfs::retime;
|
||||
using triqs::gfs::make_gf;
|
||||
|
||||
double lorentzian(double w, double a){
|
||||
return 2*a / (w*w + a*a) ;
|
||||
@ -33,7 +33,7 @@ int main() {
|
||||
double wmax=10;
|
||||
int Nw=1001;
|
||||
|
||||
auto Gw1 = make_gf<refreq> (-wmax, wmax, Nw, make_shape(1,1),triqs::gf::full_bins);
|
||||
auto Gw1 = make_gf<refreq> (-wmax, wmax, Nw, make_shape(1,1),triqs::gfs::full_bins);
|
||||
double a = Gw1.mesh().delta() * sqrt( Gw1.mesh().size() );
|
||||
for(auto const & w:Gw1.mesh()) Gw1(w)=lorentzian(w,a);
|
||||
Gw1.singularity()(2)=triqs::arrays::matrix<double>{{2.0*a}};
|
||||
|
@ -8,13 +8,13 @@ namespace tql= triqs::clef;
|
||||
namespace tqa= triqs::arrays;
|
||||
using tqa::range;
|
||||
using triqs::arrays::make_shape;
|
||||
using triqs::gf::Fermion;
|
||||
using triqs::gf::gf;
|
||||
using triqs::gf::imfreq;
|
||||
using triqs::gf::imtime;
|
||||
using triqs::gf::make_gf;
|
||||
using triqs::gf::full_bins;
|
||||
using triqs::gf::half_bins;
|
||||
using triqs::gfs::Fermion;
|
||||
using triqs::gfs::gf;
|
||||
using triqs::gfs::imfreq;
|
||||
using triqs::gfs::imtime;
|
||||
using triqs::gfs::make_gf;
|
||||
using triqs::gfs::full_bins;
|
||||
using triqs::gfs::half_bins;
|
||||
|
||||
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
||||
|
||||
@ -96,7 +96,7 @@ void test_1(){
|
||||
size_t N2=1;
|
||||
size_t size_ = 5;
|
||||
long order_min=-1;
|
||||
triqs::gf::local::tail t(N1,N2, size_, order_min);
|
||||
triqs::gfs::local::tail t(N1,N2, size_, order_min);
|
||||
t(1)=1;
|
||||
|
||||
auto Gt = make_gf<imtime> (beta, Fermion, make_shape(1,1),100,full_bins, t);
|
||||
|
@ -25,11 +25,11 @@
|
||||
#include "./local/tail.hpp"
|
||||
#include "./meshes/discrete.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct block_index {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
template<typename Opt> struct mesh<block_index,Opt> { typedef discrete_mesh<discrete_domain> type;};
|
||||
template<typename Target, typename Opt> struct h5_name<block_index,Target,Opt> { static std::string invoke(){ return "BlockGf";}};
|
||||
@ -115,7 +115,7 @@ namespace triqs { namespace gf {
|
||||
|
||||
};
|
||||
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
|
||||
// ------------------------------- Free function --------------------------------------------------
|
||||
|
||||
@ -129,7 +129,7 @@ namespace triqs { namespace gf {
|
||||
|
||||
// experimental
|
||||
template<typename Target, typename ... U>
|
||||
gf<block_index, gf<Target>> make_block_gf(U && ...u) { return gf_implementation::factories<block_index,gf<Target>,void>::make_gf(std::forward<U>(u)...);}
|
||||
gf<block_index, gf<Target>> make_block_gf(U && ...u) { return gfs_implementation::factories<block_index,gf<Target>,void>::make_gf(std::forward<U>(u)...);}
|
||||
|
||||
// also experimental
|
||||
// an iterator over the block
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <triqs/arrays.hpp>
|
||||
#include <triqs/arrays/matrix_view_proxy.hpp>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
template<typename T, int R> struct data_proxy_array;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define TRIQS_GF_DOMAIN_R_H
|
||||
#include "../tools.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
/// The domain
|
||||
struct R_domain {
|
||||
|
@ -23,7 +23,7 @@
|
||||
#define TRIQS_GF_DISCRETE_DOMAIN_H
|
||||
#include "../tools.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
/// The domain
|
||||
class discrete_domain {
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "../tools.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
/// The domain
|
||||
class legendre_domain {
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define TRIQS_GF_DOMAIN_MATSUBARA_H
|
||||
#include "../tools.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
/// The domain
|
||||
template<bool IsComplex>
|
||||
|
@ -21,7 +21,7 @@
|
||||
#ifndef TRIQS_GF_DOM_PRODUCT_H
|
||||
#define TRIQS_GF_DOM_PRODUCT_H
|
||||
#include "../tools.hpp"
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
template<typename... Domains>
|
||||
struct domain_product {
|
||||
|
@ -29,15 +29,16 @@
|
||||
#include "./tools.hpp"
|
||||
#include "./data_proxies.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
using utility::factory;
|
||||
using arrays::make_shape;
|
||||
|
||||
// GENERALISE matrxi TO DEFAULT
|
||||
template<typename Variable, typename Target=matrix_valued, typename Opt=void> class gf; // the value class
|
||||
template<typename Variable, typename Target=matrix_valued, typename Opt=void> class gf_view; // the view class
|
||||
|
||||
// various implementation traits
|
||||
namespace gf_implementation { // never use using of this...
|
||||
namespace gfs_implementation { // never use using of this...
|
||||
// what is the mesh
|
||||
template<typename Variable, typename Opt> struct mesh;
|
||||
|
||||
@ -68,17 +69,17 @@ namespace triqs { namespace gf {
|
||||
template<typename DataType, typename GF> static void read (h5::group g, std::string const & s, DataType & data, GF const &) { h5_read(g,"data",data);}
|
||||
};
|
||||
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
|
||||
// make_gf and make_gf_view forward any args to them
|
||||
template <typename Variable, typename Target=matrix_valued, typename Opt=void, typename ... U>
|
||||
gf<Variable,Target,Opt> make_gf(U && ... x) { return gf_implementation::factories<Variable,Target,Opt>::make_gf(std::forward<U>(x)...);}
|
||||
gf<Variable,Target,Opt> make_gf(U && ... x) { return gfs_implementation::factories<Variable,Target,Opt>::make_gf(std::forward<U>(x)...);}
|
||||
|
||||
template <typename Variable, typename Target=matrix_valued, typename Opt=void, typename ... U>
|
||||
gf_view<Variable,Target,Opt> make_gf_view(U && ... x) { return gf_implementation::factories<Variable,Target,Opt>::make_gf_view(std::forward<U>(x)...);}
|
||||
gf_view<Variable,Target,Opt> make_gf_view(U && ... x) { return gfs_implementation::factories<Variable,Target,Opt>::make_gf_view(std::forward<U>(x)...);}
|
||||
|
||||
template <typename Variable, typename Opt=void, typename ... U>
|
||||
typename gf_implementation::mesh<Variable,Opt>::type make_gf_mesh(U && ... x) { return gf_implementation::mesh<Variable,Opt>::make(std::forward<U>(x)...);}
|
||||
typename gfs_implementation::mesh<Variable,Opt>::type make_gf_mesh(U && ... x) { return gfs_implementation::mesh<Variable,Opt>::make(std::forward<U>(x)...);}
|
||||
|
||||
template<typename Variable, typename Target, typename Opt> struct gf_desc{};
|
||||
template<typename Descriptor> struct gf_tag{};
|
||||
@ -99,19 +100,19 @@ namespace triqs { namespace gf {
|
||||
|
||||
typedef gf_desc<Variable,Target,Opt> descriptor_t;
|
||||
|
||||
typedef typename gf_implementation::mesh<Variable,Opt>::type mesh_t;
|
||||
typedef typename gfs_implementation::mesh<Variable,Opt>::type mesh_t;
|
||||
typedef typename mesh_t::domain_t domain_t;
|
||||
typedef typename mesh_t::mesh_point_t mesh_point_t;
|
||||
typedef typename mesh_t::index_t mesh_index_t;
|
||||
typedef typename gf_implementation::symmetry<Variable,Target,Opt>::type symmetry_t;
|
||||
typedef gf_implementation::evaluator<Variable,Target,Opt> evaluator_t;
|
||||
typedef typename gfs_implementation::symmetry<Variable,Target,Opt>::type symmetry_t;
|
||||
typedef gfs_implementation::evaluator<Variable,Target,Opt> evaluator_t;
|
||||
|
||||
typedef gf_implementation::data_proxy<Variable,Target,Opt> data_proxy_t;
|
||||
typedef gfs_implementation::data_proxy<Variable,Target,Opt> data_proxy_t;
|
||||
typedef typename data_proxy_t::storage_t data_non_view_t;
|
||||
typedef typename data_proxy_t::storage_view_t data_view_t;
|
||||
typedef typename std::conditional<IsView, data_view_t, data_non_view_t>::type data_t;
|
||||
|
||||
typedef typename gf_implementation::singularity<Variable,Target,Opt>::type singularity_non_view_t;
|
||||
typedef typename gfs_implementation::singularity<Variable,Target,Opt>::type singularity_non_view_t;
|
||||
typedef typename view_type_if_exists_else_type<singularity_non_view_t>::type singularity_view_t;
|
||||
typedef typename std::conditional<IsView, singularity_view_t, singularity_non_view_t>::type singularity_t;
|
||||
|
||||
@ -195,9 +196,9 @@ namespace triqs { namespace gf {
|
||||
cr_type operator() (mesh_point_t const & x) const { return _data_proxy(_data, x.linear_index());}
|
||||
|
||||
template<typename ... U>
|
||||
r_type operator() (closest_pt_wrap<U...> const & p) { return _data_proxy(_data, _mesh.index_to_linear( gf_implementation::get_closest_point<Variable,Target,Opt>::invoke(this,p)));}
|
||||
r_type operator() (closest_pt_wrap<U...> const & p) { return _data_proxy(_data, _mesh.index_to_linear( gfs_implementation::get_closest_point<Variable,Target,Opt>::invoke(this,p)));}
|
||||
template<typename ... U>
|
||||
cr_type operator() (closest_pt_wrap<U...> const & p) const { return _data_proxy(_data, _mesh.index_to_linear( gf_implementation::get_closest_point<Variable,Target,Opt>::invoke(this,p)));}
|
||||
cr_type operator() (closest_pt_wrap<U...> const & p) const { return _data_proxy(_data, _mesh.index_to_linear( gfs_implementation::get_closest_point<Variable,Target,Opt>::invoke(this,p)));}
|
||||
|
||||
// on mesh component for composite meshes
|
||||
// enable iif the first arg is a mesh_point_t for the first component of the mesh_t
|
||||
@ -245,13 +246,13 @@ namespace triqs { namespace gf {
|
||||
|
||||
//----------------------------- HDF5 -----------------------------
|
||||
|
||||
friend std::string get_triqs_hdf5_data_scheme(gf_impl const & g) { return gf_implementation::h5_name<Variable,Target,Opt>::invoke();}
|
||||
friend std::string get_triqs_hdf5_data_scheme(gf_impl const & g) { return gfs_implementation::h5_name<Variable,Target,Opt>::invoke();}
|
||||
|
||||
/// Write into HDF5
|
||||
friend void h5_write (h5::group fg, std::string subgroup_name, gf_impl const & g) {
|
||||
auto gr = fg.create_group(subgroup_name);
|
||||
gr.write_triqs_hdf5_data_scheme(g);
|
||||
gf_implementation::h5_ops<Variable,Target,Opt>::write(gr, "data", g._data, g);//can be specialized for some descriptors (E.g. blocks)
|
||||
gfs_implementation::h5_ops<Variable,Target,Opt>::write(gr, "data", g._data, g);//can be specialized for some descriptors (E.g. blocks)
|
||||
h5_write(gr,"singularity",g._singularity);
|
||||
h5_write(gr,"mesh",g._mesh);
|
||||
h5_write(gr,"symmetry",g._symmetry);
|
||||
@ -265,7 +266,7 @@ namespace triqs { namespace gf {
|
||||
auto tag_expected= get_triqs_hdf5_data_scheme(g);
|
||||
if (tag_file != tag_expected)
|
||||
TRIQS_RUNTIME_ERROR<< "h5_read : mismatch of the tag TRIQS_HDF5_data_scheme tag in the h5 group : found "<<tag_file << " while I expected "<< tag_expected;
|
||||
gf_implementation::h5_ops<Variable,Target,Opt>::read(gr, "data", g._data, g);//can be specialized for some descriptors (E.g. blocks)
|
||||
gfs_implementation::h5_ops<Variable,Target,Opt>::read(gr, "data", g._data, g);//can be specialized for some descriptors (E.g. blocks)
|
||||
h5_read(gr,"singularity",g._singularity);
|
||||
h5_read(gr,"mesh",g._mesh);
|
||||
h5_read(gr,"symmetry",g._symmetry);
|
||||
|
@ -21,9 +21,9 @@
|
||||
#ifndef TRIQS_GF_EXPR_H
|
||||
#define TRIQS_GF_EXPR_H
|
||||
#include <triqs/utility/expression_template_tools.hpp>
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
using utility::is_in_ZRC;
|
||||
namespace gf_expr_tools {
|
||||
namespace gfs_expr_tools {
|
||||
template<typename S> struct scalar_wrap {
|
||||
typedef S value_type;
|
||||
S s; scalar_wrap(S const &s_):s(s_){}
|
||||
@ -46,19 +46,19 @@ namespace triqs { namespace gf {
|
||||
};
|
||||
|
||||
template<typename T> struct keeper_type : std::conditional<utility::is_in_ZRC<T>::value, scalar_wrap<T>, typename view_type_if_exists_else_type<T>::type> {};
|
||||
}// gf_expr_tools
|
||||
}// gfs_expr_tools
|
||||
|
||||
template<typename Descriptor, typename Tag, typename L, typename R> struct gf_expr : TRIQS_MODEL_CONCEPT(ImmutableGreenFunction),gf_tag<Descriptor> {
|
||||
typedef typename gf_expr_tools::keeper_type<L>::type L_t;
|
||||
typedef typename gf_expr_tools::keeper_type<R>::type R_t;
|
||||
typedef typename gfs_expr_tools::keeper_type<L>::type L_t;
|
||||
typedef typename gfs_expr_tools::keeper_type<R>::type R_t;
|
||||
typedef Descriptor descriptor_t;
|
||||
//typedef typename std::result_of<utility::operation<Tag>(typename L_t::value_type,typename R_t::value_type)>::type value_t;
|
||||
typedef typename std::remove_reference<typename std::result_of<gf_expr_tools::combine_mesh(L_t,R_t)>::type>::type mesh_t;
|
||||
typedef typename std::remove_reference<typename std::result_of<gfs_expr_tools::combine_mesh(L_t,R_t)>::type>::type mesh_t;
|
||||
//typedef typename Descriptor::singularity_t::view_type singularity_view_t;
|
||||
//typedef value_t value_type;
|
||||
L_t l; R_t r;
|
||||
template<typename LL, typename RR> gf_expr(LL && l_, RR && r_) : l(std::forward<LL>(l_)), r(std::forward<RR>(r_)) {}
|
||||
mesh_t mesh() const { return gf_expr_tools::combine_mesh()(l,r); }
|
||||
mesh_t mesh() const { return gfs_expr_tools::combine_mesh()(l,r); }
|
||||
auto data() const ->decltype( utility::operation<Tag>()(l.data(), r.data())) { return utility::operation<Tag>()(l.data(), r.data());}
|
||||
auto singularity() const DECL_AND_RETURN (utility::operation<Tag>()(l.singularity() , r.singularity()));
|
||||
//const singularity_view_t singularity() const { return utility::operation<Tag>()(l.singularity() , r.singularity());}
|
||||
@ -71,7 +71,7 @@ namespace triqs { namespace gf {
|
||||
// -------------------------------------------------------------------
|
||||
//a special case : the unary operator !
|
||||
template<typename Descriptor, typename L> struct gf_unary_m_expr : TRIQS_MODEL_CONCEPT(ImmutableGreenFunction),gf_tag<Descriptor>{
|
||||
typedef typename gf_expr_tools::keeper_type<L>::type L_t;
|
||||
typedef typename gfs_expr_tools::keeper_type<L>::type L_t;
|
||||
typedef Descriptor descriptor_t;
|
||||
//typedef typename L_t::value_type value_type;
|
||||
typedef typename L_t::mesh_t mesh_t;
|
||||
|
@ -25,11 +25,11 @@
|
||||
#include "./local/tail.hpp"
|
||||
#include "./domains/matsubara.hpp"
|
||||
#include "./meshes/linear.hpp"
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct imfreq {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
// mesh type and its factories
|
||||
template<typename Opt> struct mesh<imfreq,Opt> {
|
||||
@ -106,7 +106,7 @@ namespace triqs { namespace gf {
|
||||
return make_gf(mesh<imfreq,Opt>::make(beta,S,Nmax), t);
|
||||
}
|
||||
};
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include "./domains/matsubara.hpp"
|
||||
#include "./meshes/linear.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct imtime {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
// mesh type and its factories
|
||||
template<typename Opt> struct mesh<imtime,Opt> {
|
||||
@ -158,7 +158,7 @@ namespace triqs { namespace gf {
|
||||
return make_gf(mesh<imtime,Opt>::make(beta,S,Nmax,mk), t);
|
||||
}
|
||||
};
|
||||
} // gf_implementation.
|
||||
} // gfs_implementation.
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include "./domains/legendre.hpp"
|
||||
#include "./meshes/discrete.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct legendre {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
// mesh type and its factories
|
||||
template<typename Opt> struct mesh<legendre,Opt> {
|
||||
@ -70,7 +70,7 @@ namespace triqs { namespace gf {
|
||||
}
|
||||
|
||||
};
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <fftw3.h>
|
||||
#include <algorithm>
|
||||
|
||||
namespace triqs { namespace gf { namespace details {
|
||||
namespace triqs { namespace gfs { namespace details {
|
||||
|
||||
void fourier_base(const tqa::vector<dcomplex> &in, tqa::vector<dcomplex> &out, size_t L, bool direct) {
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define TRIQS_GF_LOCAL_FOURIER_BASE_H
|
||||
#include <triqs/arrays/vector.hpp>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
namespace details {
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "fourier_matsubara.hpp"
|
||||
#include <fftw3.h>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
namespace impl_local_matsubara {
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <triqs/gf/imfreq.hpp>
|
||||
#include <triqs/gf/imtime.hpp>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
// First the implementation of the fourier transform
|
||||
void fourier_impl (gf_view<imfreq,scalar_valued> gw , gf_view<imtime,scalar_valued> const gt, scalar_valued);
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "fourier_real.hpp"
|
||||
#include <fftw3.h>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
namespace {
|
||||
double pi = std::acos(-1);
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <triqs/gf/refreq.hpp>
|
||||
#include <triqs/gf/retime.hpp>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
// First the implementation of the fourier transform
|
||||
void fourier_impl (gf_view<refreq,scalar_valued> gw , gf_view<retime,scalar_valued> const gt, scalar_valued);
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "functions.hpp"
|
||||
#include <triqs/utility/legendre.hpp>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
dcomplex F(dcomplex a,double b,double Beta) {return -a/(1+exp(-Beta*b));}
|
||||
using tqa::array;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "../legendre.hpp"
|
||||
|
||||
namespace triqs {
|
||||
namespace gf {
|
||||
namespace gfs {
|
||||
|
||||
//-------------------------------------------------------
|
||||
// For Imaginary Matsubara Frequency functions
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
using namespace triqs::utility;
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
void legendre_matsubara_direct(gf_view<imfreq> & gw, gf_view<legendre> const & gl) {
|
||||
|
||||
@ -53,9 +53,9 @@ void legendre_matsubara_inverse (gf_view<legendre> & gl, gf_view<imfreq> const &
|
||||
// I set Nt time bins. This is ugly, one day we must code the direct
|
||||
// transformation without going through imaginary time
|
||||
long Nt = 50000;
|
||||
auto gt = triqs::gf::make_gf<imtime>(gw.domain().beta, gw.domain().statistic,
|
||||
auto gt = make_gf<imtime>(gw.domain().beta, gw.domain().statistic,
|
||||
triqs::arrays::mini_vector<size_t,2>(gw.data().shape()[1],gw.data().shape()[2]),
|
||||
Nt, triqs::gf::half_bins);
|
||||
Nt, half_bins);
|
||||
|
||||
// We first transform to imaginary time because it's been coded with the knowledge of the tails
|
||||
gt() = lazy_inverse_fourier(gw);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <triqs/gf/imtime.hpp>
|
||||
#include <triqs/gf/legendre.hpp>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
void legendre_matsubara_direct (gf_view<imfreq> &gw, gf_view<legendre> const &gl);
|
||||
void legendre_matsubara_inverse (gf_view<legendre> &gl, gf_view<imfreq> const &gw);
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <triqs/arrays.hpp>
|
||||
#include <triqs/utility/pade_approximants.hpp>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
typedef std::complex<double> dcomplex;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <triqs/gf/imfreq.hpp>
|
||||
#include <triqs/gf/refreq.hpp>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
void pade (gf_view<refreq> &gr, gf_view<imfreq> const &gw, int n_points, double freq_offset);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <triqs/gf/tools.hpp>
|
||||
#include <triqs/python_tools/cython_proxy.hpp>
|
||||
|
||||
namespace triqs { namespace gf { namespace local {
|
||||
namespace triqs { namespace gfs { namespace local {
|
||||
|
||||
namespace details {
|
||||
static constexpr double small = 1.e-10;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "./mesh_tools.hpp"
|
||||
#include "../domains/discrete.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
template<typename Domain>
|
||||
struct discrete_mesh {
|
||||
|
@ -25,7 +25,7 @@
|
||||
// ADDED for Krylov : to be clean and removed if necessary
|
||||
#include <algorithm>
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
// Three possible meshes
|
||||
enum mesh_kind { half_bins, full_bins, without_last };
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define TRIQS_GF_MESHTOOLS_H
|
||||
#include "../tools.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
// Derive from this object using CRTP to provide arithmetic operation by casting the final object to C
|
||||
template<typename Derived, typename C> struct arith_ops_by_cast {};
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "../domains/product.hpp"
|
||||
#include <triqs/utility/tuple_tools.hpp>
|
||||
#include <triqs/utility/mini_vector.hpp>
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
template<typename... Meshes> struct mesh_product : tag::composite {
|
||||
typedef domain_product<typename Meshes::domain_t ... > domain_t;
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include "./imfreq.hpp"
|
||||
#include "./meshes/product.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct re_im_freq {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
// the mesh
|
||||
template<typename Opt> struct mesh<re_im_freq,Opt> {
|
||||
@ -38,7 +38,7 @@ namespace triqs { namespace gf {
|
||||
typedef typename mesh<imfreq,Opt>::type m2_t;
|
||||
typedef mesh_product<m1_t,m2_t> type;
|
||||
static type make (double wmin, double wmax, size_t n_freq_re, double beta, statistic_enum S, size_t n_freq_im) {
|
||||
return {make_gf_mesh<refreq,Opt>(wmin,wmax,n_freq_re,full_bins), make_gf_mesh<imfreq,Opt>(beta, S, n_freq_im)};
|
||||
return {gfs::make_gf_mesh<refreq,Opt>(wmin,wmax,n_freq_re,full_bins), make_gf_mesh<imfreq,Opt>(beta, S, n_freq_im)};
|
||||
}
|
||||
};
|
||||
|
||||
@ -79,11 +79,11 @@ namespace triqs { namespace gf {
|
||||
auto m = make_gf_mesh<re_im_freq,Opt>(wmin, wmax, nw, beta, S, nwn);
|
||||
typename gf_t::data_non_view_t A(m.size());
|
||||
A() =0;
|
||||
return gf_t (m, std::move(A), triqs::gf::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() ) ;
|
||||
}
|
||||
};
|
||||
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
@ -26,18 +26,18 @@
|
||||
#include "./imtime.hpp"
|
||||
#include "./meshes/product.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct re_im_time {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
// the mesh
|
||||
template<typename Opt> struct mesh<re_im_time,Opt> {
|
||||
typedef typename mesh<retime,Opt>::type m1_t;
|
||||
typedef typename mesh<imtime,Opt>::type m2_t;
|
||||
typedef mesh_product<m1_t,m2_t> type;
|
||||
static type make (double tmin, double tmax, size_t nt, double beta, statistic_enum S, size_t ntau, triqs::gf::mesh_kind mk=triqs::gf::full_bins) {
|
||||
static type make (double tmin, double tmax, size_t nt, double beta, statistic_enum S, size_t ntau, mesh_kind mk=full_bins) {
|
||||
return {make_gf_mesh<retime,Opt>(tmin,tmax,nt), make_gf_mesh<imtime,Opt>(beta,S, ntau, mk)};
|
||||
}
|
||||
};
|
||||
@ -91,11 +91,11 @@ namespace triqs { namespace gf {
|
||||
typename gf_t::data_non_view_t A(m.size());
|
||||
A() =0;
|
||||
return gf_t (m, std::move(A), nothing(), nothing());
|
||||
//return gf_t (m, std::move(A), triqs::gf::make_gf<retime,scalar_valued>(tmin, tmax, nt), nothing());
|
||||
//return gf_t (m, std::move(A), make_gf<retime,scalar_valued>(tmin, tmax, nt), nothing());
|
||||
}
|
||||
};
|
||||
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
|
||||
// CHANGE THIS NAME !!!
|
||||
template<typename RHS, bool V, typename Variable, typename Target, typename Opt >
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include "./domains/R.hpp"
|
||||
#include "./meshes/linear.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct refreq {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
template<typename Opt> struct mesh<refreq,Opt> {
|
||||
typedef linear_mesh<R_domain> type;
|
||||
@ -113,7 +113,7 @@ namespace triqs { namespace gf {
|
||||
}
|
||||
|
||||
};
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include "./refreq.hpp"
|
||||
#include "./meshes/product.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct refreq_imtime {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
// the mesh
|
||||
template<typename Opt> struct mesh<refreq_imtime,Opt> {
|
||||
@ -93,7 +93,7 @@ namespace triqs { namespace gf {
|
||||
}
|
||||
};
|
||||
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
|
||||
//slices
|
||||
gf_view<refreq,scalar_valued> slice_mesh_imtime (gf_view<refreq_imtime,scalar_valued> g, size_t index) {
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include "./domains/R.hpp"
|
||||
#include "./meshes/linear.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct retime {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
template<typename Opt> struct mesh<retime,Opt> {
|
||||
typedef linear_mesh<R_domain> type;
|
||||
@ -119,7 +119,7 @@ namespace triqs { namespace gf {
|
||||
};
|
||||
|
||||
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
}}
|
||||
#endif
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <triqs/utility/expression_template_tools.hpp>
|
||||
#include <triqs/h5.hpp>
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
namespace tqa= triqs::arrays;
|
||||
namespace mpl=boost::mpl;
|
||||
|
||||
|
@ -25,11 +25,11 @@
|
||||
#include "./retime.hpp"
|
||||
#include "./meshes/product.hpp"
|
||||
|
||||
namespace triqs { namespace gf {
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
struct two_real_times {};
|
||||
|
||||
namespace gf_implementation {
|
||||
namespace gfs_implementation {
|
||||
|
||||
// the mesh
|
||||
template<typename Opt> struct mesh<two_real_times,Opt> {
|
||||
@ -37,10 +37,10 @@ namespace triqs { namespace gf {
|
||||
typedef mesh_product<m1_t,m1_t> type;
|
||||
static type make (double tmax, double n_time_slices) {
|
||||
#ifndef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS
|
||||
m1_t m1({},0, tmax,n_time_slices, triqs::gf::full_bins);
|
||||
m1_t m1({},0, tmax,n_time_slices, full_bins);
|
||||
return {m1,m1};
|
||||
#else
|
||||
m1_t m1(typename m1_t::domain_t(),0, tmax,n_time_slices, triqs::gf::full_bins);
|
||||
m1_t m1(typename m1_t::domain_t(),0, tmax,n_time_slices, full_bins);
|
||||
type m(m1,m1);
|
||||
return m;
|
||||
#endif
|
||||
@ -129,7 +129,7 @@ namespace triqs { namespace gf {
|
||||
// for (auto & p : make_path(G.mesh(), make_tuple(i,j), make_tuple(di,dj) )) G(p) +=0;
|
||||
*/
|
||||
|
||||
} // gf_implementation
|
||||
} // gfs_implementation
|
||||
|
||||
// ------------------------------- Additionnal free function for this gf --------------------------------------------------
|
||||
|
||||
|
34
triqs/gfs.hpp
Normal file
34
triqs/gfs.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* TRIQS: a Toolbox for Research in Interacting Quantum Systems
|
||||
*
|
||||
* Copyright (C) 2013 by O. Parcollet
|
||||
*
|
||||
* TRIQS is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* TRIQS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef TRIQS_GFS_ALL_H
|
||||
#define TRIQS_GFS_ALL_H
|
||||
|
||||
// The basic classes
|
||||
#include <triqs/gf/imtime.hpp>
|
||||
#include <triqs/gf/imfreq.hpp>
|
||||
#include <triqs/gf/retime.hpp>
|
||||
#include <triqs/gf/refreq.hpp>
|
||||
#include <triqs/gf/block.hpp>
|
||||
//#include <triqs/gf/product.hpp>
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user