#include <MagneticField/Interpolation/src/GlobalGridWrapper.h>
Public Member Functions | |
virtual std::vector< int > | dimensions () const |
void | dump () const |
virtual LocalPoint | fromGridFrame (double a, double b, double c) const |
find grid coordinates for point. For debugging and validation only. | |
GlobalGridWrapper (const GloballyPositioned< float > &vol, const std::string &fileName) | |
virtual LocalPoint | nodePosition (int i, int j, int k) const |
Position of node in local frame. | |
virtual LocalVector | nodeValue (int i, int j, int k) const |
Field value at node. | |
virtual void | toGridFrame (const LocalPoint &p, double &a, double &b, double &c) const |
find grid coordinates for point. For debugging and validation only. | |
virtual LocalVector | valueInTesla (const LocalPoint &p) const |
Interpolated field value at given point. | |
Private Attributes | |
MagneticFieldGrid * | theRealOne |
non-specialized/optimized for each kind of grid.
Definition at line 22 of file GlobalGridWrapper.h.
GlobalGridWrapper::GlobalGridWrapper | ( | const GloballyPositioned< float > & | vol, | |
const std::string & | fileName | |||
) |
vector< int > GlobalGridWrapper::dimensions | ( | ) | const [virtual] |
Implements MFGrid.
Definition at line 51 of file GlobalGridWrapper.cc.
00052 { 00053 throw MagLogicError ("GlobalGridWrapper::dimensions not implemented yet"); 00054 return vector<int>(); 00055 }
MFGrid::LocalPoint GlobalGridWrapper::fromGridFrame | ( | double | a, | |
double | b, | |||
double | c | |||
) | const [virtual] |
find grid coordinates for point. For debugging and validation only.
Implements MFGrid.
Definition at line 45 of file GlobalGridWrapper.cc.
00046 { 00047 throw MagLogicError ("GlobalGridWrapper::fromGridFrame not implemented yet"); 00048 return LocalPoint( 0, 0, 0); 00049 }
MFGrid::LocalPoint GlobalGridWrapper::nodePosition | ( | int | i, | |
int | j, | |||
int | k | |||
) | const [virtual] |
Position of node in local frame.
Implements MFGrid.
Definition at line 57 of file GlobalGridWrapper.cc.
00058 { 00059 throw MagLogicError ("GlobalGridWrapper::nodePosition not implemented yet"); 00060 return LocalPoint( 0, 0, 0); 00061 }
MFGrid::LocalVector GlobalGridWrapper::nodeValue | ( | int | i, | |
int | j, | |||
int | k | |||
) | const [virtual] |
Field value at node.
Implements MFGrid.
Definition at line 63 of file GlobalGridWrapper.cc.
00064 { 00065 throw MagLogicError ("GlobalGridWrapper::nodeValue not implemented yet"); 00066 return LocalVector( 0, 0, 0); 00067 }
void GlobalGridWrapper::toGridFrame | ( | const LocalPoint & | p, | |
double & | a, | |||
double & | b, | |||
double & | c | |||
) | const [virtual] |
find grid coordinates for point. For debugging and validation only.
Implements MFGrid.
Definition at line 39 of file GlobalGridWrapper.cc.
00041 { 00042 throw MagLogicError ("GlobalGridWrapper::toGridFrame not implemented yet"); 00043 }
MFGrid::LocalVector GlobalGridWrapper::valueInTesla | ( | const LocalPoint & | p | ) | const [virtual] |
Interpolated field value at given point.
Implements MFGrid.
Definition at line 15 of file GlobalGridWrapper.cc.
References MFGrid::frame(), MagneticFieldGrid::gridType(), MagneticFieldGrid::interpolateAtPoint(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), theRealOne, GloballyPositioned< T >::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
00016 { 00017 00018 GlobalPoint gp = frame().toGlobal(p); 00019 float bx, by, bz; 00020 00021 int gridType = theRealOne->gridType(); 00022 if ( gridType == 1 || gridType == 2) { 00023 // x,y,z grid 00024 theRealOne->interpolateAtPoint( gp.x(), gp.y(), gp.z(), bx, by, bz); 00025 } 00026 else { 00027 // r,phi,z grid 00028 // cout << "calling interpolateAtPoint with args " 00029 // << gp.perp() << " " << gp.phi() << " " << gp.z() << endl; 00030 theRealOne->interpolateAtPoint( gp.perp(), gp.phi(), gp.z(), bx, by, bz); 00031 // cout << "interpolateAtPoint returned " 00032 // << bx << " " << by << " " << bz << endl; 00033 } 00034 return LocalVector( bx, by, bz); 00035 }
MagneticFieldGrid* GlobalGridWrapper::theRealOne [private] |