diff --git a/pytriqs/gf/local/gf.pxd b/pytriqs/gf/local/gf.pxd index e57170c3..b930d1d8 100644 --- a/pytriqs/gf/local/gf.pxd +++ b/pytriqs/gf/local/gf.pxd @@ -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 () diff --git a/pytriqs/gf/local/imfreq.pxd b/pytriqs/gf/local/imfreq.pxd index 1df5476f..f412719e 100644 --- a/pytriqs/gf/local/imfreq.pxd +++ b/pytriqs/gf/local/imfreq.pxd @@ -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" : - cdef cppclass mesh_imfreq "triqs::gf::linear_mesh>" : + #cdef cppclass mesh_imfreq "triqs::gfs::linear_mesh" : + cdef cppclass mesh_imfreq "triqs::gfs::linear_mesh>" : 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" (double beta, statistic_enum S, size_t n_max) - #cdef mesh_imfreq make_mesh_imfreq "triqs::gf::gf_implementation::gf_factories::make_mesh" (double beta, statistic_enum S, size_t n_max) + cdef mesh_imfreq make_mesh_imfreq "triqs::gfs::make_gf_mesh" (double beta, statistic_enum S, size_t n_max) + #cdef mesh_imfreq make_mesh_imfreq "triqs::gfs::gf_implementation::gf_factories::make_mesh" (double beta, statistic_enum S, size_t n_max) - cdef cppclass gf_imfreq "triqs::python_tools::cython_proxy >" : + cdef cppclass gf_imfreq "triqs::python_tools::cython_proxy >" : 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>>" : + cdef cppclass gf_block_imfreq "triqs::python_tools::cython_proxy>>" : gf_block_imfreq() gf_imfreq & operator [](int) discrete_mesh & mesh() - cdef gf_block_imfreq make_gf_block_imfreq "triqs::gf::make_gf_view>" ( vector[gf_imfreq] &) + cdef gf_block_imfreq make_gf_block_imfreq "triqs::gfs::make_gf_view>" ( vector[gf_imfreq] &) cdef gf_block_imfreq as_gf_block_imfreq (G) except + cdef make_BlockGfImFreq (gf_block_imfreq G, block_indices_pack=*, name=*) diff --git a/pytriqs/gf/local/imtime.pxd b/pytriqs/gf/local/imtime.pxd index 0b99afc9..8db59f52 100644 --- a/pytriqs/gf/local/imtime.pxd +++ b/pytriqs/gf/local/imtime.pxd @@ -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" : - cdef cppclass mesh_imtime "triqs::gf::linear_mesh>" : + #cdef cppclass mesh_imtime "triqs::gfs::linear_mesh" : + cdef cppclass mesh_imtime "triqs::gfs::linear_mesh>" : 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" (double beta, statistic_enum S, size_t n_time_slices, mesh_enum mk) - #cdef mesh_imtime make_mesh_imtime "triqs::gf::gf_factories::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" (double beta, statistic_enum S, size_t n_time_slices, mesh_enum mk) + #cdef mesh_imtime make_mesh_imtime "triqs::gfs::gf_factories::make_mesh" (double beta, statistic_enum S, size_t n_time_slices, mesh_enum mk) - cdef cppclass gf_imtime "triqs::python_tools::cython_proxy>" : + cdef cppclass gf_imtime "triqs::python_tools::cython_proxy>" : 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>>" : + cdef cppclass gf_block_imtime "triqs::python_tools::cython_proxy>>" : gf_block_imtime() gf_imtime & operator [](int) discrete_mesh & mesh() - cdef gf_block_imtime make_gf_block_imtime "triqs::gf::make_gf_view>" ( vector[gf_imtime] &) + cdef gf_block_imtime make_gf_block_imtime "triqs::gfs::make_gf_view>" ( vector[gf_imtime] &) cdef gf_block_imtime as_gf_block_imtime (G) except + cdef make_BlockGfImTime (gf_block_imtime G, block_indices_pack=*, name=*) diff --git a/pytriqs/gf/local/legendre.pxd b/pytriqs/gf/local/legendre.pxd index dac6c288..67f4f9e0 100644 --- a/pytriqs/gf/local/legendre.pxd +++ b/pytriqs/gf/local/legendre.pxd @@ -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": - cdef cppclass mesh_legendre "triqs::gf::discrete_mesh": + #cdef cppclass mesh_legendre "triqs::gfs::discrete_mesh": + cdef cppclass mesh_legendre "triqs::gfs::discrete_mesh": 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" (double beta, statistic_enum S, size_t n_leg) - #cdef mesh_legendre make_mesh_legendre "triqs::gf::gf_factories::make_mesh" (double beta, statistic_enum S, size_t n_leg) + cdef mesh_legendre make_mesh_legendre "triqs::gfs::make_gf_mesh" (double beta, statistic_enum S, size_t n_leg) + #cdef mesh_legendre make_mesh_legendre "triqs::gfs::gf_factories::make_mesh" (double beta, statistic_enum S, size_t n_leg) - cdef cppclass gf_legendre "triqs::python_tools::cython_proxy>" : + cdef cppclass gf_legendre "triqs::python_tools::cython_proxy>" : 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>>" : + cdef cppclass gf_block_legendre "triqs::python_tools::cython_proxy>>" : gf_block_legendre() gf_legendre & operator [](int) discrete_mesh & mesh() - cdef gf_block_legendre make_gf_block_legendre "triqs::gf::make_gf_view>" ( vector[gf_legendre] &) + cdef gf_block_legendre make_gf_block_legendre "triqs::gfs::make_gf_view>" ( vector[gf_legendre] &) cdef gf_block_legendre as_gf_block_legendre (G) except + cdef make_BlockGfLegendre (gf_block_legendre G, block_indices_pack=*, name=*) diff --git a/pytriqs/gf/local/refreq.pxd b/pytriqs/gf/local/refreq.pxd index 0801fffd..168d91d8 100644 --- a/pytriqs/gf/local/refreq.pxd +++ b/pytriqs/gf/local/refreq.pxd @@ -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" : - cdef cppclass mesh_refreq "triqs::gf::linear_mesh" : + #cdef cppclass mesh_refreq "triqs::gfs::linear_mesh" : + cdef cppclass mesh_refreq "triqs::gfs::linear_mesh" : 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" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk) - #cdef mesh_refreq make_mesh_refreq "triqs::gf::gf_factories::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" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk) + #cdef mesh_refreq make_mesh_refreq "triqs::gfs::gf_factories::make_mesh" (double omega_min, double omega_max, size_t n_freq, mesh_enum mk) - cdef cppclass gf_refreq "triqs::python_tools::cython_proxy>" : + cdef cppclass gf_refreq "triqs::python_tools::cython_proxy>" : 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>>" : + cdef cppclass gf_block_refreq "triqs::python_tools::cython_proxy>>" : gf_block_refreq() gf_refreq & operator [](int) discrete_mesh & mesh() - cdef gf_block_refreq make_gf_block_refreq "triqs::gf::make_gf_view>" ( vector[gf_refreq] &) + cdef gf_block_refreq make_gf_block_refreq "triqs::gfs::make_gf_view>" ( vector[gf_refreq] &) cdef gf_block_refreq as_gf_block_refreq (G) except + cdef make_BlockGfReFreq (gf_block_refreq G, block_indices_pack=*, name=*) diff --git a/pytriqs/gf/local/retime.pxd b/pytriqs/gf/local/retime.pxd index ac355153..eb4183c5 100644 --- a/pytriqs/gf/local/retime.pxd +++ b/pytriqs/gf/local/retime.pxd @@ -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" : - cdef cppclass mesh_retime "triqs::gf::linear_mesh" : + #cdef cppclass mesh_retime "triqs::gfs::linear_mesh" : + cdef cppclass mesh_retime "triqs::gfs::linear_mesh" : 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" (double t_min, double t_max, size_t n_freq, mesh_enum mk) - #cdef mesh_retime make_mesh_retime "triqs::gf::gf_factories::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" (double t_min, double t_max, size_t n_freq, mesh_enum mk) + #cdef mesh_retime make_mesh_retime "triqs::gfs::gf_factories::make_mesh" (double t_min, double t_max, size_t n_freq, mesh_enum mk) - cdef cppclass gf_retime "triqs::python_tools::cython_proxy>" : + cdef cppclass gf_retime "triqs::python_tools::cython_proxy>" : 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>>" : + cdef cppclass gf_block_retime "triqs::python_tools::cython_proxy>>" : gf_block_retime() gf_retime & operator [](int) discrete_mesh & mesh() - cdef gf_block_retime make_gf_block_retime "triqs::gf::make_gf_view>" ( vector[gf_retime] &) + cdef gf_block_retime make_gf_block_retime "triqs::gfs::make_gf_view>" ( vector[gf_retime] &) cdef gf_block_retime as_gf_block_retime (G) except + cdef make_BlockGfReTime (gf_block_retime G, block_indices_pack=*, name=*) diff --git a/pytriqs/gf/local/tail.pxd b/pytriqs/gf/local/tail.pxd index ab3eafa9..e9ca2c10 100644 --- a/pytriqs/gf/local/tail.pxd +++ b/pytriqs/gf/local/tail.pxd @@ -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" : + cdef cppclass tail "triqs::python_tools::cython_proxy" : tail() tail(array_view[dcomplex,THREE], int, array_view[long,TWO]) except + matrix_view[dcomplex] operator()(int) except + diff --git a/pytriqs/gf/local/two_real_times.pxd b/pytriqs/gf/local/two_real_times.pxd index ed9ca38b..f79da666 100644 --- a/pytriqs/gf/local/two_real_times.pxd +++ b/pytriqs/gf/local/two_real_times.pxd @@ -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" : - cdef cppclass mesh_two_real_times "triqs::gf::mesh_product,triqs::gf::linear_mesh>" : + #cdef cppclass mesh_retime "triqs::gfs::linear_mesh" : + cdef cppclass mesh_two_real_times "triqs::gfs::mesh_product,triqs::gfs::linear_mesh>" : 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" (double t_max, double n_time_slices) + cdef mesh_two_real_times make_mesh_two_real_times "triqs::gfs::make_gf_mesh" (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>" : + cdef cppclass gf_two_real_times "triqs::python_tools::cython_proxy>" : 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>>" : + cdef cppclass gf_block_two_real_times "triqs::python_tools::cython_proxy>>" : 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>" ( vector[gf_two_real_times] &) + cdef gf_block_two_real_times make_gf_block_two_real_times "triqs::gfs::make_gf_view>" ( 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=*) diff --git a/test/speed/gf_s.cpp b/test/speed/gf_s.cpp index 7d8470aa..36bcc87c 100644 --- a/test/speed/gf_s.cpp +++ b/test/speed/gf_s.cpp @@ -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) < "<< (X) < "<< (X) < (beta, Fermion, make_shape(2,2)); diff --git a/test/triqs/gf/gf_2times.cpp b/test/triqs/gf/gf_2times.cpp index 4df697bc..005e64b1 100644 --- a/test/triqs/gf/gf_2times.cpp +++ b/test/triqs/gf/gf_2times.cpp @@ -2,8 +2,8 @@ #include -//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; diff --git a/test/triqs/gf/gf_2times_b.cpp b/test/triqs/gf/gf_2times_b.cpp index 7ca41787..f15f6f8a 100644 --- a/test/triqs/gf/gf_2times_b.cpp +++ b/test/triqs/gf/gf_2times_b.cpp @@ -9,7 +9,7 @@ #include #include #include -using namespace triqs::gf; +using namespace triqs::gfs; using namespace std; using triqs::arrays::make_shape; diff --git a/test/triqs/gf/gf_re_im_freq_time.cpp b/test/triqs/gf/gf_re_im_freq_time.cpp index fefab18c..14aa9c39 100644 --- a/test/triqs/gf/gf_re_im_freq_time.cpp +++ b/test/triqs/gf/gf_re_im_freq_time.cpp @@ -8,7 +8,7 @@ #include namespace tql= triqs::clef; -using namespace triqs::gf; +using namespace triqs::gfs; int main() { diff --git a/test/triqs/gf/gf_retw.cpp b/test/triqs/gf/gf_retw.cpp index 17a3dc9f..0c733374 100644 --- a/test/triqs/gf/gf_retw.cpp +++ b/test/triqs/gf/gf_retw.cpp @@ -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) < "<< (X) < (beta, Fermion, make_shape(2,2)); @@ -125,7 +125,7 @@ int main() { TEST( t(1)); //tqa::array A(1,2,3,4,5,6,7,8,9); A()=0; - //auto x = local::impl::gf_impl::wrap_infty (G.tail_view()) + 2.0; + //auto x = local::impl::gf_impl::wrap_infty (G.tail_view()) + 2.0; // test hdf5 H5::H5File file("ess_gf.h5", H5F_ACC_TRUNC ); diff --git a/test/triqs/gf/mpi_red.cpp b/test/triqs/gf/mpi_red.cpp index a36444ea..58ff1689 100644 --- a/test/triqs/gf/mpi_red.cpp +++ b/test/triqs/gf/mpi_red.cpp @@ -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; diff --git a/test/triqs/gf/pb_affichage.cpp b/test/triqs/gf/pb_affichage.cpp index af55eb07..8bc81a44 100644 --- a/test/triqs/gf/pb_affichage.cpp +++ b/test/triqs/gf/pb_affichage.cpp @@ -9,7 +9,7 @@ #include #include #include -using namespace triqs::gf; +using namespace triqs::gfs; using namespace std; using triqs::arrays::make_shape; diff --git a/test/triqs/gf/ser.cpp b/test/triqs/gf/ser.cpp index b22ee1d4..f9f6bb6c 100644 --- a/test/triqs/gf/ser.cpp +++ b/test/triqs/gf/ser.cpp @@ -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) < "<< (X) < (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="< "<< (X) < (beta, Fermion, make_shape(1,1),100,full_bins, t); diff --git a/triqs/gf/block.hpp b/triqs/gf/block.hpp index 2889bf23..137f3a9e 100644 --- a/triqs/gf/block.hpp +++ b/triqs/gf/block.hpp @@ -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 struct mesh { typedef discrete_mesh type;}; template struct h5_name { 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 - gf> make_block_gf(U && ...u) { return gf_implementation::factories,void>::make_gf(std::forward(u)...);} + gf> make_block_gf(U && ...u) { return gfs_implementation::factories,void>::make_gf(std::forward(u)...);} // also experimental // an iterator over the block diff --git a/triqs/gf/data_proxies.hpp b/triqs/gf/data_proxies.hpp index 1afaef8d..bfe2e52e 100644 --- a/triqs/gf/data_proxies.hpp +++ b/triqs/gf/data_proxies.hpp @@ -25,7 +25,7 @@ #include #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { template struct data_proxy_array; diff --git a/triqs/gf/domains/R.hpp b/triqs/gf/domains/R.hpp index 7aa0fad9..a6f90d3c 100644 --- a/triqs/gf/domains/R.hpp +++ b/triqs/gf/domains/R.hpp @@ -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 { diff --git a/triqs/gf/domains/discrete.hpp b/triqs/gf/domains/discrete.hpp index 96dfb902..03d78066 100644 --- a/triqs/gf/domains/discrete.hpp +++ b/triqs/gf/domains/discrete.hpp @@ -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 { diff --git a/triqs/gf/domains/legendre.hpp b/triqs/gf/domains/legendre.hpp index 1931069f..09f7da23 100644 --- a/triqs/gf/domains/legendre.hpp +++ b/triqs/gf/domains/legendre.hpp @@ -24,7 +24,7 @@ #include "../tools.hpp" -namespace triqs { namespace gf { +namespace triqs { namespace gfs { /// The domain class legendre_domain { diff --git a/triqs/gf/domains/matsubara.hpp b/triqs/gf/domains/matsubara.hpp index c34c41eb..29c6d438 100644 --- a/triqs/gf/domains/matsubara.hpp +++ b/triqs/gf/domains/matsubara.hpp @@ -22,7 +22,7 @@ #define TRIQS_GF_DOMAIN_MATSUBARA_H #include "../tools.hpp" -namespace triqs { namespace gf { +namespace triqs { namespace gfs { /// The domain template diff --git a/triqs/gf/domains/product.hpp b/triqs/gf/domains/product.hpp index ab320224..2e4d38fd 100644 --- a/triqs/gf/domains/product.hpp +++ b/triqs/gf/domains/product.hpp @@ -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 struct domain_product { diff --git a/triqs/gf/gf.hpp b/triqs/gf/gf.hpp index bdd7a09e..1cc42b05 100644 --- a/triqs/gf/gf.hpp +++ b/triqs/gf/gf.hpp @@ -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 class gf; // the value class template 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 struct mesh; @@ -68,17 +69,17 @@ namespace triqs { namespace gf { template 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 - gf make_gf(U && ... x) { return gf_implementation::factories::make_gf(std::forward(x)...);} + gf make_gf(U && ... x) { return gfs_implementation::factories::make_gf(std::forward(x)...);} template - gf_view make_gf_view(U && ... x) { return gf_implementation::factories::make_gf_view(std::forward(x)...);} + gf_view make_gf_view(U && ... x) { return gfs_implementation::factories::make_gf_view(std::forward(x)...);} template - typename gf_implementation::mesh::type make_gf_mesh(U && ... x) { return gf_implementation::mesh::make(std::forward(x)...);} + typename gfs_implementation::mesh::type make_gf_mesh(U && ... x) { return gfs_implementation::mesh::make(std::forward(x)...);} template struct gf_desc{}; template struct gf_tag{}; @@ -99,19 +100,19 @@ namespace triqs { namespace gf { typedef gf_desc descriptor_t; - typedef typename gf_implementation::mesh::type mesh_t; + typedef typename gfs_implementation::mesh::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::type symmetry_t; - typedef gf_implementation::evaluator evaluator_t; + typedef typename gfs_implementation::symmetry::type symmetry_t; + typedef gfs_implementation::evaluator evaluator_t; - typedef gf_implementation::data_proxy data_proxy_t; + typedef gfs_implementation::data_proxy 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::type data_t; - typedef typename gf_implementation::singularity::type singularity_non_view_t; + typedef typename gfs_implementation::singularity::type singularity_non_view_t; typedef typename view_type_if_exists_else_type::type singularity_view_t; typedef typename std::conditional::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 - r_type operator() (closest_pt_wrap const & p) { return _data_proxy(_data, _mesh.index_to_linear( gf_implementation::get_closest_point::invoke(this,p)));} + r_type operator() (closest_pt_wrap const & p) { return _data_proxy(_data, _mesh.index_to_linear( gfs_implementation::get_closest_point::invoke(this,p)));} template - cr_type operator() (closest_pt_wrap const & p) const { return _data_proxy(_data, _mesh.index_to_linear( gf_implementation::get_closest_point::invoke(this,p)));} + cr_type operator() (closest_pt_wrap const & p) const { return _data_proxy(_data, _mesh.index_to_linear( gfs_implementation::get_closest_point::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::invoke();} + friend std::string get_triqs_hdf5_data_scheme(gf_impl const & g) { return gfs_implementation::h5_name::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::write(gr, "data", g._data, g);//can be specialized for some descriptors (E.g. blocks) + gfs_implementation::h5_ops::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 "<::read(gr, "data", g._data, g);//can be specialized for some descriptors (E.g. blocks) + gfs_implementation::h5_ops::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); diff --git a/triqs/gf/gf_expr.hpp b/triqs/gf/gf_expr.hpp index d4a18e42..4339c1cf 100644 --- a/triqs/gf/gf_expr.hpp +++ b/triqs/gf/gf_expr.hpp @@ -21,9 +21,9 @@ #ifndef TRIQS_GF_EXPR_H #define TRIQS_GF_EXPR_H #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { using utility::is_in_ZRC; - namespace gf_expr_tools { + namespace gfs_expr_tools { template 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 struct keeper_type : std::conditional::value, scalar_wrap, typename view_type_if_exists_else_type::type> {}; - }// gf_expr_tools + }// gfs_expr_tools template struct gf_expr : TRIQS_MODEL_CONCEPT(ImmutableGreenFunction),gf_tag { - typedef typename gf_expr_tools::keeper_type::type L_t; - typedef typename gf_expr_tools::keeper_type::type R_t; + typedef typename gfs_expr_tools::keeper_type::type L_t; + typedef typename gfs_expr_tools::keeper_type::type R_t; typedef Descriptor descriptor_t; //typedef typename std::result_of(typename L_t::value_type,typename R_t::value_type)>::type value_t; - typedef typename std::remove_reference::type>::type mesh_t; + typedef typename std::remove_reference::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 gf_expr(LL && l_, RR && r_) : l(std::forward(l_)), r(std::forward(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()(l.data(), r.data())) { return utility::operation()(l.data(), r.data());} auto singularity() const DECL_AND_RETURN (utility::operation()(l.singularity() , r.singularity())); //const singularity_view_t singularity() const { return utility::operation()(l.singularity() , r.singularity());} @@ -71,7 +71,7 @@ namespace triqs { namespace gf { // ------------------------------------------------------------------- //a special case : the unary operator ! template struct gf_unary_m_expr : TRIQS_MODEL_CONCEPT(ImmutableGreenFunction),gf_tag{ - typedef typename gf_expr_tools::keeper_type::type L_t; + typedef typename gfs_expr_tools::keeper_type::type L_t; typedef Descriptor descriptor_t; //typedef typename L_t::value_type value_type; typedef typename L_t::mesh_t mesh_t; diff --git a/triqs/gf/imfreq.hpp b/triqs/gf/imfreq.hpp index f3dd85f8..14f7379f 100644 --- a/triqs/gf/imfreq.hpp +++ b/triqs/gf/imfreq.hpp @@ -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 struct mesh { @@ -106,7 +106,7 @@ namespace triqs { namespace gf { return make_gf(mesh::make(beta,S,Nmax), t); } }; - } // gf_implementation + } // gfs_implementation }} #endif diff --git a/triqs/gf/imtime.hpp b/triqs/gf/imtime.hpp index ff9fa422..4a160a9c 100644 --- a/triqs/gf/imtime.hpp +++ b/triqs/gf/imtime.hpp @@ -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 struct mesh { @@ -158,7 +158,7 @@ namespace triqs { namespace gf { return make_gf(mesh::make(beta,S,Nmax,mk), t); } }; - } // gf_implementation. + } // gfs_implementation. }} #endif diff --git a/triqs/gf/legendre.hpp b/triqs/gf/legendre.hpp index 4e8d9c64..04cc8597 100644 --- a/triqs/gf/legendre.hpp +++ b/triqs/gf/legendre.hpp @@ -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 struct mesh { @@ -70,7 +70,7 @@ namespace triqs { namespace gf { } }; - } // gf_implementation + } // gfs_implementation }} #endif diff --git a/triqs/gf/local/fourier_base.cpp b/triqs/gf/local/fourier_base.cpp index 525790c5..ff6272c9 100644 --- a/triqs/gf/local/fourier_base.cpp +++ b/triqs/gf/local/fourier_base.cpp @@ -22,7 +22,7 @@ #include #include -namespace triqs { namespace gf { namespace details { +namespace triqs { namespace gfs { namespace details { void fourier_base(const tqa::vector &in, tqa::vector &out, size_t L, bool direct) { diff --git a/triqs/gf/local/fourier_base.hpp b/triqs/gf/local/fourier_base.hpp index a7022ae8..df749126 100644 --- a/triqs/gf/local/fourier_base.hpp +++ b/triqs/gf/local/fourier_base.hpp @@ -22,7 +22,7 @@ #define TRIQS_GF_LOCAL_FOURIER_BASE_H #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { namespace details { diff --git a/triqs/gf/local/fourier_matsubara.cpp b/triqs/gf/local/fourier_matsubara.cpp index eed9c309..70209f6e 100644 --- a/triqs/gf/local/fourier_matsubara.cpp +++ b/triqs/gf/local/fourier_matsubara.cpp @@ -22,7 +22,7 @@ #include "fourier_matsubara.hpp" #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { namespace impl_local_matsubara { diff --git a/triqs/gf/local/fourier_matsubara.hpp b/triqs/gf/local/fourier_matsubara.hpp index bc8abc72..18d8d2ad 100644 --- a/triqs/gf/local/fourier_matsubara.hpp +++ b/triqs/gf/local/fourier_matsubara.hpp @@ -25,7 +25,7 @@ #include #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { // First the implementation of the fourier transform void fourier_impl (gf_view gw , gf_view const gt, scalar_valued); diff --git a/triqs/gf/local/fourier_real.cpp b/triqs/gf/local/fourier_real.cpp index 6c1ddc09..02804c5a 100644 --- a/triqs/gf/local/fourier_real.cpp +++ b/triqs/gf/local/fourier_real.cpp @@ -22,7 +22,7 @@ #include "fourier_real.hpp" #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { namespace { double pi = std::acos(-1); diff --git a/triqs/gf/local/fourier_real.hpp b/triqs/gf/local/fourier_real.hpp index f3bb4d47..587af427 100644 --- a/triqs/gf/local/fourier_real.hpp +++ b/triqs/gf/local/fourier_real.hpp @@ -25,7 +25,7 @@ #include #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { // First the implementation of the fourier transform void fourier_impl (gf_view gw , gf_view const gt, scalar_valued); diff --git a/triqs/gf/local/functions.cpp b/triqs/gf/local/functions.cpp index 60efd86f..894c854e 100644 --- a/triqs/gf/local/functions.cpp +++ b/triqs/gf/local/functions.cpp @@ -21,7 +21,7 @@ #include "functions.hpp" #include -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; diff --git a/triqs/gf/local/functions.hpp b/triqs/gf/local/functions.hpp index 3313d2ac..b768b5d0 100644 --- a/triqs/gf/local/functions.hpp +++ b/triqs/gf/local/functions.hpp @@ -26,7 +26,7 @@ #include "../legendre.hpp" namespace triqs { - namespace gf { + namespace gfs { //------------------------------------------------------- // For Imaginary Matsubara Frequency functions diff --git a/triqs/gf/local/legendre_matsubara.cpp b/triqs/gf/local/legendre_matsubara.cpp index 697c94dc..db014b10 100644 --- a/triqs/gf/local/legendre_matsubara.cpp +++ b/triqs/gf/local/legendre_matsubara.cpp @@ -27,7 +27,7 @@ using namespace triqs::utility; -namespace triqs { namespace gf { +namespace triqs { namespace gfs { void legendre_matsubara_direct(gf_view & gw, gf_view const & gl) { @@ -53,9 +53,9 @@ void legendre_matsubara_inverse (gf_view & gl, gf_view 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(gw.domain().beta, gw.domain().statistic, + auto gt = make_gf(gw.domain().beta, gw.domain().statistic, triqs::arrays::mini_vector(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); diff --git a/triqs/gf/local/legendre_matsubara.hpp b/triqs/gf/local/legendre_matsubara.hpp index 40a8bf57..cabb8bb8 100644 --- a/triqs/gf/local/legendre_matsubara.hpp +++ b/triqs/gf/local/legendre_matsubara.hpp @@ -26,7 +26,7 @@ #include #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { void legendre_matsubara_direct (gf_view &gw, gf_view const &gl); void legendre_matsubara_inverse (gf_view &gl, gf_view const &gw); diff --git a/triqs/gf/local/pade.cpp b/triqs/gf/local/pade.cpp index 84eff52c..368b44b7 100644 --- a/triqs/gf/local/pade.cpp +++ b/triqs/gf/local/pade.cpp @@ -24,7 +24,7 @@ #include #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { typedef std::complex dcomplex; diff --git a/triqs/gf/local/pade.hpp b/triqs/gf/local/pade.hpp index d7d74a6a..baaaab32 100644 --- a/triqs/gf/local/pade.hpp +++ b/triqs/gf/local/pade.hpp @@ -26,7 +26,7 @@ #include #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { void pade (gf_view &gr, gf_view const &gw, int n_points, double freq_offset); diff --git a/triqs/gf/local/tail.hpp b/triqs/gf/local/tail.hpp index 0281aaac..5823cb76 100644 --- a/triqs/gf/local/tail.hpp +++ b/triqs/gf/local/tail.hpp @@ -25,7 +25,7 @@ #include #include -namespace triqs { namespace gf { namespace local { +namespace triqs { namespace gfs { namespace local { namespace details { static constexpr double small = 1.e-10; diff --git a/triqs/gf/meshes/discrete.hpp b/triqs/gf/meshes/discrete.hpp index 904ae1ac..5fb64255 100644 --- a/triqs/gf/meshes/discrete.hpp +++ b/triqs/gf/meshes/discrete.hpp @@ -23,7 +23,7 @@ #include "./mesh_tools.hpp" #include "../domains/discrete.hpp" -namespace triqs { namespace gf { +namespace triqs { namespace gfs { template struct discrete_mesh { diff --git a/triqs/gf/meshes/linear.hpp b/triqs/gf/meshes/linear.hpp index e987096a..bbad7127 100644 --- a/triqs/gf/meshes/linear.hpp +++ b/triqs/gf/meshes/linear.hpp @@ -25,7 +25,7 @@ // ADDED for Krylov : to be clean and removed if necessary #include #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { // Three possible meshes enum mesh_kind { half_bins, full_bins, without_last }; diff --git a/triqs/gf/meshes/mesh_tools.hpp b/triqs/gf/meshes/mesh_tools.hpp index 995c0c29..80ad1445 100644 --- a/triqs/gf/meshes/mesh_tools.hpp +++ b/triqs/gf/meshes/mesh_tools.hpp @@ -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 struct arith_ops_by_cast {}; diff --git a/triqs/gf/meshes/product.hpp b/triqs/gf/meshes/product.hpp index 7882024c..aa5d9fe1 100644 --- a/triqs/gf/meshes/product.hpp +++ b/triqs/gf/meshes/product.hpp @@ -24,7 +24,7 @@ #include "../domains/product.hpp" #include #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { template struct mesh_product : tag::composite { typedef domain_product domain_t; diff --git a/triqs/gf/re_im_freq.hpp b/triqs/gf/re_im_freq.hpp index 620b594e..47df54f1 100644 --- a/triqs/gf/re_im_freq.hpp +++ b/triqs/gf/re_im_freq.hpp @@ -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 struct mesh { @@ -38,7 +38,7 @@ namespace triqs { namespace gf { typedef typename mesh::type m2_t; typedef mesh_product 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(wmin,wmax,n_freq_re,full_bins), make_gf_mesh(beta, S, n_freq_im)}; + return {gfs::make_gf_mesh(wmin,wmax,n_freq_re,full_bins), make_gf_mesh(beta, S, n_freq_im)}; } }; @@ -79,11 +79,11 @@ namespace triqs { namespace gf { auto m = make_gf_mesh(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(wmin, wmax, nw), nothing() ) ; + return gf_t (m, std::move(A), gfs::make_gf(wmin, wmax, nw), nothing() ) ; } }; -} // gf_implementation +} // gfs_implementation }} #endif diff --git a/triqs/gf/re_im_time.hpp b/triqs/gf/re_im_time.hpp index 05c3c7b6..391f3393 100644 --- a/triqs/gf/re_im_time.hpp +++ b/triqs/gf/re_im_time.hpp @@ -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 struct mesh { typedef typename mesh::type m1_t; typedef typename mesh::type m2_t; typedef mesh_product 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(tmin,tmax,nt), make_gf_mesh(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(tmin, tmax, nt), nothing()); + //return gf_t (m, std::move(A), make_gf(tmin, tmax, nt), nothing()); } }; - } // gf_implementation + } // gfs_implementation // CHANGE THIS NAME !!! template diff --git a/triqs/gf/refreq.hpp b/triqs/gf/refreq.hpp index 290ddf62..7653fdc1 100644 --- a/triqs/gf/refreq.hpp +++ b/triqs/gf/refreq.hpp @@ -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 struct mesh { typedef linear_mesh type; @@ -113,7 +113,7 @@ namespace triqs { namespace gf { } }; - } // gf_implementation + } // gfs_implementation }} #endif diff --git a/triqs/gf/refreq_imtime.hpp b/triqs/gf/refreq_imtime.hpp index cf4c1dbf..07707723 100644 --- a/triqs/gf/refreq_imtime.hpp +++ b/triqs/gf/refreq_imtime.hpp @@ -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 struct mesh { @@ -93,7 +93,7 @@ namespace triqs { namespace gf { } }; - } // gf_implementation + } // gfs_implementation //slices gf_view slice_mesh_imtime (gf_view g, size_t index) { diff --git a/triqs/gf/retime.hpp b/triqs/gf/retime.hpp index 4f92657c..11e2d7d5 100644 --- a/triqs/gf/retime.hpp +++ b/triqs/gf/retime.hpp @@ -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 struct mesh { typedef linear_mesh type; @@ -119,7 +119,7 @@ namespace triqs { namespace gf { }; - } // gf_implementation + } // gfs_implementation }} #endif diff --git a/triqs/gf/tools.hpp b/triqs/gf/tools.hpp index f4d06f07..c53722f8 100644 --- a/triqs/gf/tools.hpp +++ b/triqs/gf/tools.hpp @@ -32,7 +32,7 @@ #include #include -namespace triqs { namespace gf { +namespace triqs { namespace gfs { namespace tqa= triqs::arrays; namespace mpl=boost::mpl; diff --git a/triqs/gf/two_real_times.hpp b/triqs/gf/two_real_times.hpp index ce59563e..d21b8d07 100644 --- a/triqs/gf/two_real_times.hpp +++ b/triqs/gf/two_real_times.hpp @@ -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 struct mesh { @@ -37,10 +37,10 @@ namespace triqs { namespace gf { typedef mesh_product 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 -------------------------------------------------- diff --git a/triqs/gfs.hpp b/triqs/gfs.hpp new file mode 100644 index 00000000..18dafa2a --- /dev/null +++ b/triqs/gfs.hpp @@ -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 . + * + ******************************************************************************/ +#ifndef TRIQS_GFS_ALL_H +#define TRIQS_GFS_ALL_H + +// The basic classes +#include +#include +#include +#include +#include +//#include + + +#endif +