30 IFormFactor::IFormFactor(
const NodeMeta& meta,
const std::vector<double>& PValues)
38 if (ShapeIsContainedInLimits(*
this, limits, rot, translation))
39 return createTransformedFormFactor(*
this, rot, translation);
40 if (ShapeOutsideLimits(*
this, limits, rot, translation))
44 throw std::runtime_error(getName()
45 +
"::createSlicedFormFactor error: not supported for "
46 "the given rotation!");
53 "IFormFactor::evaluatePol: is not implemented by default");
58 auto zero_wavevectors = WavevectorInfo::GetZeroQ();
59 return std::abs(
evaluate(zero_wavevectors));
63 std::unique_ptr<const ILayerRTCoefficients>)
74 throw std::runtime_error(getName() +
"::sliceFormFactor error: not implemented!");
80 std::unique_ptr<IFormFactor> P_fftemp, P_result;
82 P_fftemp = std::make_unique<FormFactorDecoratorRotation>(formfactor, rot);
84 P_fftemp.reset(formfactor.
clone());
86 P_result = std::make_unique<FormFactorDecoratorPositionFactor>(*P_fftemp, translation);
89 return P_result.release();
97 double zbottom = formfactor.
bottomZ(rot) + translation.
z();
98 double ztop = formfactor.
topZ(rot) + translation.
z();
101 if (!upper_limit.m_limitless && ztop > upper_limit.m_value)
103 if (!lower_limit.m_limitless && zbottom < lower_limit.m_value)
110 double zbottom = formfactor.
bottomZ(rot) + translation.
z();
111 double ztop = formfactor.
topZ(rot) + translation.
z();
114 if (!upper_limit.m_limitless && zbottom >= upper_limit.m_value)
116 if (!lower_limit.m_limitless && ztop <= lower_limit.m_value)
Defines and implements class ILayerRTCoefficients.
void swap(OutputDataIterator< TValue, TContainer > &left, OutputDataIterator< TValue, TContainer > &right)
make Swappable
T z() const
Returns z-component in cartesian coordinate system.
Pure virtual interface for rotations.
virtual bool isIdentity() const
Returns true if rotation matrix is identity matrix (no rotations)
Pure virtual base class for sample components and properties related to scattering.
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.
Helper class that represents a onesided limit.