55 <<
"Cannot read file " << filename
75 if (line.size() > 72 && line[72] ==
'+')
84 if (buf.size() > 72 && buf[72] ==
'+')
86 line += buf.substr(8, 64);
90 line += buf.substr(8);
100 if (cmd ==
"CBEAM" || cmd ==
"CROD")
103 (void) nextNasField(line, linei, 8);
105 (void) nextNasField(line, linei, 8);
107 label a =
readLabel(nextNasField(line, linei, 8));
108 label
b =
readLabel(nextNasField(line, linei, 8));
112 else if (cmd ==
"PLOTEL")
115 (void) nextNasField(line, linei, 8);
117 label a =
readLabel(nextNasField(line, linei, 8));
118 label
b =
readLabel(nextNasField(line, linei, 8));
122 else if (cmd ==
"GRID")
124 label index =
readLabel(nextNasField(line, linei, 8));
125 (void) nextNasField(line, linei, 8);
126 scalar
x = readNasScalar(nextNasField(line, linei, 8));
127 scalar
y = readNasScalar(nextNasField(line, linei, 8));
128 scalar z = readNasScalar(nextNasField(line, linei, 8));
133 else if (cmd ==
"GRID*")
141 label index =
readLabel(nextNasField(line, linei, 16));
142 (void) nextNasField(line, linei, 16);
143 scalar
x = readNasScalar(nextNasField(line, linei, 16));
144 scalar
y = readNasScalar(nextNasField(line, linei, 16));
151 <<
"Expected continuation symbol '*' when reading GRID*" 152 <<
" (double precision coordinate) format" <<
nl 153 <<
"Read:" << line <<
nl 154 <<
"File:" << is.name() <<
" line:" << is.lineNumber()
157 (void) nextNasField(line, linei, 8);
158 scalar z = readNasScalar(nextNasField(line, linei, 16));
166 storedPoints().transfer(dynPoints);
172 bitSet usedPoints(
points().size());
177 for (edge&
e : dynEdges)
179 e[0] = mapPointId[
e[0]];
180 e[1] = mapPointId[
e[1]];
182 usedPoints.set(
e[0]);
183 usedPoints.set(
e[1]);
189 if (!usedPoints.all())
194 for (
const label pointi : usedPoints)
202 mapPointId.set(pointi, nUsed);
209 for (edge&
e : dynEdges)
211 e[0] = mapPointId[
e[0]];
212 e[1] = mapPointId[
e[1]];
216 storedEdges().transfer(dynEdges);
static word validate(const std::string &s, const bool prefix=false)
Construct validated word (no invalid characters).
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Input/output from string buffers.
constexpr char nl
The newline '\n' character (0x0a)
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
void append(const T &val)
Copy append an element to the end of this list.
graph_traits< Graph >::vertices_size_type size_type
Input from file stream as an ISstream, normally using std::ifstream for the actual input...
vector point
Point is a vector.
void clearStorage()
Clear the list and delete storage.
Map< label > invertToMap(const labelUList &values)
Create inverse mapping, which is a lookup table into the given list.