29#include "vtkFloatArray.h"
30#include "vtkCellData.h"
31#include "vtkPointData.h"
32#include "vtkSmartPointer.h"
37vtkSmartPointer<vtkFloatArray>
47 auto data = vtkSmartPointer<vtkFloatArray>::New();
48 data->SetName(
fld.name().c_str());
49 data->SetNumberOfComponents(nComp);
63 for (
const label meshCelli :
cellMap)
66 data->SetTuple(celli++, scratch);
74vtkSmartPointer<vtkFloatArray>
81 return convertField<Type>(
fld.internalField(), vtuData);
86vtkSmartPointer<vtkFloatArray>
92 return convertField<Type>(
fld, *
this);
97vtkSmartPointer<vtkFloatArray>
103 return convertField<Type>(
fld, *
this);
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
void size(const label n)
Older name for setAddressableSize.
Database for solution data, solver performance and other reduced data.
const labelList & cellMap() const noexcept
Original cell ids for all cells (regular and decomposed).
A traits class, which is primarily used for primitives.
Bookkeeping for vtkUnstructuredGrid.
static vtkSmartPointer< vtkFloatArray > convertField(const DimensionedField< Type, volMesh > &fld, const vtuAdaptor &vtuData)
Convert internal volume field (CellData)