mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Initial state after latest Foundation merge
This commit is contained in:
@ -2,7 +2,6 @@
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Parse arguments for library compilation
|
||||
targetType=libso
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
# Source the wmake functions
|
||||
@ -16,19 +15,23 @@ set -x
|
||||
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
||||
then
|
||||
wmake $targetType vtkPVFoam
|
||||
sourceDir=$PWD/PVFoamReader
|
||||
|
||||
# Where are any generated files stored?
|
||||
findObjectDir $sourceDir
|
||||
(
|
||||
mkdir -p $objectsDir \
|
||||
&& cd $objectsDir \
|
||||
&& cmake $sourceDir \
|
||||
&& make
|
||||
) || {
|
||||
echo
|
||||
echo "WARNING: incomplete build of ParaView OpenFOAM plugin"
|
||||
}
|
||||
if [ "$targetType" != "objects" ]
|
||||
then
|
||||
sourceDir=$PWD/PVFoamReader
|
||||
|
||||
# Where are any generated files stored?
|
||||
findObjectDir $sourceDir
|
||||
(
|
||||
mkdir -p $objectsDir \
|
||||
&& cd $objectsDir \
|
||||
&& cmake $sourceDir \
|
||||
&& make
|
||||
) || {
|
||||
echo
|
||||
echo "WARNING: incomplete build of ParaView OpenFOAM plugin"
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# create a plugin that adds a reader to the ParaView GUI
|
||||
# Create a plugin that adds a reader to the ParaView GUI
|
||||
# it is added in the file dialog when doing opens/saves.
|
||||
|
||||
# The qrc file is processed by Qt's resource compiler (rcc)
|
||||
@ -61,7 +61,7 @@ IF(("${PARAVIEW_VERSION_MAJOR}" LESS 5) AND ("${PARAVIEW_VERSION_MINOR}" LESS 4)
|
||||
SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx
|
||||
GUI_INTERFACES ${IFACES}
|
||||
GUI_SOURCES pqPVFoamReaderPanel.cxx
|
||||
${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
|
||||
${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
|
||||
GUI_RESOURCE_FILES PVFoamReader.xml
|
||||
)
|
||||
ELSE()
|
||||
@ -71,7 +71,7 @@ ELSE()
|
||||
SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx
|
||||
GUI_INTERFACES ${IFACES}
|
||||
GUI_SOURCES pqPVFoamReaderPanel.cxx
|
||||
${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
|
||||
${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
@ -58,10 +58,10 @@ vtkPVFoamReader::vtkPVFoamReader()
|
||||
|
||||
SetNumberOfInputPorts(0);
|
||||
|
||||
FileName = NULL;
|
||||
foamData_ = NULL;
|
||||
FileName = nullptr;
|
||||
foamData_ = nullptr;
|
||||
|
||||
output0_ = NULL;
|
||||
output0_ = nullptr;
|
||||
|
||||
#ifdef VTKPVFOAM_DUALPORT
|
||||
// Add second output for the Lagrangian
|
||||
@ -217,7 +217,7 @@ int vtkPVFoamReader::RequestInformation
|
||||
|
||||
// delete foamData and flag it as fatal error
|
||||
delete foamData_;
|
||||
foamData_ = NULL;
|
||||
foamData_ = nullptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -9,8 +9,7 @@ EXE_INC = \
|
||||
-I../PVFoamReader
|
||||
|
||||
LIB_LIBS = \
|
||||
-lmeshTools \
|
||||
-lfiniteVolume \
|
||||
-ldynamicMesh \
|
||||
-ldynamicMesh \
|
||||
-lgenericPatchFields \
|
||||
-llagrangian \
|
||||
|
||||
@ -30,7 +30,6 @@ InClass
|
||||
#define vtkOpenFOAMTupleRemap_H
|
||||
|
||||
// OpenFOAM includes
|
||||
#include "StaticAssert.H"
|
||||
#include "Swap.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -39,17 +38,6 @@ template<class Type>
|
||||
inline void vtkOpenFOAMTupleRemap(float vec[]);
|
||||
|
||||
|
||||
// a symmTensor specialization to remap OpenFOAM -> ParaView naming order
|
||||
// Qt/Core/pqScalarBarRepresentation.cxx defines this order
|
||||
// { "XX", "YY", "ZZ", "XY", "YZ", "XZ" }
|
||||
// in pqScalarBarRepresentation::getDefaultComponentLabel()
|
||||
// whereas OpenFOAM uses this order
|
||||
// { XX, XY, XZ, YY, YZ, ZZ }
|
||||
//
|
||||
// for extra safety, assert that symmTensor indeed has 6 components
|
||||
StaticAssert(Foam::symmTensor::nComponents == 6);
|
||||
|
||||
|
||||
// Template specialization for symmTensor
|
||||
template<>
|
||||
inline void vtkOpenFOAMTupleRemap<Foam::symmTensor>(float vec[])
|
||||
|
||||
@ -86,7 +86,7 @@ void Foam::vtkPVFoam::reduceMemory()
|
||||
if (!reader_->GetCacheMesh())
|
||||
{
|
||||
delete meshPtr_;
|
||||
meshPtr_ = NULL;
|
||||
meshPtr_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -226,8 +226,8 @@ Foam::vtkPVFoam::vtkPVFoam
|
||||
)
|
||||
:
|
||||
reader_(reader),
|
||||
dbPtr_(NULL),
|
||||
meshPtr_(NULL),
|
||||
dbPtr_(nullptr),
|
||||
meshPtr_(nullptr),
|
||||
meshRegion_(polyMesh::defaultRegion),
|
||||
meshDir_(polyMesh::meshSubDir),
|
||||
timeIndex_(-1),
|
||||
@ -347,7 +347,7 @@ void Foam::vtkPVFoam::updateInfo()
|
||||
if (debug)
|
||||
{
|
||||
Info<< "<beg> Foam::vtkPVFoam::updateInfo"
|
||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] timeIndex="
|
||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "] timeIndex="
|
||||
<< timeIndex_ << endl;
|
||||
}
|
||||
|
||||
@ -426,7 +426,7 @@ void Foam::vtkPVFoam::updateFoamMesh()
|
||||
if (!reader_->GetCacheMesh())
|
||||
{
|
||||
delete meshPtr_;
|
||||
meshPtr_ = NULL;
|
||||
meshPtr_ = nullptr;
|
||||
}
|
||||
|
||||
// Check to see if the OpenFOAM mesh has been created
|
||||
@ -551,7 +551,7 @@ void Foam::vtkPVFoam::CleanUp()
|
||||
double* Foam::vtkPVFoam::findTimes(int& nTimeSteps)
|
||||
{
|
||||
int nTimes = 0;
|
||||
double* tsteps = NULL;
|
||||
double* tsteps = nullptr;
|
||||
|
||||
if (dbPtr_.valid())
|
||||
{
|
||||
@ -640,10 +640,10 @@ void Foam::vtkPVFoam::renderPatchNames
|
||||
|
||||
// always remove old actors first
|
||||
|
||||
forAll(patchTextActorsPtrs_, patchI)
|
||||
forAll(patchTextActorsPtrs_, patchi)
|
||||
{
|
||||
renderer->RemoveViewProp(patchTextActorsPtrs_[patchI]);
|
||||
patchTextActorsPtrs_[patchI]->Delete();
|
||||
renderer->RemoveViewProp(patchTextActorsPtrs_[patchi]);
|
||||
patchTextActorsPtrs_[patchi]->Delete();
|
||||
}
|
||||
patchTextActorsPtrs_.clear();
|
||||
|
||||
@ -673,9 +673,9 @@ void Foam::vtkPVFoam::renderPatchNames
|
||||
|
||||
|
||||
// Loop through all patches to determine zones, and centre of each zone
|
||||
forAll(pbMesh, patchI)
|
||||
forAll(pbMesh, patchi)
|
||||
{
|
||||
const polyPatch& pp = pbMesh[patchI];
|
||||
const polyPatch& pp = pbMesh[patchi];
|
||||
|
||||
// Only include the patch if it is selected
|
||||
if (!selectedPatches.found(pp.name()))
|
||||
@ -707,27 +707,27 @@ void Foam::vtkPVFoam::renderPatchNames
|
||||
// Do topological analysis of patch, find disconnected regions
|
||||
patchZones pZones(pp, featEdge);
|
||||
|
||||
nZones[patchI] = pZones.nZones();
|
||||
nZones[patchi] = pZones.nZones();
|
||||
|
||||
labelList zoneNFaces(pZones.nZones(), 0);
|
||||
|
||||
// Create storage for additional zone centres
|
||||
forAll(zoneNFaces, zoneI)
|
||||
{
|
||||
zoneCentre[patchI].append(Zero);
|
||||
zoneCentre[patchi].append(Zero);
|
||||
}
|
||||
|
||||
// Do averaging per individual zone
|
||||
forAll(pp, faceI)
|
||||
forAll(pp, facei)
|
||||
{
|
||||
label zoneI = pZones[faceI];
|
||||
zoneCentre[patchI][zoneI] += pp[faceI].centre(pp.points());
|
||||
label zoneI = pZones[facei];
|
||||
zoneCentre[patchi][zoneI] += pp[facei].centre(pp.points());
|
||||
zoneNFaces[zoneI]++;
|
||||
}
|
||||
|
||||
forAll(zoneCentre[patchI], zoneI)
|
||||
forAll(zoneCentre[patchi], zoneI)
|
||||
{
|
||||
zoneCentre[patchI][zoneI] /= zoneNFaces[zoneI];
|
||||
zoneCentre[patchi][zoneI] /= zoneNFaces[zoneI];
|
||||
}
|
||||
}
|
||||
|
||||
@ -738,9 +738,9 @@ void Foam::vtkPVFoam::renderPatchNames
|
||||
|
||||
label displayZoneI = 0;
|
||||
|
||||
forAll(pbMesh, patchI)
|
||||
forAll(pbMesh, patchi)
|
||||
{
|
||||
displayZoneI += min(MAXPATCHZONES, nZones[patchI]);
|
||||
displayZoneI += min(MAXPATCHZONES, nZones[patchi]);
|
||||
}
|
||||
|
||||
if (debug)
|
||||
@ -760,18 +760,18 @@ void Foam::vtkPVFoam::renderPatchNames
|
||||
// Actor index
|
||||
displayZoneI = 0;
|
||||
|
||||
forAll(pbMesh, patchI)
|
||||
forAll(pbMesh, patchi)
|
||||
{
|
||||
const polyPatch& pp = pbMesh[patchI];
|
||||
const polyPatch& pp = pbMesh[patchi];
|
||||
|
||||
label globalZoneI = 0;
|
||||
|
||||
// Only selected patches will have a non-zero number of zones
|
||||
label nDisplayZones = min(MAXPATCHZONES, nZones[patchI]);
|
||||
label nDisplayZones = min(MAXPATCHZONES, nZones[patchi]);
|
||||
label increment = 1;
|
||||
if (nZones[patchI] >= MAXPATCHZONES)
|
||||
if (nZones[patchi] >= MAXPATCHZONES)
|
||||
{
|
||||
increment = nZones[patchI]/MAXPATCHZONES;
|
||||
increment = nZones[patchi]/MAXPATCHZONES;
|
||||
}
|
||||
|
||||
for (label i = 0; i < nDisplayZones; i++)
|
||||
@ -779,7 +779,7 @@ void Foam::vtkPVFoam::renderPatchNames
|
||||
if (debug)
|
||||
{
|
||||
Info<< "patch name = " << pp.name() << nl
|
||||
<< "anchor = " << zoneCentre[patchI][globalZoneI] << nl
|
||||
<< "anchor = " << zoneCentre[patchi][globalZoneI] << nl
|
||||
<< "globalZoneI = " << globalZoneI << endl;
|
||||
}
|
||||
|
||||
@ -802,9 +802,9 @@ void Foam::vtkPVFoam::renderPatchNames
|
||||
|
||||
txt->GetPositionCoordinate()->SetValue
|
||||
(
|
||||
zoneCentre[patchI][globalZoneI].x(),
|
||||
zoneCentre[patchI][globalZoneI].y(),
|
||||
zoneCentre[patchI][globalZoneI].z()
|
||||
zoneCentre[patchi][globalZoneI].x(),
|
||||
zoneCentre[patchi][globalZoneI].y(),
|
||||
zoneCentre[patchi][globalZoneI].z()
|
||||
);
|
||||
|
||||
// Add text to each renderer
|
||||
|
||||
@ -74,9 +74,9 @@ void Foam::vtkPVFoam::convertFaceField
|
||||
|
||||
// for interior faces: average owner/neighbour
|
||||
// for boundary faces: owner
|
||||
forAll(faceLabels, faceI)
|
||||
forAll(faceLabels, facei)
|
||||
{
|
||||
const label faceNo = faceLabels[faceI];
|
||||
const label faceNo = faceLabels[facei];
|
||||
if (faceNo < nInternalFaces)
|
||||
{
|
||||
Type t = 0.5*(tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]);
|
||||
@ -96,7 +96,7 @@ void Foam::vtkPVFoam::convertFaceField
|
||||
}
|
||||
vtkOpenFOAMTupleRemap<Type>(vec);
|
||||
|
||||
cellData->InsertTuple(faceI, vec);
|
||||
cellData->InsertTuple(facei, vec);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -188,7 +188,7 @@ void Foam::vtkPVFoam::convertMeshPatches
|
||||
<< patchName << endl;
|
||||
}
|
||||
|
||||
vtkPolyData* vtkmesh = NULL;
|
||||
vtkPolyData* vtkmesh = nullptr;
|
||||
if (patchIds.size() == 1)
|
||||
{
|
||||
vtkmesh = patchVTKMesh(patchName, patches[patchIds.begin().key()]);
|
||||
|
||||
@ -45,7 +45,7 @@ vtkPolyData* Foam::vtkPVFoam::lagrangianVTKMesh
|
||||
const word& cloudName
|
||||
)
|
||||
{
|
||||
vtkPolyData* vtkmesh = NULL;
|
||||
vtkPolyData* vtkmesh = nullptr;
|
||||
|
||||
if (debug)
|
||||
{
|
||||
|
||||
@ -55,10 +55,10 @@ vtkPolyData* Foam::vtkPVFoam::faceSetVTKMesh
|
||||
|
||||
const faceList& meshFaces = mesh.faces();
|
||||
faceList patchFaces(fSet.size());
|
||||
label faceI = 0;
|
||||
label facei = 0;
|
||||
forAllConstIter(faceSet, fSet, iter)
|
||||
{
|
||||
patchFaces[faceI++] = meshFaces[iter.key()];
|
||||
patchFaces[facei++] = meshFaces[iter.key()];
|
||||
}
|
||||
primitiveFacePatch p(patchFaces, mesh.points());
|
||||
|
||||
@ -83,9 +83,9 @@ vtkPolyData* Foam::vtkPVFoam::faceSetVTKMesh
|
||||
vtkCellArray* vtkcells = vtkCellArray::New();
|
||||
vtkcells->Allocate(faces.size());
|
||||
|
||||
forAll(faces, faceI)
|
||||
forAll(faces, facei)
|
||||
{
|
||||
const face& f = faces[faceI];
|
||||
const face& f = faces[facei];
|
||||
vtkIdType nodeIds[f.size()];
|
||||
|
||||
forAll(f, fp)
|
||||
|
||||
@ -83,9 +83,9 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
Info<< "... scanning for polyhedra" << endl;
|
||||
}
|
||||
|
||||
forAll(cellShapes, cellI)
|
||||
forAll(cellShapes, celli)
|
||||
{
|
||||
const cellModel& model = cellShapes[cellI].model();
|
||||
const cellModel& model = cellShapes[celli].model();
|
||||
|
||||
if
|
||||
(
|
||||
@ -97,11 +97,11 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
&& model != tetWedge
|
||||
)
|
||||
{
|
||||
const cell& cFaces = mesh.cells()[cellI];
|
||||
const cell& cFaces = mesh.cells()[celli];
|
||||
|
||||
forAll(cFaces, cFaceI)
|
||||
forAll(cFaces, cFacei)
|
||||
{
|
||||
const face& f = mesh.faces()[cFaces[cFaceI]];
|
||||
const face& f = mesh.faces()[cFaces[cFacei]];
|
||||
|
||||
label nQuads = 0;
|
||||
label nTris = 0;
|
||||
@ -158,7 +158,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
vtkmesh->Allocate(mesh.nCells() + nAddCells);
|
||||
|
||||
// Set counters for additional points and additional cells
|
||||
label addPointI = 0, addCellI = 0;
|
||||
label addPointi = 0, addCelli = 0;
|
||||
|
||||
// Create storage for points - needed for mapping from OpenFOAM to VTK
|
||||
// data types - max 'order' = hex = 8 points
|
||||
@ -168,12 +168,12 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
// [numFace0Pts, id1, id2, id3, numFace1Pts, id1, id2, id3, ...]
|
||||
DynamicList<vtkIdType> faceStream(256);
|
||||
|
||||
forAll(cellShapes, cellI)
|
||||
forAll(cellShapes, celli)
|
||||
{
|
||||
const cellShape& cellShape = cellShapes[cellI];
|
||||
const cellShape& cellShape = cellShapes[celli];
|
||||
const cellModel& cellModel = cellShape.model();
|
||||
|
||||
superCells[addCellI++] = cellI;
|
||||
superCells[addCelli++] = celli;
|
||||
|
||||
if (cellModel == tet)
|
||||
{
|
||||
@ -219,7 +219,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
nodeIds
|
||||
);
|
||||
}
|
||||
else if (cellModel == tetWedge)
|
||||
else if (cellModel == tetWedge && !reader_->GetUseVTKPolyhedron())
|
||||
{
|
||||
// Treat as squeezed prism (VTK_WEDGE)
|
||||
|
||||
@ -273,15 +273,15 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
else if (reader_->GetUseVTKPolyhedron())
|
||||
{
|
||||
// Polyhedral cell - use VTK_POLYHEDRON
|
||||
const labelList& cFaces = mesh.cells()[cellI];
|
||||
const labelList& cFaces = mesh.cells()[celli];
|
||||
|
||||
vtkIdType nFaces = cFaces.size();
|
||||
vtkIdType nLabels = nFaces;
|
||||
|
||||
// count size for face stream
|
||||
forAll(cFaces, cFaceI)
|
||||
forAll(cFaces, cFacei)
|
||||
{
|
||||
const face& f = mesh.faces()[cFaces[cFaceI]];
|
||||
const face& f = mesh.faces()[cFaces[cFacei]];
|
||||
nLabels += f.size();
|
||||
}
|
||||
|
||||
@ -291,10 +291,10 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
faceStream.clear();
|
||||
faceStream.reserve(nLabels + nFaces);
|
||||
|
||||
forAll(cFaces, cFaceI)
|
||||
forAll(cFaces, cFacei)
|
||||
{
|
||||
const face& f = mesh.faces()[cFaces[cFaceI]];
|
||||
const bool isOwner = (owner[cFaces[cFaceI]] == cellI);
|
||||
const face& f = mesh.faces()[cFaces[cFacei]];
|
||||
const bool isOwner = (owner[cFaces[cFacei]] == celli);
|
||||
const label nFacePoints = f.size();
|
||||
|
||||
// number of labels for this face
|
||||
@ -325,20 +325,20 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
// Polyhedral cell. Decompose into tets + prisms.
|
||||
|
||||
// Mapping from additional point to cell
|
||||
addPointCellLabels[addPointI] = cellI;
|
||||
addPointCellLabels[addPointi] = celli;
|
||||
|
||||
// The new vertex from the cell-centre
|
||||
const label newVertexLabel = mesh.nPoints() + addPointI;
|
||||
vtkInsertNextOpenFOAMPoint(vtkpoints, mesh.C()[cellI]);
|
||||
const label newVertexLabel = mesh.nPoints() + addPointi;
|
||||
vtkInsertNextOpenFOAMPoint(vtkpoints, mesh.C()[celli]);
|
||||
|
||||
// Whether to insert cell in place of original or not.
|
||||
bool substituteCell = true;
|
||||
|
||||
const labelList& cFaces = mesh.cells()[cellI];
|
||||
forAll(cFaces, cFaceI)
|
||||
const labelList& cFaces = mesh.cells()[celli];
|
||||
forAll(cFaces, cFacei)
|
||||
{
|
||||
const face& f = mesh.faces()[cFaces[cFaceI]];
|
||||
const bool isOwner = (owner[cFaces[cFaceI]] == cellI);
|
||||
const face& f = mesh.faces()[cFaces[cFacei]];
|
||||
const bool isOwner = (owner[cFaces[cFacei]] == celli);
|
||||
|
||||
// Number of triangles and quads in decomposition
|
||||
label nTris = 0;
|
||||
@ -360,7 +360,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
}
|
||||
else
|
||||
{
|
||||
superCells[addCellI++] = cellI;
|
||||
superCells[addCelli++] = celli;
|
||||
}
|
||||
|
||||
const face& quad = quadFcs[quadI];
|
||||
@ -403,7 +403,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
}
|
||||
else
|
||||
{
|
||||
superCells[addCellI++] = cellI;
|
||||
superCells[addCelli++] = celli;
|
||||
}
|
||||
|
||||
const face& tri = triFcs[triI];
|
||||
@ -432,7 +432,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
|
||||
}
|
||||
}
|
||||
|
||||
addPointI++;
|
||||
addPointi++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -54,9 +54,9 @@ vtkPolyData* Foam::vtkPVFoam::pointZoneVTKMesh
|
||||
vtkPoints* vtkpoints = vtkPoints::New();
|
||||
vtkpoints->Allocate(pointLabels.size());
|
||||
|
||||
forAll(pointLabels, pointI)
|
||||
forAll(pointLabels, pointi)
|
||||
{
|
||||
vtkInsertNextOpenFOAMPoint(vtkpoints, meshPoints[pointLabels[pointI]]);
|
||||
vtkInsertNextOpenFOAMPoint(vtkpoints, meshPoints[pointLabels[pointi]]);
|
||||
}
|
||||
|
||||
vtkmesh->SetPoints(vtkpoints);
|
||||
|
||||
@ -152,7 +152,7 @@ void Foam::vtkPVFoam::convertPointFields
|
||||
// Extract the field on the zone
|
||||
Field<Type> fld
|
||||
(
|
||||
ptf.internalField(),
|
||||
ptf.primitiveField(),
|
||||
mesh.faceZones()[zoneId]().meshPoints()
|
||||
);
|
||||
|
||||
|
||||
@ -71,9 +71,9 @@ vtkPolyData* Foam::vtkPVFoam::patchVTKMesh
|
||||
|
||||
vtkCellArray* vtkcells = vtkCellArray::New();
|
||||
vtkcells->Allocate(faces.size());
|
||||
forAll(faces, faceI)
|
||||
forAll(faces, facei)
|
||||
{
|
||||
const face& f = faces[faceI];
|
||||
const face& f = faces[facei];
|
||||
vtkIdType nodeIds[f.size()];
|
||||
|
||||
forAll(f, fp)
|
||||
|
||||
@ -228,7 +228,7 @@ void Foam::vtkPVFoam::updateInfoPatches
|
||||
if (debug)
|
||||
{
|
||||
Info<< "<beg> Foam::vtkPVFoam::updateInfoPatches"
|
||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -295,9 +295,9 @@ void Foam::vtkPVFoam::updateInfoPatches
|
||||
|
||||
if (!reader_->GetShowGroupsOnly())
|
||||
{
|
||||
forAll(patches, patchI)
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
const polyPatch& pp = patches[patchi];
|
||||
|
||||
if (pp.size())
|
||||
{
|
||||
@ -344,12 +344,12 @@ void Foam::vtkPVFoam::updateInfoPatches
|
||||
wordList names(patchEntries.size());
|
||||
labelList sizes(patchEntries.size());
|
||||
|
||||
forAll(patchEntries, patchI)
|
||||
forAll(patchEntries, patchi)
|
||||
{
|
||||
const dictionary& patchDict = patchEntries[patchI].dict();
|
||||
const dictionary& patchDict = patchEntries[patchi].dict();
|
||||
|
||||
sizes[patchI] = readLabel(patchDict.lookup("nFaces"));
|
||||
names[patchI] = patchEntries[patchI].keyword();
|
||||
sizes[patchi] = readLabel(patchDict.lookup("nFaces"));
|
||||
names[patchi] = patchEntries[patchi].keyword();
|
||||
}
|
||||
|
||||
|
||||
@ -358,9 +358,9 @@ void Foam::vtkPVFoam::updateInfoPatches
|
||||
|
||||
HashTable<labelList, word> groups(patchEntries.size());
|
||||
|
||||
forAll(patchEntries, patchI)
|
||||
forAll(patchEntries, patchi)
|
||||
{
|
||||
const dictionary& patchDict = patchEntries[patchI].dict();
|
||||
const dictionary& patchDict = patchEntries[patchi].dict();
|
||||
|
||||
wordList groupNames;
|
||||
patchDict.readIfPresent("inGroups", groupNames);
|
||||
@ -373,11 +373,11 @@ void Foam::vtkPVFoam::updateInfoPatches
|
||||
);
|
||||
if (iter != groups.end())
|
||||
{
|
||||
iter().append(patchI);
|
||||
iter().append(patchi);
|
||||
}
|
||||
else
|
||||
{
|
||||
groups.insert(groupNames[groupI], labelList(1, patchI));
|
||||
groups.insert(groupNames[groupI], labelList(1, patchi));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -432,14 +432,14 @@ void Foam::vtkPVFoam::updateInfoPatches
|
||||
|
||||
if (!reader_->GetShowGroupsOnly())
|
||||
{
|
||||
forAll(names, patchI)
|
||||
forAll(names, patchi)
|
||||
{
|
||||
// Valid patch if nFace > 0 - add patch to GUI list
|
||||
if (sizes[patchI])
|
||||
if (sizes[patchi])
|
||||
{
|
||||
arraySelection->AddArray
|
||||
(
|
||||
(names[patchI] + " - patch").c_str()
|
||||
(names[patchi] + " - patch").c_str()
|
||||
);
|
||||
|
||||
++nPatches;
|
||||
@ -476,7 +476,7 @@ void Foam::vtkPVFoam::updateInfoZones
|
||||
if (debug)
|
||||
{
|
||||
Info<< "<beg> Foam::vtkPVFoam::updateInfoZones"
|
||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||
}
|
||||
|
||||
wordList namesLst;
|
||||
|
||||
@ -41,7 +41,7 @@ void Foam::vtkPVFoam::updateInfoFields
|
||||
{
|
||||
Info<< "<beg> Foam::vtkPVFoam::updateInfoFields <"
|
||||
<< meshType::Mesh::typeName
|
||||
<< "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]"
|
||||
<< "> [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user