Class EllipsoidalBoundary

Inheritance Relationships

Base Type

Class Documentation

class EllipsoidalBoundary : public AbstractCondition

Flags a particle when leaving the ellipsoid.

This module flags particles when outside of the ellipsoid, defined by two focal points and a major axis (length). The particle is made inactive and flagged as “Rejected”. By default the module prevents overshooting the boundary by more than a margin of 0.1 kpc. This corresponds to the default minimum step size of the propagation modules (PropagationCK and SimplePropagation).

Public Functions

EllipsoidalBoundary()

Default constructor

EllipsoidalBoundary(Vector3d focalPoint1, Vector3d focalPoint2, double majorAxis)

Constructor

Parameters:
  • focalPoint1 – one of the foci of the ellipsoid

  • focalPoint2 – the other foci of the ellipsoid

  • majorAxis – length of the major axis of the ellipsoid

virtual void process(Candidate *candidate) const

Process function This is the main function to work with, it is called during every ModuleList::run step. Derived functions need to override this overload of process!

Parameters:

candidateCandidate raw pointer

void setFocalPoints(Vector3d focalPoint1, Vector3d focalPoint2)
void setMajorAxis(double size)
void setMargin(double margin)
void setLimitStep(bool limitStep)
virtual std::string getDescription() const

Returns description, can be overriden by derived class.

void onReject(Module *rejectAction)

Sets the module that should be invoked on rejection

Parameters:

rejectActionModule that should be called on rejection

void onAccept(Module *acceptAction)

Sets the module that should be invoked on acception

Parameters:

rejectActionModule that should be called on acception

void setMakeRejectedInactive(bool makeInactive)

Whether to make Candidate inactive on rejection

void setMakeAcceptedInactive(bool makeInactive)

Whether to make Candidate inactive on acception

void setRejectFlag(std::string key, std::string value)

sets Rejection flag Sets the key and value that should be set when the Candidate is rejected

Parameters:
  • key – property key

  • value – property value

void setAcceptFlag(std::string key, std::string value)

sets the Acception flag Sets the key and value that should be set when the Candidate is accepted

Parameters:
  • key – property key

  • value – property value

std::string getRejectFlag()
std::string getAcceptFlag()
void setDescription(const std::string &description)

Sets description, can be used instead of getDescription in derived class

Parameters:

description – Description string

inline void process(ref_ptr<Candidate> candidate) const

Process function Overload for process function to explicitly make a conversion from ref_ptr to a raw pointer

inline size_t addReference() const
inline size_t removeReference() const
inline int removeReferenceNoDelete() const
inline size_t getReferenceCount() const

Protected Functions

void reject(Candidate *candidate) const

Function to reject particle This function rejects the particle, what that means is determined by the rejectAction and makeRejectedInactive variable.

Parameters:

candidateCandidate raw pointer to reject

inline void reject(ref_ptr<Candidate> candidate) const

Overload for reject(Candidate *candidate) This function wraps reject(Candidate *candidate) so a reference pointer can be conversed explicitly

void accept(Candidate *candidate) const

Function to accepts particle This function accepts the particle, what that means is determined by the acceptAction and makeAcceptedInactive variable.

Parameters:

candidateCandidate to reject

inline void accept(ref_ptr<Candidate> candidate) const

Overload for accept(Candidate *candidate) This function wraps accept(Candidate *candidate) so a reference pointer can be conversed explicitly

Protected Attributes

ref_ptr<Module> rejectAction

Module to call when Candidate is rejected

ref_ptr<Module> acceptAction

Module to call when Candidate is accepted

bool makeRejectedInactive

If to make Candidate inactive on rejection

bool makeAcceptedInactive

If to make Candidate inactive on acception

std::string rejectFlagKey

key for the Candidate property that should be set on rejection

std::string rejectFlagValue

value for the Candidate property that should be set on rejection

std::string acceptFlagKey

key for the Candidate property that should be set on acception

std::string acceptFlagValue

value for the Candidate property that should be set on acception

mutable size_t _referenceCount