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
75 starPointLabelLookup_.
setSize(maxLabel+1);
78 starPointLabelLookup_ = -1;
85 IFstream pointsFile(pointsFileName);
96 starPointIndex_[
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.
void setSize(const label)
Reset size of List.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)