34 void Foam::starMesh::readPoints(
const scalar scaleFactor)
39 fileName pointsFileName(casePrefix_ +
".vrt");
42 IFstream pointsFile(pointsFileName);
46 if (pointsFile.good())
52 while ((pointsFile >> pointLabel).good())
55 maxLabel =
max(maxLabel, pointLabel);
56 pointsFile >> x >> y >> z;
62 <<
"Cannot read file " << pointsFileName
67 Info<<
"Number of points = " << nPoints << endl <<
endl;
75 starPointLabelLookup_.
setSize(maxLabel+1);
78 starPointLabelLookup_ = -1;
85 IFstream pointsFile(pointsFileName);
96 starPointID_[
p] = pointLabel;
97 starPointLabelLookup_[pointLabel] =
p;
100 if (scaleFactor > 1.0 + SMALL || scaleFactor < 1.0 - SMALL)
102 points_ *= scaleFactor;
108 <<
"void starMesh::readPoints() : " 109 <<
"no points in file " #define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of List.