47 Pout<<
"volPointInterpolation::interpolateUnconstrained(" 48 <<
"const GeometricField<Type, fvPatchField, volMesh>&, " 49 <<
"GeometricField<Type, pointPatchField, pointMesh>&) : " 50 <<
"interpolating field from cells to points" 72 forAll(pointWeights_, pointi)
74 forAll(pointWeights_[pointi], pointCelli)
76 const label celli = pointCells[pointi][pointCelli];
78 pf[pointi] += pointWeights_[pointi][pointCelli]*vf[celli];
90 forAll(boundaryPointWeights_, bPointi)
96 forAll(boundaryPointWeights_[bPointi], bPointFacei)
100 mesh().polyBFacePatches()[pFaces[bPointFacei]];
102 mesh().polyBFacePatchFaces()[pFaces[bPointFacei]];
104 forAll(boundaryPointWeights_[bPointi][bPointFacei], i)
109 !isCoupledPolyPatch[patches[i]]
110 && isCoupledFvPatch[patches[i]]
114 boundaryPointNbrWeights_[bPointi][bPointFacei][i]
115 *vfBnf[patches[i]][patchFaces[i]];
121 !isCoupledPolyPatch[patches[i]]
122 && !isCoupledFvPatch[patches[i]]
126 boundaryPointWeights_[bPointi][bPointFacei][i]
166 if (!cache || vf.
mesh().changing())
169 if (db.objectRegistry::template foundObject<PointFieldType>(name))
172 db.objectRegistry::template lookupObjectRef<PointFieldType>
177 if (pf.ownedByRegistry())
201 if (!db.objectRegistry::template foundObject<PointFieldType>(name))
205 PointFieldType* pfPtr = tpf.
ptr();
212 db.objectRegistry::template lookupObjectRef<PointFieldType>
232 PointFieldType* pfPtr = tpf.
ptr();
249 return interpolate(vf,
"volPointInterpolate(" + vf.
name() +
')',
false);
const fvPatchList & patches
tmp< GeometricField< Type, pointPatchField, pointMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &) const
Interpolate volField using inverse distance weighting.
#define forAll(list, i)
Loop across all elements in list.
const word & name() const
Return name.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Traits class for primitives.
Generic GeometricField class.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
Mesh representing a set of points created from polyMesh.
const dimensionSet & dimensions() const
Return dimensions.
A list of faces which address into the list of points.
A class for handling words, derived from string.
const objectRegistry & thisDb() const
Return database. For now is its polyMesh.
void interpolateUnconstrained(const GeometricField< Type, fvPatchField, volMesh > &, GeometricField< Type, pointPatchField, pointMesh > &) const
Interpolate from volField to pointField.
faceListList boundary(nPatches)
tmp< GeometricBoundaryField > boundaryNeighbourField() const
Return BoundaryField of the values on the other side of couples.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
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, &mergedCyclicPolyPatch::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]
void store()
Transfer ownership of this object to its registry.
const labelListList & pointFaces() const
Return point-face addressing.
const Mesh & mesh() const
Return mesh.
static pointConstraints & New(pointMesh &mesh)
Generic GeometricBoundaryField class.
label size() const
Return the number of elements in the UPtrList.
prefixOSstream Pout(cout, "Pout")
T * ptr() const
Return tmp pointer for reuse.
A class for managing temporary objects.
Registry of regIOobjects.
const objectRegistry & db() const
Return the local objectRegistry.
static void cachePrintMessage(const char *message, const word &name, const FieldType &vf)
Helper for printing cache message.