Go to the documentation of this file.
40 namespace surfaceWriters
72 for (
const label vert : elem)
74 os <<
", " << (vert + 1);
85 void Foam::surfaceWriters::abaqusWriter::writeFace
98 os <<
"*ELEMENT, TYPE=S" <<
f.size();
102 os <<
", ELSET=_" << propId;
112 void Foam::surfaceWriters::abaqusWriter::writeGeometry
115 const meshedSurf& surf,
117 DynamicList<face>& decompFaces
121 const faceList& faces = surf.faces();
123 const labelList& elemIds = surf.faceIds();
126 bool useOrigFaceIds =
128 elemIds.size() == faces.size()
135 for (
const auto&
f : faces)
139 useOrigFaceIds =
false;
146 os <<
"** Geometry" <<
nl;
157 decompOffsets.resize(faces.size()+1);
160 decompOffsets[0] = 0;
172 const face&
f = faces[facei];
177 elemId = elemIds[facei];
181 const label propId = 1 + (facei < zones.size() ? zones[facei] : 0);
183 const label
n =
f.size();
186 (prevOutput.first() !=
n || prevOutput.second() != propId);
191 prevOutput.first() =
n;
192 prevOutput.second() = propId;
195 if (
n == 3 ||
n == 4)
197 writeFace(
os,
f, ++elemId, propId, header);
202 prevOutput.first() = 3;
204 f.triangles(
points, decompFaces);
208 label decompi = decompOffsets[facei];
209 decompi < decompFaces.size();
216 decompFaces[decompi],
227 decompOffsets[facei+1] = decompFaces.size();
243 outputLayout_(outputLayoutType::BY_FIELD)
253 geometryScale_(options.getOrDefault<scalar>(
"scale", 1)),
254 fieldScale_(options.subOrEmptyDict(
"fieldScale")),
255 noGeometry_(options.getOrDefault(
"noGeometry", false)),
256 outputLayout_(outputLayoutType::BY_FIELD)
270 open(surf, outputPath, parallel);
285 open(
points, faces, outputPath, parallel);
301 switch (outputLayout_)
303 case outputLayoutType::BY_TIME:
305 outputFile = outputPath_;
306 if (useTimeDir() && !
timeName().empty())
314 case outputLayoutType::BY_FIELD:
316 outputFile = outputPath_ /
"geometry" / outputPath_.
name();
325 outputFile.
ext(
"abq");
329 Info<<
"Writing abaqus geometry to " << outputFile <<
endl;
333 const meshedSurf& surf = surface();
342 OFstream
os(outputFile);
345 DynamicList<face> decompFaces;
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A class for handling words, derived from Foam::string.
Base class for surface writers.
A class for handling file names.
defineTypeName(abaqusWriter)
static std::string path(const std::string &str)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
static void writeConnectivity(Ostream &os, const label elemId, const labelUList &elem)
static std::string name(const std::string &str)
Abstract definition of a meshed surface defined by faces and points.
static bool master(const label communicator=worldComm)
Ostream & endl(Ostream &os)
Convenience macros for instantiating surfaceWriter methods.
defineSurfaceWriterWriteFields(Foam::surfaceWriters::abaqusWriter)
Pair< label > labelPair
A pair of labels.
addToRunTimeSelectionTable(surfaceWriter, abaqusWriter, word)
Generic templated field type.
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)
Macros for easy insertion into run-time selection tables.
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
Output to file stream, using an OSstream.
List< face > faceList
A List of faces.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool found(const ListType &input, const UnaryPredicate &pred, const label start=0)
Various functions to operate on Lists.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
UList< label > labelUList
A UList of labels.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
bool mkDir(const fileName &pathName, mode_t mode=0777)
bool isDir(const fileName &name, const bool followLink=true)
A surface writer for the ABAQUS file format - both surface mesh and fields.