30 unsigned N_1,
unsigned N_2)
33 setName(
"InterferenceFinite2DLattice");
57 throw std::runtime_error(
"InterferenceFunctionFinite2DLattice::lattice() -> Error. "
58 "No lattice defined.");
65 return area == 0.0 ? 0.0 : 1.0 / area;
70 return std::vector<const INode*>() <<
m_lattice;
88 double xialpha = xi +
m_lattice->latticeAngle();
90 double qadiv2 = (
m_qx * a * std::cos(xi) +
m_qy * a * std::sin(xi)) / 2.0;
91 double qbdiv2 = (
m_qx * b * std::cos(xialpha) +
m_qy * b * std::sin(xialpha)) / 2.0;
93 double lattice_factor = ampl * ampl / (
m_N_1 *
m_N_2);
95 return lattice_factor;
Defines M_PI and some more mathematical constants.
Defines functions in namespace Math.
Defines classes RealIntegrator, ComplexIntegrator.
Defines class InterferenceFunctionFinite2DLattice.
Defines class RealParameter.
T y() const
Returns y-component in cartesian coordinate system.
T x() const
Returns x-component in cartesian coordinate system.
Abstract base class of interference functions.
void registerChild(INode *node)
void setName(const std::string &name)
Interference function of a finite 2D lattice.
void setIntegrationOverXi(bool integrate_xi)
bool m_integrate_xi
Integrate over the orientation xi.
std::vector< const INode * > getChildren() const override
Returns a vector of children.
bool integrationOverXi() const
unsigned m_N_2
Size of the finite lattice in lattice units.
InterferenceFunctionFinite2DLattice(const Lattice2D &lattice, unsigned N_1, unsigned N_2)
Constructor of two-dimensional finite lattice interference function.
const Lattice2D & lattice() const
double interferenceForXi(double xi) const
double iff_without_dw(const kvector_t q) const override
Calculates the structure factor without Debye-Waller factor.
std::unique_ptr< Lattice2D > m_lattice
~InterferenceFunctionFinite2DLattice() override
double getParticleDensity() const override
Returns the particle density associated with this 2d lattice.
InterferenceFunctionFinite2DLattice * clone() const override
Returns a clone of this ISampleNode object.
A two-dimensional Bravais lattice.
virtual Lattice2D * clone() const =0
To integrate a real function of a real variable.
double integrate(const std::function< double(double)> &f, double lmin, double lmax)
double Laue(const double x, size_t N)
Real Laue function: .