Go to the documentation of this file.
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)
65 const point diff(pts[i] - nearest[i].hitPoint());
68 pointDist[i] = (
diff & norms[i]);
74 cellCuts.resize(nCells);
78 cellCuts.resize(nCells,
true);
84 surfPtr_().findNearest
94 for (
const label celli : cellCuts)
97 cellBb.add(pts, fvm.cellPoints(celli));
99 if (!cellBb.contains(nearest[celli].hitPoint()))
101 cellCuts.unset(celli);
112 "cuttingSurface.cellCuts",
113 fvm.time().timeName(),
123 for (
const label celli : cellCuts)
128 Pout<<
"Writing cellCuts:" << cCuts.objectPath() <<
endl;
135 "cuttingSurface.pointDistance",
136 fvm.time().timeName(),
147 Pout<<
"Writing point distance:" << pDist.objectPath() <<
endl;
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Global zero (0)
static const pointMesh & New(const polyMesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Field< vector > vectorField
Specialisation of Field<T> for vector.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
static int debug
Debug information.
vector point
Point is a vector.
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField