23 setName(
"Interference3DLattice");
61 throw std::runtime_error(
"InterferenceFunction3DLattice::evaluate: "
62 "no peak shape defined");
65 double inner_radius = 0.0;
68 inner_radius = std::max(0.0, q.
mag() -
radius);
73 for (
const auto& q_rec : rec_vectors) {
74 if (!(q_rec.mag() < inner_radius)) {
Defines many exception classes in namespace Exceptionss.
Defines the interface IPeakShape and subclasses.
Defines class InterferenceFunction3DLattice.
BasicVector3D< double > kvector_t
double mag() const
Returns magnitude of the vector.
Pure virtual base class of interference functions.
void setName(const std::string &name)
Pure virtual interface class that defines the peak shape of a Bragg peak.
virtual IPeakShape * clone() const =0
Returns a clone of this ISample object.
Interference function of a 3D lattice.
void setPeakShape(const IPeakShape &peak_shape)
double m_rec_radius
radius in reciprocal space defining the nearest q vectors to use
InterferenceFunction3DLattice(const Lattice &lattice)
void onChange() override final
Action to be taken in inherited class when a parameter has changed.
double iff_without_dw(const kvector_t q) const override final
Calculates the structure factor without Debye-Waller factor.
InterferenceFunction3DLattice * clone() const override final
Returns a clone of this ISample object.
std::vector< const INode * > getChildren() const override final
Returns a vector of children (const).
const Lattice & lattice() const
std::unique_ptr< IPeakShape > mP_peak_shape
~InterferenceFunction3DLattice() final
A lattice with three basis vectors.
kvector_t getBasisVectorB() const
Returns basis vector b.
std::vector< kvector_t > reciprocalLatticeVectorsWithinRadius(const kvector_t input_vector, double radius) const
Computes a list of reciprocal lattice vectors within a specified distance of a given vector.
kvector_t getBasisVectorC() const
Returns basis vector c.
kvector_t getBasisVectorA() const
Returns basis vector a.
const double radius(5 *Units::nanometer)