Foam::wordList Foam::vtkPV4Foam::readZoneNames(const word& zoneType) { wordList zoneNames; // mesh not loaded - read from file IOobject ioObj ( zoneType, dbPtr_().findInstance ( meshDir_, zoneType, IOobject::READ_IF_PRESENT ), meshDir_, dbPtr_(), IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false ); if (ioObj.headerOk()) { zonesEntries zones(ioObj); zoneNames.setSize(zones.size()); forAll(zones, zoneI) { zoneNames[zoneI] = zones[zoneI].keyword(); } }
void Foam::vtkPV3Foam::convertVolFields ( vtkMultiBlockDataSet* output ) { const fvMesh& mesh = *meshPtr_; wordHashSet selectedFields = getSelected ( reader_->GetVolFieldSelection() ); if (selectedFields.empty()) { return; } // Get objects (fields) for this time - only keep selected fields // the region name is already in the mesh db IOobjectList objects(mesh, dbPtr_().timeName()); pruneObjectList(objects, selectedFields); if (objects.empty()) { return; } if (debug) { Info<< "<beg> Foam::vtkPV3Foam::convertVolFields" << nl << "converting OpenFOAM volume fields" << endl; forAllConstIter(IOobjectList, objects, iter) { Info<< " " << iter()->name() << " == " << iter()->objectPath() << nl; } printMemory(); } PtrList<PrimitivePatchInterpolation<primitivePatch> > ppInterpList(mesh.boundaryMesh().size()); forAll(ppInterpList, i) { ppInterpList.set ( i, new PrimitivePatchInterpolation<primitivePatch> ( mesh.boundaryMesh()[i] ) ); }