35 void Foam::cuttingSurface::calcCellCuts
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(),
141 Pout<<
"Writing point distance:" << pDist.objectPath() <<
endl;
label nPoints() const
Number of points supporting patch faces.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
static const pointMesh & New(const polyMesh &mesh, Args &&... args)
Get existing or create a new MeshObject. Registered with typeName.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField
static int debug
Debug information.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
vector point
Point is a vector.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Field< vector > vectorField
Specialisation of Field<T> for vector.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Do not request registration (bool: false)
static constexpr const zero Zero
Global zero (0)