47 Pout<<
"volPointInterpolation::interpolateUnconstrained("
48 <<
"const VolField<Type>&, "
49 <<
"PointField<Type>&) : "
50 <<
"interpolating field from cells to points"
70 forAll(pointWeights_, pointi)
72 forAll(pointWeights_[pointi], pointCelli)
74 const label celli = pointCells[pointi][pointCelli];
76 pf[pointi] += pointWeights_[pointi][pointCelli]*vf[celli];
88 forAll(boundaryPointWeights_, bPointi)
94 forAll(boundaryPointWeights_[bPointi], bPointFacei)
102 forAll(boundaryPointWeights_[bPointi][bPointFacei], i)
107 !isCoupledPolyPatch[
patches[i]]
108 && isCoupledFvPatch[
patches[i]]
112 boundaryPointNbrWeights_[bPointi][bPointFacei][i]
113 *vfBnf[
patches[i]][patchFaces[i]];
119 !isCoupledPolyPatch[
patches[i]]
120 && !isCoupledFvPatch[
patches[i]]
124 boundaryPointWeights_[bPointi][bPointFacei][i]
143 interpolateUnconstrained(vf, pf);
154 const VolField<Type>& vf,
160 const objectRegistry& db = pm.thisDb();
162 if (!cache || vf.mesh().changing())
165 if (db.objectRegistry::template foundObject<PointField<Type>>(
name))
167 PointField<Type>& pf =
168 db.objectRegistry::template lookupObjectRef<PointField<Type>>
173 if (pf.ownedByRegistry())
181 tmp<PointField<Type>> tpf
197 if (!db.objectRegistry::template foundObject<PointField<Type>>(
name))
201 PointField<Type>* pfPtr = tpf.ptr();
207 PointField<Type>& pf =
208 db.objectRegistry::template lookupObjectRef<PointField<Type>>
228 PointField<Type>* pfPtr = tpf.ptr();
242 const VolField<Type>& vf
245 return interpolate(vf,
"volPointInterpolate(" + vf.name() +
')',
false);
253 const tmp<VolField<Type>>& tvf
256 tmp<PointField<Type>> tpf =
#define forAll(list, i)
Loop across all elements in list.
const fvMesh & mesh() const
static pointConstraints & New(const word &name, const pointMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
const Mesh & mesh() const
Return mesh.
Generic GeometricBoundaryField class.
tmp< GeometricBoundaryField > boundaryNeighbourField() const
Return BoundaryField of the values on the other side of couples.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
static tmp< GeometricField< Type, pointPatchField, pointMesh > > New(const word &name, const Internal &, const PtrList< pointPatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
const labelListList & pointFaces() const
Return point-face addressing.
label size() const
Return the number of elements in the UPtrList.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const UCompactListList< label > & polyBFacePatches() const
Return poly-bFace-patch addressing.
const UCompactListList< label > & polyBFacePatchFaces() const
Return poly-bFace-patch-face addressing.
Traits class for primitives.
void constrain(PointField< Type > &pf, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints) and.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const labelListList & pointCells() const
void store()
Transfer ownership of this object to its registry.
static void cachePrintMessage(const char *message, const word &name, const FieldType &vf)
Helper for printing cache message.
A class for managing temporary objects.
tmp< PointField< Type > > interpolate(const VolField< Type > &) const
Interpolate volField using inverse distance weighting.
void interpolateUnconstrained(const VolField< Type > &, PointField< Type > &) const
Interpolate from volField to pointField.
const fvPatchList & patches
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
prefixOSstream Pout(cout, "Pout")
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]