BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
BasicVector3D.h File Reference
Include dependency graph for BasicVector3D.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BasicVector3D< T >
 

Functions

BasicVector3D< double > vecOfLambdaAlphaPhi (double _lambda, double _alpha, double _phi)
 

Detailed Description

Declares and partly implements template class BasicVector3D.

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file BasicVector3D.h.

Function Documentation

◆ vecOfLambdaAlphaPhi()

BasicVector3D<double> vecOfLambdaAlphaPhi ( double  _lambda,
double  _alpha,
double  _phi 
)

Creates a vector<double> as a wavevector with given wavelength and angles.

Specifically needed for grazing-incidence scattering.

Definition at line 25 of file BasicVector3D.cpp.

26 {
27  double k = M_TWOPI / _lambda;
28  return BasicVector3D<double>(k * std::cos(_alpha) * std::cos(_phi),
29  -k * std::cos(_alpha) * std::sin(_phi), k * std::sin(_alpha));
30 }
#define M_TWOPI
Definition: MathConstants.h:49

References M_TWOPI.

Referenced by Bin1DCVector::Bin1DCVector(), Bin1DKVector::Bin1DKVector(), SphericalConverter::calculateValue(), RectangularConverter::calculateValue(), Beam::getCentralK(), SphericalPixel::getK(), DepthProbeElement::getKi(), and RectangularDetector::indexOfSpecular().