Go to the documentation of this file.
43 if (!Pstream::master())
51 label nLines = controllers_.size();
58 for (
const word& ctrlName : controllers_.sortedToc())
60 lines[nLines] = controllers_[ctrlName]->pointLabels();
71 state.
writeVTP(file, lines, originalIds_);
122 const uint64_t payLoad = vtk::sizeofData<float, 3>(
nPoints);
128 format().writeSize(payLoad);
144 const uint64_t payLoad = vtk::sizeofData<label>(
nPoints);
147 format().writeSize(payLoad);
161 const uint64_t payLoad = vtk::sizeofData<label>(
nPoints);
164 format().writeSize(payLoad);
177 format().beginPointData();
182 const uint64_t payLoad = vtk::sizeofData<float, 3>(
nPoints);
184 format().beginDataArray<float, 3>(
"forces");
185 format().writeSize(payLoad);
196 const uint64_t payLoad = vtk::sizeofData<float, 3>(
nPoints);
198 format().beginDataArray<float, 3>(
"moments");
199 format().writeSize(payLoad);
236 const labelList& faceToPoint = patchControls_[patchi].faceToPoint_;
250 writer.writeUniform(
"patchId", patchi);
294 const pointPatch& ptPatch = ptMesh.boundary()[patchi];
304 const labelList& faceToPoint = patchControls_[patchi].faceToPoint_;
308 writer.writeUniform(
"patchId", patchi);
315 = patchControls_[patchi].interp_;
325 intData[i] = interpList[i].nearest();
331 intData[i] = interpList[i].next1();
338 intData[i] = interpList[i].next2();
349 floatData[i] = interpList[i].weight0();
355 floatData[i] = interpList[i].weight1();
361 floatData[i] = interpList[i].weight2();
static const List< face > & null()
Return a null List.
A class for handling words, derived from Foam::string.
A class for handling file names.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
A class for managing temporary objects.
XML inline ASCII, asciiFormatter.
A List obtained as a section of another List.
void writeIdentity(vtk::formatter &fmt, const label len, label start=0)
Write an identity list of labels.
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const =0
General entry point for writing.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const pointField & points() const
The points corresponding to mass centres.
void writeStateVTP(const lumpedPointState &state, const fileName &file) const
Write state as VTK PolyData format.
Basic pointPatch represents a set of points from the mesh.
Mesh consisting of general polyhedral cells.
labelRange range() const
The face range for all boundary faces.
#define forAll(list, i)
Loop across all elements in list.
The state of lumped points corresponds to positions and rotations.
word format(conversionProperties.get< word >("format"))
A patch is a list of labels that address the faces in the global face list.
void writeZonesVTP(const fileName &file, const polyMesh &mesh, const pointField &points0) const
Write pressure-zones geometry, write as VTK PolyData format.
void writeForcesAndMomentsVTP(const fileName &file, const UList< vector > &forces, const UList< vector > &moments) const
Write forces on points as VTK PolyData format.
void writeVTP(const fileName &file, const polyMesh &mesh, const pointField &points0) const
Write displaced geometry according to the current state,.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
void writeVTP(const fileName &outputFile, const labelListList &lines=labelListList(), const labelList &pointIds=labelList::null()) const
Output points/rotations as VTK file for debugging/visualization.
void resize(const label newSize)
Adjust allocated size of list.
Base class for graphics format writing. Entry points are.
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
Mesh representing a set of points created from polyMesh.
const lumpedPointState & state() const
The current state (positions/rotations)
const Field< point_type > & localPoints() const
Return pointField of points in patch.
Output to file stream, using an OSstream.
static bool master(const label communicator=0)
Am I the master process.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, false)))
virtual const faceList & faces() const
Return raw faces.
virtual std::ostream & stdStream()
Access to underlying std::ostream.
Write faces/points (optionally with fields) as a vtp file or a legacy vtk file.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
static const Field< Type > & null()
Return nullObject reference field.
const polyBoundaryMesh & patches
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
autoPtr< vtk::formatter > newFormatter(std::ostream &os, unsigned prec=IOstream::defaultPrecision())
Return a default asciiFormatter.
label size() const
The number of points.
A list of faces which address into the list of points.