BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Protected Member Functions | Protected Attributes
BDSInterpolator2D Class Referenceabstract

Interface for all 2D interpolators. More...

#include <BDSInterpolator2D.hh>

Inheritance diagram for BDSInterpolator2D:
Inheritance graph
Collaboration diagram for BDSInterpolator2D:
Collaboration graph

Public Member Functions

 BDSInterpolator2D (BDSArray2DCoords *arrayIn)
 
G4ThreeVector GetInterpolatedValue (G4double x, G4double y) const
 Public interface to a 2D interpolator. Returns Geant4 type as that's what will be needed. More...
 
const BDSArray2DCoordsArray () const
 
BDSDimensionType FirstDimension () const
 Accessor for the active dimension this represents (first). More...
 
BDSDimensionType SecondDimension () const
 Accessor for the active dimension this represents (second). More...
 
virtual BDSExtent Extent () const
 Extent of field. More...
 
- Public Member Functions inherited from BDSInterpolator
 BDSInterpolator (BDSArray4DCoords *arrayIn=nullptr)
 
virtual BDSExtent Extent () const =0
 Interface each derived class must provide. More...
 
G4double SmallestSpatialStep () const
 

Protected Member Functions

virtual BDSFieldValue GetInterpolatedValueT (G4double x, G4double y) const =0
 

Protected Attributes

BDSArray2DCoordsarray
 The field data. More...
 
- Protected Attributes inherited from BDSInterpolator
G4double smallestSpatialStep
 

Detailed Description

Interface for all 2D interpolators.

Does not own data - so multiple interpolators could be used on same data.

Author
Laurie Nevay

Definition at line 38 of file BDSInterpolator2D.hh.

Constructor & Destructor Documentation

◆ BDSInterpolator2D()

BDSInterpolator2D::BDSInterpolator2D ( BDSArray2DCoords arrayIn)
explicit

Definition at line 24 of file BDSInterpolator2D.cc.

◆ ~BDSInterpolator2D()

virtual BDSInterpolator2D::~BDSInterpolator2D ( )
inlinevirtual

Definition at line 43 of file BDSInterpolator2D.hh.

Member Function Documentation

◆ Array()

const BDSArray2DCoords * BDSInterpolator2D::Array ( ) const
inline

Definition at line 48 of file BDSInterpolator2D.hh.

◆ Extent()

virtual BDSExtent BDSInterpolator2D::Extent ( ) const
inlinevirtual

Extent of field.

Implements BDSInterpolator.

Definition at line 57 of file BDSInterpolator2D.hh.

References array, and BDSArray2DCoords::Extent().

Here is the call graph for this function:

◆ FirstDimension()

BDSDimensionType BDSInterpolator2D::FirstDimension ( ) const
inline

Accessor for the active dimension this represents (first).

Definition at line 51 of file BDSInterpolator2D.hh.

References array, and BDSArray4DCoords::FirstDimension().

Here is the call graph for this function:

◆ GetInterpolatedValue()

G4ThreeVector BDSInterpolator2D::GetInterpolatedValue ( G4double  x,
G4double  y 
) const

Public interface to a 2D interpolator. Returns Geant4 type as that's what will be needed.

Definition at line 29 of file BDSInterpolator2D.cc.

References GetInterpolatedValueT(), BDSThreeVector< T >::x(), BDSThreeVector< T >::y(), and BDSThreeVector< T >::z().

Referenced by BDSFieldEInterpolated2D::GetField(), BDSFieldEMInterpolated2D::GetField(), and BDSFieldMagInterpolated2D::GetField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInterpolatedValueT()

virtual BDSFieldValue BDSInterpolator2D::GetInterpolatedValueT ( G4double  x,
G4double  y 
) const
protectedpure virtual

Each derived class should implement this function. Note T suffix (was templated) to distinguish it from GetInterpolatedValue which returns Geant4 types and is the main interface to should have the clean name.

Implemented in BDSInterpolator2DCubic, BDSInterpolator2DLinear, BDSInterpolator2DLinearMag, and BDSInterpolator2DNearest.

Referenced by GetInterpolatedValue().

Here is the caller graph for this function:

◆ SecondDimension()

BDSDimensionType BDSInterpolator2D::SecondDimension ( ) const
inline

Accessor for the active dimension this represents (second).

Definition at line 54 of file BDSInterpolator2D.hh.

References array, and BDSArray4DCoords::SecondDimension().

Here is the call graph for this function:

Field Documentation

◆ array

BDSArray2DCoords* BDSInterpolator2D::array
protected

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