ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
LR_Util Namespace Reference

Classes

class  ExcitonPlotter
struct  MPIType
 Struct to get MPI_traits for different data types. More...
struct  MPIType< int >
struct  MPIType< double >
struct  MPIType< std::complex< double > >
struct  BlockHead

Typedefs

using Complex = std::complex<double>
template<typename T>
using Real = typename GetTypeReal<T>::type
using TC = std::array<int, 3>
using TAC = std::pair<int, TC>
template<typename T>
using TLRIX = std::map<int, std::map<TAC, std::vector<T>>>

Enumerations

enum  MO_TYPE {
  OO , VO , OV , VV ,
  ALL
}

Functions

template<typename TR>
void save_HR (const hamilt::HContainer< TR > &hR, const std::string &filename, const Parallel_Orbitals &pv, const std::string &out_dir, const double sparse_thr, std::ostream &running_log)
template<typename TK, typename TR>
void save_DMR (const module_dm::DensityMatrix< TK, TR > &dm, const std::string &filename, const Parallel_Orbitals &pv, const std::string &out_dir, const double sparse_thr, std::ostream &running_log)
template void save_HR (const hamilt::HContainer< double > &, const std::string &, const Parallel_Orbitals &, const std::string &, double, std::ostream &)
template void save_HR (const hamilt::HContainer< Complex > &, const std::string &, const Parallel_Orbitals &, const std::string &, double, std::ostream &)
template void save_DMR (const module_dm::DensityMatrix< double, double > &, const std::string &, const Parallel_Orbitals &, const std::string &, double, std::ostream &)
template void save_DMR (const module_dm::DensityMatrix< Complex, double > &, const std::string &, const Parallel_Orbitals &, const std::string &, double, std::ostream &)
template void save_DMR (const module_dm::DensityMatrix< Complex, Complex > &, const std::string &, const Parallel_Orbitals &, const std::string &, double, std::ostream &)
double hse_sigma_floor ()
 Existing HSE sigma floor (bohr^-8), shared by LR and the GS fallback.
int spin_population_difference (const ModuleBase::matrix &wg, int kpar, int rank_in_pool)
 Sum k-point spin populations before rounding; count each pool only once.
std::string force_window_warning (int basis_size, int gs_bands, int skipped_occupied, const std::vector< int > &x_virtual, const std::vector< int > &z_virtual)
 Diagnose resolved force windows without modifying X, Z or their energies.
void check_force_pp (const UnitCell &cell, bool cal_force, const std::string &calculation)
 Reject unsupported NLCC force requests after pseudopotentials have been loaded.
const std::vector< double > & prepare_xc_sigma (const std::vector< double > &sigma, bool is_hse06, std::vector< double > &hse_buffer)
 Preserve signed sigma invariants except for the existing HSE06 stabilization.
const std::vector< double > & prepare_xc_sigma (const std::vector< double > &sigma, bool is_hse06, std::vector< double > &hse_buffer, std::vector< double > &jacobian)
 Prepare stabilized sigma and its componentwise derivative.
int cal_nocc (int nelec)
 =================PHYSICS====================
int cal_nocc (double nelec, int nspin, int nupdown)
 Largest occupied spin channel; nelec already includes the charge correction.
int cal_nocc_window (int requested_nocc, int nocc_max)
 Retain a positive user window, otherwise use all occupied orbitals.
std::pair< ModuleBase::matrix, std::vector< std::pair< int, int > > > set_ix_map_diagonal (bool mode, int nc, int nv)
 set the index map: ix to (ic, iv) and vice versa by diagonal traverse the c-v pairs leftdown -> rightup for mode 0, rightup -> leftdown for mode 1
template<>
void matsym< double > (const double *in, const int n, const Parallel_Blkcyclic &pmat, double *out)
 =================ALGORITHM====================
template<>
void matsym< double > (double *inout, const int n, const Parallel_Blkcyclic &pmat)
template<>
void matsym< std::complex< double > > (const std::complex< double > *in, const int n, const Parallel_Blkcyclic &pmat, std::complex< double > *out)
template<>
void matsym< std::complex< double > > (std::complex< double > *inout, const int n, const Parallel_Blkcyclic &pmat)
template<>
void mattrans< double > (const double *in, const int n, const Parallel_Blkcyclic &pmat, double *out)
template<>
void mattrans< double > (double *inout, const int n, const Parallel_Blkcyclic &pmat)
template<>
void mattrans< std::complex< double > > (const std::complex< double > *in, const int n, const Parallel_Blkcyclic &pmat, std::complex< double > *out)
template<>
void mattrans< std::complex< double > > (std::complex< double > *inout, const int n, const Parallel_Blkcyclic &pmat)
template<>
void matantisym< double > (double *inout, const int n, const Parallel_Blkcyclic &pmat)
template<>
void matantisym< std::complex< double > > (std::complex< double > *inout, const int n, const Parallel_Blkcyclic &pmat)
void setup_2d_division (Parallel_Blkcyclic &pv, int nb, int gr, int gc)
 =================2D-block Parallel===============
void setup_2d_division (Parallel_Blkcyclic &pv, int nb, int gr, int gc, const int &blacs_ctxt_in)
template<>
void diag_lapack< double > (const int &n, double *mat, double *eig)
template<>
void diag_lapack< std::complex< double > > (const int &n, std::complex< double > *mat, double *eig)
template<>
void diag_lapack_nh< double > (const int &n, double *mat, std::complex< double > *eig)
template<>
void diag_lapack_nh< std::complex< double > > (const int &n, std::complex< double > *mat, std::complex< double > *eig)
template<>
int lapack_linear_solver< double > (const double *A, double *x, const double *b, const int n, const int nrhs)
template<>
int lapack_linear_solver< std::complex< double > > (const std::complex< double > *A, std::complex< double > *x, const std::complex< double > *b, const int n, const int nrhs)
std::string tolower (const std::string &str)
 =================string option====================
std::string toupper (const std::string &str)
const std::set< std::string > & hybrid_xc_list ()
 the xc kernels that carry an exact-exchange (EXX) term
bool has_local_xc (const std::string &name)
 check if the xc functional has local xc kernel
template<typename TCell>
int cal_nelec (const TCell &ucell)
 calculate the number of electrons
double inner_product (const double *vec1, const double *vec2, const int &size)
 =================ALGORITHM====================
std::complex< double > inner_product (const std::complex< double > *vec1, const std::complex< double > *vec2, const int &size)
template<typename T>
void _deallocate_2order_nested_ptr (T **p2, size_t size)
 delete 2d pointer
template<typename T>
void _allocate_2order_nested_ptr (T **&p2, size_t size1, size_t size2)
 new 2d pointer
template<typename T>
ct::Tensor newTensor (const ct::TensorShape &shape)
template<typename T>
void matsym (const T *in, const int n, T *out)
template<typename T>
void matsym (T *inout, const int n)
 calculate (A+A^T)/2 (in-place version)
template<typename T>
void matsym (const T *in, const int n, const Parallel_Blkcyclic &pmat, T *out)
template<typename T>
void matsym (T *inout, const int n, const Parallel_Blkcyclic &pmat)
template<typename T>
void mattrans (const T *in, const int n, const Parallel_Blkcyclic &pmat, T *out)
template<typename T>
void mattrans (T *inout, const int n, const Parallel_Blkcyclic &pmat)
template<typename T>
void matantisym (T *inout, const int n, const Parallel_Blkcyclic &pmat)
template<typename T>
bool is_hermitian (const T *mat, const Parallel_Blkcyclic &pmat, const double threshold, const int my_rank)
template<typename T>
bool is_symmetric (const T *mat, const Parallel_Blkcyclic &pmat, const double threshold, const int my_rank)
template<typename T, typename Device>
psi::Psi< T, Device > k1_to_bfirst_wrapper (const psi::Psi< T, Device > &psi_kfirst, int nk_in, int nbasis_in)
 psi(nk=1, nbands=nb, nk * nbasis) -> psi(nb, nk, nbasis) without memory copy
template<typename T, typename Device>
psi::Psi< T, Device > bfirst_to_k1_wrapper (const psi::Psi< T, Device > &psi_bfirst)
 psi(nb, nk, nbasis) -> psi(nk=1, nbands=nb, nk * nbasis) without memory copy
template<typename T>
void global2local_X (T *local_X, const T *global_X, const int nband, const int nk, const std::vector< int > &nocc, const std::vector< int > &nvirt, const std::vector< Parallel_Blkcyclic > &pX, const bool openshell)
 assign global X to 2d-matrix, its col is band(excition state), and row is { spin, k-point, occ, virt }
template<typename T>
void pA2pX (T *X_pX, const T *X_pA, const int nband, const int nk, const std::vector< int > &nocc, const std::vector< int > &nvirt, const std::vector< Parallel_Blkcyclic > &pX, const Parallel_Blkcyclic &pA, const int row_offset, const int col_offset, const bool openshell, const int my_rank, const int nproc)
 assign X in pA to X in pX
template<typename T>
void gather_2d_to_full (const Parallel_Blkcyclic &pv, const T *submat, T *fullmat, const bool row_major, const std::size_t global_nrow, const std::size_t global_ncol)
 gather 2d matrix to full matrix the defination of row and col is consistent with setup_2d_division
template<typename T>
void scatter_full_to_2d (const Parallel_Blkcyclic &pv, const T *fullmat, T *submat, const bool col_first=false)
 scatter full matrix to 2d block-cyclic distributed matrix
template<typename T>
void diag_lapack (const int &n, T *mat, double *eig)
 diagonalize a hermitian matrix
template<typename T>
void diag_lapack_nh (const int &n, T *mat, std::complex< double > *eig)
 diagonalize a general matrix
template<typename T>
int lapack_linear_solver (const T *A, T *x, const T *b, const int n, const int nrhs)
 solve linear equations Ax=b using LAPACK
template<typename T, typename... Args>
std::unique_ptr< T > make_unique (Args &&... args)
double get_conj (const double &x)
std::complex< double > get_conj (const std::complex< double > &x)
template<typename T>
psi::Psi< T > get_psi_spin (const psi::Psi< T > &psi_in, const int &is, const int &nk)
 get the Psi wrapper of the selected spin from the Psi object
MPI_Datatype mpi_type_blockhead ()
template<typename TR>
void print_HR (const hamilt::HContainer< TR > &HR, const std::string &label, const double &threshold=1e-10)
template<typename TK, typename TR>
void print_DMR (const module_dm::DensityMatrix< TK, TR > &DMR, const std::string &label, const double &threshold=1e-10)
template<typename TR_from, typename TR_to>
void copy_hcontainer_real_imag_part (const hamilt::HContainer< TR_from > &HR, hamilt::HContainer< TR_to > &HR_real, const bool get_imag)
template<typename T>
void get_DMR_real_imag_part (const module_dm::DensityMatrix< T, T > &DMR, module_dm::DensityMatrix< T, Real< T > > &DMR_real, const char &type='R')
template<typename T>
void get_DMR_real_imag_part (const module_dm::DensityMatrix< T, T > &DMR, module_dm::DensityMatrix< T, Real< T > > &DMR_real, const int &is, const char &type='R')
void set_HR_real_imag_part (const hamilt::HContainer< double > &HR_real, hamilt::HContainer< std::complex< double > > &HR, const char &type)
template<typename T, typename TR>
void initialize_HR (hamilt::HContainer< TR > &hR, const UnitCell &ucell, const Grid_Driver &gd, const std::vector< double > &orb_cutoff)
template<typename T, typename TR>
void initialize_DMR (module_dm::DensityMatrix< T, TR > &dm, const Parallel_Orbitals &pmat, const UnitCell &ucell, const Grid_Driver &gd, const std::vector< double > &orb_cutoff)
template<typename TR1, typename TR2>
TR1 dot_R_matrix (const hamilt::HContainer< TR1 > &h1, const hamilt::HContainer< TR2 > &h2)
 $\sum_{uvR} H1_{uv}(R) H2_{uv}(R)$
template<typename TK>
void transpose_DMR (module_dm::DensityMatrix< TK, double > &dm, const Parallel_Orbitals &pv)
template<typename TK>
void transpose_DMR (module_dm::DensityMatrix< TK, std::complex< double > > &dm, const Parallel_Orbitals &pv)
template<typename TK, typename TR>
module_dm::DensityMatrix< TK, TR > build_dm_from_dmk (const std::vector< ct::Tensor > &dmk, const Parallel_Orbitals &pmat, const int &nk, const std::vector< ModuleBase::Vector3< double > > &kvec_d, const UnitCell &ucell, const Grid_Driver &gd, const std::vector< double > &orb_cutoff, const bool symmetrize=false, const bool cal_dmr=true, const bool transpose=false)
template<typename TK, typename TR>
module_dm::DensityMatrix< TK, TR > build_dm_from_dmk_spin (const std::vector< std::vector< ct::Tensor > > &dmk, const Parallel_Orbitals &pmat, const int &nk, const std::vector< ModuleBase::Vector3< double > > &kvec_d, const UnitCell &ucell, const Grid_Driver &gd, const std::vector< double > &orb_cutoff, const bool symmetrize=false, const bool cal_dmr=true)
 Spin-resolved counterpart of build_dm_from_dmk: one dmk list per spin channel.
void print_excitation_energies (std::ostream &log, const double *energies, const int nstates, const std::string &channel)
template<typename T>
constexpr T filter (const T &v, const double &threshold=1e-10)
template<typename T>
int read_value (std::ifstream &ifs, T *ptr, const int &size)
template<typename T, typename... Args>
int read_value (std::ifstream &ifs, T *ptr, const int &size, Args &&... args)
template<typename T, typename... Args>
int read_value (const std::string &file, T *ptr, const int &size, Args &&... args)
template<typename T>
int write_value (std::ofstream &ofs, const T *ptr, const int &size)
template<typename T, typename... Args>
int write_value (std::ofstream &ofs, const T *ptr, const int &size, Args &&... args)
template<typename T, typename... Args>
int write_value (const std::string &file, const int &prec, const T *ptr, const int &size, Args &&... args)
template<typename T>
int print_value (const T *ptr, const int &size)
template<typename T, typename... Args>
int print_value (const T *ptr, const int &size, Args &&... args)
template<typename T>
void print_psi_bandfirst (const psi::Psi< T > &psi, const std::string &label, const int &ib, const double &threshold=1e-10)
template<typename T>
void write_psi_bandfirst (const psi::Psi< T > &psi, const std::string &filename, const int &rank, const double &threshold=1e-10, const int &precision=8)
template<typename T>
void write_psi_bandfirst (const T *psi, const int &nband, const int &nk, const int &nbasis, const std::string &filename, const int &rank, const double &threshold=1e-10, const int &precision=8)
template<typename T>
psi::Psi< T > read_psi_bandfirst (const std::string &filename, const int &rank)
template<typename T>
void print_psi_kfirst (const psi::Psi< T > &psi, const std::string &label, const double &threshold=1e-10)
template<typename T>
void print_tensor (const container::Tensor &t, const std::string &label, const Parallel_Blkcyclic *pmat, const double &threshold=1e-10)
template<typename T>
void print_grid_nonzero (T *rho, const int &nrxx, const int &nnz, const std::string &label, const double &threshold=1e-5)
template<typename T>
void print_CsX (const TLRIX< T > &CsX, const int nvirt, const std::string &label, const double &threshold=1e-10)
template<typename T>
void grad (const T *rhor, ModuleBase::Vector3< T > *gradrho, const ModulePW::PW_Basis &rho_basis, const double &tpiba)
template<typename T>
void grad (const std::vector< T > &rhor, std::vector< ModuleBase::Vector3< T > > &gradrho, const ModulePW::PW_Basis &rho_basis, const double &tpiba)
template<typename T>
void lapl (const T *rhor, T *lapn, const ModulePW::PW_Basis &rho_basis, const double &tpiba2)
template<typename T>
void lapl (const std::vector< T > &rhor, std::vector< T > &lapn, const ModulePW::PW_Basis &rho_basis, const double &tpiba2)
void set_dim (const MO_TYPE type, const int &nocc, const int &nvirt, int &nmo1, int &nmo2, int &imo1, int &imo2)
template<typename T>
std::vector< std::complex< double > > cal_velocity_mo (const UnitCell &ucell, const Grid_Driver &gd, const TwoCenterBundle &two_center_bundle, const Parallel_Orbitals &pmat, const Parallel_Blkcyclic &pc, const K_Vectors &kv, const psi::Psi< T > &psi_ks, const int nk, const int nspin_tmp, const int nbasis, const std::vector< int > nocc, const std::vector< int > nvirt)
 Compute C^dagger v C for the selected KS window; return replicated spin/cartesian/k blocks.
template std::vector< std::complex< double > > cal_velocity_mo< double > (const UnitCell &, const Grid_Driver &, const TwoCenterBundle &, const Parallel_Orbitals &, const Parallel_Blkcyclic &, const K_Vectors &, const psi::Psi< double > &, const int, const int, const int, const std::vector< int >, const std::vector< int >)
template std::vector< std::complex< double > > cal_velocity_mo< std::complex< double > > (const UnitCell &, const Grid_Driver &, const TwoCenterBundle &, const Parallel_Orbitals &, const Parallel_Blkcyclic &, const K_Vectors &, const psi::Psi< std::complex< double > > &, const int, const int, const int, const std::vector< int >, const std::vector< int >)
void output_spectrum_mo (const std::vector< std::complex< double > > &out_spectrum_mo, const std::string &filename, const double *const eig_ks, const int nk, const int nspin_tmp, const int KS_num, const K_Vectors &kv)
 output the velocity matrix in KS presentation in human-read friendly format
void output_spectrum_mo_librpa (const std::vector< std::complex< double > > &out_spectrum_mo, const std::string &filename, const int nk, const int nspin_tmp, const int nbands, const int nbasis, const int KS_num)
 output the velocity matrix in KS presentation in LibRPA format
double spatial_k_weight (const double ks_weight, const int nspin_global)
std::vector< double > spatial_k_weights (const std::vector< double > &ks_weights, const int nspin_global)
template<typename T>
std::complex< double > weighted_velocity_transition (const std::complex< double > &velocity, const T &x, const T &y, const double gap, const bool use_ks_gap, const std::vector< double > &weights, const int spin, const int ik, const int nk)

Typedef Documentation

◆ Complex

using LR_Util::Complex = std::complex<double>

◆ Real

template<typename T>
using LR_Util::Real = typename GetTypeReal<T>::type

◆ TAC

using LR_Util::TAC = std::pair<int, TC>

◆ TC

using LR_Util::TC = std::array<int, 3>

◆ TLRIX

template<typename T>
using LR_Util::TLRIX = std::map<int, std::map<TAC, std::vector<T>>>

Enumeration Type Documentation

◆ MO_TYPE

Enumerator
OO 
VO 
OV 
VV 
ALL 

Function Documentation

◆ _allocate_2order_nested_ptr()

template<typename T>
void LR_Util::_allocate_2order_nested_ptr ( T **& p2,
size_t size1,
size_t size2 )

new 2d pointer

Template Parameters
T
Parameters
size1
size2
Here is the caller graph for this function:

◆ _deallocate_2order_nested_ptr()

template<typename T>
void LR_Util::_deallocate_2order_nested_ptr ( T ** p2,
size_t size )

delete 2d pointer

Template Parameters
T
Parameters
p2
size
Here is the caller graph for this function:

◆ bfirst_to_k1_wrapper()

template<typename T, typename Device>
psi::Psi< T, Device > LR_Util::bfirst_to_k1_wrapper ( const psi::Psi< T, Device > & psi_bfirst)

psi(nb, nk, nbasis) -> psi(nk=1, nbands=nb, nk * nbasis) without memory copy

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_dm_from_dmk()

template<typename TK, typename TR>
module_dm::DensityMatrix< TK, TR > LR_Util::build_dm_from_dmk ( const std::vector< ct::Tensor > & dmk,
const Parallel_Orbitals & pmat,
const int & nk,
const std::vector< ModuleBase::Vector3< double > > & kvec_d,
const UnitCell & ucell,
const Grid_Driver & gd,
const std::vector< double > & orb_cutoff,
const bool symmetrize = false,
const bool cal_dmr = true,
const bool transpose = false )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_dm_from_dmk_spin()

template<typename TK, typename TR>
module_dm::DensityMatrix< TK, TR > LR_Util::build_dm_from_dmk_spin ( const std::vector< std::vector< ct::Tensor > > & dmk,
const Parallel_Orbitals & pmat,
const int & nk,
const std::vector< ModuleBase::Vector3< double > > & kvec_d,
const UnitCell & ucell,
const Grid_Driver & gd,
const std::vector< double > & orb_cutoff,
const bool symmetrize = false,
const bool cal_dmr = true )

Spin-resolved counterpart of build_dm_from_dmk: one dmk list per spin channel.

Needed by the open-shell gradient, where $D^X$, $T$, $D^Z$ and the energy-weighted density matrix all have two independent channels. DensityMatrix stores DMK as a flat [nspin][nk] array, so channel is starts at is * nk.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_nelec()

template<typename TCell>
int LR_Util::cal_nelec ( const TCell & ucell)

calculate the number of electrons

=================PHYSICS====================

Template Parameters
TCell
Parameters
ucell
Here is the caller graph for this function:

◆ cal_nocc() [1/2]

int LR_Util::cal_nocc ( double nelec,
int nspin,
int nupdown )

Largest occupied spin channel; nelec already includes the charge correction.

◆ cal_nocc() [2/2]

int LR_Util::cal_nocc ( int nelec)

=================PHYSICS====================

calculate the number of occupied orbitals

Parameters
nelec
Here is the caller graph for this function:

◆ cal_nocc_window()

int LR_Util::cal_nocc_window ( int requested_nocc,
int nocc_max )

Retain a positive user window, otherwise use all occupied orbitals.

Here is the caller graph for this function:

◆ cal_velocity_mo()

template<typename T>
std::vector< std::complex< double > > LR_Util::cal_velocity_mo ( const UnitCell & ucell,
const Grid_Driver & gd,
const TwoCenterBundle & two_center_bundle,
const Parallel_Orbitals & pmat,
const Parallel_Blkcyclic & pc,
const K_Vectors & kv,
const psi::Psi< T > & psi_ks,
const int nk,
const int nspin_tmp,
const int nbasis,
const std::vector< int > nocc,
const std::vector< int > nvirt )

Compute C^dagger v C for the selected KS window; return replicated spin/cartesian/k blocks.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_velocity_mo< double >()

template std::vector< std::complex< double > > LR_Util::cal_velocity_mo< double > ( const UnitCell & ,
const Grid_Driver & ,
const TwoCenterBundle & ,
const Parallel_Orbitals & ,
const Parallel_Blkcyclic & ,
const K_Vectors & ,
const psi::Psi< double > & ,
const int ,
const int ,
const int ,
const std::vector< int > ,
const std::vector< int >  )

◆ cal_velocity_mo< std::complex< double > >()

template std::vector< std::complex< double > > LR_Util::cal_velocity_mo< std::complex< double > > ( const UnitCell & ,
const Grid_Driver & ,
const TwoCenterBundle & ,
const Parallel_Orbitals & ,
const Parallel_Blkcyclic & ,
const K_Vectors & ,
const psi::Psi< std::complex< double > > & ,
const int ,
const int ,
const int ,
const std::vector< int > ,
const std::vector< int >  )
Here is the call graph for this function:

◆ check_force_pp()

void LR_Util::check_force_pp ( const UnitCell & cell,
const bool cal_force,
const std::string & calculation )

Reject unsupported NLCC force requests after pseudopotentials have been loaded.

Here is the caller graph for this function:

◆ copy_hcontainer_real_imag_part()

template<typename TR_from, typename TR_to>
void LR_Util::copy_hcontainer_real_imag_part ( const hamilt::HContainer< TR_from > & HR,
hamilt::HContainer< TR_to > & HR_real,
const bool get_imag )
inline

copy one atom pair's HContainer values from a complex DMR into a real-valued one, by matching atom-pair/R rather than by nat-based index iteration (so it needs no nat).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ diag_lapack()

template<typename T>
void LR_Util::diag_lapack ( const int & n,
T * mat,
double * eig )

diagonalize a hermitian matrix

=================diago-lapack====================

Here is the caller graph for this function:

◆ diag_lapack< double >()

template<>
void LR_Util::diag_lapack< double > ( const int & n,
double * mat,
double * eig )
Here is the call graph for this function:

◆ diag_lapack< std::complex< double > >()

template<>
void LR_Util::diag_lapack< std::complex< double > > ( const int & n,
std::complex< double > * mat,
double * eig )
Here is the call graph for this function:

◆ diag_lapack_nh()

template<typename T>
void LR_Util::diag_lapack_nh ( const int & n,
T * mat,
std::complex< double > * eig )

diagonalize a general matrix

Here is the caller graph for this function:

◆ diag_lapack_nh< double >()

template<>
void LR_Util::diag_lapack_nh< double > ( const int & n,
double * mat,
std::complex< double > * eig )
Here is the call graph for this function:

◆ diag_lapack_nh< std::complex< double > >()

template<>
void LR_Util::diag_lapack_nh< std::complex< double > > ( const int & n,
std::complex< double > * mat,
std::complex< double > * eig )
Here is the call graph for this function:

◆ dot_R_matrix()

template<typename TR1, typename TR2>
TR1 LR_Util::dot_R_matrix ( const hamilt::HContainer< TR1 > & h1,
const hamilt::HContainer< TR2 > & h2 )

$\sum_{uvR} H1_{uv}(R) H2_{uv}(R)$

Here is the call graph for this function:
Here is the caller graph for this function:

◆ filter()

template<typename T>
T LR_Util::filter ( const T & v,
const double & threshold = 1e-10 )
constexpr
Here is the caller graph for this function:

◆ force_window_warning()

std::string LR_Util::force_window_warning ( const int basis_size,
const int gs_bands,
const int skipped_occupied,
const std::vector< int > & x_virtual,
const std::vector< int > & z_virtual )

Diagnose resolved force windows without modifying X, Z or their energies.

Here is the caller graph for this function:

◆ gather_2d_to_full()

template<typename T>
void LR_Util::gather_2d_to_full ( const Parallel_Blkcyclic & pv,
const T * submat,
T * fullmat,
const bool row_major,
const std::size_t global_nrow,
const std::size_t global_ncol )

gather 2d matrix to full matrix the defination of row and col is consistent with setup_2d_division

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_conj() [1/2]

double LR_Util::get_conj ( const double & x)
inline
Here is the caller graph for this function:

◆ get_conj() [2/2]

std::complex< double > LR_Util::get_conj ( const std::complex< double > & x)
inline

◆ get_DMR_real_imag_part() [1/2]

template<typename T>
void LR_Util::get_DMR_real_imag_part ( const module_dm::DensityMatrix< T, T > & DMR,
module_dm::DensityMatrix< T, Real< T > > & DMR_real,
const char & type = 'R' )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_DMR_real_imag_part() [2/2]

template<typename T>
void LR_Util::get_DMR_real_imag_part ( const module_dm::DensityMatrix< T, T > & DMR,
module_dm::DensityMatrix< T, Real< T > > & DMR_real,
const int & is,
const char & type = 'R' )

overload: only copy the is-th spin channel of DMR (source) into the (single-channel) DMR_real, to avoid mixing/overlapping spin channels when DMR has more than one spin channel

Here is the call graph for this function:

◆ get_psi_spin()

template<typename T>
psi::Psi< T > LR_Util::get_psi_spin ( const psi::Psi< T > & psi_in,
const int & is,
const int & nk )

get the Psi wrapper of the selected spin from the Psi object

Here is the call graph for this function:
Here is the caller graph for this function:

◆ global2local_X()

template<typename T>
void LR_Util::global2local_X ( T * local_X,
const T * global_X,
const int nband,
const int nk,
const std::vector< int > & nocc,
const std::vector< int > & nvirt,
const std::vector< Parallel_Blkcyclic > & pX,
const bool openshell )

assign global X to 2d-matrix, its col is band(excition state), and row is { spin, k-point, occ, virt }

Attention
pX is 2d-blocked as {occ, virt}, this assignment is used to calculate transition density matrix c_b X_{bj} c_j
pX is 2d-blocked as {occ, virt}, this assignment is used to calculate transition density matrix c_b X_{bj} c_j
Todo
this function is a merge version of HamiltULR::global2local and HamiltLR::global2local, they should be replaced
Here is the call graph for this function:
Here is the caller graph for this function:

◆ grad() [1/2]

template<typename T>
void LR_Util::grad ( const std::vector< T > & rhor,
std::vector< ModuleBase::Vector3< T > > & gradrho,
const ModulePW::PW_Basis & rho_basis,
const double & tpiba )
Here is the call graph for this function:

◆ grad() [2/2]

template<typename T>
void LR_Util::grad ( const T * rhor,
ModuleBase::Vector3< T > * gradrho,
const ModulePW::PW_Basis & rho_basis,
const double & tpiba )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_local_xc()

bool LR_Util::has_local_xc ( const std::string & name)
inline

check if the xc functional has local xc kernel

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hse_sigma_floor()

double LR_Util::hse_sigma_floor ( )

Existing HSE sigma floor (bohr^-8), shared by LR and the GS fallback.

Here is the caller graph for this function:

◆ hybrid_xc_list()

const std::set< std::string > & LR_Util::hybrid_xc_list ( )
inline

the xc kernels that carry an exact-exchange (EXX) term

=====================PHYSICS====================

Membership here says only that the kernel has an EXX part, never which Coulomb operator that part uses. The operator is the general range-separated form $v_1(r)=[\alpha+\beta\,\mathrm{erfc}(\mu r)]/r$, and it is built from coulomb_param, which input_conv fills from dft_functional plus exx_fock_alpha ($\alpha$), exx_erfc_alpha ($\beta$) and exx_erfc_omega ($\mu$). Its overall weight reaches this module as exx_info.info_global.hybrid_alpha ($=\max(|\alpha|,|\beta|)$, the factor by which coulomb_param was normalized).

Here is the caller graph for this function:

◆ initialize_DMR()

template<typename T, typename TR>
void LR_Util::initialize_DMR ( module_dm::DensityMatrix< T, TR > & dm,
const Parallel_Orbitals & pmat,
const UnitCell & ucell,
const Grid_Driver & gd,
const std::vector< double > & orb_cutoff )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize_HR()

template<typename T, typename TR>
void LR_Util::initialize_HR ( hamilt::HContainer< TR > & hR,
const UnitCell & ucell,
const Grid_Driver & gd,
const std::vector< double > & orb_cutoff )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ inner_product() [1/2]

double LR_Util::inner_product ( const double * vec1,
const double * vec2,
const int & size )
inline

=================ALGORITHM====================

Here is the caller graph for this function:

◆ inner_product() [2/2]

std::complex< double > LR_Util::inner_product ( const std::complex< double > * vec1,
const std::complex< double > * vec2,
const int & size )
inline

◆ is_hermitian()

template<typename T>
bool LR_Util::is_hermitian ( const T * mat,
const Parallel_Blkcyclic & pmat,
const double threshold,
const int my_rank )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_symmetric()

template<typename T>
bool LR_Util::is_symmetric ( const T * mat,
const Parallel_Blkcyclic & pmat,
const double threshold,
const int my_rank )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ k1_to_bfirst_wrapper()

template<typename T, typename Device>
psi::Psi< T, Device > LR_Util::k1_to_bfirst_wrapper ( const psi::Psi< T, Device > & psi_kfirst,
int nk_in,
int nbasis_in )

psi(nk=1, nbands=nb, nk * nbasis) -> psi(nb, nk, nbasis) without memory copy

===================Psi wrapper================= psi(nk=1, nbands=nb, nk * nbasis) -> psi(nb, nk, nbasis) without memory copy

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lapack_linear_solver()

template<typename T>
int LR_Util::lapack_linear_solver ( const T * A,
T * x,
const T * b,
const int n,
const int nrhs )

solve linear equations Ax=b using LAPACK

================linear-solver-lapack==============

Here is the caller graph for this function:

◆ lapack_linear_solver< double >()

template<>
int LR_Util::lapack_linear_solver< double > ( const double * A,
double * x,
const double * b,
const int n,
const int nrhs )
Here is the call graph for this function:

◆ lapack_linear_solver< std::complex< double > >()

template<>
int LR_Util::lapack_linear_solver< std::complex< double > > ( const std::complex< double > * A,
std::complex< double > * x,
const std::complex< double > * b,
const int n,
const int nrhs )
Here is the call graph for this function:

◆ lapl() [1/2]

template<typename T>
void LR_Util::lapl ( const std::vector< T > & rhor,
std::vector< T > & lapn,
const ModulePW::PW_Basis & rho_basis,
const double & tpiba2 )
Here is the call graph for this function:

◆ lapl() [2/2]

template<typename T>
void LR_Util::lapl ( const T * rhor,
T * lapn,
const ModulePW::PW_Basis & rho_basis,
const double & tpiba2 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_unique()

template<typename T, typename... Args>
std::unique_ptr< T > LR_Util::make_unique ( Args &&... args)

=================ALGORITHM==================== for lack of make_unique in c++11

Here is the caller graph for this function:

◆ matantisym()

template<typename T>
void LR_Util::matantisym ( T * inout,
const int n,
const Parallel_Blkcyclic & pmat )
Here is the caller graph for this function:

◆ matantisym< double >()

template<>
void LR_Util::matantisym< double > ( double * inout,
const int n,
const Parallel_Blkcyclic & pmat )
Here is the call graph for this function:

◆ matantisym< std::complex< double > >()

template<>
void LR_Util::matantisym< std::complex< double > > ( std::complex< double > * inout,
const int n,
const Parallel_Blkcyclic & pmat )
Here is the call graph for this function:

◆ matsym() [1/4]

template<typename T>
void LR_Util::matsym ( const T * in,
const int n,
const Parallel_Blkcyclic & pmat,
T * out )

◆ matsym() [2/4]

template<typename T>
void LR_Util::matsym ( const T * in,
const int n,
T * out )

================ BLAS ====================== calculate (A+A^T)/2

Here is the call graph for this function:
Here is the caller graph for this function:

◆ matsym() [3/4]

template<typename T>
void LR_Util::matsym ( T * inout,
const int n )

calculate (A+A^T)/2 (in-place version)

Here is the call graph for this function:

◆ matsym() [4/4]

template<typename T>
void LR_Util::matsym ( T * inout,
const int n,
const Parallel_Blkcyclic & pmat )

◆ matsym< double >() [1/2]

template<>
void LR_Util::matsym< double > ( const double * in,
const int n,
const Parallel_Blkcyclic & pmat,
double * out )

=================ALGORITHM====================

Here is the call graph for this function:

◆ matsym< double >() [2/2]

template<>
void LR_Util::matsym< double > ( double * inout,
const int n,
const Parallel_Blkcyclic & pmat )
Here is the call graph for this function:

◆ matsym< std::complex< double > >() [1/2]

template<>
void LR_Util::matsym< std::complex< double > > ( const std::complex< double > * in,
const int n,
const Parallel_Blkcyclic & pmat,
std::complex< double > * out )
Here is the call graph for this function:

◆ matsym< std::complex< double > >() [2/2]

template<>
void LR_Util::matsym< std::complex< double > > ( std::complex< double > * inout,
const int n,
const Parallel_Blkcyclic & pmat )
Here is the call graph for this function:

◆ mattrans() [1/2]

template<typename T>
void LR_Util::mattrans ( const T * in,
const int n,
const Parallel_Blkcyclic & pmat,
T * out )
Here is the caller graph for this function:

◆ mattrans() [2/2]

template<typename T>
void LR_Util::mattrans ( T * inout,
const int n,
const Parallel_Blkcyclic & pmat )

◆ mattrans< double >() [1/2]

template<>
void LR_Util::mattrans< double > ( const double * in,
const int n,
const Parallel_Blkcyclic & pmat,
double * out )
Here is the call graph for this function:

◆ mattrans< double >() [2/2]

template<>
void LR_Util::mattrans< double > ( double * inout,
const int n,
const Parallel_Blkcyclic & pmat )
Here is the call graph for this function:

◆ mattrans< std::complex< double > >() [1/2]

template<>
void LR_Util::mattrans< std::complex< double > > ( const std::complex< double > * in,
const int n,
const Parallel_Blkcyclic & pmat,
std::complex< double > * out )
Here is the call graph for this function:

◆ mattrans< std::complex< double > >() [2/2]

template<>
void LR_Util::mattrans< std::complex< double > > ( std::complex< double > * inout,
const int n,
const Parallel_Blkcyclic & pmat )
Here is the call graph for this function:

◆ mpi_type_blockhead()

MPI_Datatype LR_Util::mpi_type_blockhead ( )
inline
Here is the caller graph for this function:

◆ newTensor()

template<typename T>
ct::Tensor LR_Util::newTensor ( const ct::TensorShape & shape)
Here is the caller graph for this function:

◆ output_spectrum_mo()

void LR_Util::output_spectrum_mo ( const std::vector< std::complex< double > > & out_spectrum_mo,
const std::string & filename,
const double *const eig_ks,
const int nk,
const int nspin_tmp,
const int KS_num,
const K_Vectors & kv )

output the velocity matrix in KS presentation in human-read friendly format

◆ output_spectrum_mo_librpa()

void LR_Util::output_spectrum_mo_librpa ( const std::vector< std::complex< double > > & out_spectrum_mo,
const std::string & filename,
const int nk,
const int nspin_tmp,
const int nbands,
const int nbasis,
const int KS_num )

output the velocity matrix in KS presentation in LibRPA format

Here is the caller graph for this function:

◆ pA2pX()

template<typename T>
void LR_Util::pA2pX ( T * X_pX,
const T * X_pA,
const int nband,
const int nk,
const std::vector< int > & nocc,
const std::vector< int > & nvirt,
const std::vector< Parallel_Blkcyclic > & pX,
const Parallel_Blkcyclic & pA,
const int row_offset,
const int col_offset,
const bool openshell,
const int my_rank,
const int nproc )

assign X in pA to X in pX

Note
if use Cpxgemr2d, the communication time will be much more than MPIAlltoall by hand
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepare_xc_sigma() [1/2]

const std::vector< double > & LR_Util::prepare_xc_sigma ( const std::vector< double > & sigma,
const bool is_hse06,
std::vector< double > & hse_buffer )

Preserve signed sigma invariants except for the existing HSE06 stabilization.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepare_xc_sigma() [2/2]

const std::vector< double > & LR_Util::prepare_xc_sigma ( const std::vector< double > & sigma,
bool is_hse06,
std::vector< double > & hse_buffer,
std::vector< double > & jacobian )

Prepare stabilized sigma and its componentwise derivative.

Parameters
[in]sigmaLibXC sigma invariants, in bohr^-8, in native spin layout.
[in]is_hse06Whether to apply the existing HSE LR stabilization.
[out]hse_bufferOwned stabilized values; unused for other kernels.
[out]jacobianDerivatives of stabilized values with respect to raw sigma. Empty means identity; the clipped branch uses zero, including the nondifferentiable junction itself.
Returns
A borrowed reference to sigma or hse_buffer, valid while its owner lives.
Here is the call graph for this function:

◆ print_CsX()

template<typename T>
void LR_Util::print_CsX ( const TLRIX< T > & CsX,
const int nvirt,
const std::string & label,
const double & threshold = 1e-10 )
Here is the call graph for this function:

◆ print_DMR()

template<typename TK, typename TR>
void LR_Util::print_DMR ( const module_dm::DensityMatrix< TK, TR > & DMR,
const std::string & label,
const double & threshold = 1e-10 )
Here is the call graph for this function:

◆ print_excitation_energies()

void LR_Util::print_excitation_energies ( std::ostream & log,
const double * energies,
const int nstates,
const std::string & channel )
inline

Report selected excitation energies without evaluating optical matrix elements. Match transition_analysis's energy precision so existing energy regressions apply.

Here is the caller graph for this function:

◆ print_grid_nonzero()

template<typename T>
void LR_Util::print_grid_nonzero ( T * rho,
const int & nrxx,
const int & nnz,
const std::string & label,
const double & threshold = 1e-5 )

◆ print_HR()

template<typename TR>
void LR_Util::print_HR ( const hamilt::HContainer< TR > & HR,
const std::string & label,
const double & threshold = 1e-10 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_psi_bandfirst()

template<typename T>
void LR_Util::print_psi_bandfirst ( const psi::Psi< T > & psi,
const std::string & label,
const int & ib,
const double & threshold = 1e-10 )
Here is the call graph for this function:

◆ print_psi_kfirst()

template<typename T>
void LR_Util::print_psi_kfirst ( const psi::Psi< T > & psi,
const std::string & label,
const double & threshold = 1e-10 )
Here is the call graph for this function:

◆ print_tensor()

template<typename T>
void LR_Util::print_tensor ( const container::Tensor & t,
const std::string & label,
const Parallel_Blkcyclic * pmat,
const double & threshold = 1e-10 )
Here is the call graph for this function:

◆ print_value() [1/2]

template<typename T>
int LR_Util::print_value ( const T * ptr,
const int & size )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_value() [2/2]

template<typename T, typename... Args>
int LR_Util::print_value ( const T * ptr,
const int & size,
Args &&... args )
Here is the call graph for this function:

◆ read_psi_bandfirst()

template<typename T>
psi::Psi< T > LR_Util::read_psi_bandfirst ( const std::string & filename,
const int & rank )
Here is the call graph for this function:

◆ read_value() [1/3]

template<typename T, typename... Args>
int LR_Util::read_value ( const std::string & file,
T * ptr,
const int & size,
Args &&... args )
Here is the call graph for this function:

◆ read_value() [2/3]

template<typename T>
int LR_Util::read_value ( std::ifstream & ifs,
T * ptr,
const int & size )
Here is the caller graph for this function:

◆ read_value() [3/3]

template<typename T, typename... Args>
int LR_Util::read_value ( std::ifstream & ifs,
T * ptr,
const int & size,
Args &&... args )
Here is the call graph for this function:

◆ save_DMR() [1/4]

template void LR_Util::save_DMR ( const module_dm::DensityMatrix< Complex, Complex > & ,
const std::string & ,
const Parallel_Orbitals & ,
const std::string & ,
double ,
std::ostream &  )

◆ save_DMR() [2/4]

template void LR_Util::save_DMR ( const module_dm::DensityMatrix< Complex, double > & ,
const std::string & ,
const Parallel_Orbitals & ,
const std::string & ,
double ,
std::ostream &  )

◆ save_DMR() [3/4]

template void LR_Util::save_DMR ( const module_dm::DensityMatrix< double, double > & ,
const std::string & ,
const Parallel_Orbitals & ,
const std::string & ,
double ,
std::ostream &  )

◆ save_DMR() [4/4]

template<typename TK, typename TR>
void LR_Util::save_DMR ( const module_dm::DensityMatrix< TK, TR > & dm,
const std::string & filename,
const Parallel_Orbitals & pv,
const std::string & out_dir,
const double sparse_thr,
std::ostream & running_log )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_HR() [1/3]

template void LR_Util::save_HR ( const hamilt::HContainer< Complex > & ,
const std::string & ,
const Parallel_Orbitals & ,
const std::string & ,
double ,
std::ostream &  )

◆ save_HR() [2/3]

template void LR_Util::save_HR ( const hamilt::HContainer< double > & ,
const std::string & ,
const Parallel_Orbitals & ,
const std::string & ,
double ,
std::ostream &  )

◆ save_HR() [3/3]

template<typename TR>
void LR_Util::save_HR ( const hamilt::HContainer< TR > & hR,
const std::string & filename,
const Parallel_Orbitals & pv,
const std::string & out_dir,
const double sparse_thr,
std::ostream & running_log )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scatter_full_to_2d()

template<typename T>
void LR_Util::scatter_full_to_2d ( const Parallel_Blkcyclic & pv,
const T * fullmat,
T * submat,
const bool col_first = false )

scatter full matrix to 2d block-cyclic distributed matrix

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_dim()

void LR_Util::set_dim ( const MO_TYPE type,
const int & nocc,
const int & nvirt,
int & nmo1,
int & nmo2,
int & imo1,
int & imo2 )
inline
Here is the caller graph for this function:

◆ set_HR_real_imag_part()

void LR_Util::set_HR_real_imag_part ( const hamilt::HContainer< double > & HR_real,
hamilt::HContainer< std::complex< double > > & HR,
const char & type )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_ix_map_diagonal()

std::pair< ModuleBase::matrix, std::vector< std::pair< int, int > > > LR_Util::set_ix_map_diagonal ( bool mode,
int nc,
int nv )

set the index map: ix to (ic, iv) and vice versa by diagonal traverse the c-v pairs leftdown -> rightup for mode 0, rightup -> leftdown for mode 1

Parameters
mode0: homo-1 -> lumo first; 1: homo -> lumo+1 first
ncnumber of occupied bands
nvnumber of virtual bands
Returns
[iciv2ix, ix2iciv]
Here is the caller graph for this function:

◆ setup_2d_division() [1/2]

void LR_Util::setup_2d_division ( Parallel_Blkcyclic & pv,
int nb,
int gr,
int gc )

=================2D-block Parallel===============

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_2d_division() [2/2]

void LR_Util::setup_2d_division ( Parallel_Blkcyclic & pv,
int nb,
int gr,
int gc,
const int & blacs_ctxt_in )
Here is the call graph for this function:

◆ spatial_k_weight()

double LR_Util::spatial_k_weight ( const double ks_weight,
const int nspin_global )
inline

KS weights include a factor two only for nspin=1. Optical singlet amplitudes account for that degeneracy separately through sqrt(2).

Here is the caller graph for this function:

◆ spatial_k_weights()

std::vector< double > LR_Util::spatial_k_weights ( const std::vector< double > & ks_weights,
const int nspin_global )
inline

Convert KS weights at the LR/spectrum boundary without changing the shared k list. BSE already owns spatial weights and must pass them directly to LR_Spectrum.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ spin_population_difference()

int LR_Util::spin_population_difference ( const ModuleBase::matrix & wg,
const int kpar,
const int rank_in_pool )

Sum k-point spin populations before rounding; count each pool only once.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tolower()

std::string LR_Util::tolower ( const std::string & str)

=================string option====================

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toupper()

std::string LR_Util::toupper ( const std::string & str)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transpose_DMR() [1/2]

template<typename TK>
void LR_Util::transpose_DMR ( module_dm::DensityMatrix< TK, double > & dm,
const Parallel_Orbitals & pv )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transpose_DMR() [2/2]

template<typename TK>
void LR_Util::transpose_DMR ( module_dm::DensityMatrix< TK, std::complex< double > > & dm,
const Parallel_Orbitals & pv )
Here is the call graph for this function:

◆ weighted_velocity_transition()

template<typename T>
std::complex< double > LR_Util::weighted_velocity_transition ( const std::complex< double > & velocity,
const T & x,
const T & y,
const double gap,
const bool use_ks_gap,
const std::vector< double > & weights,
const int spin,
const int ik,
const int nk )
inline

One production velocity-gauge transition, before the common i/omega and singlet factors. Spatial weights are indexed by response spin and k point.

Here is the caller graph for this function:

◆ write_psi_bandfirst() [1/2]

template<typename T>
void LR_Util::write_psi_bandfirst ( const psi::Psi< T > & psi,
const std::string & filename,
const int & rank,
const double & threshold = 1e-10,
const int & precision = 8 )
Here is the call graph for this function:

◆ write_psi_bandfirst() [2/2]

template<typename T>
void LR_Util::write_psi_bandfirst ( const T * psi,
const int & nband,
const int & nk,
const int & nbasis,
const std::string & filename,
const int & rank,
const double & threshold = 1e-10,
const int & precision = 8 )
Here is the call graph for this function:

◆ write_value() [1/3]

template<typename T, typename... Args>
int LR_Util::write_value ( const std::string & file,
const int & prec,
const T * ptr,
const int & size,
Args &&... args )
Here is the call graph for this function:

◆ write_value() [2/3]

template<typename T>
int LR_Util::write_value ( std::ofstream & ofs,
const T * ptr,
const int & size )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_value() [3/3]

template<typename T, typename... Args>
int LR_Util::write_value ( std::ofstream & ofs,
const T * ptr,
const int & size,
Args &&... args )
Here is the call graph for this function: