50 const bool mustTriangulate = this->isTri();
57 <<
"Cannot read file " << filename
82 word ansaType, ansaName;
93 if (
line.substr(0, 10) ==
"$ANSA_NAME")
102 && sem1 != string::npos
103 && sem2 != string::npos
110 ansaType =
line.substr(sem1+1, sem2-sem1-1);
114 if (rawName[rawName.size()-1] ==
'\r')
116 rawName = rawName.substr(1, rawName.size()-2);
120 rawName = rawName.substr(1, rawName.size()-1);
123 string::stripInvalid<word>(rawName);
137 line.substr(0, 12) ==
"$HMNAME COMP"
138 &&
line.find (
'"') != string::npos
149 lineStream >> rawName;
150 string::stripInvalid<word>(rawName);
152 word groupName(rawName);
153 nameLookup.
insert(groupId, groupName);
166 if (
line.size() > 72 &&
line[72] ==
'+')
175 if (buf.size() > 72 && buf[72] ==
'+')
177 line += buf.substr(8, 64);
181 line += buf.substr(8, buf.size()-8);
204 if (fnd != lookup.
end())
215 zoneI = dynSizes.
size();
216 lookup.
insert(groupId, zoneI);
225 else if (cmd ==
"CQUAD4")
238 if (fnd != lookup.
end())
249 zoneI = dynSizes.
size();
250 lookup.
insert(groupId, zoneI);
262 dynSizes[zoneI] += 2;
271 else if (cmd ==
"GRID")
281 else if (cmd ==
"GRID*")
297 <<
"Expected continuation symbol '*' when reading GRID*"
298 <<
" (double precision coordinate) format" <<
nl
308 else if (cmd ==
"PSHELL")
313 if (groupId == ansaId && ansaType ==
"PSHELL")
315 nameLookup.
insert(ansaId, ansaName);
319 else if (unhandledCmd.
insert(cmd))
321 Info<<
"Unhandled Nastran command " <<
line <<
nl
332 this->storedPoints().transfer(dynPoints);
341 mapPointId.
insert(pointId[i], i);
348 Face&
f = dynFaces[i];
351 f[fp] = mapPointId[
f[fp]];
362 const label zoneI = iter();
363 const label groupI = iter.key();
366 if (fnd != nameLookup.
end())
368 names[zoneI] = fnd();
376 this->sortFacesAndStore(move(dynFaces), move(dynZones), sorted);
379 this->addZones(dynSizes, names,
true);
graph_traits< Graph >::vertices_size_type size_type
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
void clearStorage()
Clear the list and delete storage.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
A HashTable with keys but without contents.
bool insert(const Key &key)
Insert a new entry.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
void clear()
Clear all entries from table.
const fileName & name() const
Return the name of the stream.
label lineNumber() const
Return current stream line number.
bool good() const
Return true if next operation might succeed.
ISstream & getLine(string &, const bool continuation=true)
Read line into a string.
Input from memory buffer stream.
void size(const label)
Override size to be inconsistent with allocated storage.
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
A triangular face using a FixedList of labels corresponding to mesh vertices.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
word name(const bool)
Return a word representation of a bool.
vector point
Point is a vector.
static scalar parseNASCoord(const string &s)
label readLabel(Istream &is)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable