ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
invmat_ri.h
Go to the documentation of this file.
1//=======================
2// AUTHOR : Peize Lin
3// DATE : 2022-08-17
4//=======================
5
6#ifndef ABACUS_SOURCE_LCAO_MODULE_RI_INVMAT_RI_H
7#define ABACUS_SOURCE_LCAO_MODULE_RI_INVMAT_RI_H
8
9
10
11#include <RI/global/Tensor.h>
12#include <vector>
13#include <array>
14
15template <typename Tdata>
17{
18 public:
19 enum class Method
20 {
23 };
24 void cal_inverse(const Method& method, const double& threshold_condition_number = 0.);
25
27 std::array<RI::Tensor<Tdata>, 3> cal_inverse_with_derivatives(
28 const std::array<RI::Tensor<Tdata>, 3>& derivatives,
29 const double threshold_condition_number);
30
31 void input(const RI::Tensor<Tdata>& m);
32 void input(const std::vector<std::vector<RI::Tensor<Tdata>>>& ms);
34 std::vector<std::vector<RI::Tensor<Tdata>>> output(const std::vector<size_t>& n0,
35 const std::vector<size_t>& n1) const;
36
37 private:
38 void using_potrf();
39 void using_syev(const double& threshold_condition_number);
40 void copy_down_triangle();
42};
43
44
45#endif // ABACUS_SOURCE_LCAO_MODULE_RI_INVMAT_RI_H
Definition invmat_ri.h:17
Method
Definition invmat_ri.h:20
@ syev
Definition invmat_ri.h:22
@ potrf
Definition invmat_ri.h:21
RI::Tensor< Tdata > A
Definition invmat_ri.h:41
void using_potrf()
Definition invmat_ri.cpp:33
void copy_down_triangle()
Definition invmat_ri.cpp:319
RI::Tensor< Tdata > output() const
Definition invmat_ri.cpp:286
void using_syev(const double &threshold_condition_number)
Definition invmat_ri.cpp:105
std::array< RI::Tensor< Tdata >, 3 > cal_inverse_with_derivatives(const std::array< RI::Tensor< Tdata >, 3 > &derivatives, const double threshold_condition_number)
Invert with a fixed-rank spectral cutoff and differentiate the retained subspace.
Definition invmat_ri.cpp:146
void cal_inverse(const Method &method, const double &threshold_condition_number=0.)
Definition invmat_ri.cpp:19
Definition rpa_lri_coeff_v1.h:11
Input_para input
Definition test_io_sys_var.cpp:58