summaryrefslogtreecommitdiff
path: root/langevin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'langevin.cpp')
-rw-r--r--langevin.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/langevin.cpp b/langevin.cpp
index dcf8c68..d704266 100644
--- a/langevin.cpp
+++ b/langevin.cpp
@@ -1,8 +1,8 @@
-#include <getopt.h>
-#include <cstdlib>
-#include <random>
#include <complex>
+#include <cstdlib>
#include <functional>
+#include <getopt.h>
+#include <random>
#include <eigen3/Eigen/Core>
#include <eigen3/unsupported/Eigen/CXX11/Tensor>
@@ -60,7 +60,8 @@ std::tuple<double, Vector> WdW(const Tensor& J, const Vector& z) {
return {W, dW};
}
-Vector langevin(const Tensor& J, const Vector& z0, double T, double γ0, std::function<bool(double, unsigned)> quit, Rng& r) {
+Vector langevin(const Tensor& J, const Vector& z0, double T, double γ0,
+ std::function<bool(double, unsigned)> quit, Rng& r) {
Vector z = z0;
double W;
@@ -97,13 +98,13 @@ Vector langevin(const Tensor& J, const Vector& z0, double T, double γ0, std::fu
int main(int argc, char* argv[]) {
// model parameters
unsigned N = 10; // number of spins
- double T = 1; // temperature
- double Rκ = 1; // real part of distribution parameter
- double Iκ = 0; // imaginary part of distribution parameter
+ double T = 1; // temperature
+ double Rκ = 1; // real part of distribution parameter
+ double Iκ = 0; // imaginary part of distribution parameter
// simulation parameters
- double δ = 1e-2; // threshold for determining saddle
- double γ = 1e-2; // step size
+ double δ = 1e-2; // threshold for determining saddle
+ double γ = 1e-2; // step size
unsigned t = 1000; // number of Langevin steps
int opt;