31 , m_integrate_xi(false)
57 throw std::runtime_error(
"InterferenceFinite2DLattice::lattice() -> Error. "
58 "No lattice defined.");
65 return area == 0.0 ? 0.0 : 1.0 / area;
70 return std::vector<const INode*>() <<
m_lattice;
87 double xialpha = xi +
m_lattice->latticeAngle();
89 double qadiv2 = (qx * a * std::cos(xi) + qy * a * std::sin(xi)) / 2.0;
90 double qbdiv2 = (qx * b * std::cos(xialpha) + qy * b * std::sin(xialpha)) / 2.0;
92 double lattice_factor = ampl * ampl / (
m_N_1 *
m_N_2);
94 return lattice_factor;
Defines M_PI and some more mathematical constants.
Defines classes RealIntegrator, ComplexIntegrator.
Defines class InterferenceFinite2DLattice.
Abstract base class of interference functions.
Interference function of a finite 2D lattice.
const Lattice2D & lattice() const
unsigned m_N_2
Size of the finite lattice in lattice units.
bool m_integrate_xi
Integrate over the orientation xi.
~InterferenceFinite2DLattice() override
double particleDensity() const override
Returns the particle density associated with this 2d lattice.
InterferenceFinite2DLattice(const Lattice2D &lattice, unsigned N_1, unsigned N_2)
Constructor of two-dimensional finite lattice interference function.
InterferenceFinite2DLattice * clone() const override
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.
std::unique_ptr< Lattice2D > m_lattice
double interferenceForXi(double xi, double qx, double qy) const
bool integrationOverXi() const
void setIntegrationOverXi(bool integrate_xi)
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: .