34 vtkUnsignedCharArray* array,
38 array->SetNumberOfComponents(1);
39 array->SetNumberOfTuples(size);
47 vtkIdTypeArray* array,
51 array->SetNumberOfComponents(1);
52 array->SetNumberOfTuples(size);
58 inline vtkSmartPointer<vtkPoints>
63 vtkpoints->SetNumberOfPoints(
pts.size());
65 vtkIdType pointId = 0;
68 vtkpoints->SetPoint(pointId++, pt.v_);
75 inline vtkSmartPointer<vtkPoints>
80 vtkpoints->SetNumberOfPoints(addr.
size());
82 vtkIdType pointId = 0;
83 for (
const label pointi : addr)
85 vtkpoints->SetPoint(pointId++,
pts[pointi].v_);
92 inline vtkSmartPointer<vtkPolyData>
104 inline vtkSmartPointer<vtkPolyData>
118 double range[2]{GREAT, -GREAT};
122 if (data->GetNumberOfComponents() == 1)
124 data->GetRange(
range);
129 data->GetRange(
range, -1);
144 #ifdef VTK_CELL_ARRAY_V2 152 const vtkIdType nOffsets(size+1);
154 offsets->SetNumberOfTuples(nOffsets);
156 vtkIdType* iter = offsets->WritePointer(0, nOffsets);
158 std::iota(iter, (iter + nOffsets), vtkIdType(0));
166 const vtkIdType nConnect(size);
168 connect->SetNumberOfTuples(nConnect);
170 vtkIdType* iter = connect->WritePointer(0, nConnect);
172 std::iota(iter, (iter + nConnect), vtkIdType(0));
177 cells->SetData(offsets, connect);
189 const vtkIdType nElem(size);
190 const vtkIdType nConnect(2*size);
193 cells->GetData()->SetNumberOfTuples(nConnect);
195 vtkIdType* iter =
cells->WritePointer(nElem, nConnect);
199 for (vtkIdType
id = 0;
id < nElem; ++id)
void size(const label n)
Older name for setAddressableSize.
MinMax< scalar > scalarMinMax
A scalar min/max range.
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.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
static Ostream & output(Ostream &os, const IntRange< T > &range)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)