34 : component_m(nullptr),
35 componentPosition_m(0.), componentOrientation_m(0.),
36 startPosition_m(0.), startOrientation_m(0.),
37 endPosition_m(0.), endOrientation_m(0.) {
41 : component_m(nullptr),
42 componentPosition_m(0.), componentOrientation_m(0.),
43 startPosition_m(0.), startOrientation_m(0.),
44 endPosition_m(0.), endOrientation_m(0.) {
59 "Failed to copy RingSection");
80 return normProd >= 0. && posProd >= 0.;
92 return normProd > 0. && posProd > 0.;
128 std::vector<Vector_t<double, 3>> bb;
160 for (
size_t i = 0; i < virtualBB.size(); ++i) {
168 bool hasBefore =
false;
169 bool hasAfter =
false;
170 for (
size_t i = 0; i < virtualBB.size(); ++i) {
171 hasBefore = hasBefore ||
173 hasAfter = hasAfter ||
177 if (hasBefore && hasAfter)
Interface for a single beam element.
virtual bool apply(const size_t &i, const double &t, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B)
virtual ElementBase * clone() const =0
Return clone.
Component placement handler in ring geometry.
Vector_t< double, 3 > getStartPosition() const
Get a position on the plane of the section start.
RingSection & operator=(const RingSection &sec)
Vector_t< double, 3 > componentOrientation_m
void rotateToCyclCoordinates(Vector_t< double, 3 > &vec) const
void setEndPosition(Vector_t< double, 3 > pos)
Set a position on the section end plane.
Vector_t< double, 3 > getEndPosition() const
Get a position on the section end plane.
bool getFieldValue(const Vector_t< double, 3 > &pos, const Vector_t< double, 3 > ¢roid, const double &t, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B) const
Return field value in global coordinate system.
Vector_t< double, 3 > & normalise(Vector_t< double, 3 > &vector) const
void setStartNormal(Vector_t< double, 3 > orientation)
Set the normal vector to the section start plane.
Vector_t< double, 3 > getEndNormal() const
Get the normal vector to the section end plane.
Vector_t< double, 3 > getStartNormal() const
Get the normal vector to the section start plane.
std::vector< Vector_t< double, 3 > > getVirtualBoundingBox() const
Get the "Virtual" bounding box for the RingSection.
void rotateToTCoordinates(Vector_t< double, 3 > &vec) const
bool isOnOrPastStartPlane(const Vector_t< double, 3 > &pos) const
Return true if pos is on or past start plane.
bool doesOverlap(double phiStart, double phiEnd) const
Return true if the phi range overlaps bounding box elements.
Vector_t< double, 3 > endPosition_m
void updateComponentOrientation()
void setEndNormal(Vector_t< double, 3 > orientation)
Set the normal vector to the section end plane
Vector_t< double, 3 > startOrientation_m
void setStartPosition(Vector_t< double, 3 > pos)
Set a position on the plane of the section start.
void rotate_back(Vector_t< double, 3 > &vector) const
Vector_t< double, 3 > componentPosition_m
bool isPastEndPlane(const Vector_t< double, 3 > &pos) const
Return true if pos is past end plane.
void rotate(Vector_t< double, 3 > &vector) const
Vector_t< double, 3 > startPosition_m
Vector_t< double, 3 > endOrientation_m
RingSection()
Construct a ring section - positions, orientations etc default to 0.
~RingSection()
Destructor - does nothing.