51 label nLines = controllers_.size();
58 for (
const word& ctrlName : controllers_.sortedToc())
60 lines[nLines] = controllers_[ctrlName]->pointLabels();
95 std::ostream&
os = fos.stdStream();
128 format().writeSize(payLoad);
147 format().writeSize(payLoad);
164 format().writeSize(payLoad);
177 format().beginPointData();
184 format().beginDataArray<float, 3>(
"forces");
185 format().writeSize(payLoad);
198 format().beginDataArray<float, 3>(
"moments");
199 format().writeSize(payLoad);
240 writer.piece(
pp.localPoints(),
pp.localFaces());
246 writer.writeUniform(
"patchId", patchi);
256 const fileName& file,
257 const polyMesh&
mesh,
290 const pointPatch& ptPatch = ptMesh.boundary()[patchi];
295 writer.piece(tpts(),
pp.localFaces());
304 writer.writeUniform(
"patchId", patchi);
311 = patchControls_[patchi].interp_;
321 intData[i] = interpList[i].nearest();
323 writer.write(
"nearest", intData);
327 intData[i] = interpList[i].next1();
334 intData[i] = interpList[i].next2();
345 floatData[i] = interpList[i].weight0();
351 floatData[i] = interpList[i].weight1();
357 floatData[i] = interpList[i].weight2();
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edgesCentres")))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static const Field< vector > & null() noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void resize(const label len)
Adjust allocated size of list.
static const List< face > & null() noexcept
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
virtual const std::ostream & stdStream() const override
Const access to underlying std::ostream.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
T & first()
Access first element of the list, position [0].
void size(const label n)
Older name for setAddressableSize.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A topoSetPointSource to select all points based on usage in given faceSet(s).
A class for handling file names.
void writeForcesAndMomentsVTP(const fileName &file, const UList< vector > &forces, const UList< vector > &moments) const
Write forces on points as VTK PolyData format.
void writeStateVTP(const lumpedPointState &state, const fileName &file) const
Write state as VTK PolyData format.
const lumpedPointState & state() const
The current state (positions/rotations).
tmp< pointField > pointsPosition(const lumpedPointState &state, const pointPatch &fpatch, const pointField &points0) const
The points absolute position according to specified state.
void writeZonesVTP(const fileName &file, const polyMesh &mesh, const pointField &points0) const
Write pressure-zones geometry, write as VTK PolyData format.
void writeVTP(const fileName &file, const polyMesh &mesh, const pointField &points0) const
Write displaced geometry according to the current state,.
The state of lumped points corresponds to positions and rotations.
void writeVTP(const fileName &outputFile, const labelListList &lines=labelListList(), const labelList &pointIds=labelList::null()) const
Output points/rotations as VTK file for debugging/visualization.
const pointField & points() const
The points corresponding to mass centres.
Mesh representing a set of points created from polyMesh.
const pointBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
Basic pointPatch represents a set of points from the mesh.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
A class for managing temporary objects.
bool endPointData()
Explicitly end PointData output and switch to PIECE state.
void write(const word &fieldName, const UList< Type > &field)
Write primitive field of CellData (Poly or Line) or PointData values.
Write faces/points (optionally with fields) as a vtp file or a legacy vtk file.
A class for handling words, derived from Foam::string.
const polyBoundaryMesh & patches
OBJstream os(runTime.globalPath()/outputName)
autoPtr< vtk::formatter > newFormatter(std::ostream &os, unsigned prec=IOstream::defaultPrecision())
Return a default asciiFormatter.
uint64_t sizeofData(label count)
Commonly used calculation for header and payload sizes.
@ NUMBER_OF_VERTS
"NumberOfVerts"
@ NUMBER_OF_POINTS
"NumberOfPoints"
void writeIdentity(vtk::formatter &fmt, const label len, label start=0)
Write an identity list of labels.
@ CONNECTIVITY
"connectivity"
@ INLINE_ASCII
XML inline ASCII, asciiFormatter.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
vectorField pointField
pointField is a vectorField.
List< scalar > scalarList
List of scalar.
word format(conversionProperties.get< word >("format"))
#define forAll(list, i)
Loop across all elements in list.
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER)))