Skip to content
Snippets Groups Projects
Commit a077a2c5 authored by Anthony Lim's avatar Anthony Lim
Browse files

refs #19802 clang format

parent 74817b09
No related branches found
No related tags found
No related merge requests found
...@@ -128,8 +128,8 @@ double integral(double func(const double, const double, const double), ...@@ -128,8 +128,8 @@ double integral(double func(const double, const double, const double),
// f1: function to integrate // f1: function to integrate
double f1(const double x, const double G, const double w0) { double f1(const double x, const double G, const double w0) {
// G = Delta in doc // G = Delta in doc
// x = dummy time variable // x = dummy time variable
return (exp(-G * G * x * x / 2) * sin(w0 * x)); return (exp(-G * G * x * x / 2) * sin(w0 * x));
} }
...@@ -143,7 +143,7 @@ double ZFKT(const double x, const double G) { ...@@ -143,7 +143,7 @@ double ZFKT(const double x, const double G) {
// Static non-zero field Kubo Toyabe relaxation function // Static non-zero field Kubo Toyabe relaxation function
double HKT(const double x, const double G, const double F) { double HKT(const double x, const double G, const double F) {
// q = Delta^2 t^2 in doc // q = Delta^2 t^2 in doc
const double q = G * G * x * x; const double q = G * G * x * x;
// Muon gyromagnetic ratio * 2 * PI // Muon gyromagnetic ratio * 2 * PI
const double gm = 2 * M_PI * PhysicalConstants::MuonGyromagneticRatio; const double gm = 2 * M_PI * PhysicalConstants::MuonGyromagneticRatio;
...@@ -172,10 +172,10 @@ double HKT(const double x, const double G, const double F) { ...@@ -172,10 +172,10 @@ double HKT(const double x, const double G, const double F) {
(1 - 2 * r * (1 - exp(-q / 2) * cos(w * x)) + 2 * r * r * w * ig); (1 - 2 * r * (1 - exp(-q / 2) * cos(w * x)) + 2 * r * r * w * ig);
if (F > 2 * G) { if (F > 2 * G) {
// longitudinal Gaussian field // longitudinal Gaussian field
return ktb; return ktb;
} else { } else {
// //
const double kz = ZFKT(x, G); const double kz = ZFKT(x, G);
return kz + F / 2 / G * (ktb - kz); return kz + F / 2 / G * (ktb - kz);
} }
...@@ -228,7 +228,7 @@ double DynamicKuboToyabe::getDKT(double t, double G, double F, double v, ...@@ -228,7 +228,7 @@ double DynamicKuboToyabe::getDKT(double t, double G, double F, double v,
// Generate dynamic Kubo Toyabe // Generate dynamic Kubo Toyabe
for (int k = 0; k < tsmax; k++) { for (int k = 0; k < tsmax; k++) {
double y = gStat[k]; double y = gStat[k];
// do integration // do integration
for (int j = k - 1; j > 0; j--) { for (int j = k - 1; j > 0; j--) {
y = y * (1 - hop) + hop * gDyn[k - j] * gStat[j]; y = y * (1 - hop) + hop * gDyn[k - j] * gStat[j];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment