35void Foam::cuttingSurface::calcCellCuts
38 scalarField& pointDist,
45 const label nCells = fvm.nCells();
46 const label
nPoints = fvm.nPoints();
50 List<pointIndexHit> nearest;
51 surfPtr_().findNearest
59 surfPtr_().getNormal(nearest, norms);
63 for (label i=0; i <
nPoints; ++i)
68 pointDist[i] = (
diff & norms[i]);
74 cellCuts.resize(nCells);
78 cellCuts.resize(nCells,
true);
84 surfPtr_().findNearest
92 for (
const label celli : cellCuts)
94 if (!fvm.cellBb(celli).contains(nearest[celli].point()))
96 cellCuts.unset(celli);
106 "cuttingSurface.cellCuts",
107 fvm.time().timeName(),
117 for (
const label celli : cellCuts)
122 Pout<<
"Writing cellCuts:" << cCuts.objectPath() <<
endl;
129 "cuttingSurface.pointDistance",
130 fvm.time().timeName(),
139 pDist.primitiveFieldRef() = pointDist;
141 Pout<<
"Writing point distance:" << pDist.objectPath() <<
endl;
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
void resize(const label len)
Adjust allocated size of list.
static FOAM_NO_DANGLING_REFERENCE const pointMesh & New(const polyMesh &mesh, Args &&... args)
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
static int debug
Debug information.
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.