54 pointLengthScale[
e[i]] =
max(pointLengthScale[
e[i]], l);
55 pointLengthScale[
e[i]] =
max(pointLengthScale[
e[i]], l);
59 syncTools::syncPointList
74 const vector l = pointLengthScale[pointi]*vector::one;
78 nearPointPointis.
append(pointi);
100 forAll(nearPoints, nearPointi)
102 const label pointi = nearPointPointis[nearPointi];
105 mag(nearPoints[nearPointi] - nearPointHits[nearPointi].hitPoint());
107 switch (nearPointsVolumeType[nearPointi])
109 case volumeType::unknown:
110 case volumeType::mixed:
111 pointDistances[pointi] = vGreat;
113 case volumeType::outside:
114 pointDistances[pointi] = d;
116 case volumeType::inside:
117 pointDistances[pointi] = -d;
173 const scalar fMagSqrCutArea =
magSqr(fCutArea);
175 faceCutAreas[facei] = fCutArea;
176 faceCutCentres[facei] =
177 fMagSqrCutArea > vSmall
178 ? (fCutArea & fCutAreaCentre.
second())/fMagSqrCutArea
185 cellCutVolumes[celli] =
239 mag(
points[pointi] - pointHits[pointi].hitPoint());
241 switch (pointsVolumeType[pointi])
243 case volumeType::unknown:
244 case volumeType::mixed:
245 pointDistances[pointi] = vGreat;
247 case volumeType::outside:
248 pointDistances[pointi] = d;
250 case volumeType::inside:
251 pointDistances[pointi] = -d;
273 faceCutAreas[facei] =
288 return mag(faceCutAreas)/
mag(faceAreas);
#define forAll(list, i)
Loop across all elements in list.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
Pre-declare related SubField type.
A 2-tuple for storing two objects of different types.
const Type2 & second() const
Return second.
const Type1 & first() const
Return first.
A bounding box defined in terms of the points at its extremities.
bool overlaps(const boundBox &) const
Overlaps/touches boundingBox?
Description of cuts across cells.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const pointField & points() const
Return raw points.
A patch is a list of labels that address the faces in the global face list.
const vectorField::subField faceAreas() const
Return face areas.
const vectorField & faceCentres() const
const scalarField & cellVolumes() const
const vectorField & faceAreas() const
const cellList & cells() const
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
virtual void getVolumeType(const pointField &, List< volumeType > &) const =0
Determine type (inside/outside) for point. unknown if.
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const =0
const boundBox & bounds() const
Return const reference to boundBox.
A class for managing temporary objects.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
volScalarField scalarField(fieldObject, mesh)
const dimensionedScalar e
Elementary charge.
Tuple2< vector, std::tuple< AreaIntegralType< Types > ... > > faceCutAreaIntegral(const face &f, const vector &fArea, const std::tuple< Types ... > &fPsis, const List< labelPair > &fCuts, const pointField &ps, const std::tuple< const Field< Types > &... > &pPsis, const scalarField &pAlphas, const scalar isoAlpha, const bool below)
Compute the face-cut-area and face-cut-area-integral of the given properties.
vector faceCutArea(const face &f, const vector &fArea, const List< labelPair > &fCuts, const pointField &ps, const scalarField &pAlphas, const scalar isoAlpha, const bool below)
Compute the face-cut-area.
List< labelPair > faceCuts(const face &f, const scalarField &pAlphas, const scalar isoAlpha)
Return the cuts for a given face. This returns a list of pairs of.
labelListList cellCuts(const cell &c, const cellEdgeAddressing &cAddr, const faceUList &fs, const List< List< labelPair >> &fCuts, const scalarField &pAlphas, const scalar isoAlpha)
Return the cuts for a given cell. This returns a list of lists of cell-edge.
scalar cellCutVolume(const cell &c, const cellEdgeAddressing &cAddr, const scalar cVolume, const labelListList &cCuts, const faceUList &fs, const vectorField &fAreas, const pointField &fCentres, const vectorField &fCutAreas, const pointField &ps, const scalarField &pAlphas, const scalar isoAlpha, const bool below)
Compute the cell-cut-volume.
tmp< scalarField > insideFraction(const searchableSurface &surface, const polyMesh &mesh)
Return a cell-field of the volume fraction inside the given surface.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)