2 #include "DiracOperator/TensorOperator.hpp"
3 #include "qip/String.hpp"
14 enum class Method { TDHF, basis, diagram, none, Error };
16 inline Method ParseMethod(std::string_view str) {
31 enum class dPsiType { X, Y };
32 enum class StateType { bra, ket };
43 double m_core_eps{1.0};
45 double m_core_omega{0.0};
51 double m_eps{1.0e-10};
60 int rank()
const {
return m_rank; }
61 int parity()
const {
return m_pi; }
62 bool imagQ()
const {
return m_imag; }
70 double eta()
const {
return m_eta; }
73 assert(
eta >= 0.0 &&
eta < 1 &&
"Must have 0 <= eta < 1");
81 virtual void solve_core(
const double omega,
int max_its = 100,
82 const bool print =
true) = 0;
General operator (virtual base class); operators derive from this.
Definition: TensorOperator.hpp:110
bool imaginaryQ() const
returns true if operator is imaginary (has imag MEs)
Definition: TensorOperator.hpp:171
int parity() const
returns parity, as integer (+1 or -1)
Definition: TensorOperator.hpp:174
Stores radial Dirac spinor: F_nk = (f, g)
Definition: DiracSpinor.hpp:41
Virtual Core Polarisation class, for <a||dV||b>. See TDHF, DiagramRPA, etc.
Definition: CorePolarisation.hpp:35
virtual void clear()=0
Clears the dPsi orbitals (sets to zero)
virtual double dV(const DiracSpinor &Fn, const DiracSpinor &Fm) const =0
Calculate reduced matrix element <n||dV||m>
double last_eps() const
Returns eps (convergance) of last solve_core run.
Definition: CorePolarisation.hpp:55
double last_omega() const
Returns omega (frequency) of last solve_core run.
Definition: CorePolarisation.hpp:59
void set_eta(double eta)
Set/update damping factor; 0 means no damping. Must have 0 <= eta < 1.
Definition: CorePolarisation.hpp:72
double eps_target() const
Convergance target.
Definition: CorePolarisation.hpp:67
virtual void solve_core(const double omega, int max_its=100, const bool print=true)=0
Solve RPA equations (for whichever method) for core.
virtual Method method() const =0
Returns RPA method.
double eta() const
Damping factor; 0 means no damping. Must have 0 <= eta < 1.
Definition: CorePolarisation.hpp:70
double last_its() const
Returns its (# of iterations) of last solve_core run.
Definition: CorePolarisation.hpp:57
double & eps_target()
Convergance target.
Definition: CorePolarisation.hpp:65
Dirac Operators: General + derived.
Definition: GenerateOperator.cpp:12
Calculates many-body corrections (RPA) to matrix elements of external field.
Definition: calcMatrixElements.cpp:14
bool ci_compare(std::string_view s1, std::string_view s2)
Case insensitive string compare. Essentially: LowerCase(s1)==LowerCase(s2)
Definition: String.hpp:92