27 const int min_points = 4;
51 result->setDecayFunction(*
m_decay);
60 double decay_length =
m_decay->decayLength();
62 m_na =
static_cast<int>(std::lround(std::abs(qa_max) + 0.5));
68 return std::vector<const INode*>() <<
m_decay;
84 double qx_prime = qxr * std::cos(
xi) + qyr * std::sin(
xi);
87 int qa_int =
static_cast<int>(qx_prime / a_rec);
88 qx_frac = qx_prime - qa_int * a_rec;
90 for (
int i = -
m_na; i <
m_na + 1; ++i) {
91 double qx = qx_frac + i * a_rec;
Defines the macro ASSERT.
#define ASSERT(condition)
Defines class Interference1DLattice.
Defines interface class IProfile1D, and children thereof.
Defines interface class IProfile2D, and children thereof.
Defines class RealLimits.
Abstract base class of interference functions.
Interface for a one-dimensional distribution, with normalization adjusted so that the Fourier transfo...
IProfile1D * clone() const override=0
Interference function of a 1D lattice.
int m_na
determines the number of reciprocal lattice points to use
void setDecayFunction(const IProfile1D &decay)
Sets one-dimensional decay function.
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.
Interference1DLattice * clone() const override
std::unique_ptr< IProfile1D > m_decay
~Interference1DLattice() override
Interference1DLattice(double length, double xi)
Constructor of interference function of one-dimensional lattice.
void check(const std::string &name, double value) const
Throws if value is outside limits. Parameter 'name' is for exception message.
static RealLimits nonnegative()
Creates an object which can have only positive values with 0. included.