BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Interface for all 1D interpolators. More...
#include <BDSInterpolator1D.hh>
Public Member Functions | |
BDSInterpolator1D (BDSArray1DCoords *arrayIn) | |
G4ThreeVector | GetInterpolatedValue (G4double x) const |
Public interface to a 1D interpolator. Returns Geant4 type as that's what will be needed. | |
const BDSArray1DCoords * | Array () const |
Accessor for the underlying array data. | |
BDSDimensionType | FirstDimension () const |
Accessor for the active dimension this represents. | |
virtual BDSExtent | Extent () const |
Extent of field. | |
virtual G4bool | TimeVarying () const |
![]() | |
BDSInterpolator (BDSArray4DCoords *arrayIn=nullptr) | |
virtual BDSExtent | Extent () const =0 |
Interface each derived class must provide. | |
virtual G4bool | TimeVarying () const =0 |
G4double | SmallestSpatialStep () const |
Protected Member Functions | |
virtual BDSFieldValue | GetInterpolatedValueT (G4double x) const =0 |
Protected Attributes | |
BDSArray1DCoords * | array |
The field data. | |
![]() | |
G4double | smallestSpatialStep |
Interface for all 1D interpolators.
Does not own data - so multiple interpolators could be used on same data.
Definition at line 38 of file BDSInterpolator1D.hh.
|
explicit |
Definition at line 24 of file BDSInterpolator1D.cc.
|
inlinevirtual |
Definition at line 43 of file BDSInterpolator1D.hh.
|
inline |
Accessor for the underlying array data.
Definition at line 49 of file BDSInterpolator1D.hh.
References array.
|
inlinevirtual |
Extent of field.
Implements BDSInterpolator.
Definition at line 55 of file BDSInterpolator1D.hh.
References array, and BDSArray1DCoords::Extent().
|
inline |
Accessor for the active dimension this represents.
Definition at line 52 of file BDSInterpolator1D.hh.
References array, and BDSArray4DCoords::FirstDimension().
G4ThreeVector BDSInterpolator1D::GetInterpolatedValue | ( | G4double | x | ) | const |
Public interface to a 1D interpolator. Returns Geant4 type as that's what will be needed.
Definition at line 29 of file BDSInterpolator1D.cc.
References GetInterpolatedValueT(), BDSThreeVector< T >::x(), BDSThreeVector< T >::y(), and BDSThreeVector< T >::z().
Referenced by BDSFieldEInterpolated1D::GetField(), BDSFieldEMInterpolated1D::GetField(), and BDSFieldMagInterpolated1D::GetField().
|
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 BDSInterpolator1DCubic, BDSInterpolator1DLinear, BDSInterpolator1DLinearMag, and BDSInterpolator1DNearest.
Referenced by GetInterpolatedValue().
|
inlinevirtual |
Implements BDSInterpolator.
Definition at line 57 of file BDSInterpolator1D.hh.
|
protected |
The field data.
Definition at line 66 of file BDSInterpolator1D.hh.
Referenced by Array(), Extent(), FirstDimension(), BDSInterpolator1DCubic::GetInterpolatedValueT(), BDSInterpolator1DLinear::GetInterpolatedValueT(), BDSInterpolator1DLinearMag::GetInterpolatedValueT(), and BDSInterpolator1DNearest::GetInterpolatedValueT().