27 componentPosition_m(0.), componentOrientation_m(0.),
28 startPosition_m(0.), startOrientation_m(0.),
29 endPosition_m(0.), endOrientation_m(0.) {
34 componentPosition_m(0.), componentOrientation_m(0.),
35 startPosition_m(0.), startOrientation_m(0.),
36 endPosition_m(0.), endOrientation_m(0.) {
51 "Failed to copy RingSection");
73 return normProd >= 0. && posProd >= 0.;
85 return normProd > 0. && posProd > 0.;
121 std::vector<Vector_t> bb;
151 for (
size_t i = 0; i < virtualBB.size(); ++i) {
159 bool hasBefore =
false;
160 bool hasAfter =
false;
161 for (
size_t i = 0; i < virtualBB.size(); ++i) {
162 hasBefore = hasBefore ||
164 hasAfter = hasAfter ||
168 if (hasBefore && hasAfter)
189 if (offsetCast ==
nullptr) {
Tps< T > cos(const Tps< T > &x)
Cosine.
Tps< T > sin(const Tps< T > &x)
Sine.
Tps< T > sqrt(const Tps< T > &x)
Square root.
Interface for a single beam element.
virtual bool apply(const size_t &i, const double &t, Vector_t &E, Vector_t &B)
virtual ElementBase * clone() const =0
Return clone.
void updateGeometry(Vector_t startPosition, Vector_t startDirection)
Convert to a local coordinate system for global offsets.
Component placement handler in ring geometry.
Vector_t componentOrientation_m
void setStartNormal(Vector_t orientation)
Set the normal vector to the section start plane.
RingSection & operator=(const RingSection &sec)
void rotate(Vector_t &vector) const
void handleOffset()
Check whether component_m is a global offset and handle.
void setStartPosition(Vector_t pos)
Set a position on the plane of the section start.
Vector_t getStartNormal() const
Get the normal vector to the section start plane.
bool getFieldValue(const Vector_t &pos, const Vector_t ¢roid, const double &t, Vector_t &E, Vector_t &B) const
Return field value in global coordinate system.
void rotateToCyclCoordinates(Vector_t &vec) const
Vector_t endOrientation_m
void rotate_back(Vector_t &vector) const
Vector_t startOrientation_m
bool isOnOrPastStartPlane(const Vector_t &pos) const
Return true if pos is on or past start plane.
Vector_t componentPosition_m
bool doesOverlap(double phiStart, double phiEnd) const
Return true if the phi range overlaps bounding box elements.
Vector_t getEndPosition() const
Get a position on the section end plane.
void updateComponentOrientation()
Vector_t getStartPosition() const
Get a position on the plane of the section start.
void setEndPosition(Vector_t pos)
Set a position on the section end plane.
Vector_t getEndNormal() const
Get the normal vector to the section end plane.
void setEndNormal(Vector_t orientation)
Set the normal vector to the section end plane
Vector_t & normalise(Vector_t &vector) const
std::vector< Vector_t > getVirtualBoundingBox() const
Get the "Virtual" bounding box for the RingSection.
void rotateToTCoordinates(Vector_t &vec) const
bool isPastEndPlane(const Vector_t &pos) const
Return true if pos is past end plane.
RingSection()
Construct a ring section - positions, orientations etc default to 0.
~RingSection()
Destructor - does nothing.
Vektor< double, 3 > Vector_t