summaryrefslogtreecommitdiff
path: root/log_get_energy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'log_get_energy.cpp')
-rw-r--r--log_get_energy.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/log_get_energy.cpp b/log_get_energy.cpp
index b01034c..a183861 100644
--- a/log_get_energy.cpp
+++ b/log_get_energy.cpp
@@ -16,7 +16,7 @@ int main(int argc, char* argv[]) {
Real Δτ = 0.1;
Real k = 0.1;
unsigned pad = 2;
- Real shift = 0.5;
+ Real logShift = 0;
/* Iteration parameters */
Real β₀ = 0;
@@ -25,7 +25,7 @@ int main(int argc, char* argv[]) {
int opt;
- while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:k:D:0:h:")) != -1) {
+ while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:k:h:D:0:")) != -1) {
switch (opt) {
case 'p':
p = atoi(optarg);
@@ -49,7 +49,7 @@ int main(int argc, char* argv[]) {
k = atof(optarg);
break;
case 'h':
- shift = atof(optarg);
+ logShift = atof(optarg);
break;
case 'D':
Δτ = atof(optarg);
@@ -63,8 +63,10 @@ int main(int argc, char* argv[]) {
}
unsigned N = pow(2, log2n);
+ Real Γ₀ = 1;
+ Real μ₀ = τ₀ > 0 ? (sqrt(1+4*Γ₀*τ₀)-1)/(2*τ₀) : Γ₀;
- LogarithmicFourierTransform fft(N, k, Δτ, pad, shift);
+ LogarithmicFourierTransform fft(N, k, Δτ, pad, μ₀ * pow(10, logShift));
std::vector<Real> C(N);
std::vector<Real> R(N);
@@ -76,7 +78,7 @@ int main(int argc, char* argv[]) {
std::cout << std::setprecision(16);
while (β += Δβ, β <= βₘₐₓ) {
- if (logFourierLoad(C, R, Ct, Rt, p, s, λ, τ₀, β, log2n, Δτ, shift)) {
+ if (logFourierLoad(C, R, Ct, Rt, p, s, λ, τ₀, β, log2n, Δτ, logShift)) {
Real e = energy(fft, C, R, p, s, λ, β);