24 cout <<
"ERROR: RectangularCylindricalMFGrid: unexpected orientation: x: " 25 << localXDir <<
" y: " << localYDir << endl;
29 inFile >> n1 >> n2 >> n3;
30 double xref, yref, zref;
31 inFile >> xref >> yref >> zref;
32 double stepx, stepy, stepz;
33 inFile >> stepx >> stepy >> stepz;
35 vector<BVector> fieldValues;
37 int nLines = n1*n2*n3;
38 fieldValues.reserve(nLines);
39 for (
int iLine=0; iLine<nLines; ++iLine){
40 inFile >> Bx >> By >> Bz;
41 fieldValues.push_back(
BVector(Bx,By,Bz));
46 if (lastEntry !=
"complete"){
47 cout <<
"ERROR during file reading: file is not complete" << endl;
54 cout <<
"Grid reference point in grid system: " << xref <<
"," << yref <<
"," << zref << endl;
55 cout <<
"Grid reference point in global x,y,z: " << grefp << endl;
56 cout <<
"Grid reference point in local x,y,z: " << lrefp << endl;
57 cout <<
"steps " << stepx <<
"," << stepy <<
"," << stepz << endl;
60 Grid1D gridX( lrefp.perp(), lrefp.perp() + stepx*(n1-1), n1);
62 Grid1D gridY( yref, yref + stepy*(n2-1), n2);
63 Grid1D gridZ( lrefp.z(), lrefp.z() + stepz*(n3-1), n3);
71 cout << endl <<
"Dump of RectangularCylindricalMFGrid" << endl;
72 cout <<
"Number of points from Grid1D " 75 cout <<
"Reference Point from Grid1D " 78 cout <<
"Basic Distance from Grid1D " 82 cout <<
"Dumping " <<
grid_.
data().size() <<
" field values " << endl;
88 const float minimalSignificantR = 1
e-6;
90 if (R < minimalSignificantR) {
107 double&
a,
double&
b,
double&
c)
const
const Grid1D & grida() const
GloballyPositioned< float >::GlobalVector GlobalVector
GloballyPositioned< float >::LocalPoint LocalPoint
ReturnType interpolate(Scalar a, Scalar b, Scalar c)
LocalPoint toLocal(const GlobalPoint &gp) const
const Grid1D & gridc() const
LocalPoint fromGridFrame(double a, double b, double c) const override
find grid coordinates for point. For debugging and validation only.
const Container & data() const
GloballyPositioned< float >::GlobalPoint GlobalPoint
void dump() const override
void toGridFrame(const LocalPoint &p, double &a, double &b, double &c) const override
find grid coordinates for point. For debugging and validation only.
LocalVector uncheckedValueInTesla(const LocalPoint &p) const override
Interpolated field value at given point; does not check for exceptions.
GloballyPositioned< float >::LocalVector LocalVector
const GloballyPositioned< float > & frame() const
Local reference frame.
RectangularCylindricalMFGrid(binary_ifstream &istr, const GloballyPositioned< float > &vol)
int index(Scalar a, Scalar &f) const
const Grid1D & gridb() const