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
9d68744f
Commit
9d68744f
authored
4 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
copy edit
parent
7ff46b96
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Core/Correlations/IPeakShape.cpp
+1
-1
1 addition, 1 deletion
Core/Correlations/IPeakShape.cpp
Core/Correlations/IPeakShape.h
+11
-11
11 additions, 11 deletions
Core/Correlations/IPeakShape.h
Core/Lattice/Lattice2D.cpp
+13
-3
13 additions, 3 deletions
Core/Lattice/Lattice2D.cpp
with
25 additions
and
15 deletions
Core/Correlations/IPeakShape.cpp
+
1
−
1
View file @
9d68744f
...
@@ -76,7 +76,7 @@ double Cauchy3D(double q2, double domainsize)
...
@@ -76,7 +76,7 @@ double Cauchy3D(double q2, double domainsize)
}
// namespace
}
// namespace
// ************************************************************************** //
// ************************************************************************** //
//
class
IPeakShape
//
interface
IPeakShape
// ************************************************************************** //
// ************************************************************************** //
IPeakShape
::
IPeakShape
(
const
NodeMeta
&
meta
,
const
std
::
vector
<
double
>&
PValues
)
IPeakShape
::
IPeakShape
(
const
NodeMeta
&
meta
,
const
std
::
vector
<
double
>&
PValues
)
...
...
This diff is collapsed.
Click to expand it.
Core/Correlations/IPeakShape.h
+
11
−
11
View file @
9d68744f
...
@@ -62,7 +62,7 @@ private:
...
@@ -62,7 +62,7 @@ private:
double
m_domainsize
;
double
m_domainsize
;
};
};
//!
Class that implements a
n isotropic Lorentzian peak shape of a Bragg peak.
//!
A
n isotropic Lorentzian peak shape of a Bragg peak.
//!
//!
//! @ingroup samples_internal
//! @ingroup samples_internal
...
@@ -84,7 +84,7 @@ private:
...
@@ -84,7 +84,7 @@ private:
double
m_domainsize
;
double
m_domainsize
;
};
};
//!
Class that implements a
peak shape that is Gaussian in the radial direction and
//!
A
peak shape that is Gaussian in the radial direction and
//! uses the Mises-Fisher distribution in the angular direction.
//! uses the Mises-Fisher distribution in the angular direction.
//!
//!
//! @ingroup samples_internal
//! @ingroup samples_internal
...
@@ -109,8 +109,8 @@ private:
...
@@ -109,8 +109,8 @@ private:
double
m_kappa
;
double
m_kappa
;
};
};
//!
Class that implements a
peak shape that is Lorentzian in the radial direction and
//!
A
peak shape that is Lorentzian in the radial direction and
uses the
//!
uses the
Mises-Fisher distribution in the angular direction.
//! Mises-Fisher distribution in the angular direction.
//!
//!
//! @ingroup samples_internal
//! @ingroup samples_internal
...
@@ -134,9 +134,8 @@ private:
...
@@ -134,9 +134,8 @@ private:
double
m_kappa
;
double
m_kappa
;
};
};
//! Class that implements a peak shape that is Gaussian in the radial direction and a
//! A peak shape that is Gaussian in the radial direction and a convolution of a
//! convolution of a Mises-Fisher distribution with a Mises distribution on the
//! Mises-Fisher distribution with a Mises distribution on the two-sphere.
//! two-sphere
//!
//!
//! @ingroup samples_internal
//! @ingroup samples_internal
...
@@ -156,17 +155,17 @@ public:
...
@@ -156,17 +155,17 @@ public:
bool
angularDisorder
()
const
override
{
return
true
;
}
bool
angularDisorder
()
const
override
{
return
true
;
}
private
:
private
:
double
integrand
(
double
phi
)
const
;
double
m_max_intensity
;
double
m_max_intensity
;
double
m_radial_size
;
double
m_radial_size
;
kvector_t
m_zenith
;
kvector_t
m_zenith
;
double
m_kappa_1
,
m_kappa_2
;
double
m_kappa_1
,
m_kappa_2
;
double
integrand
(
double
phi
)
const
;
mutable
double
m_theta
,
m_phi
;
mutable
double
m_theta
,
m_phi
;
mutable
kvector_t
m_ux
,
m_uy
,
m_up
;
mutable
kvector_t
m_ux
,
m_uy
,
m_up
;
};
};
//! Class that implements a peak shape that is a convolution of a Mises-Fisher distribution
//! A peak shape that is a convolution of a Mises-Fisher distribution with a 3d Gaussian.
//! with a 3d Gaussian
//!
//!
//! @ingroup samples_internal
//! @ingroup samples_internal
...
@@ -185,11 +184,12 @@ public:
...
@@ -185,11 +184,12 @@ public:
bool
angularDisorder
()
const
override
{
return
true
;
}
bool
angularDisorder
()
const
override
{
return
true
;
}
private
:
private
:
double
integrand
(
double
phi
)
const
;
double
m_max_intensity
;
double
m_max_intensity
;
double
m_radial_size
;
double
m_radial_size
;
kvector_t
m_zenith
;
kvector_t
m_zenith
;
double
m_kappa
;
double
m_kappa
;
double
integrand
(
double
phi
)
const
;
mutable
double
m_theta
,
m_phi
,
m_qr
;
mutable
double
m_theta
,
m_phi
,
m_qr
;
mutable
kvector_t
m_ux
,
m_uy
,
m_p
;
mutable
kvector_t
m_ux
,
m_uy
,
m_p
;
};
};
...
...
This diff is collapsed.
Click to expand it.
Core/Lattice/Lattice2D.cpp
+
13
−
3
View file @
9d68744f
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
#include
"Core/Parametrization/RealParameter.h"
#include
"Core/Parametrization/RealParameter.h"
#include
<cmath>
#include
<cmath>
// ************************************************************************** //
// class Lattice2D
// ************************************************************************** //
Lattice2D
::
Lattice2D
(
const
NodeMeta
&
meta
,
const
std
::
vector
<
double
>&
PValues
)
Lattice2D
::
Lattice2D
(
const
NodeMeta
&
meta
,
const
std
::
vector
<
double
>&
PValues
)
:
INode
(
meta
,
PValues
)
:
INode
(
meta
,
PValues
)
{
{
...
@@ -57,7 +61,9 @@ void Lattice2D::setRotationEnabled(bool enabled) // TODO ASAP replace by generic
...
@@ -57,7 +61,9 @@ void Lattice2D::setRotationEnabled(bool enabled) // TODO ASAP replace by generic
}
}
}
}
// --------------------------------------------------------------------------------------------- //
// ************************************************************************** //
// class BasicLattice
// ************************************************************************** //
BasicLattice
::
BasicLattice
(
double
length1
,
double
length2
,
double
angle
,
double
xi
)
BasicLattice
::
BasicLattice
(
double
length1
,
double
length2
,
double
angle
,
double
xi
)
:
Lattice2D
(
xi
),
m_length1
(
length1
),
m_length2
(
length2
),
m_angle
(
angle
)
:
Lattice2D
(
xi
),
m_length1
(
length1
),
m_length2
(
length2
),
m_angle
(
angle
)
...
@@ -82,7 +88,9 @@ double BasicLattice::unitCellArea() const
...
@@ -82,7 +88,9 @@ double BasicLattice::unitCellArea() const
return
std
::
abs
(
m_length1
*
m_length2
*
std
::
sin
(
m_angle
));
return
std
::
abs
(
m_length1
*
m_length2
*
std
::
sin
(
m_angle
));
}
}
// --------------------------------------------------------------------------------------------- //
// ************************************************************************** //
// class SquareLattice
// ************************************************************************** //
SquareLattice
::
SquareLattice
(
double
length
,
double
xi
)
:
Lattice2D
(
xi
),
m_length
(
length
)
SquareLattice
::
SquareLattice
(
double
length
,
double
xi
)
:
Lattice2D
(
xi
),
m_length
(
length
)
{
{
...
@@ -109,7 +117,9 @@ double SquareLattice::unitCellArea() const
...
@@ -109,7 +117,9 @@ double SquareLattice::unitCellArea() const
return
std
::
abs
(
m_length
*
m_length
);
return
std
::
abs
(
m_length
*
m_length
);
}
}
// --------------------------------------------------------------------------------------------- //
// ************************************************************************** //
// class HexagonalLattice
// ************************************************************************** //
HexagonalLattice
::
HexagonalLattice
(
double
length
,
double
xi
)
:
Lattice2D
(
xi
),
m_length
(
length
)
HexagonalLattice
::
HexagonalLattice
(
double
length
,
double
xi
)
:
Lattice2D
(
xi
),
m_length
(
length
)
{
{
...
...
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