Go to the documentation of this file.
68 elems[slavePoints[j]] = elems[i];
91 Pout<<
"volPointInterpolation::addSeparated" <<
endl;
98 refCast<coupledPointPatchField<Type> >
114 refCast<coupledPointPatchField<Type> >
134 Pout<<
"volPointInterpolation::interpolateInternalField("
135 <<
"const GeometricField<Type, fvPatchField, volMesh>&, "
136 <<
"GeometricField<Type, pointPatchField, pointMesh>&) : "
137 <<
"interpolating field from cells to points"
144 forAll(pointCells, pointi)
146 if (!isPatchPoint_[pointi])
149 const labelList& ppc = pointCells[pointi];
155 pf[pointi] += pw[pointCelli]*vf[ppc[pointCelli]];
171 Pout<<
"volPointInterpolation::interpolateDimensionedInternalField("
172 <<
"const DimensionedField<Type, volMesh>&, "
173 <<
"DimensionedField<Type, pointMesh>&) : "
174 <<
"interpolating field from cells to points"
190 forAll(pointCells, pointi)
192 const labelList& ppc = pointCells[pointi];
198 label celli = ppc[pointCelli];
199 scalar pw = 1.0/
mag(
points[pointi] - cellCentres[celli]);
201 pf[pointi] += pw*vf[celli];
213 scalar
s = sumW[pointi];
243 !isA<emptyFvPatch>(bm[patchI])
256 const polyPatch& pp = bm[patchI].patch();
265 return tboundaryVals;
292 if (isPatchPoint_[pointI])
295 const scalarList& pWeights = boundaryPointWeights_[i];
297 Type& val = pfi[pointI];
302 if (boundaryIsPatchFace_[
pFaces[j]])
304 val += pWeights[j]*boundaryVals[
pFaces[j]];
319 pushUntransformedData(pfi);
328 const bool overrideFixedValue
331 interpolateBoundaryField(vf, pf);
349 Pout<<
"volPointInterpolation::interpolate("
350 <<
"const GeometricField<Type, fvPatchField, volMesh>&, "
351 <<
"GeometricField<Type, pointPatchField, pointMesh>&) : "
352 <<
"interpolating field from cells to points"
356 interpolateInternalField(vf, pf);
359 interpolateBoundaryField(vf, pf,
false);
380 "volPointInterpolate(" + vf.name() +
')',
390 interpolateInternalField(vf, tpf());
393 interpolateBoundaryField(vf, tpf(),
true);
429 if (!cache || vf.mesh().changing())
432 if (db.objectRegistry::template foundObject<PointFieldType>(
name))
434 PointFieldType& pf =
const_cast<PointFieldType&
>
436 db.objectRegistry::template lookupObject<PointFieldType>(
name)
439 if (pf.ownedByRegistry())
469 if (!db.objectRegistry::template foundObject<PointFieldType>(
name))
473 PointFieldType* pfPtr = tpf.
ptr();
479 PointFieldType& pf =
const_cast<PointFieldType&
>
481 db.objectRegistry::template lookupObject<PointFieldType>(
name)
506 return interpolate(vf,
"volPointInterpolate(" + vf.name() +
')',
false);
539 if (!cache || vf.
mesh().changing())
542 if (db.objectRegistry::template foundObject<PointFieldType>(
name))
544 PointFieldType& pf =
const_cast<PointFieldType&
>
546 db.objectRegistry::template lookupObject<PointFieldType>(
name)
549 if (pf.ownedByRegistry())
573 interpolateDimensionedInternalField(vf, tpf());
579 if (!db.objectRegistry::template foundObject<PointFieldType>(
name))
583 PointFieldType* pfPtr = tpf.
ptr();
589 PointFieldType& pf =
const_cast<PointFieldType&
>
591 db.objectRegistry::template lookupObject<PointFieldType>(
name)
601 interpolateDimensionedInternalField(vf, pf);
617 return interpolate(vf,
"volPointInterpolate(" + vf.name() +
')',
false);
virtual const pointField & points() const
Return raw points.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const mapDistribute & globalCoPointSlavesMap() const
tmp< Field< Type > > flatBoundaryField(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Get boundary field in same order as boundary faces. Field is.
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
A List obtained as a section of another List.
faceListList boundary(nPatches)
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Variant of pointEdgePoint with some transported additional data. WIP - should be templated on data li...
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void cachePrintMessage(const char *message, const word &name, const FieldType &vf)
Helper for printing cache message.
dimensioned< scalar > mag(const dimensioned< Type > &)
static const pointConstraints & New(const pointMesh &mesh)
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]
Registry of regIOobjects.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
const Mesh & mesh() const
Return mesh.
A patch is a list of labels that address the faces in the global face list.
void addSeparated(GeometricField< Type, pointPatchField, pointMesh > &) const
Add separated contributions.
Class containing processor-to-processor mapping information.
void assign(const UList< T > &)
Assign elements to those from UList.
InternalField & internalField()
Return internal field.
label nInternalFaces() const
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
Mesh data needed to do the Finite Volume discretisation.
Mesh representing a set of points created from polyMesh.
T * ptr() const
Return tmp pointer for reuse.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const dimensionSet & dimensions() const
Return dimensions.
tmp< GeometricField< Type, pointPatchField, pointMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &) const
Interpolate volField using inverse distance weighting.
Application of (multi-)patch point contraints.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
label constructSize() const
Constructed data size.
const vectorField & cellCentres() const
void store()
Transfer ownership of this object to its registry.
prefixOSstream Pout(cout, "Pout")
static void syncUntransformedData(const polyMesh &mesh, List< Type > &pointData, const CombineOp &cop)
Helper: sync data on collocated points only.
Traits class for primitives.
const indirectPrimitivePatch & coupledPatch() const
Return patch of all coupled faces.
const objectRegistry & thisDb() const
Return database. For now is its polyMesh.
void interpolateInternalField(const GeometricField< Type, fvPatchField, volMesh > &, GeometricField< Type, pointPatchField, pointMesh > &) const
Interpolate internal field from volField to pointField.
const labelListList & pointCells() const
void reverseDistribute(const label constructSize, List< T > &, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
void constrain(GeometricField< Type, pointPatchField, pointMesh > &pf, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints) and.
void size(const label)
Override size to be inconsistent with allocated storage.
const globalMeshData & globalData() const
Return parallel info.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
Generic GeometricField class.
void interpolateDimensionedInternalField(const DimensionedField< Type, volMesh > &vf, DimensionedField< Type, pointMesh > &pf) const
Interpolate dimensioned internal field from cells to points.
void interpolateBoundaryField(const GeometricField< Type, fvPatchField, volMesh > &vf, GeometricField< Type, pointPatchField, pointMesh > &pf) const
Interpolate boundary field without applying constraints/boundary.
void pushUntransformedData(List< Type > &) const
Helper: push master point data to collocated points.
word name(const complex &)
Return a string representation of a complex.
const labelListList & globalCoPointSlaves() const
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A list of faces which address into the list of points.