OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Vector.h File Reference
#include "Algebra/Array1D.h"
#include "Utilities/SizeError.h"
#include <algorithm>
#include <numeric>
#include <cmath>
#include <functional>
Include dependency graph for Vector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Vector< T >
 Vector. More...

Functions

template<class T>
Vector< T > operator+ (const Vector< T > &, const Vector< T > &)
 Vector addition.
template<class T>
Vector< T > operator- (const Vector< T > &, const Vector< T > &)
 Vector subtraction.
template<class T>
operator* (const Vector< T > &, const Vector< T > &)
 Vector dot product.
template<class T>
Vector< T > operator* (const Vector< T > &, const T &)
 Vector multiplied by scalar.
template<class T>
Vector< T > operator/ (const Vector< T > &, const T &)
 Vector divided by scalar.
template<class T>
Vector< T > operator* (const T &, const Vector< T > &)
 Scalar multiplied by vector.
template<class T>
euclidean_norm (const Vector< T > &)
 Euclidean norm.
template<class T>
scaled_norm (const Array1D< T > D, const Vector< T > &V)
 Euclidean norm of diagonal matrix D times vector V.

Function Documentation

◆ euclidean_norm()

template<class T>
T euclidean_norm ( const Vector< T > & V)

Euclidean norm.

Definition at line 243 of file Vector.h.

References Array1D< T >::begin(), and Array1D< T >::end().

Referenced by Undulator::apply(), ScatteringPhysics::applyRandomRotation(), Degrader::applyToReferenceParticle(), Monitor::applyToReferenceParticle(), ParallelCyclotronTracker::bunchDumpPhaseSpaceData(), ParallelCyclotronTracker::bunchDumpStatData(), Bend2D::calculateBendAngle(), PluginElement::changeWidth(), OrbitThreader::checkElementLengths(), ParallelCyclotronTracker::checkFileMomentum(), OutputPlane::checkOne(), Vacuum::checkVacuum(), OpalBeamline::compute3DLattice(), ScatteringPhysics::computeCoulombScattering(), OrbitThreader::computeDriftLengthToBoundingBox(), ScatteringPhysics::computeEnergyLoss(), ParallelCyclotronTracker::deleteParticle(), Probe::doCheck(), CCollimator::doFinaliseCheck(), mslang::euclidean_norm2D(), ParallelTTracker::execute(), ThickTracker::execute(), ParallelTTracker::findStartPosition(), ParallelCyclotronTracker::gapCrossKick_m(), BoundingBox::getIntersectionPoint(), CavityAutophaser::getPhaseAtMaxEnergy(), Bend2D::getSurfaceMesh(), Util::getTaitBryantAngles(), ParallelCyclotronTracker::initDistInGlobalFrame(), Bend2D::inMagnetCentralRegion(), OrbitThreader::integrate(), ParallelCyclotronTracker::push(), OrbitThreader::registerElement(), OutputPlane::setNormal(), OpalOutputPlane::update(), ParallelTTracker::updateRefToLabCSTrafo(), and ParallelTTracker::writePhaseSpace().

Here is the call graph for this function:

◆ operator*() [1/3]

template<class T>
Vector< T > operator* ( const T & x,
const Vector< T > & V1 )

Scalar multiplied by vector.

Definition at line 235 of file Vector.h.

References Array1D< T >::begin(), and Array1D< T >::end().

Here is the call graph for this function:

◆ operator*() [2/3]

template<class T>
Vector< T > operator* ( const Vector< T > & V1,
const T & x )

Vector multiplied by scalar.

Definition at line 220 of file Vector.h.

◆ operator*() [3/3]

template<class T>
T operator* ( const Vector< T > & V1,
const Vector< T > & V2 )

Vector dot product.

Definition at line 214 of file Vector.h.

References Array1D< T >::begin(), and Array1D< T >::end().

Here is the call graph for this function:

◆ operator+()

template<class T>
Vector< T > operator+ ( const Vector< T > & V1,
const Vector< T > & V2 )

Vector addition.

Definition at line 194 of file Vector.h.

References Array1D< T >::begin(), Array1D< T >::end(), and Array1D< T >::size().

Here is the call graph for this function:

◆ operator-()

template<class T>
Vector< T > operator- ( const Vector< T > & V1,
const Vector< T > & V2 )

Vector subtraction.

Definition at line 203 of file Vector.h.

References Array1D< T >::begin(), Array1D< T >::end(), and Array1D< T >::size().

Here is the call graph for this function:

◆ operator/()

template<class T>
Vector< T > operator/ ( const Vector< T > & V1,
const T & x )

Vector divided by scalar.

Definition at line 227 of file Vector.h.

◆ scaled_norm()

template<class T>
T scaled_norm ( const Array1D< T > D,
const Vector< T > & V )

Euclidean norm of diagonal matrix D times vector V.

Definition at line 248 of file Vector.h.

References Array1D< T >::size(), and sum().

Here is the call graph for this function: