Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6dev
      Class Index
      File List
   Version 1.0.6
   Version 1.0.5new_solver
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads
TrajectoryRep1D Class Reference

Trajectory representation between two calculated points in 1d. More...

#include <trajectory.hpp>

Public Member Functions

 TrajectoryRep1D ()
 Default constructor for empty representation. More...
 
 TrajectoryRep1D (double dt, double x1, double v1, double x2, double v2, trajectory_rep_e force=TRAJ_EMPTY)
 Constructor for representation of trajectory from (x1,v1) to (x2,v2) in time dt. More...
 
 ~TrajectoryRep1D ()
 Destructor. More...
 
void construct (double dt, double x1, double v1, double x2, double v2, trajectory_rep_e force=TRAJ_EMPTY)
 Construct representation of trajectory from (x1,v1) to (x2,v2) in time dt. More...
 
void coord (double &x, double &v, double K)
 Calculate location x and velocity v at parametric time K. More...
 
int solve (double K[3], double x, int extrapolate=0)
 Solves for trajectory intersection with location. More...
 
uint32_t get_representation_order (void) const
 Returns order of polynomial used. More...
 
void debug_print (std::ostream &os) const
 Print debugging information to os. More...
 

Detailed Description

Trajectory representation between two calculated points in 1d.

Uses either linear-linear, quadratic-linear or cubic-quadratic representation for location x and velocity v. Time is presented as a parametric, scaled variable K ranging from 0 to 1.

Constructor & Destructor Documentation

◆ TrajectoryRep1D() [1/2]

TrajectoryRep1D::TrajectoryRep1D ( )
inline

Default constructor for empty representation.

◆ TrajectoryRep1D() [2/2]

TrajectoryRep1D::TrajectoryRep1D ( double  dt,
double  x1,
double  v1,
double  x2,
double  v2,
trajectory_rep_e  force = TRAJ_EMPTY 
)

Constructor for representation of trajectory from (x1,v1) to (x2,v2) in time dt.

Can be forced to use a specified representation type by setting force. Defaults to TRAJ_EMPTY, which means that the highest numerically stable polynomial is automatically used.

◆ ~TrajectoryRep1D()

TrajectoryRep1D::~TrajectoryRep1D ( )
inline

Destructor.

Member Function Documentation

◆ construct()

void TrajectoryRep1D::construct ( double  dt,
double  x1,
double  v1,
double  x2,
double  v2,
trajectory_rep_e  force = TRAJ_EMPTY 
)

Construct representation of trajectory from (x1,v1) to (x2,v2) in time dt.

Can be forced to use a specified representation type by setting force. Defaults to TRAJ_EMPTY, which means that the highest numerically stable polynomial is automatically used.

◆ coord()

void TrajectoryRep1D::coord ( double &  x,
double &  v,
double  K 
)

Calculate location x and velocity v at parametric time K.

◆ debug_print()

void TrajectoryRep1D::debug_print ( std::ostream &  os) const

Print debugging information to os.

◆ get_representation_order()

uint32_t TrajectoryRep1D::get_representation_order ( void  ) const

Returns order of polynomial used.

Returns order 0-3.

◆ solve()

int TrajectoryRep1D::solve ( double  K[3],
double  x,
int  extrapolate = 0 
)

Solves for trajectory intersection with location.

Solves the trajectory intersection with location x. Saves the valid solutions to array K in increasing order and returns the number of solutions saved. The accepted limit for parametric time K is 0 < K =< 1 if extrapolate is 0, -1.0e-6 < K =< 1 if extrapolate is less than 0 or 0.0 < K <= 1+1.0e-6 if extrapolate is more than 0.


The documentation for this class was generated from the following files:


Reference manual for Ion Beam Simulator 1.0.6dev
Generated by Doxygen 1.9.1 on Thu Sep 11 2025 09:37:24.