Acoustic FDTD Solver
Public Member Functions | Public Attributes | Friends | List of all members
CartPosition Class Reference

Denote a point in the Cartesian coordinate. More...

#include <CartPosition.hpp>

Public Member Functions

 CartPosition ()
 CartPosition (double c)
 CartPosition (double b, double c)
 Set to (0,b,c)
 CartPosition (double a, double b, double c)
 Set to (a,b,c)
 CartPosition (const CartPosition &b)
bool operator> (const CartPosition &b) const
bool operator< (const CartPosition &b) const
bool operator== (const CartPosition &b) const
bool operator!= (const CartPosition &b) const
CartPositionoperator+ (const CartPosition &b)
CartPositionoperator- (const CartPosition &b)
CartPositionoperator/ (const double)
double getDistance (const CartPosition &b) const
 Calculate the distance between two CartPositions.
double getAngleInYZPlane (const CartPosition &center) const
 Compute the angle relative to argument in the YZ plane.
SpherePosition toSphere () const
 Convert to the spherical coordinate.
double dotProduct (const CartPosition &b) const
double getNorm () const
void print () const

Public Attributes

double x
 x coordinate
double y
 y coordinate
double z
 z coordinate

Friends

std::ostream & operator<< (std::ostream &stream, const CartPosition &b)

Detailed Description

Denote a point in the Cartesian coordinate.

Constructor & Destructor Documentation

CartPosition::CartPosition ( )
CartPosition::CartPosition ( double  c)
Parameters
cset to (0,0,c);
CartPosition::CartPosition ( double  b,
double  c 
)

Set to (0,b,c)

Parameters
b
c
CartPosition::CartPosition ( double  a,
double  b,
double  c 
)

Set to (a,b,c)

Parameters
a
b
c
CartPosition::CartPosition ( const CartPosition b)

Member Function Documentation

double CartPosition::dotProduct ( const CartPosition b) const
double CartPosition::getAngleInYZPlane ( const CartPosition center) const

Compute the angle relative to argument in the YZ plane.

Always $ \theta\in [-\pi,+\pi) $

Parameters
center
Returns
always positive
double CartPosition::getDistance ( const CartPosition b) const

Calculate the distance between two CartPositions.

Parameters
*banother CartPosition
Returns
distance
double CartPosition::getNorm ( ) const
bool CartPosition::operator!= ( const CartPosition b) const
CartPosition & CartPosition::operator+ ( const CartPosition b)
CartPosition & CartPosition::operator- ( const CartPosition b)
CartPosition & CartPosition::operator/ ( const double  den)
bool CartPosition::operator< ( const CartPosition b) const
bool CartPosition::operator== ( const CartPosition b) const
bool CartPosition::operator> ( const CartPosition b) const
void CartPosition::print ( ) const
SpherePosition CartPosition::toSphere ( ) const

Convert to the spherical coordinate.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const CartPosition b 
)
friend

Member Data Documentation

double CartPosition::x

x coordinate

double CartPosition::y

y coordinate

double CartPosition::z

z coordinate


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