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);
112 else if (cmd ==
"PLOTEL")
115 (void) nextNasField(
line, linei, 8);
122 else if (cmd ==
"GRID")
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*")
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
157 (void) nextNasField(
line, linei, 8);
158 scalar z = readNasScalar(nextNasField(
line, linei, 16));
166 storedPoints().transfer(dynPoints);
175 mapPointId.
insert(pointId[i], i);
184 for (
edge&
e : dynEdges)
186 e[0] = mapPointId[
e[0]];
187 e[1] = mapPointId[
e[1]];
189 usedPoints.
set(
e[0]);
190 usedPoints.
set(
e[1]);
196 if (!usedPoints.
all())
201 for (
const label pointi : usedPoints)
205 pts[nUsed] = pts[pointi];
209 mapPointId.
set(pointi, nUsed);
216 for (
edge&
e : dynEdges)
218 e[0] = mapPointId[
e[0]];
219 e[1] = mapPointId[
e[1]];
Input/output from string buffers.
label size_type
The type to represent the size of a buffer.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
void append(const T &val)
Copy append an element to the end of this list.
void clearStorage()
Clear the list and delete storage.
bool set(const Key &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
void transfer(HashTable< T, Key, Hash > &rhs)
Transfer contents into this table.
void clear()
Clear all entries from table.
Input from file stream, using an ISstream.
virtual const fileName & name() const
Read/write access to the name of the stream.
label lineNumber() const noexcept
Const access to the current stream line number.
bool good() const noexcept
True if next operation might succeed.
ISstream & getLine(std::string &str, char delim='\n')
Raw, low-level getline (until delimiter) into a string.
void resize(const label len)
Adjust allocated size of list.
A HashTable to objects of type <T> with a label key.
virtual bool read()
Re-read model coefficients if they have changed.
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void set(const bitSet &bitset)
Set specified bits from another bitset.
bool all() const
True if all bits in this bitset are set or if the set is empty.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A class for handling file names.
virtual void validate()
Validate the turbulence fields after construction.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
vector point
Point is a vector.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.