OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
TpsMath.h File Reference
#include "Algebra/Tps.h"
#include "Utilities/DomainError.h"
#include <cmath>
Include dependency graph for TpsMath.h:

Go to the source code of this file.

Functions

template<class T>
Tps< T > pow (const Tps< T > &x, int y)
 Integer power.
template<class T>
Tps< T > sqrt (const Tps< T > &x)
 Square root.
template<class T>
Tps< T > sin (const Tps< T > &x)
 Sine.
template<class T>
Tps< T > cos (const Tps< T > &x)
 Cosine.
template<class T>
Tps< T > tan (const Tps< T > &x)
 Tangent.
template<class T>
Tps< T > cot (const Tps< T > &x)
 Cotangent.
template<class T>
Tps< T > sec (const Tps< T > &x)
 Secant.
template<class T>
Tps< T > csc (const Tps< T > &x)
 Cosecant.
template<class T>
Tps< T > exp (const Tps< T > &x)
 Exponential.
template<class T>
Tps< T > log (const Tps< T > &x)
 Natural logarithm.
template<class T>
Tps< T > sinh (const Tps< T > &x)
 Hyperbolic sine.
template<class T>
Tps< T > cosh (const Tps< T > &x)
 Hyperbolic cosine.
template<class T>
Tps< T > tanh (const Tps< T > &x)
 Hyperbolic tangent.

Function Documentation

◆ cos()

template<class T>
Tps< T > cos ( const Tps< T > & x)

Cosine.

Definition at line 129 of file TpsMath.h.

References cos(), Tps< T >::getTruncOrder(), sin(), and Tps< T >::Taylor().

Referenced by mslang::Repeat::apply(), mslang::Rotation::applyRotation(), OscillatingField< Field >::Bfield(), OpalBeamline::compute3DLattice(), mslang::Ellipse::computeBoundingBox(), ScatteringPhysics::computeCoulombScattering(), _Astra1D_fast::computeFieldDerivatives(), _FM1DDynamic_fast::computeFieldDerivatives(), _FM1DElectroStatic_fast::computeFieldDerivatives(), _FM1DMagnetoStatic_fast::computeFieldDerivatives(), _FM1DDynamic::computeFieldOnAxis(), _FM1DElectroStatic::computeFieldOnAxis(), _FM1DMagnetoStatic::computeFieldOnAxis(), ClosedOrbitFinder< Value_type, Size_type, Stepper >::computeTune(), cos(), cos(), OscillatingField< Field >::Efield(), MeshGenerator::getCylinder(), _Astra1DDynamic::getFieldDerivative(), _FM1DDynamic::getFieldDerivative(), _FM1DElectroStatic::getFieldDerivative(), _FM1DMagnetoStatic::getFieldDerivative(), _Astra1DDynamic::getFieldstrength(), _Astra1DElectroStatic::getFieldstrength(), _Astra1DMagnetoStatic::getFieldstrength(), SectorMagneticFieldMap::getFieldstrength(), MultipoleTCurvedVarRadius::localCartesianToOpalCartesian(), GlobalFunctions::_cos::operator()(), Line::parse(), LOMB_class::period(), sec(), sin(), tan(), MultipoleTCurvedVarRadius::transformBField(), MultipoleTCurvedVarRadius::transformCoords(), and mslang::Ellipse::writeGnuplot().

Here is the call graph for this function:

◆ cosh()

template<class T>
Tps< T > cosh ( const Tps< T > & x)

Hyperbolic cosine.

Definition at line 222 of file TpsMath.h.

References cosh(), Tps< T >::getTruncOrder(), sinh(), and Tps< T >::Taylor().

Referenced by cosh(), cosh(), sinh(), tanh(), and MultipoleTCurvedVarRadius::transformBField().

Here is the call graph for this function:

◆ cot()

template<class T>
Tps< T > cot ( const Tps< T > & x)

Cotangent.

◆ csc()

template<class T>
Tps< T > csc ( const Tps< T > & x)

Cosecant.

Definition at line 159 of file TpsMath.h.

References Tps< T >::inverse(), and sin().

Here is the call graph for this function:

◆ exp()

template<class T>
Tps< T > exp ( const Tps< T > & x)

Exponential.

Definition at line 165 of file TpsMath.h.

References exp(), Tps< T >::getTruncOrder(), and Tps< T >::Taylor().

Referenced by Distribution::applyEmissModelNonEquil(), _FM1DProfile1::computeFringe(), Distribution::createDistributionMultiGauss(), exp(), exp(), endfieldmodel::Enge::gN(), GlobalFunctions::_exp::operator()(), GlobalFunctions::_pow::operator()(), LOMB_class::period(), and LOMB_class::signi().

Here is the call graph for this function:

◆ log()

template<class T>
Tps< T > log ( const Tps< T > & x)

◆ pow()

◆ sec()

template<class T>
Tps< T > sec ( const Tps< T > & x)

Secant.

Definition at line 153 of file TpsMath.h.

References cos(), and Tps< T >::inverse().

Referenced by PyOpal::Field::getElementEndNormal(), PyOpal::Field::getElementEndPosition(), PyOpal::Field::getElementName(), PyOpal::Field::getElementStartNormal(), PyOpal::Field::getElementStartPosition(), and Ring::getSection().

Here is the call graph for this function:

◆ sin()

template<class T>
Tps< T > sin ( const Tps< T > & x)

Sine.

Definition at line 111 of file TpsMath.h.

References cos(), Tps< T >::getTruncOrder(), sin(), and Tps< T >::Taylor().

Referenced by mslang::Repeat::apply(), mslang::Rotation::applyRotation(), OpalBeamline::compute3DLattice(), mslang::Ellipse::computeBoundingBox(), ScatteringPhysics::computeCoulombScattering(), _Astra1D_fast::computeFieldDerivatives(), _FM1DDynamic_fast::computeFieldDerivatives(), _FM1DElectroStatic_fast::computeFieldDerivatives(), _FM1DMagnetoStatic_fast::computeFieldDerivatives(), _FM1DDynamic::computeFieldOnAxis(), _FM1DElectroStatic::computeFieldOnAxis(), _FM1DMagnetoStatic::computeFieldOnAxis(), cos(), csc(), RBendGeometry::getArcLength(), MeshGenerator::getCylinder(), _Astra1DDynamic::getFieldDerivative(), _FM1DDynamic::getFieldDerivative(), _FM1DElectroStatic::getFieldDerivative(), _FM1DMagnetoStatic::getFieldDerivative(), _Astra1DDynamic::getFieldstrength(), _Astra1DElectroStatic::getFieldstrength(), _Astra1DMagnetoStatic::getFieldstrength(), SectorMagneticFieldMap::getFieldstrength(), MultipoleTCurvedVarRadius::localCartesianToOpalCartesian(), GlobalFunctions::_sin::operator()(), Line::parse(), LOMB_class::period(), PETE_apply(), sin(), sinti(), tan(), MultipoleTCurvedVarRadius::transformBField(), MultipoleTCurvedVarRadius::transformCoords(), OpalRBend3D::update(), OpalRBend::update(), and OpalSBend::update().

Here is the call graph for this function:

◆ sinh()

template<class T>
Tps< T > sinh ( const Tps< T > & x)

Hyperbolic sine.

Definition at line 204 of file TpsMath.h.

References cosh(), Tps< T >::getTruncOrder(), sinh(), and Tps< T >::Taylor().

Referenced by cosh(), PETE_apply(), sinh(), and tanh().

Here is the call graph for this function:

◆ sqrt()

template<class T>
Tps< T > sqrt ( const Tps< T > & x)

◆ tan()

template<class T>
Tps< T > tan ( const Tps< T > & x)

Tangent.

Definition at line 147 of file TpsMath.h.

References cos(), and sin().

Referenced by mslang::Shear::applyShear(), RBendGeometry::getEntrancePatch(), RBendGeometry::getExitPatch(), GlobalFunctions::_tan::operator()(), PETE_apply(), and mslang::Ellipse::writeGnuplot().

Here is the call graph for this function:

◆ tanh()

template<class T>
Tps< T > tanh ( const Tps< T > & x)

Hyperbolic tangent.

Definition at line 240 of file TpsMath.h.

References cosh(), and sinh().

Referenced by PETE_apply(), MultipoleTCurvedVarRadius::transformBField(), and OpalVariableRFCavityFringeField::update().

Here is the call graph for this function: