Stellarator and Tokamak Modeling and Meshing Software (STOMMS)
Loading...
Searching...
No Matches
fluxCurveUtilityEqdsk.h File Reference

Classes

Functions

bool findNextPoint (Point &startPoint, Point &nextPoint, double &lengthPoloidalGoal, const PhysicsPoint &oPoint, CurveMetaData &curveData, EqdskData &eqdsk)
bool findNextFieldFollowingPoint (Point &startPoint, Point &nextPoint, double &dist, int m, CurveMetaData &curveData, EqdskData &eqdsk)
double getStepToroidalAngle (int numPlanes, int m, int &steps, double stepRadians)
double getStepToroidalUnit (const PhysicsPoint &oPoint, double goal)
int updatePointOnBoundary (Point &pt, const DomainBox &box)
bool isBoundaryPointOnOrigin (Point &pt1, Point &pt2, double &dist, int numIterations, CurveMetaData &curveData, EqdskData &eqdsk, const DomainBox &box)
bool doesPointHitTheOrigin (Point &pt1, Point &pt2, Point startPt, double goal, double distNewToStartLast, CurveMetaData &curveData, EqdskData &eqdsk)
std::vector< PhysicsPoint > getStartPointClosed (const std::vector< double > &corePsiValues, EqdskData &eqdskData)
std::vector< std::vector< PhysicsPoint > > getStartPointsOnSimFace (pGFace face, const std::vector< double > &psiNormList, EqdskData &eqdskData)
int findStartPointIndexAtIntersection (const Point &pt1, const Point &pt2, std::vector< Point > &startPoints, int iFilter=-1)
int intersectBetweenTwoLineSegments (const Point &testPt1, const Point &testPt2, const Point &refPt1, const Point &refPt2, double toleranceMeter, double toleranceSine, Point &intersectPt1, Point &intersectPt2)
int getNumIntersection (const Point &pt1, const Point &pt2, const WallCurve &wall)
std::vector< Point > getPushedPoints (const PhysicsPoint &xPoint, double dist, EqdskData &eqdsk)
std::vector< Point > findPointBySectioningBtwTwoPts (double targetPsi, int sampleN, const Point &pt1, const Point pt2, EqdskData &eqdsk)
std::vector< Point > findPointBySectioningOnEdge (double targetPsi, pGEdge ge, EqdskData &eqdsk)
std::vector< Point > findStartPointOnWall (double psiNormalized, int type, const WallCurve &wall, EqdskData &eqdsk)
bool validOpenCurve (const Flux &f, const std::vector< pGEdge > &edgesOnCurve)
void restrictDistanceOfLastEdge (Flux &f, EqdskData &eqdsk)

Function Documentation

◆ doesPointHitTheOrigin()

bool doesPointHitTheOrigin ( Point & pt1,
Point & pt2,
Point startPt,
double goal,
double distNewToStartLast,
CurveMetaData & curveData,
EqdskData & eqdsk )

Check if the next traced points, hits the origin (starting point) of curve or not.

Parameters
pt1point to be updated.
pt2point to be checked and adjusted.
startPtstarting point of the curve for the test.
distlocal 2D distance from start point to the next finding point.
distNewToStartLastdistance between the last guessed pt (pt2) in last iteration and starting point of curve.
curveDatacurve meta data containing psi values etc.
eqdskEqdsk class for handling magnetic field related operations/queries/parameters.
Returns
true if point hits the starting point.

◆ findNextFieldFollowingPoint()

bool findNextFieldFollowingPoint ( Point & startPoint,
Point & nextPoint,
double & dist,
int m,
CurveMetaData & curveData,
EqdskData & eqdsk )

Given a point on curve, and properties of magnetic field along with the curve meta deta, find next point on the poloidal curve. Its field following, and traces the point along the field line.

Parameters
startPointcurrent point on the curve (last successful traced point).
nextPointthe next traced point.
distlocal 2D distance from start point to the next finding point.
ma division parameter for steppings in toroidal direction.
curveDatacurve meta data containing psi values etc.
eqdskEqdsk class for handling magnetic field related operations/queries/parameters.
boxbounding box of the domain.
Returns
true if the next point is found.

◆ findNextPoint()

bool findNextPoint ( Point & startPoint,
Point & nextPoint,
double & lengthPoloidalGoal,
const PhysicsPoint & oPoint,
CurveMetaData & curveData,
EqdskData & eqdsk )

Given a point on curve, and properties of magnetic field along with the curve meta deta, find next point on the poloidal curve. Its not field following. For field-following curve tracing, function is findNextFieldFollowingPoint.

Parameters
startPointcurrent point on the curve (last successful traced point).
nextPointthe next traced point.
lengthPoloidalGoallocal 2D distance from start point to the next finding point.
oPointmagnetic axis (oPoint).
curveDatacurve meta data containing psi values etc.
eqdskEqdsk class for handling magnetic field related operations/queries/parameters.
boxbounding box of the domain.
Returns
true if the next point is found.

◆ findPointBySectioningBtwTwoPts()

std::vector< Point > findPointBySectioningBtwTwoPts ( double targetPsi,
int sampleN,
const Point & pt1,
const Point pt2,
EqdskData & eqdsk )

◆ findPointBySectioningOnEdge()

std::vector< Point > findPointBySectioningOnEdge ( double targetPsi,
pGEdge ge,
EqdskData & eqdsk )

◆ findStartPointIndexAtIntersection()

int findStartPointIndexAtIntersection ( const Point & pt1,
const Point & pt2,
std::vector< Point > & startPoints,
int iFilter = -1 )

◆ findStartPointOnWall()

std::vector< Point > findStartPointOnWall ( double psiNormalized,
int type,
const WallCurve & wall,
EqdskData & eqdsk )

◆ getNumIntersection()

int getNumIntersection ( const Point & pt1,
const Point & pt2,
const WallCurve & wall )

◆ getPushedPoints()

std::vector< Point > getPushedPoints ( const PhysicsPoint & xPoint,
double dist,
EqdskData & eqdsk )

◆ getStartPointClosed()

std::vector< PhysicsPoint > getStartPointClosed ( const std::vector< double > & corePsiValues,
EqdskData & eqdskData )

Given the list of psi values for closed curves, find the starting points for each flux curve on the horizontal line starting from axis to box boundary.

Parameters
corePsiValueslist of psi values for closed curves.
eqdskDataclass for queries related to eqdsk data.
Returns
a vector of PhysicsPoint containing both coordinate and psi value.

◆ getStartPointsOnSimFace()

std::vector< std::vector< PhysicsPoint > > getStartPointsOnSimFace ( pGFace face,
const std::vector< double > & psiNormList,
EqdskData & eqdskData )

◆ getStepToroidalAngle()

double getStepToroidalAngle ( int numPlanes,
int m,
int & steps,
double stepRadians )

To find the toroidal step size for rk4 method.

Parameters
numPlanesnumber of target poloidal planes.
ma division parameter for steppings in toroidal direction.
stepsnumber of rk4 steps.
stepRadianschange in phi in radians of each rk4 step taken when moving a point along a psi curve (user input).
Returns
toroidal step size

◆ getStepToroidalUnit()

double getStepToroidalUnit ( const PhysicsPoint & oPoint,
double goal )

To find normalized toroidal step for rk4 method.

Parameters
oPointmagnetic axis (oPoint).
goallocal 2D distance from start point to the next finding point.
Returns
toroidal unit step size.

◆ intersectBetweenTwoLineSegments()

int intersectBetweenTwoLineSegments ( const Point & testPt1,
const Point & testPt2,
const Point & refPt1,
const Point & refPt2,
double toleranceMeter,
double toleranceSine,
Point & intersectPt1,
Point & intersectPt2 )

◆ isBoundaryPointOnOrigin()

bool isBoundaryPointOnOrigin ( Point & pt1,
Point & pt2,
double & dist,
int numIterations,
CurveMetaData & curveData,
EqdskData & eqdsk,
const DomainBox & box )

Check if the point adjusted on the bounding box, hits the origin (starting point) of curve or not.

Parameters
pt1point to be updated.
pt2point to be checked and adjusted.
distlocal 2D distance from start point to the next finding point.
numIterationscurrent number of iterations to test a return condition.
curveDatacurve meta data containing psi values etc.
eqdskEqdsk class for handling magnetic field related operations/queries/parameters.
boxbounding box of the domain.
Returns
true if point hits the starting point.

◆ restrictDistanceOfLastEdge()

void restrictDistanceOfLastEdge ( Flux & f,
EqdskData & eqdsk )

◆ updatePointOnBoundary()

int updatePointOnBoundary ( Point & pt,
const DomainBox & box )

If a point is outside the bounding box, readjust it on the boundary.

Parameters
ptpt to be adjusted.
boxbounding box of the domain. returns the side of the box on which point lies.
side = 1 is left, side = 3 is right, side = 2 is bottom, side = 0 is top.

◆ validOpenCurve()

bool validOpenCurve ( const Flux & f,
const std::vector< pGEdge > & edgesOnCurve )