Go to the documentation of this file.
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);
215 zoneI = dynSizes.size();
216 lookup.insert(groupId, zoneI);
225 else if (cmd ==
"CQUAD4")
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(dynFaces.
xfer(), dynZones.
xfer(), sorted);
379 this->addZones(dynSizes, names,
true);
Xfer< List< T > > xfer()
Transfer contents to the Xfer container as a plain List.
const fileName & name() const
Return the name of the stream.
A class for handling words, derived from string.
A class for handling file names.
#define forAll(list, i)
Loop across all elements in list.
bool read(const char *, int32_t &)
An STL-conforming const_iterator.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A HashTable with keys but without contents.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
static scalar parseNASCoord(const string &s)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
ISstream & getLine(string &)
Raw, low-level getline into a string function.
graph_traits< Graph >::vertices_size_type size_type
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
Input from memory buffer stream.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A triangular face using a FixedList of labels corresponding to mesh vertices.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool insert(const Key &key)
Insert a new entry.
void clearStorage()
Clear the list and delete storage.
label readLabel(Istream &is)
label lineNumber() const
Return current stream line number.
A face is a list of labels corresponding to mesh vertices.
vector point
Point is a vector.
bool good() const
Return true if next operation might succeed.
word name(const complex &)
Return a string representation of a complex.
stressControl lookup("compactNormalStress") >> compactNormalStress