28 , m_integrate_xi(false)
29 , m_substructure(nullptr)
33 setName(
"Interference2DSuperLattice");
47 double length_1,
double length_2,
double alpha,
double xi,
unsigned size_1,
unsigned size_2)
96 throw std::runtime_error(
"InterferenceFunctionFinite2DLattice::lattice() -> Error. "
97 "No lattice defined.");
114 const double qadiv2 = (q.
x() * a * std::cos(
m_xi) + q.
y() * a * std::sin(
m_xi)) / 2.0;
115 const double qbdiv2 = (q.
x() * b * std::cos(xialpha) + q.
y() * b * std::sin(xialpha)) / 2.0;
125 const double delta_xi = xi -
m_lattice->rotationAngle();
Defines M_PI and some more mathematical constants.
Defines functions in namespace Math.
Defines classes RealIntegrator, ComplexIntegrator.
Defines class InterferenceFunction2DSuperLattice.
Defines class InterferenceFunctionNone.
Defines class RealParameter.
BasicVector3D< double > kvector_t
A two-dimensional Bravais lattice with no special symmetry.
BasicVector3D< T > rotatedZ(double a) const
Returns result of rotation around z-axis.
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.
double iff_no_inner(const kvector_t q, double outer_iff) const
Calculates the structure factor in the absence of extra inner structure.
virtual IInterferenceFunction * clone() const =0
Returns a clone of this ISampleNode object.
void registerChild(INode *node)
void setName(const std::string &name)
Interference function of a 2D superlattice with a configurable interference function for each lattice...
InterferenceFunction2DSuperLattice * clone() const override
Returns a clone of this ISampleNode object.
const Lattice2D & lattice() const
bool integrationOverXi() const
unsigned m_size_2
Size of the finite lattice in lattice units.
InterferenceFunction2DSuperLattice(const Lattice2D &lattice, unsigned size_1, unsigned size_2)
~InterferenceFunction2DSuperLattice() override
void setSubstructureIFF(const IInterferenceFunction &sub_iff)
std::vector< const INode * > getChildren() const override
Returns a vector of children.
std::unique_ptr< Lattice2D > m_lattice
double interferenceForXi(double xi) const
double evaluate(const kvector_t q, double outer_iff=1.0) const override
Evaluates the interference function for a given wavevector transfer.
std::unique_ptr< IInterferenceFunction > m_substructure
IFF of substructure.
double iff_without_dw(const kvector_t q) const override
Calculates the structure factor without Debye-Waller factor.
bool m_integrate_xi
Integrate over the orientation xi.
void setIntegrationOverXi(bool integrate_xi)
const IInterferenceFunction & substructureIFF() const
Default interference function (i.e.
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: .