Go to the documentation of this file.
42 const std::string& elsetName,
46 const label
n =
f.size();
52 os <<
"*ELEMENT, TYPE=S4";
54 if (!elsetName.empty())
56 os <<
", ELSET=" << elsetName;
72 os <<
"*ELEMENT, TYPE=S3";
74 if (!elsetName.empty())
76 os <<
", ELSET=" << elsetName;
94 for (label fp1 = 1; fp1 <
f.size() - 1; ++fp1)
96 const label fp2 =
f.fcIndex(fp1);
101 << (
f[fp1] + 1) <<
','
102 << (
f[fp2] + 1) <<
nl;
138 <<
"Cannot read file " << filename <<
nl
144 ABAQUSCore::readHelper reader(
true);
146 ABAQUSCore::readHelper reader;
155 reader.purge_solids();
156 reader.compact_nodes();
157 reader.renumber_elements_1to0();
164 for (
labelList& conn : reader.connectivity_)
166 dynFaces.append(Face(std::move(conn)));
175 labelList newToOldZone(elsetUsed.sortedToc());
178 if (newToOldZone.empty())
180 newToOldZone.resize(1,
Zero);
183 Map<label> oldToNewZone(2*newToOldZone.size());
185 forAll(newToOldZone, zonei)
187 oldToNewZone.set(newToOldZone[zonei], zonei);
190 wordList zoneNames(newToOldZone.size());
195 const label zonei = oldToNewZone.lookup(iter.val(), -1);
206 if (zoneNames[zonei].empty())
208 zoneNames[zonei] = surfZoneIdentifier::defaultName(zonei);
213 DynamicList<label> dynZones(std::move(reader.elsetIds_));
216 for (label& zonei : dynZones)
218 zonei = oldToNewZone.lookup(zonei, 0);
225 this->storedPoints().transfer(reader.points_);
227 this->sortFacesAndStore
236 this->addZones(zoneSizes, zoneNames);
237 this->addZonesToFaces();
253 streamOpt.
format(IOstream::ASCII);
264 ? surfaceFormatsCore::oneZone(faceLst,
"")
268 const bool useFaceMap = (surf.
useFaceMap() && zones.size() > 1);
272 bool useOrigFaceIds =
282 for (
const auto&
f : faceLst)
286 useOrigFaceIds =
false;
297 <<
"Cannot write file " << filename <<
nl
302 os <<
"*HEADING" <<
nl;
309 writePoints(
os, pointLst);
324 for (
const surfZone& zone : zones)
326 for (label nLocal = zone.size(); nLocal--; ++faceIndex)
329 (useFaceMap ?
faceMap[faceIndex] : faceIndex);
331 const Face&
f = faceLst[facei];
335 elemId = elemIds[facei];
338 const label
n =
f.size();
341 (prevOutput.first() !=
n || prevOutput.second() != zoneIndex);
346 prevOutput.first() =
n;
347 prevOutput.second() = zoneIndex;
350 elemId = writeShell(
os,
f, elemId, zone.name(), header);
List< label > labelList
A List of labels.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling file names.
void resize(const label len)
static constexpr const zero Zero
Input from file stream, using an ISstream.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Base class for mesh zones.
streamFormat format() const noexcept
const pointField & points() const
A HashTable with keys but without contents that is similar to std::unordered_set.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
const labelUList & faceMap() const
bool good() const noexcept
Pair< label > labelPair
A pair of labels.
List< word > wordList
A List of words.
DynamicList< T, SizeMin > & append(const T &val)
void transfer(List< T > &list)
The IOstreamOption is a simple container for options an IOstream can normally have.
Istream and Ostream manipulators taking arguments.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Output to file stream, using an OSstream.
const labelUList & faceIds() const
#define FatalErrorInFunction
An ordered pair of two objects of type <T> with first() and second() elements.
forAllConstIters(mixture.phases(), phase)
const word & name() const noexcept
const T & second() const noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A surface zone on a MeshedSurface.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Various functions to operate on Lists.
const UList< Face > & surfFaces() const
StringType validate(const std::string &str, const UnaryPredicate &accept, const bool invert=false)
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
const UList< surfZone > & surfZones() const