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())
183 wordList zoneNames(newToOldZone.size());
186 Map<label> oldToNewZone(
invertToMap(newToOldZone));
190 const label zonei = oldToNewZone.lookup(iter.val(), -1);
201 if (zoneNames[zonei].empty())
203 zoneNames[zonei] = surfZoneIdentifier::defaultName(zonei);
208 DynamicList<label> dynZones(std::move(reader.elsetIds_));
211 for (label& zonei : dynZones)
213 zonei = oldToNewZone.lookup(zonei, 0);
220 this->storedPoints().transfer(reader.points_);
222 this->sortFacesAndStore
231 this->addZones(zoneSizes, zoneNames);
232 this->addZonesToFaces();
248 streamOpt.
format(IOstreamOption::ASCII);
259 ? surfaceFormatsCore::oneZone(faceLst,
"")
267 bool useOrigFaceIds =
277 for (
const auto&
f : faceLst)
281 useOrigFaceIds =
false;
292 <<
"Cannot write file " << filename <<
nl 297 os <<
"*HEADING" <<
nl;
304 writePoints(
os, pointLst);
319 for (
const surfZone& zone : zones)
321 for (label nLocal = zone.size(); nLocal--; ++faceIndex)
324 (useFaceMap ?
faceMap[faceIndex] : faceIndex);
326 const Face&
f = faceLst[facei];
330 elemId = elemIds[facei];
333 const label
n =
f.size();
336 (prevOutput.first() !=
n || prevOutput.second() != zoneIndex);
341 prevOutput.first() =
n;
342 prevOutput.second() = zoneIndex;
345 elemId = writeShell(
os,
f, elemId, zone.name(), header);
void size(const label n)
Older name for setAddressableSize.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Output to file stream as an OSstream, normally using std::ofstream for the actual output...
constexpr char nl
The newline '\n' character (0x0a)
A simple container for options an IOstream can normally have.
void push_back(const T &val)
Append an element at the end of the list.
const pointField & points() const noexcept
Return const access to the points.
const labelUList & faceMap() const noexcept
Const access to the faceMap, zero-sized when unused.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
StringType validate(const std::string &str, const UnaryPredicate &accept, const bool invert=false)
Return a copy of the input string with validated characters.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
bool useFaceMap() const noexcept
Can/should use faceMap?
const UList< surfZone > & surfZones() const noexcept
Const access to the surface zones.
void append(const T &val)
Copy append an element to the end of this list.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Istream and Ostream manipulators taking arguments.
Pair< label > labelPair
A pair of labels.
OBJstream os(runTime.globalPath()/outputName)
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats...
Input from file stream as an ISstream, normally using std::ifstream for the actual input...
List< word > wordList
List of word.
const labelUList & faceIds() const noexcept
Const access to the faceIds, zero-sized when unused.
bool good() const noexcept
True if next operation might succeed.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
List< label > labelList
A List of labels.
const UList< Face > & surfFaces() const noexcept
Return const access to the faces.
Map< label > invertToMap(const labelUList &values)
Create inverse mapping, which is a lookup table into the given list.
streamFormat format() const noexcept
Get the current stream format.
forAllConstIters(mixture.phases(), phase)