Loading...
Searching...
No Matches
principal_phase_branch.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * PrincipalPhaseBranch — Im ln M_nn as std::arg returns it, on (-pi, pi].
5 *
6 * The branch of a gauge nobody has a centre for yet: it is what gives the
7 * projection gauge its centres in the first place. It jumps by 2 pi as a
8 * diagonal element crosses the negative real axis, so a minimisation is
9 * never run on it (SpreadFunctional says what that costs); a test that wants
10 * to exhibit the jump is.
11 */
12
13#include <complex>
14
17
18namespace q3 {
19
21 public:
22 [[nodiscard]] Real phase_of(const Complex& diagonal_overlap,
23 int /*wannier_function*/,
24 const Vector3D& /*b_vector*/) const override {
25 return std::arg(diagonal_overlap);
26 }
27
28 /// The principal value needs nothing per function, so it serves any number of them.
29 void require_serves(int /*number_of_wannier_functions*/) const override {}
30};
31
32} // namespace q3
Real phase_of(const Complex &diagonal_overlap, int, const Vector3D &) const override
void require_serves(int) const override
The principal value needs nothing per function, so it serves any number of them.
double Real
std::complex< double > Complex