51 label nLines = controllers_.size();
58 for (
const word& ctrlName : controllers_.sortedToc())
60 lines[nLines] = controllers_[ctrlName]->pointLabels();
77 writeStateVTP(state(), file);
109 const label
nPoints = state().points().size();
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);
315 = patchControls_[patchi].interp_;
325 intData[i] = interpList[i].nearest();
327 writer.write(
"nearest", intData);
331 intData[i] = interpList[i].next1();
333 writer.write(
"next1", intData);
338 intData[i] = interpList[i].next2();
340 writer.write(
"next2", intData);
349 floatData[i] = interpList[i].weight0();
351 writer.write(
"weight", floatData);
355 floatData[i] = interpList[i].weight1();
357 writer.write(
"weight1", floatData);
361 floatData[i] = interpList[i].weight2();
363 writer.write(
"weight2", floatData);
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
void resize(const label len)
Adjust allocated size of list.
Output to file stream, using an OSstream.
virtual std::ostream & stdStream()
Access to underlying std::ostream.
A list of faces which address into the list of points.
const Field< point_type > & localPoints() const
Return pointField of points in patch.
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
A List obtained as a section of another List.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
T & first()
Return the first element of the list.
void size(const label n)
Older name for setAddressableSize.
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)
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.
label size() const
The number of points.
void writeVTP(const fileName &outputFile, const labelListList &lines=labelListList(), const labelList &pointIds=labelList::null()) const
Output points/rotations as VTK file for debugging/visualization.
Mesh representing a set of points created from polyMesh.
const pointBoundaryMesh & boundary() const
Return reference to boundary mesh.
Basic pointPatch represents a set of points from the mesh.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
labelRange range() const noexcept
The face range for all boundary faces.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
splitCell * master() const
A class for managing temporary objects.
bool endCellData()
Explicitly end CellData output and switch to PIECE state.
bool endPointData()
Explicitly end PointData output and switch to PIECE state.
void writeUniform(const word &fieldName, const Type &val)
Write a uniform field of Cell or Point values.
virtual bool beginCellData(label nFields=0)
Begin CellData output section for specified number of fields.
virtual bool beginPointData(label nFields=0)
Begin PointData for specified number of fields.
virtual bool writeGeometry()
Write mesh topology.
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)
@ 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.
autoPtr< vtk::formatter > newFormatter(std::ostream &os, unsigned prec=IOstream::defaultPrecision())
Return a default asciiFormatter.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
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, false)))