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);
160 if (line.empty() || line[0] ==
'$')
166 if (line.size() > 72 && line[72] ==
'+')
168 line = line.substr(0, 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 299 <<
"Read:" << line <<
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);
A HashTable with keys but without contents.
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
An STL-conforming const_iterator.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A face is a list of labels corresponding to mesh vertices.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label lineNumber() const
Return current stream line number.
bool insert(const Key &key)
Insert a new entry.
bool good() const
Return true if next operation might succeed.
bool insert(const label &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
stressControl lookup("compactNormalStress") >> compactNormalStress
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
A class for handling words, derived from string.
A triangular face using a FixedList of labels corresponding to mesh vertices.
const fileName & name() const
Return the name of the stream.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
graph_traits< Graph >::vertices_size_type size_type
label readLabel(Istream &is)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
word name(const complex &)
Return a string representation of a complex.
ISstream & getLine(string &, const bool continuation=true)
Read line into a string.
vector point
Point is a vector.
Input from memory buffer stream.
void clearStorage()
Clear the list and delete storage.
static scalar parseNASCoord(const string &s)