Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
a077a2c5
Commit
a077a2c5
authored
7 years ago
by
Anthony Lim
Browse files
Options
Downloads
Patches
Plain Diff
refs #19802 clang format
parent
74817b09
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/CurveFitting/src/Functions/DynamicKuboToyabe.cpp
+6
-6
6 additions, 6 deletions
Framework/CurveFitting/src/Functions/DynamicKuboToyabe.cpp
with
6 additions
and
6 deletions
Framework/CurveFitting/src/Functions/DynamicKuboToyabe.cpp
+
6
−
6
View file @
a077a2c5
...
@@ -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
];
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment