BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Protected Member Functions | Private Member Functions
BDSInterpolator3DCubic Class Reference

Cubic interpolation over 3d array. More...

#include <BDSInterpolator3DCubic.hh>

Inheritance diagram for BDSInterpolator3DCubic:
Inheritance graph
Collaboration diagram for BDSInterpolator3DCubic:
Collaboration graph

Public Member Functions

 BDSInterpolator3DCubic (BDSArray3DCoords *arrayIn)
 
- Public Member Functions inherited from BDSInterpolator3D
 BDSInterpolator3D (BDSArray3DCoords *arrayIn)
 
G4ThreeVector GetInterpolatedValue (G4double x, G4double y, G4double z) const
 Public interface to a 3D interpolator. Returns Geant4 type as that's what will be needed. More...
 
const BDSArray3DCoordsArray () 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...
 
BDSDimensionType ThirdDimension () 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, G4double z) const
 
virtual BDSFieldValue GetInterpolatedValueT (G4double x, G4double y, G4double z) const =0
 

Private Member Functions

 BDSInterpolator3DCubic ()=delete
 Private default constructor to force use of provided one.
 

Additional Inherited Members

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

Detailed Description

Cubic interpolation over 3d array.

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

This uses a tricubic algorithm to interpolate a 3d array and return the value at any arbitrary point. If the point lies outside the array the default value for the templated parameter is returned (typically 0). Therefore, the field drops to 0 outside the specified region.

Author
Laurie Nevay

Definition at line 42 of file BDSInterpolator3DCubic.hh.

Constructor & Destructor Documentation

◆ BDSInterpolator3DCubic()

BDSInterpolator3DCubic::BDSInterpolator3DCubic ( BDSArray3DCoords arrayIn)
explicit

Definition at line 26 of file BDSInterpolator3DCubic.cc.

◆ ~BDSInterpolator3DCubic()

BDSInterpolator3DCubic::~BDSInterpolator3DCubic ( )
virtual

Definition at line 30 of file BDSInterpolator3DCubic.cc.

Member Function Documentation

◆ GetInterpolatedValueT()

BDSFieldValue BDSInterpolator3DCubic::GetInterpolatedValueT ( G4double  x,
G4double  y,
G4double  z 
) const
protectedvirtual

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.

Implements BDSInterpolator3D.

Definition at line 33 of file BDSInterpolator3DCubic.cc.

References BDSInterpolator3D::array, BDS::Cubic3D(), and BDSArray3DCoords::ExtractSection4x4x4().

Here is the call graph for this function:

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