Loading...
Searching...
No Matches
init.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * PhaseBranch — which branch of Im ln M_nn(k,b) the spread functional reads.
5 *
6 * The diagonal phase of an overlap is defined up to 2 pi, and Omega_D squares
7 * it, so the choice of branch is part of the definition of the functional:
8 * SpreadFunctional documents why, and why the choice must be held fixed for
9 * the whole of a minimisation. Two choices exist and they are two
10 * functionals, so they are two classes here rather than a mode of one --
11 * PrincipalPhaseBranch, the value std::arg returns, and GuidedPhaseBranch,
12 * the branch a centre known in advance implies.
13 */
14
16
17namespace q3 {
18
20 public:
21 virtual ~PhaseBranch() = default;
22
23 /**
24 * The phase of `diagonal_overlap`, M_nn(k,b) of Wannier function
25 * `wannier_function` along `b_vector`, on this branch.
26 */
27 [[nodiscard]] virtual Real phase_of(const Complex& diagonal_overlap,
28 int wannier_function,
29 const Vector3D& b_vector) const = 0;
30
31 /// Refuses, with std::invalid_argument, a functional of a size this branch cannot serve.
32 virtual void require_serves(int number_of_wannier_functions) const = 0;
33};
34
35} // namespace q3
virtual ~PhaseBranch()=default
virtual Real phase_of(const Complex &diagonal_overlap, int wannier_function, const Vector3D &b_vector) const =0
virtual void require_serves(int number_of_wannier_functions) const =0
Refuses, with std::invalid_argument, a functional of a size this branch cannot serve.
double Real
std::complex< double > Complex