TRIQS/triqs_modest 3.3.0
Brillouin zone summation
Loading...
Searching...
No Matches
triqs Namespace Reference

Namespaces

namespace  gfs
 
namespace  modest
 

Classes

class  indented_ostream
 A custom output stream that automatically indents each new line by a specified number of spaces. More...
 
class  ostream_with_verbosity
 FIXME : MERGE : replace triqs::report_steam, -> merge + alias. More...
 
class  scoped_timer
 A utility class for measuring the execution time of a scope. More...
 

Typedefs

using block2_matrix_t = nda::array< nda::matrix< dcomplex >, 2 >
 
using block_matrix_t = std::vector< nda::matrix< dcomplex > >
 
using cmat_t = nda::matrix< dcomplex >
 
using cmat_vt = nda::matrix_view< dcomplex >
 

Functions

template<std::ranges::input_range R>
bool all_equal (R const &r)
 Determines if all elements in the given range are equal.
 
std::pair< double, double > bisection (std::function< double(double)> f, double x_low, double x_high, double y_target, double precision, long max_loops, std::string x_name, std::string y_name, bool verbosity)
 bisection algorithm
 
std::pair< double, double > dichotomy (std::function< double(double)> f, double x_low, double x_high, double y_target, double precision, long max_loops, std::string x_name, std::string y_name, bool verbosity)
 dichotomy algorithm
 
generator< std::pair< long, nda::range > > enumerated_sub_slices (auto sub_div)
 
std::pair< double, double > find_bounds (std::function< double(double)> f, double x_init, double y_value, double delta_x, double precision, long max_loops=1000, bool verbosity=false)
 find upper and lower bounds of f(x)
 
std::pair< double, double > root_finder (std::string method, std::function< double(double)> f, double x_init, double y_value, double precision, double delta_x, long max_loops=1000, std::string x_name="", std::string y_name="", bool verbosity=false)
 Root finder f(x) = 0.
 
template<typename T >
auto to_vector (auto &&gen)
 
Hamiltonians

Functions to create the impurity interaction using many-body operators.

operators::many_body_operator make_density_density (std::vector< std::string > const &tau_names, std::vector< long > const &dim_gamma, double U_int, double U_prime, double J_hund)
 Construct a density-density interation.
 
operators::many_body_operator make_kanamori (std::vector< std::string > const &tau_names, std::vector< long > const &dim_gamma, double U_int, double U_prime, double J_hund, bool spin_flip=true, bool pair_hopping=true)
 Construct a Hubbard-Kanamori Hamiltonian.
 
operators::many_body_operator make_slater (std::vector< std::string > const &tau_names, std::vector< long > const &dim_gamma, double U_int, double J_hund, nda::matrix< dcomplex > const &spherical_to_dft, std::optional< nda::matrix< dcomplex > > const &dft_to_local)
 Construct a new operators::many body operator make slater object.
 
Coulomb tensor utilities

Utility functions for creating and working with the four index Coulomb tensor.

nda::array< double, 4 > U_matrix_in_spherical_basis (long l, double U_int, double J_hund)
 Construct a four-index Coulomb tensor in the basis of spherical harmonics.
 
nda::array< dcomplex, 4 > U_matrix_in_local_basis (long l, nda::matrix< dcomplex > s2l, double U_int, double J_hund)
 Construct a four-index Coulomb tensor in a specific orbital basis.
 

Variables

static constexpr auto r_all = nda::range::all
 

Typedef Documentation

◆ block2_matrix_t

using triqs::block2_matrix_t = typedef nda::array<nda::matrix<dcomplex>, 2>

Definition at line 15 of file embedding.hpp.

◆ block_matrix_t

using triqs::block_matrix_t = typedef std::vector<nda::matrix<dcomplex> >

Definition at line 14 of file embedding.hpp.

◆ cmat_t

using triqs::cmat_t = typedef nda::matrix<dcomplex>

Definition at line 38 of file defs.hpp.

◆ cmat_vt

using triqs::cmat_vt = typedef nda::matrix_view<dcomplex>

Definition at line 39 of file defs.hpp.

Function Documentation

◆ all_equal()

template<std::ranges::input_range R>
bool triqs::all_equal ( R const &  r)

Determines if all elements in the given range are equal.

Template Parameters
RA type that satisfies the std::ranges::input_range concept.
Parameters
rThe input range to check.
Returns
True if all elements in the range are equal, false otherwise.

This function uses std::ranges::adjacent_find with a predicate that checks for inequality. If no such adjacent elements are found, it implies all elements in the range are equal.

Definition at line 22 of file range_supp.hpp.

◆ enumerated_sub_slices()

generator< std::pair< long, nda::range > > triqs::enumerated_sub_slices ( auto  sub_div)
inline
Parameters
sub_divList of block dimensions as longs (vector, range, generator)
Returns
Generator of (block dim, corresponding range in the matrix)

Definition at line 19 of file enumerate_slice.hpp.

◆ root_finder()

std::pair< double, double > triqs::root_finder ( std::string  method,
std::function< double(double)>  f,
double  x_init,
double  y_value,
double  precision,
double  delta_x,
long  max_loops = 1000,
std::string  x_name = "",
std::string  y_name = "",
bool  verbosity = false 
)
inline

Root finder f(x) = 0.

Parameters
methodroot finding method (dichtomy, bisection)
ff(x) (double -> double)
x_initinitial value for x
y_valuetarget value for y
precisionprecision for algorihtm
delta_xincrement of x
max_loopsmax number of iterations for method
x_namename of x variable
y_namename of y variable f(x)
verbositylogging of root finder
Returns
x, f(x) where f(x) = y_value

Definition at line 176 of file root_finder.hpp.

◆ to_vector()

template<typename T >
auto triqs::to_vector ( auto &&  gen)

Definition at line 11 of file to_vector.hpp.

Variable Documentation

◆ r_all

constexpr auto triqs::r_all = nda::range::all
staticconstexpr

Definition at line 40 of file defs.hpp.