Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
4411b559
Commit
4411b559
authored
4 years ago
by
Beerwerth, Randolf
Browse files
Options
Downloads
Patches
Plain Diff
use exp_I(x) instead of exp(I * x)
parent
a8194279
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Core/HardParticle/FormFactorTruncatedSpheroid.cpp
+2
-2
2 additions, 2 deletions
Core/HardParticle/FormFactorTruncatedSpheroid.cpp
Core/HardParticle/Ripples.cpp
+3
-3
3 additions, 3 deletions
Core/HardParticle/Ripples.cpp
with
5 additions
and
5 deletions
Core/HardParticle/FormFactorTruncatedSpheroid.cpp
+
2
−
2
View file @
4411b559
...
...
@@ -70,7 +70,7 @@ complex_t FormFactorTruncatedSpheroid::Integrand(double Z) const
complex_t
qrRz
=
std
::
sqrt
(
m_q
.
x
()
*
m_q
.
x
()
+
m_q
.
y
()
*
m_q
.
y
())
*
Rz
;
complex_t
J1_qrRz_div_qrRz
=
MathFunctions
::
Bessel_J1c
(
qrRz
);
return
Rz
*
Rz
*
J1_qrRz_div_qrRz
*
std
::
exp
(
I
*
m_q
.
z
()
*
Z
);
return
Rz
*
Rz
*
J1_qrRz_div_qrRz
*
exp_I
(
m_q
.
z
()
*
Z
);
}
complex_t
FormFactorTruncatedSpheroid
::
evaluate_for_q
(
cvector_t
q
)
const
...
...
@@ -82,7 +82,7 @@ complex_t FormFactorTruncatedSpheroid::evaluate_for_q(cvector_t q) const
if
(
std
::
abs
(
m_q
.
mag
())
<=
std
::
numeric_limits
<
double
>::
epsilon
())
return
M_PI
/
3.
/
fp
*
(
H
*
H
*
(
3.
*
R
-
H
/
fp
)
-
m_dh
*
m_dh
*
(
3.
*
R
-
m_dh
/
fp
));
complex_t
z_part
=
std
::
exp
(
I
*
m_q
.
z
()
*
(
H
-
fp
*
R
));
complex_t
z_part
=
exp_I
(
m_q
.
z
()
*
(
H
-
fp
*
R
));
return
M_TWOPI
*
z_part
*
ComplexIntegrator
().
integrate
([
&
](
double
Z
)
{
return
Integrand
(
Z
);
},
fp
*
R
-
H
,
fp
*
R
-
m_dh
);
...
...
This diff is collapsed.
Click to expand it.
Core/HardParticle/Ripples.cpp
+
3
−
3
View file @
4411b559
...
...
@@ -60,13 +60,13 @@ complex_t ripples::profile_yz_cosine(complex_t qy, complex_t qz, double width, d
// numerical integration otherwise
const
complex_t
ay
=
qy
*
width
/
M_TWOPI
;
const
complex_t
az
=
I
*
qz
*
(
height
/
2
);
const
complex_t
az
=
qz
*
(
height
/
2
);
const
auto
integrand
=
[
&
](
double
u
)
->
complex_t
{
return
sin
(
u
)
*
exp
(
az
*
std
::
cos
(
u
))
*
(
ay
==
0.
?
u
:
sin
(
ay
*
u
)
/
ay
);
return
sin
(
u
)
*
exp
_I
(
az
*
std
::
cos
(
u
))
*
(
ay
==
0.
?
u
:
sin
(
ay
*
u
)
/
ay
);
};
complex_t
integral
=
ComplexIntegrator
().
integrate
(
integrand
,
0
,
M_PI
);
return
factor
*
integral
*
exp
(
az
)
*
(
height
/
2
);
return
factor
*
integral
*
exp
_I
(
az
)
*
(
height
/
2
);
}
//! Complex form factor of triangular ripple.
...
...
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