71 double z_bottom = position.
z();
72 double z_top = position.
z() +
height;
77 throw std::runtime_error(
getName()
78 +
"::sliceFormFactor error: "
79 "upperlimit < lowerlimit.");
82 if (dz_top < 0 && dz_bottom < 0)
83 throw std::runtime_error(
getName()
84 +
"::sliceFormFactor error: "
85 "shape didn't need to be sliced.");
87 throw std::runtime_error(
getName()
88 +
"::sliceFormFactor error: "
89 "interface outside shape.");
91 throw std::runtime_error(
getName()
92 +
"::sliceFormFactor error: "
93 "interface outside shape.");
100 return {new_position, dz_bottom, dz_top};
107 vertices.begin(), vertices.end(),
108 [&](
const kvector_t& vertex) ->
double { return rotation.transformed(vertex).z(); });
115 vertices.begin(), vertices.end(),
116 [&](
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 many exception classes in namespace Exceptionss.
Defines interface IShape.
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.
const std::string & getName() const
Pure virtual interface 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.