|
Extension: Geometries
#include "dg/geometries/geometries.h"
|
Distance to wall along fieldline in phi or s coordinate More...
Public Member Functions | |
| WallFieldlineDistance (const dg::geo::CylindricalVectorLvl0 &vec, const dg::aRealTopology2d< double > &domain, double maxPhi, double eps, std::string type, std::function< bool(double, double)> predicate=mod::everywhere) | |
| Construct with vector field, domain. | |
| double | do_compute (double R, double Z) const |
| Integrate fieldline until wall is reached. | |
Public Member Functions inherited from dg::geo::aCylindricalFunctor< WallFieldlineDistance > | |
| double | operator() (double R, double Z) const |
do_compute(R,Z) | |
| double | operator() (double R, double Z, double) const |
do_compute(R,Z) | |
Distance to wall along fieldline in phi or s coordinate
The following differential equation is integrated
\[ \frac{ d R}{d \varphi} = b^R / b^\varphi \\ \frac{ d Z}{d \varphi} = b^Z / b^\varphi \\ \frac{ d s}{s \varphi} = 1 / b^\varphi \]
for initial conditions \( (R,Z,0)\) until either a maximum angle is reached or until \( (R,Z) \) leaves the given domain. In the latter case a bisection algorithm is used to find the exact angle \(\varphi_l\) of leave. Either the angle \( \varphi_l\) or the corresponding \( s_l\) is returned by the function.
|
inline |
Construct with vector field, domain.
| vec | The vector field to integrate |
| domain | The box |
| maxPhi | the maximum angle to integrate to (something like plus or minus 2.*M_PI) |
| eps | the accuracy of the fieldline integrator |
| type | either "phi" then the distance is computed in the angle coordinate or "s" then the distance is computed in the s parameter |
| predicate | only integrate points where predicate is true |
|
inline |
Integrate fieldline until wall is reached.
If wall is not reached integration stops at maxPhi given in the constructor
| R | starting coordinate in R |
| Z | starting coordinate in Z |