30 #include "vtkPV3FoamReader.h" 33 #include "vtkDataArraySelection.h" 34 #include "vtkPolyData.h" 35 #include "vtkUnstructuredGrid.h" 44 void Foam::vtkPV3Foam::pruneObjectList
46 IOobjectList& objects,
59 if (!selected.found(iter()->
name()))
67 void Foam::vtkPV3Foam::convertVolFields
69 vtkMultiBlockDataSet* output
72 const fvMesh& mesh = *meshPtr_;
76 reader_->GetVolFieldSelection()
79 if (selectedFields.empty())
86 IOobjectList objects(mesh, dbPtr_().
timeName());
87 pruneObjectList(objects, selectedFields);
96 Info<<
"<beg> Foam::vtkPV3Foam::convertVolFields" << nl
97 <<
"converting OpenFOAM volume fields" <<
endl;
100 Info<<
" " << iter()->name()
101 <<
" == " << iter()->objectPath() <<
nl;
107 PtrList<PrimitivePatchInterpolation<primitivePatch>>
108 ppInterpList(mesh.boundaryMesh().size());
115 new PrimitivePatchInterpolation<primitivePatch>
117 mesh.boundaryMesh()[i]
123 bool interpFields = reader_->GetInterpolateVolFields();
125 convertVolFields<scalar>
127 mesh, ppInterpList, objects, interpFields, output
129 convertVolFields<vector>
131 mesh, ppInterpList, objects, interpFields, output
133 convertVolFields<sphericalTensor>
135 mesh, ppInterpList, objects, interpFields, output
137 convertVolFields<symmTensor>
139 mesh, ppInterpList, objects, interpFields, output
141 convertVolFields<tensor>
143 mesh, ppInterpList, objects, interpFields, output
148 Info<<
"<end> Foam::vtkPV3Foam::convertVolFields" <<
endl;
154 void Foam::vtkPV3Foam::convertPointFields
156 vtkMultiBlockDataSet* output
159 const fvMesh& mesh = *meshPtr_;
163 reader_->GetPointFieldSelection()
166 if (selectedFields.empty())
170 Info<<
"no point fields selected" <<
endl;
177 IOobjectList objects(mesh, dbPtr_().
timeName());
178 pruneObjectList(objects, selectedFields);
187 Info<<
"<beg> Foam::vtkPV3Foam::convertPointFields" << nl
188 <<
"converting OpenFOAM volume fields -> point fields" <<
endl;
191 Info<<
" " << iter()->name()
192 <<
" == " << iter()->objectPath() <<
nl;
201 convertPointFields<scalar>
203 mesh, pMesh, objects, output
205 convertPointFields<vector>
207 mesh, pMesh, objects, output
209 convertPointFields<sphericalTensor>
211 mesh, pMesh, objects, output
213 convertPointFields<symmTensor>
215 mesh, pMesh, objects, output
217 convertPointFields<tensor>
219 mesh, pMesh, objects, output
224 Info<<
"<end> Foam::vtkPV3Foam::convertPointFields" <<
endl;
230 void Foam::vtkPV3Foam::convertLagrangianFields
232 vtkMultiBlockDataSet* output
235 arrayRange& range = arrayRangeLagrangian_;
236 const fvMesh& mesh = *meshPtr_;
240 reader_->GetLagrangianFieldSelection()
243 if (selectedFields.empty())
250 Info<<
"<beg> Foam::vtkPV3Foam::convertLagrangianFields" <<
endl;
254 for (
int partId = range.start(); partId < range.end(); ++partId)
256 const word cloudName = getPartName(partId);
257 const label datasetNo = partDataset_[partId];
259 if (!partStatus_[partId] || datasetNo < 0)
274 pruneObjectList(objects, selectedFields);
283 Info<<
"converting OpenFOAM lagrangian fields" <<
nl;
286 Info<<
" " << iter()->name()
287 <<
" == " << iter()->objectPath() <<
nl;
291 convertLagrangianFields<label>
293 objects, output, datasetNo
295 convertLagrangianFields<scalar>
297 objects, output, datasetNo
299 convertLagrangianFields<vector>
301 objects, output, datasetNo
303 convertLagrangianFields<sphericalTensor>
305 objects, output, datasetNo
307 convertLagrangianFields<symmTensor>
309 objects, output, datasetNo
311 convertLagrangianFields<tensor>
313 objects, output, datasetNo
319 Info<<
"<end> Foam::vtkPV3Foam::convertLagrangianFields" <<
endl;
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void printMemory()
Simple memory used debugging information.
static const pointMesh & New(const polyMesh &mesh)
HashSet wordHashSet
A HashSet with word keys.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
static const word prefix
The prefix to local: lagrangian.
word name(const complex &)
Return a string representation of a complex.