27 , m_integrate_xi(false)
28 , m_substructure(nullptr)
44 double alpha,
double xi,
unsigned size_1,
76 [&](
double xi) ->
double {
return interferenceForXi(xi, q.x(), q.y(), outer_iff); },
90 throw std::runtime_error(
"InterferenceFinite2DLattice::lattice() -> Error. "
91 "No lattice defined.");
111 const double xialpha = xi +
m_lattice->latticeAngle();
113 const double qadiv2 = (q.x() * a * std::cos(xi) + q.y() * a * std::sin(xi)) / 2.0;
114 const double qbdiv2 = (q.x() * b * std::cos(xialpha) + q.y() * b * std::sin(xialpha)) / 2.0;
120 double outer_iff)
const
122 const R3 q = R3(qx, qy, 0.0);
124 const double delta_xi = xi -
m_lattice->rotationAngle();
125 return m_substructure->structureFactor(q.rotatedZ(-delta_xi), sub_iff);
Defines the macro ASSERT.
#define ASSERT(condition)
Defines M_PI and some more mathematical constants.
Defines classes RealIntegrator, ComplexIntegrator.
Defines class Interference2DSuperLattice.
Defines class InterferenceNone.
A two-dimensional Bravais lattice with no special symmetry.
Abstract base class of interference functions.
IInterference * clone() const override=0
double DWfactor(R3 q) const
structureFactors the Debye-Waller factor for a given wavevector transfer
Interference function of a 2D superlattice with a configurable interference function for each lattice...
~Interference2DSuperLattice() override
void setSubstructureIFF(const IInterference &sub_iff)
std::vector< const INode * > nodeChildren() const override
Returns all children.
double iff_without_dw(R3 q) const override
Calculates the structure factor without Debye-Waller factor.
Interference2DSuperLattice * clone() const override
std::unique_ptr< IInterference > m_substructure
IFF of substructure.
void setIntegrationOverXi(bool integrate_xi)
const Lattice2D & lattice() const
unsigned m_size_2
Size of the finite lattice in lattice units.
bool m_integrate_xi
Integrate over the orientation xi.
double interferenceForXi(double xi, double qx, double qy, double outer_iff) const
const IInterference & substructureIFF() const
Interference2DSuperLattice(const Lattice2D &lattice, unsigned size_1, unsigned size_2)
bool integrationOverXi() const
std::unique_ptr< Lattice2D > m_lattice
double structureFactor(R3 q, double outer_iff=1.0) const override
The interference function for a given wavevector transfer.
Default interference function (i.e. absence of any interference).
A two-dimensional Bravais lattice.
Lattice2D * clone() const override=0
To integrate a real function of a real variable.
double integrate(const std::function< double(double)> &f, double lmin, double lmax)
double Laue(double x, size_t N)
Real Laue function: .