70 double z_bottom = position.
z();
71 double z_top = position.
z() + height;
78 ASSERT(dz_top >= 0 || dz_bottom >= 0);
79 ASSERT(dz_bottom <= height);
87 return {new_position, dz_bottom, dz_top};
94 vertices.begin(), vertices.end(),
95 [&](
const kvector_t& vertex) ->
double { return rotation.transformed(vertex).z(); });
102 vertices.begin(), vertices.end(),
103 [&](
const kvector_t& vertex) ->
double { return rotation.transformed(vertex).z(); });
Defines and implements namespace algo with some algorithms.
#define ASSERT(condition)
std::complex< double > complex_t
Defines interface IBornFF.
Defines interface IShape3D.
Defines IRotation classes.
T z() const
Returns z-component in cartesian coordinate system.
void setZ(const T &a)
Sets z-component in cartesian coordinate system.
std::unique_ptr< IShape3D > m_shape3D
IShape3D object, used to retrieve vertices (which may be approximate in the case of round shapes).
virtual Eigen::Matrix2cd evaluate_for_q_pol(cvector_t q) const
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f in case of matrix interactio...
Eigen::Matrix2cd evaluatePol(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for matrix interactions.
static double TopZ(const std::vector< kvector_t > &vertices, const IRotation &rotation)
Calculates the z-coordinate of the highest vertex after rotation.
bool canSliceAnalytically(const IRotation &rot) const override
Default implementation only allows rotations along z-axis.
virtual double bottomZ(const IRotation &rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
virtual double topZ(const IRotation &rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
virtual complex_t evaluate_for_q(cvector_t q) const =0
Returns scattering amplitude for complex scattering wavevector q=k_i-k_f.
complex_t evaluate(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for complex wavevectors ki, kf.
static double BottomZ(const std::vector< kvector_t > &vertices, const IRotation &rotation)
Calculates the z-coordinate of the lowest vertex after rotation.
static SlicingEffects computeSlicingEffects(ZLimits limits, const kvector_t &position, double height)
Helper method for slicing.
Abstract base class for rotations.
Holds all wavevector information relevant for calculating form factors.
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
OneSidedLimit lowerLimit() const
OneSidedLimit upperLimit() const
double max_value(const Iterator &begin, const Iterator &end, const Evaluator &evaluate)
Returns the maximum value of function evaluate as applied to the elements of an iterator range.
double min_value(const Iterator &begin, const Iterator &end, const Evaluator &evaluate)
Returns the minimum value of function evaluate as applied to the elements of an iterator range.
Helper class that represents a onesided limit.
Nested structure that holds slicing effects on position and removed parts.