50 void Foam::sampledCuttingPlane::createGeometry()
54 Pout<<
"sampledCuttingPlane::createGeometry :updating geometry."
61 pointDistance_.
clear();
62 cellDistancePtr_.
clear();
68 if (zoneID_.
index() != -1 && !subMeshPtr_.
valid())
73 label exposedPatchI = patches.
findPatchID(exposedPatchName_);
77 Info<<
"Allocating subset of size "
79 <<
" with exposed faces into patch "
80 << patches[exposedPatchI].name() <<
endl;
85 new fvMeshSubset(static_cast<const fvMesh&>(
mesh()))
87 subMeshPtr_().setLargeCellSubset
99 ? subMeshPtr_().subMesh()
100 :
static_cast<const fvMesh&
>(
mesh())
107 cellDistancePtr_.
reset
114 fvm.time().timeName(),
140 forAll(cellDistance.boundaryField(), patchI)
144 isA<emptyFvPatchScalarField>
146 cellDistance.boundaryField()[patchI]
150 cellDistance.boundaryField().set
153 new calculatedFvPatchScalarField
155 fvm.boundary()[patchI],
160 const polyPatch& pp = fvm.boundary()[patchI].patch();
172 const pointField& cc = fvm.C().boundaryField()[patchI];
189 pointDistance_.
setSize(fvm.nPoints());
195 pointDistance_[i] = (pts[i] - plane_.
refPoint()) & plane_.
normal();
202 Pout<<
"Writing cell distance:" << cellDistance.objectPath() <<
endl;
203 cellDistance.
write();
209 fvm.time().timeName(),
220 Pout<<
"Writing point distance:" << pDist.objectPath() <<
endl;
262 cellDistancePtr_(NULL),
266 if (zoneID_.index() != -1)
268 dict.
lookup(
"exposedPatchName") >> exposedPatchName_;
274 "sampledCuttingPlane::sampledCuttingPlane"
275 "(const word&, const polyMesh&, const dictionary&)"
276 ) <<
"Cannot find patch " << exposedPatchName_
277 <<
" in which to put exposed faces." <<
endl
282 if (debug && zoneID_.index() != -1)
284 Info<<
"Restricting to cellZone " << zoneID_.name()
285 <<
" with exposed internal faces into patch "
286 << exposedPatchName_ <<
endl;
310 Pout<<
"sampledCuttingPlane::expire :"
311 <<
" have-facesPtr_:" << facesPtr_.valid()
312 <<
" needsUpdate_:" << needsUpdate_ <<
endl;
336 Pout<<
"sampledCuttingPlane::update :"
337 <<
" have-facesPtr_:" << facesPtr_.valid()
338 <<
" needsUpdate_:" << needsUpdate_ <<
endl;
348 needsUpdate_ =
false;
359 return sampleField(vField);
369 return sampleField(vField);
379 return sampleField(vField);
389 return sampleField(vField);
399 return sampleField(vField);
409 return interpolateField(interpolator);
419 return interpolateField(interpolator);
428 return interpolateField(interpolator);
438 return interpolateField(interpolator);
448 return interpolateField(interpolator);
454 os <<
"sampledCuttingPlane: " <<
name() <<
" :"
455 <<
" plane:" << plane_
456 <<
" faces:" << faces().size()