mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add vtk::writeIdentity() and optional repeat value for vtk::write()
- An identity is often useful when generating connectivity and offset information. - The optional repeat value for vtk::write() allows it to also be used as a fill method.
This commit is contained in:
committed by
Andrew Heather
parent
10a03ceba2
commit
4380349f45
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -69,10 +69,8 @@ void Foam::functionObjects::vtkCloud::writeVerts
|
||||
format().beginDataArray<label>(vtk::dataArrayAttr::CONNECTIVITY);
|
||||
format().writeSize(payLoad);
|
||||
|
||||
for (label i=0; i < nTotParcels; ++i)
|
||||
{
|
||||
format().write(i);
|
||||
}
|
||||
vtk::writeIdentity(format(), nTotParcels);
|
||||
|
||||
format().flush();
|
||||
format().endDataArray();
|
||||
}
|
||||
@ -85,10 +83,8 @@ void Foam::functionObjects::vtkCloud::writeVerts
|
||||
format().beginDataArray<label>(vtk::dataArrayAttr::OFFSETS);
|
||||
format().writeSize(payLoad);
|
||||
|
||||
for (label i=0; i < nTotParcels; ++i)
|
||||
{
|
||||
format().write(i+1);
|
||||
}
|
||||
vtk::writeIdentity(format(), nTotParcels, 1);
|
||||
|
||||
format().flush();
|
||||
format().endDataArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user