OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

readKivaGrid.H File Reference

Go to the source code of this file.


Enumerations

enum  patchTypeNames {
  PISTON, VALVE, LINER, CYLINDERHEAD,
  AXIS, WEDGE, INFLOW, OUTFLOW,
  PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC
}

Functions

ifstream kivaFile (kivaFileName.c_str())
 if (!kivaFile.good())
 if (bcb[i] > 0 &&bcb[i]!=4) nBfaces++
 if (mTable==0)
labelList imtab (nPoints)
labelList jmtab (nPoints)
labelList kmtab (nPoints)
 for (label i=0;i< nPoints;i++)
cellZoning setSize (activeCells)
 forAll (cellShapes, celli)
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)
wordList patchPhysicalTypes (nPatches)
labelList pointLabels (nPoints,-1)
 forAll (pointLabels, pointi)
points setSize (newPointi)
 forAll (boundary, patchi)
 preservePatchTypes (runTime, runTime.constant(), polyMesh::defaultRegion, patchNames, patchTypes, defaultFacesName, defaultFacesType, patchPhysicalTypes)
polyMesh pShapeMesh (IOobject(polyMesh::defaultRegion, runTime.constant(), runTime), xferMove(points), cellShapes, boundary, patchNames, patchTypes, defaultFacesName, defaultFacesType, patchPhysicalTypes)

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;pointField
points(nPoints);label i4;labelList
idface(nPoints), fv(nPoints);for(label
i=0;i< nPoints;i++){scalar ffv;kivaFile >
> i4 >> points[i].x() >
> points[i].y() >> points[i].z() >
> ffv;if(kivaVersion==kiva3v){kivaFile >
> idface[i];}points[i]*=0.01;fv[i]=label(ffv);}labelList
i1tab(nPoints), i3tab(nPoints),
i8tab(nPoints), idreg(nPoints),
f(nPoints), bcl(nPoints), bcf(nPoints),
bcb(nPoints);label nBfaces=0;for(label
i=0;i< nPoints;i++){label i1,
i3, i8;scalar ff, fbcl, fbcf,
fbcb;kivaFile >> i1 >> i3 >
> i4 >> i8 >> ff >> fbcl >
> fbcf >> fbcb >> idreg[i];i1tab[i]=i1-1;i3tab[i]=i3-1;i8tab[i]=i8-1;f[i]=label(ff);bcl[i]=label(fbcl);bcf[i]=label(fbcf);bcb[i]=label(fbcb);if(bcl[i] >
0 &&bcl[i]!=4) nBfaces++;if(bcf[i] > && 
bcf [i] = 4) nBfaces++
label mTable
label bcIDs [11] = {-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9}
const label nBCs = 12
const word * kivaPatchTypes [nBCs]
const char * kivaPatchNames [nBCs]
List< SLList< face > > pFaces [nBCs]
label nPatches = 0
word defaultFacesName = "defaultFaces"
word defaultFacesType = emptyPolyPatch::typeName
label nAddedPatches = 0
label newPointi = 0

Enumeration Type Documentation

Enumerator:
PISTON 
VALVE 
LINER 
CYLINDERHEAD 
AXIS 
WEDGE 
INFLOW 
OUTFLOW 
PRESIN 
PRESOUT 
SYMMETRYPLANE 
CYCLIC 

Definition at line 202 of file readKivaGrid.H.


Function Documentation

ifstream kivaFile ( kivaFileName.  c_str()  ) 

Referenced by for().

Here is the caller graph for this function:

if ( !kivaFile.  good()  ) 

Definition at line 3 of file readKivaGrid.H.

References args, argList::executable(), Foam::exit(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

if ( bcb  [i],
0 &&bcb!  [i] = 4 
)

if ( mTable  = = 0  ) 

Definition at line 77 of file readKivaGrid.H.

References args, argList::executable(), Foam::exit(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

labelList imtab ( nPoints   ) 

Referenced by for().

Here is the caller graph for this function:

labelList jmtab ( nPoints   ) 

Referenced by for().

Here is the caller graph for this function:

labelList kmtab ( nPoints   ) 

Referenced by for().

Here is the caller graph for this function:

for (  ) 

Definition at line 88 of file readKivaGrid.H.

References imtab(), jmtab(), kivaFile(), and kmtab().

Here is the call graph for this function:

cellZoning setSize ( activeCells   ) 

forAll ( cellShapes  ,
celli   
)

Definition at line 170 of file readKivaGrid.H.

References cellShapes, and forAll.

face quadFace ( 4   ) 

Referenced by if().

Here is the caller graph for this function:

face triFace ( 3   ) 

Referenced by if(), and MeshedSurface< Face >::transcribe().

Here is the caller graph for this function:

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

Definition at line 321 of file readKivaGrid.H.

References CYLINDERHEAD, forAll, Foam::Info, LINER, Foam::min(), and points.

Here is the call graph for this function:

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

Definition at line 431 of file readKivaGrid.H.

References cellShapes, CYCLIC, d, Foam::mathematicalConstant::pi, points, Foam::tan(), and WEDGE.

Here is the call graph for this function:

faceListList boundary ( nPatches   ) 

Referenced by forAll().

Here is the caller graph for this function:

wordList patchNames ( nPatches   ) 

wordList patchTypes ( nPatches   ) 

wordList patchPhysicalTypes ( nPatches   ) 

labelList pointLabels ( nPoints  ,
-  1 
)

Referenced by forAll().

Here is the caller graph for this function:

forAll ( pointLabels  ,
pointi   
)

Definition at line 523 of file readKivaGrid.H.

References pointLabels(), and points.

Here is the call graph for this function:

points setSize ( newPointi   ) 

forAll ( boundary  ,
patchi   
)

Definition at line 545 of file readKivaGrid.H.

References boundary(), forAll, patchi, and pointLabels().

Here is the call graph for this function:

preservePatchTypes ( runTime  ,
runTime.  constant(),
polyMesh::defaultRegion  ,
patchNames  ,
patchTypes  ,
defaultFacesName  ,
defaultFacesType  ,
patchPhysicalTypes   
)

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


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;pointField points(nPoints);label i4;labelList idface(nPoints), fv(nPoints);for(label i=0; i<nPoints; i++){ scalar ffv; kivaFile >> i4 >> points[i].x() >> points[i].y() >> points[i].z() >> ffv; if (kivaVersion == kiva3v) { kivaFile >> idface[i]; } points[i] *= 0.01; fv[i] = label(ffv);}labelList i1tab(nPoints), i3tab(nPoints), i8tab(nPoints), idreg(nPoints), f(nPoints), bcl(nPoints), bcf(nPoints), bcb(nPoints);label nBfaces = 0;for(label i=0; i<nPoints; i++){ label i1, i3, i8; scalar ff, fbcl, fbcf, fbcb; kivaFile >> i1 >> i3 >> i4 >> i8 >> ff >> fbcl >> fbcf >> fbcb >> idreg[i]; i1tab[i] = i1 - 1; i3tab[i] = i3 - 1; i8tab[i] = i8 - 1; f[i] = label(ff); bcl[i] = label(fbcl); bcf[i] = label(fbcf); bcb[i] = label(fbcb); if (bcl[i] > 0 && bcl[i] != 4) nBfaces++; if (bcf[i] >&& bcf[i] = 4) nBfaces++

Definition at line 69 of file readKivaGrid.H.

kivaFile mTable

Definition at line 74 of file readKivaGrid.H.

label bcIDs[11] = {-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9}

Definition at line 182 of file readKivaGrid.H.

Referenced by if().

const label nBCs = 12

Definition at line 184 of file readKivaGrid.H.

const word* kivaPatchTypes[nBCs]

Initial value:

{
    &wallPolyPatch::typeName,
    &wallPolyPatch::typeName,
    &wallPolyPatch::typeName,
    &wallPolyPatch::typeName,
    &symmetryPolyPatch::typeName,
    &wedgePolyPatch::typeName,
    &polyPatch::typeName,
    &polyPatch::typeName,
    &polyPatch::typeName,
    &polyPatch::typeName,
    &symmetryPolyPatch::typeName,
    &cyclicPolyPatch::typeName
}

Definition at line 186 of file readKivaGrid.H.

const char* kivaPatchNames[nBCs]

Initial value:

{
    "piston",
    "valve",
    "liner",
    "cylinderHead",
    "axis",
    "wedge",
    "inflow", 
    "outflow",
    "presin",
    "presout",
    "symmetryPlane",
    "cyclic"
}

Definition at line 218 of file readKivaGrid.H.

List<SLList<face> > pFaces[nBCs]

Definition at line 235 of file readKivaGrid.H.

Referenced by if(), cyclicPolyPatch::order(), and Foam::polyMeshZipUpCells().

word defaultFacesName = "defaultFaces"

Definition at line 480 of file readKivaGrid.H.

word defaultFacesType = emptyPolyPatch::typeName

Definition at line 481 of file readKivaGrid.H.

label nAddedPatches = 0

Definition at line 484 of file readKivaGrid.H.

label newPointi = 0

Definition at line 522 of file readKivaGrid.H.

Copyright © 2000-2009 OpenCFD Ltd