46 #ifndef Foam_vtk_vtkTools_H 47 #define Foam_vtk_vtkTools_H 55 #include "vtkCellArray.h" 56 #include "vtkFloatArray.h" 57 #include "vtkDoubleArray.h" 58 #include "vtkIdTypeArray.h" 59 #include "vtkSmartPointer.h" 60 #include "vtkUnsignedCharArray.h" 61 #include "vtkPoints.h" 62 #include "vtkPolyData.h" 84 template<
class DataType>
90 vtkSmartPointer<dataType>
vtkgeom;
93 vtkSmartPointer<dataType>
dataset;
130 void set(vtkSmartPointer<dataType> geom)
142 vtkgeom->PrintSelf(std::cout, vtkIndent(2));
153 dataset->PrintSelf(std::cout, vtkIndent(2));
173 vtkUnsignedCharArray* array,
178 inline UList<vtkIdType>
asUList 180 vtkIdTypeArray* array,
185 inline vtkSmartPointer<vtkPoints>
Points 187 const UList<point>&
pts 191 inline vtkSmartPointer<vtkPoints>
Points 193 const UList<point>&
pts,
199 vtkSmartPointer<vtkCellArray>
Faces(
const UList<Face>& faces);
202 inline vtkSmartPointer<vtkPolyData>
Vertices 204 const UList<point>&
pts 208 inline vtkSmartPointer<vtkPolyData>
Vertices 210 const UList<point>&
pts,
222 template<
class PatchType>
223 static vtkSmartPointer<vtkPoints>
points(
const PatchType&
p);
226 template<
class PatchType>
227 static vtkSmartPointer<vtkCellArray>
faces(
const PatchType&
p);
230 template<
class PatchType>
231 static vtkSmartPointer<vtkPolyData>
mesh(
const PatchType&
p);
234 template<
class PatchType>
235 static vtkSmartPointer<vtkFloatArray>
faceNormals(
const PatchType&
p);
238 template<
class PatchType>
239 static vtkSmartPointer<vtkPoints>
faceCentres(
const PatchType&
p);
243 static vtkSmartPointer<vtkPolyData>
mesh 245 const UList<point>&
pts,
246 const UList<Face>& fcs
297 vtkFloatArray* array,
338 void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(
float data[])
340 std::swap(data[1], data[3]);
341 std::swap(data[2], data[5]);
347 void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(
double data[])
349 std::swap(data[1], data[3]);
350 std::swap(data[2], data[5]);
MinMax< scalar > scalarMinMax
A scalar min/max range.
uint64_t nPoints() const
Number of points associated with the geometry.
constexpr char nl
The newline '\n' character (0x0a)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
void clearGeom()
Clear geometry and dataset.
void PrintSelf(std::ostream &os) const
Report basic information to output.
UList< label > labelUList
A UList of labels.
vtkSmartPointer< dataType > vtkgeom
The geometry, without any cell/point data.
Bookkeeping for internal caching.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
static Istream & input(Istream &is, IntRange< T > &range)
OBJstream os(runTime.globalPath()/outputName)
Database for solution data, solver performance and other reduced data.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
vtkSmartPointer< dataType > dataset
The shallow-copy of geometry, plus additional data.
vtkSmartPointer< dataType > getCopy() const
Return a shallow copy of vtkgeom for manipulation.
static Ostream & output(Ostream &os, const IntRange< T > &range)
void reuse()
Make a shallow copy of vtkgeom into dataset.