Functions | Variables
readKivaGrid.H File Reference
Include dependency graph for readKivaGrid.H:

Go to the source code of this file.

Functions

ifstream kivaFile (kivaFileName.c_str())
 
 if (!kivaFile.good())
 
pointField points (nPoints)
 
labelList idface (nPoints)
 
labelList fv (nPoints)
 
 for (label i=0;i< nPoints;i++)
 
labelList i1tab (nPoints)
 
labelList i3tab (nPoints)
 
labelList i8tab (nPoints)
 
labelList idreg (nPoints)
 
labelList f (nPoints)
 
labelList bcl (nPoints)
 
labelList bcf (nPoints)
 
labelList bcb (nPoints)
 
 if (mTable==0)
 
labelList imtab (nPoints)
 
labelList jmtab (nPoints)
 
labelList kmtab (nPoints)
 
face quadFace (4)
 
face triFace (3)
 
 if (pFaces[LINER].size()&&pFaces[LINER][0].size()&&pFaces[CYLINDERHEAD].size()&&pFaces[CYLINDERHEAD][0].size())
 
 if (pFaces[WEDGE].size()&&pFaces[WEDGE][0].size())
 
faceListList boundary (nPatches)
 
wordList patchNames (nPatches)
 
wordList patchTypes (nPatches)
 
labelList pointLabels (nPoints,-1)
 
 forAll (cellShapes, celli)
 
 forAll (pointLabels, pointi)
 
points setSize (newPointi)
 
 forAll (boundary, patchi)
 
 preservePatchTypes (runTime, runTime.constant(), polyMesh::meshSubDir, patchNames, patchDicts, defaultFacesName, defaultFacesType)
 
 forAll (patchNames, patchi)
 
polyMesh pShapeMesh (IOobject(polyMesh::defaultRegion, runTime.constant(), runTime), xferMove(points), cellShapes, boundary, patchNames, patchDicts, defaultFacesName, defaultFacesType)
 

Variables

Info<< "Reading kiva grid from file "<< kivaFileName<< endl;char title[120];kivaFile.getline(title, 120, '\n');label nPoints, nCells, nRegs;kivaFile > nCells nPoints nRegs
 
label i4
 
label nBfaces = 0
 
label mTable
 
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints,-1);const cellModel &hex=*(cellModeller::lookup("hex"));labelList hexLabels(8);label activeCells=0;labelList pointMap(nPoints);forAll(pointMap, i){pointMap[i]=i;}for(label i=0;i< nPoints;i++){if(f[i] > 0.0){hexLabels[0]=i;hexLabels[1]=i1tab[i];hexLabels[2]=i3tab[i1tab[i]];hexLabels[3]=i3tab[i];hexLabels[4]=i8tab[i];hexLabels[5]=i1tab[i8tab[i]];hexLabels[6]=i3tab[i1tab[i8tab[i]]];hexLabels[7]=i3tab[i8tab[i]];cellShapes[activeCells]=cellShape(hex, hexLabels);edgeList edges=cellShapes[activeCells].edges();forAll(edges, ei){if(edges[ei].mag(points)< SMALL){label start=pointMap[edges[ei].start()];while(start!=pointMap[start]){start=pointMap[start];}label end=pointMap[edges[ei].end()];while(end!=pointMap[end]){end=pointMap[end];}label minLabel=min(start, end);pointMap[start]=pointMap[end]=minLabel;}}cellZoning[activeCells]=idreg[i];activeCells++;}}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){cellShape &cs=cellShapes[celli];forAll(cs, i){cs[i]=pointMap[cs[i]];}cs.collapse();}label bcIDs[11]={-1, 0, 2, 4,-1, 5,-1, 6, 7, 8, 9};const label nBCs=12;const word *kivaPatchTypes[nBCs]={&wallPolyPatch::typeName,&wallPolyPatch::typeName,&wallPolyPatch::typeName,&wallPolyPatch::typeName,&symmetryPolyPatch::typeName,&wedgePolyPatch::typeName,&polyPatch::typeName,&polyPatch::typeName,&polyPatch::typeName,&polyPatch::typeName,&symmetryPolyPatch::typeName,&oldCyclicPolyPatch::typeName};enum patchTypeNames{PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char *kivaPatchNames[nBCs]={"piston","valve","liner","cylinderHead","axis","wedge","inflow","outflow","presin","presout","symmetryPlane","cyclic"};List< SLList< face > > pFaces [nBCs]
 
label nPatches = 0
 
word defaultFacesName = "defaultFaces"
 
word defaultFacesType = emptyPolyPatch::typeName
 
label nAddedPatches = 0
 
label newPointi = 0
 
PtrList< dictionary > patchDicts
 

Function Documentation

ifstream kivaFile ( kivaFileName.  c_str())

Referenced by for(), and if().

Here is the caller graph for this function:

if ( !kivaFile.  good())

Definition at line 3 of file readKivaGrid.H.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, kivaFile(), nPoints, and nRegs.

Here is the call graph for this function:

pointField points ( nPoints  )

Referenced by for(), forAll(), and if().

Here is the caller graph for this function:

labelList idface ( nPoints  )

Referenced by for(), and if().

Here is the caller graph for this function:

labelList fv ( nPoints  )

Referenced by for(), if(), and NamedEnum< Enum, nEnum >::names().

Here is the caller graph for this function:

for ( )

Definition at line 23 of file readKivaGrid.H.

References bcb(), bcf(), bcl(), f(), fv(), i1tab(), i3tab(), i8tab(), idface(), idreg(), kivaFile(), and points().

Here is the call graph for this function:

labelList i1tab ( nPoints  )

Referenced by for(), and if().

Here is the caller graph for this function:

labelList i3tab ( nPoints  )

Referenced by for(), and if().

Here is the caller graph for this function:

labelList i8tab ( nPoints  )

Referenced by for(), and if().

Here is the caller graph for this function:

labelList idreg ( nPoints  )

Referenced by for(), and if().

Here is the caller graph for this function:

labelList f ( nPoints  )

Referenced by isoSurface::adaptPatchFields(), multivariateSurfaceInterpolationScheme< Type >::fieldTable::add(), singleProcessorFaceSetsConstraint::add(), singleProcessorFaceSetsConstraint::apply(), booleanSurface::booleanSurface(), primitiveMeshTools::boundaryFaceSkewness(), searchableBox::boundingSpheres(), PatchTools::calcBounds(), BrownianMotionForce< CloudType >::calcCoupled(), cellMatcher::calcEdgeAddressing(), coupledPolyPatch::calcFaceTol(), faceZone::calcFaceZonePatch(), cellMatcher::calcLocalFaces(), cellMatcher::calcPointFaceIndex(), primitiveMesh::calcPointOrder(), createShellMesh::calcPointRegions(), rotorDiskSource::calculate(), nutUSpaldingWallFunctionFvPatchScalarField::calcUTau(), cellMatcher::cellMatcher(), primitiveMesh::cellPoints(), repatchPolyTopoChanger::changeAnchorPoint(), primitiveMesh::checkCellsZipUp(), primitiveMesh::checkEdgeLength(), primitiveMesh::checkFacePyramids(), MeshedSurface< Face >::checkFaces(), polyMeshTetDecomposition::checkFaceTets(), primitiveMesh::checkFaceVertices(), regIOobject::checkIn(), hexRef8::checkMesh(), edgeCollapser::checkMeshQuality(), PatchTools::checkOrientation(), searchableSurfaces::checkQuality(), triSurface::checkTriangles(), ensightPartFaces::classify(), isotropic::clone(), equilibrium::clone(), nonEquilibrium::clone(), Foam::cmptAv(), Foam::cmptMag(), Foam::cmptMax(), Foam::cmptMin(), cellShape::collapsedFaces(), ORourkeCollision< CloudType >::collideSorted(), Foam::component(), processorLduInterface::compressedReceive(), polyMeshFilter::copyMesh(), inversePointDistanceDiffusivity::correct(), CentredFitScheme< Type, Polynomial, Stencil >::correction(), pointLinear< Type >::correction(), removePoints::countPointUsage(), wallBoundedParticle::crossDiagonalEdge(), wallBoundedParticle::crossEdgeConnectedFace(), particle< Type >::crossEdgeConnectedFace(), wallBoundedParticle::currentEdge(), cyclicACMILduInterfaceField::cyclicACMILduInterfaceField(), cyclicAMILduInterfaceField::cyclicAMILduInterfaceField(), cyclicLduInterfaceField::cyclicLduInterfaceField(), decompositionMethod::decompose(), Dual< Type >::Dual(), dynamicRefineFvMesh::dynamicRefineFvMesh(), PatchTools::edgeOwner(), directionInfo::edgeToFaceIndex(), directionInfo::enterDomain(), turbulenceFields::execute(), extrudePatchMesh::extrudePatchMesh(), primitiveMeshTools::faceConcavity(), primitiveMeshTools::faceFlatness(), hexRef8::faceLevel(), mappedPatchBase::facePoint(), primitiveMeshTools::facePyramidVolume(), cellModel::faces(), primitiveMeshTools::faceSkewness(), polyMeshTetDecomposition::faceTetIndices(), tetIndices::faceTri(), tetIndices::faceTriIs(), fanFvPatchField< Type >::fanFvPatchField(), polyMeshTetDecomposition::findBasePoint(), localPointRegion::findDuplicateFaces(), FitData< FitDataType, ExtendedStencil, Polynomial >::findFaceDirs(), sampledSet::findNearFace(), polyMeshTetDecomposition::findSharedBasePoint(), polyMeshTetDecomposition::findTet(), cellPointWeight::findTetrahedron(), cellPointWeight::findTriangle(), for(), forAll(), pairPotentialList::force(), pairPotential::force(), isoSurface::generateFaceTriPoints(), coupledPolyPatch::getAnchorPoints(), surfaceRegion::getFieldValues(), surfaceSets::getHangingCells(), boundaryMesh::getNearest(), boundaryMesh::getNTris(), cellDistFuncs::getPointNeighbours(), coupledPolyPatch::getRotation(), wallBoundedParticle::hitProcessorPatch(), particle< Type >::hitWallFaces(), if(), FreeStream< CloudType >::inflow(), processorPolyPatch::initUpdateMesh(), interpolationCellPoint< Type >::interpolate(), sampledPlane::interpolateField(), sampledIsoSurfaceCell::interpolateField(), sampledThresholdCellFaces::interpolateField(), sampledPatch::interpolateField(), meshToMesh0::interpolateField(), Foam::interpolatePointToCell(), meshRefinement::intersectedPoints(), face::intersection(), IOField< Type >::IOField(), noiseFFT::Ldelta(), Foam::mag(), Foam::magSqr(), primitiveMesh::makeFaceCentresAndAreas(), Field< Type >::map(), noiseFFT::meanPf(), polyMeshAdder::mergePoints(), polyTopoChange::modifyFace(), Moment< Type >::Moment(), MPPICParcel< ParcelType >::move(), molecule::move(), regionModel1D::moveMesh(), primitiveMesh::movePoints(), multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(), NamedEnum< Enum, nEnum >::names(), face::nearestPointClassify(), cellCuts::nonAnchorPoints(), tetIndices::oldFaceTri(), tetIndices::oldTet(), ConstMatrixBlock< MatrixType >::operator Field< cmptType >(), MatrixBlock< MatrixType >::operator Field< cmptType >(), spatialTransform::transpose::operator&(), spatialTransform::dual::operator&(), minEqOpFace::operator()(), listPlusEqOp< T >::operator()(), minEqOp< labelPair >::operator()(), ifEqEqOp< value >::operator()(), nearestEqOp::operator()(), FieldMapper::operator()(), offsetOp< face >::operator()(), Foam::operator/(), Field< Type >::operator/=(), Foam::operator<<(), Foam::operator>>(), Foam::operator^(), oldCyclicPolyPatch::order(), distributedTriSurfaceMesh::overlappingSurface(), Pair< word >::Pair(), CollisionRecordList< PairType, WallType >::pairAccessed(), CollisionRecordList< PairType, WallType >::pairData(), CollisionRecordList< PairType, WallType >::pairOrigIdOfOther(), CollisionRecordList< PairType, WallType >::pairOrigProcOfOther(), Foam::parseNASCoord(), noiseFFT::Pdelta(), polyMesh::pointInCell(), primitiveMesh::pointInCell(), PatchTools::pointNormals(), Foam::pow(), processorLduInterfaceField::processorLduInterfaceField(), face::ray(), OBJsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), OFFsurfaceFormat< Face >::read(), VTKsurfaceFormat< Face >::read(), AC3DsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), boundaryMesh::read(), STARCD::readCells(), DimensionedField< Type, GeoMesh >::readField(), CollidingParcel< ParcelType >::readFields(), SLListBase::removeHead(), DLListBase::removeHead(), face::reverseFace(), Field< Type >::rmap(), noiseFFT::RMSmeanPf(), decompositionModel::selectIO(), IOstream::setBad(), hexRef8::setInstance(), removeCells::setRefinement(), duplicatePoints::setRefinement(), perfectInterface::setRefinement(), removePoints::setRefinement(), createShellMesh::setRefinement(), removeFaces::setRefinement(), addPatchCellLayer::setRefinement(), ThermoCloud< CloudType >::sigmap(), solidBodyMotionFvMesh::solidBodyMotionFvMesh(), sixDoFRigidBodyMotionSolver::solve(), rigidBodyMeshMotion::solve(), PatchTools::sortedEdgeFaces(), meshRefinement::splitFaces(), Foam::sqr(), AMIInterpolation< SourcePatch, TargetPatch >::srcPointFace(), MeshedSurface< Face >::stitchFaces(), PatchTools::subsetMap(), UnsortedMeshedSurface< Face >::subsetMesh(), MeshedSurface< Face >::subsetMesh(), SVD::SVD(), swapec(), syncTools::syncEdgeMap(), tetIndices::tet(), tetIndices::tetIndices(), particle< Type >::tetNeighbour(), tetOverlapVolume::tetOverlapVolume(), AMIInterpolation< SourcePatch, TargetPatch >::tgtPointFace(), thermo< Thermo, Type >::thermo(), Time::Time(), fileName::toAbsolute(), wallBoundedParticle::trackToEdge(), particle< Type >::trackToFace(), Foam::transformFieldMask(), polyMeshTetDecomposition::triangleTetIndices(), boundaryMesh::triangulate(), MeshedSurface< Face >::triangulate(), boundaryMesh::triangulateLocal(), triFace::triFaceFace(), triSurface::triSurfInstance(), MPPICParcel< ParcelType >::TrackingData< CloudType >::updateAverages(), directionInfo::updateCell(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), outletMappedUniformInletFvPatchField< Type >::updateCoeffs(), fWallFunctionFvPatchScalarField::updateCoeffs(), patchFaceOrientation::updateEdge(), patchEdgeFaceRegions::updateEdge(), patchFaceOrientation::updateFace(), patchEdgeFaceRegions::updateFace(), patchInjectionBase::updateMesh(), processorPolyPatch::updateMesh(), removePoints::updateMesh(), vtkUnstructuredReader::vtkUnstructuredReader(), CollisionRecordList< PairType, WallType >::wallAccessed(), CollisionRecordList< PairType, WallType >::wallData(), wallLayerCells::wallLayerCells(), CollisionRecordList< PairType, WallType >::wallPRel(), face::which(), X3DsurfaceFormat< Face >::write(), WRLsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), AveragingMethod< Type >::write(), forces::writeBins(), ensightPartFaces::writeConnectivity(), CollidingParcel< ParcelType >::writeFields(), fieldAverage::writeFieldType(), forces::writeFileHeader(), Foam::meshTools::writeOBJ(), coupledPolyPatch::writeOBJ(), alphatJayatillekeWallFunctionFvPatchScalarField::yPlusTherm(), Dual< Type >::~Dual(), ensightPartCells::~ensightPartCells(), ensightPartFaces::~ensightPartFaces(), and Stochastic< CloudType >::~Stochastic().

labelList bcl ( nPoints  )

Referenced by for().

Here is the caller graph for this function:

labelList bcf ( nPoints  )

Referenced by for().

Here is the caller graph for this function:

labelList bcb ( nPoints  )

Referenced by for().

Here is the caller graph for this function:

if ( mTable  = = 0)
labelList imtab ( nPoints  )

Referenced by if().

Here is the caller graph for this function:

labelList jmtab ( nPoints  )

Referenced by if().

Here is the caller graph for this function:

labelList kmtab ( nPoints  )

Referenced by if().

Here is the caller graph for this function:

face quadFace ( )

Referenced by if().

Here is the caller graph for this function:

face triFace ( )
if ( pFaces.  size()&&pFaces.size()&&pFaces.size()&&pFaces.size()[LINER][LINER][0][CYLINDERHEAD][CYLINDERHEAD][0])

Definition at line 321 of file readKivaGrid.H.

References Foam::endl(), forAll(), forAllConstIter(), Foam::Info, Foam::min(), and points().

Here is the call graph for this function:

if ( pFaces.  size()&&pFaces.size()[WEDGE][WEDGE][0])

Definition at line 416 of file readKivaGrid.H.

References boundary(), Foam::degToRad(), forAllIter, patchNames(), patchTypes(), points(), and Foam::tan().

Here is the call graph for this function:

faceListList boundary ( nPatches  )
wordList patchNames ( nPatches  )
wordList patchTypes ( nPatches  )

Referenced by extrudePatchMesh::extrudePatchMesh(), if(), and thermalBaffleFvPatchScalarField::rmap().

Here is the caller graph for this function:

labelList pointLabels ( nPoints  ,
1 
)
forAll ( cellShapes  ,
celli   
)

Definition at line 492 of file readKivaGrid.H.

Referenced by forAll(), and if().

Here is the caller graph for this function:

forAll ( pointLabels  ,
pointi   
)

Definition at line 502 of file readKivaGrid.H.

References forAll(), newPointi, and points().

Here is the call graph for this function:

points setSize ( newPointi  )
forAll ( boundary  ,
patchi   
)

Definition at line 524 of file readKivaGrid.H.

References f(), forAll(), and patchi.

Here is the call graph for this function:

preservePatchTypes ( runTime  ,
runTime.  constant(),
polyMesh::meshSubDir  ,
patchNames  ,
patchDicts  ,
defaultFacesName  ,
defaultFacesType   
)
forAll ( patchNames  ,
patchi   
)

Definition at line 549 of file readKivaGrid.H.

References boundary(), cellShapes, defaultFacesName, defaultFacesType, Foam::endl(), Foam::Info, patchDicts, patchi, patchNames(), points(), pShapeMesh(), and Foam::xferMove().

Here is the call graph for this function:

polyMesh pShapeMesh ( IOobject(polyMesh::defaultRegion, runTime.constant(), runTime)  ,
xferMove(points ,
cellShapes  ,
boundary  ,
patchNames  ,
patchDicts  ,
defaultFacesName  ,
defaultFacesType   
)

Referenced by forAll().

Here is the caller graph for this function:

Variable Documentation

Info<< "Reading kiva grid from file " << kivaFileName << endl;char title[120];kivaFile.getline(title, 120, '\n');label nPoints, nCells, nRegs;kivaFile > nCells nPoints nRegs

Definition at line 17 of file readKivaGrid.H.

Referenced by if().

label i4

Definition at line 20 of file readKivaGrid.H.

label nBfaces = 0

Definition at line 45 of file readKivaGrid.H.

kivaFile mTable

Definition at line 74 of file readKivaGrid.H.

Info<< "Finished reading KIVA file" << endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel& hex = *(cellModeller::lookup("hex"));labelList hexLabels(8);label activeCells = 0;labelList pointMap(nPoints);forAll(pointMap, i){ pointMap[i] = i;}for (label i=0; i<nPoints; i++){ if (f[i] > 0.0) { hexLabels[0] = i; hexLabels[1] = i1tab[i]; hexLabels[2] = i3tab[i1tab[i]]; hexLabels[3] = i3tab[i]; hexLabels[4] = i8tab[i]; hexLabels[5] = i1tab[i8tab[i]]; hexLabels[6] = i3tab[i1tab[i8tab[i]]]; hexLabels[7] = i3tab[i8tab[i]]; cellShapes[activeCells] = cellShape(hex, hexLabels); edgeList edges = cellShapes[activeCells].edges(); forAll(edges, ei) { if (edges[ei].mag(points) < SMALL) { label start = pointMap[edges[ei].start()]; while (start != pointMap[start]) { start = pointMap[start]; } label end = pointMap[edges[ei].end()]; while (end != pointMap[end]) { end = pointMap[end]; } label minLabel = min(start, end); pointMap[start] = pointMap[end] = minLabel; } } cellZoning[activeCells] = idreg[i]; activeCells++; }}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){ cellShape& cs = cellShapes[celli]; forAll(cs, i) { cs[i] = pointMap[cs[i]]; } cs.collapse();}label bcIDs[11] = {-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9};const label nBCs = 12;const word* kivaPatchTypes[nBCs] ={ &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &symmetryPolyPatch::typeName, &wedgePolyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &symmetryPolyPatch::typeName, &oldCyclicPolyPatch::typeName};enum patchTypeNames{ PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char* kivaPatchNames[nBCs] ={ "piston", "valve", "liner", "cylinderHead", "axis", "wedge", "inflow", "outflow", "presin", "presout", "symmetryPlane", "cyclic"};List<SLList<face> > pFaces[nBCs]
label nPatches = 0
word defaultFacesName = "defaultFaces"

Definition at line 460 of file readKivaGrid.H.

Referenced by forAll().

word defaultFacesType = emptyPolyPatch::typeName

Definition at line 461 of file readKivaGrid.H.

Referenced by forAll().

label nAddedPatches = 0

Definition at line 463 of file readKivaGrid.H.

label newPointi = 0
PtrList<dictionary> patchDicts

Definition at line 537 of file readKivaGrid.H.

Referenced by forAll().