A sampledSurface defined by a cuttingPlane. Always triangulated. More...
#include <sampling/sampledPlane.H>
A sampledSurface defined by a cuttingPlane. Always triangulated.
Note: does not cut at construction (since might need fields which are not registered yet). Explicitly call update().
Definition at line 53 of file sampledPlane.H.
Public Member Functions | |
TypeName ("sampledPlane") | |
Runtime type information. | |
sampledPlane (const word &name, const polyMesh &mesh, const plane &planeDesc, const word &zoneName=word::null) | |
Construct from components. | |
sampledPlane (const word &name, const polyMesh &mesh, const dictionary &dict) | |
Construct from dictionary. | |
virtual | ~sampledPlane () |
virtual bool | needsUpdate () const |
Does the surface need an update? | |
virtual bool | expire () |
Mark the surface as needing an update. | |
virtual bool | update () |
Update the surface as required. | |
virtual const pointField & | points () const |
Points of surface. | |
virtual const faceList & | faces () const |
Faces of surface. | |
const labelList & | meshCells () const |
For every face original cell in mesh. | |
virtual tmp< scalarField > | sample (const volScalarField &) const |
sample field on surface | |
virtual tmp< vectorField > | sample (const volVectorField &) const |
sample field on surface | |
virtual tmp< sphericalTensorField > | sample (const volSphericalTensorField &) const |
sample field on surface | |
virtual tmp< symmTensorField > | sample (const volSymmTensorField &) const |
sample field on surface | |
virtual tmp< tensorField > | sample (const volTensorField &) const |
sample field on surface | |
virtual tmp< scalarField > | interpolate (const interpolation< scalar > &) const |
interpolate field on surface | |
virtual tmp< vectorField > | interpolate (const interpolation< vector > &) const |
interpolate field on surface | |
virtual tmp< sphericalTensorField > | interpolate (const interpolation< sphericalTensor > &) const |
interpolate field on surface | |
virtual tmp< symmTensorField > | interpolate (const interpolation< symmTensor > &) const |
interpolate field on surface | |
virtual tmp< tensorField > | interpolate (const interpolation< tensor > &) const |
interpolate field on surface | |
virtual void | print (Ostream &) const |
Write. | |
![]() | |
TypeName ("sampledSurface") | |
Runtime type information. | |
declareRunTimeSelectionTable (autoPtr, sampledSurface, word,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict)) | |
sampledSurface (const word &name, const polyMesh &) | |
Construct from name, mesh. | |
sampledSurface (const word &name, const polyMesh &, const dictionary &) | |
Construct from dictionary. | |
autoPtr< sampledSurface > | clone () const |
Clone. | |
virtual | ~sampledSurface () |
const polyMesh & | mesh () const |
Access to the underlying mesh. | |
const word & | name () const |
Name of surface. | |
bool | interpolate () const |
interpolation requested for surface | |
virtual const vectorField & | Sf () const |
Return face area vectors. | |
virtual const scalarField & | magSf () const |
Return face area magnitudes. | |
virtual const vectorField & | Cf () const |
Return face centres as vectorField. | |
scalar | area () const |
The total surface area. | |
template<class Type > | |
Type | integrate (const Field< Type > &) const |
Integration of a field across the surface. | |
template<class Type > | |
Type | integrate (const tmp< Field< Type > > &) const |
Integration of a field across the surface. | |
template<class Type > | |
Type | average (const Field< Type > &) const |
Area-averaged value of a field across the surface. | |
template<class Type > | |
Type | average (const tmp< Field< Type > > &) const |
Area-averaged value of a field across the surface. | |
tmp< Field< scalar > > | project (const Field< scalar > &) const |
Project field onto surface. | |
tmp< Field< scalar > > | project (const Field< vector > &) const |
Project field onto surface. | |
tmp< Field< vector > > | project (const Field< sphericalTensor > &) const |
Project field onto surface. | |
tmp< Field< vector > > | project (const Field< symmTensor > &) const |
Project field onto surface. | |
tmp< Field< vector > > | project (const Field< tensor > &) const |
Project field onto surface. | |
virtual void | rename (const word &newName) |
Rename. | |
![]() | |
cuttingPlane (const plane &, const primitiveMesh &, const UList< label > &cellIdLabels=UList< label >::null()) | |
Construct from plane and mesh reference,. | |
const plane & | planeDesc () const |
Return plane used. | |
const labelList & | cutCells () const |
Return List of cells cut by the plane. | |
bool | cut () const |
Return true or false to question: have any cells been cut? | |
template<class Type > | |
tmp< Field< Type > > | sample (const Field< Type > &) const |
Sample the cell field. | |
template<class Type > | |
tmp< Field< Type > > | sample (const tmp< Field< Type > > &) const |
void | operator= (const cuttingPlane &) |
![]() | |
plane (const vector &normalVector) | |
Construct from normal vector through the origin. | |
plane (const point &basePoint, const vector &normalVector) | |
Construct from normal vector and point in plane. | |
plane (const point &point1, const point &point2, const point &point3) | |
Construct from three points in plane. | |
plane (const scalarList &C) | |
Construct from coefficients for the. | |
plane (const dictionary &planeDict) | |
Construct from dictionary. | |
plane (Istream &is) | |
Construct from Istream. Assumes the base + normal notation. | |
const vector & | normal () const |
Return plane normal. | |
const point & | refPoint () const |
Return or return plane base point. | |
FixedList< scalar, 4 > | planeCoeffs () const |
Return coefficients for the. | |
point | nearestPoint (const point &p) const |
Return nearest point in the plane for the given point. | |
scalar | distance (const point &p) const |
Return distance from the given point to the plane. | |
scalar | normalIntersect (const point &pnt0, const vector &dir) const |
Return cut coefficient for plane and line defined by. | |
scalar | normalIntersect (const ray &r) const |
Return cut coefficient for plane and ray. | |
template<class Point , class PointRef > | |
scalar | lineIntersect (const line< Point, PointRef > &l) const |
Return the cutting point between the plane and. | |
ray | planeIntersect (const plane &) const |
Return the cutting line between this plane and another. | |
point | planePlaneIntersect (const plane &, const plane &) const |
Return the cutting point between this plane and two other planes. | |
void | writeDict (Ostream &) const |
Write to dictionary. | |
![]() | |
MeshedSurface () | |
Construct null. | |
MeshedSurface (const Xfer< pointField > &, const Xfer< List< face > > &, const Xfer< surfZoneList > &) | |
Construct by transferring components (points, faces, zones). | |
MeshedSurface (const Xfer< pointField > &, const Xfer< List< face > > &, const UList< label > &zoneSizes=UList< label >(), const UList< word > &zoneNames=UList< word >()) | |
Construct by transferring components (points, faces). | |
MeshedSurface (const MeshedSurface &) | |
Construct as copy. | |
MeshedSurface (const UnsortedMeshedSurface< face > &) | |
Construct from a UnsortedMeshedSurface. | |
MeshedSurface (const polyBoundaryMesh &, const bool globalPoints=false) | |
Construct from a boundary mesh with local points/faces. | |
MeshedSurface (const surfMesh &) | |
Construct from a surfMesh. | |
MeshedSurface (const Xfer< UnsortedMeshedSurface< face > > &) | |
Construct by transferring the contents from a UnsortedMeshedSurface. | |
MeshedSurface (const Xfer< MeshedSurface< face > > &) | |
Construct by transferring the contents from a MeshedSurface. | |
MeshedSurface (const fileName &) | |
Construct from file name (uses extension to determine type) | |
MeshedSurface (const fileName &, const word &ext) | |
Construct from file name (uses extension to determine type) | |
MeshedSurface (const Time &, const word &surfName="") | |
Construct from database. | |
ClassName ("MeshedSurface") | |
Runtime type information. | |
declareRunTimeSelectionTable (autoPtr, MeshedSurface, fileExtension,(const fileName &name),(name)) | |
virtual | ~MeshedSurface () |
declareMemberFunctionSelectionTable (void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const MeshedSurface< face > &surf),(name, surf)) | |
virtual void | write (const fileName &name) const |
Generic write routine. Chooses writer based on extension. | |
void | write (const Time &, const word &surfName="") const |
Write to database. | |
label | size () const |
The surface size is the number of faces. | |
const List< surfZone > & | surfZones () const |
Const access to the surface zones. | |
virtual void | addZones (const UList< surfZone > &, const bool cullEmpty=false) |
Add surface zones. | |
virtual void | addZones (const UList< label > &sizes, const UList< word > &names, const bool cullEmpty=false) |
Add surface zones. | |
virtual void | addZones (const UList< label > &sizes, const bool cullEmpty=false) |
Add surface zones. | |
virtual void | removeZones () |
Remove surface zones. | |
virtual void | clear () |
Clear all storage. | |
virtual void | movePoints (const pointField &) |
Move points. | |
virtual void | scalePoints (const scalar &) |
Scale points. A non-positive factor is ignored. | |
virtual void | reset (const Xfer< pointField > &points, const Xfer< List< face > > &faces, const Xfer< surfZoneList > &zones) |
Reset primitive data (points, faces and zones) | |
virtual void | reset (const Xfer< List< point > > &points, const Xfer< List< face > > &faces, const Xfer< surfZoneList > &zones) |
Reset primitive data (points, faces and zones) | |
virtual void | cleanup (const bool verbose) |
Remove invalid faces. | |
virtual bool | stitchFaces (const scalar tol=SMALL, const bool verbose=false) |
virtual bool | checkFaces (const bool verbose=false) |
virtual label | triangulate () |
Triangulate in-place, returning the number of triangles added. | |
virtual label | triangulate (List< label > &faceMap) |
Triangulate in-place, returning the number of triangles added. | |
MeshedSurface | subsetMesh (const labelHashSet &include, labelList &pointMap, labelList &faceMap) const |
Return new surface. | |
MeshedSurface | subsetMesh (const labelHashSet &include) const |
Return new surface. | |
void | transfer (MeshedSurface< face > &) |
Transfer the contents of the argument and annull the argument. | |
void | transfer (UnsortedMeshedSurface< face > &) |
Transfer the contents of the argument and annull the argument. | |
Xfer< MeshedSurface< face > > | xfer () |
Transfer contents to the Xfer container. | |
bool | read (const fileName &, const word &ext) |
Read from file. Chooses reader based on explicit extension. | |
virtual bool | read (const fileName &) |
Read from file. Chooses reader based on detected extension. | |
void | writeStats (Ostream &os) const |
void | operator= (const MeshedSurface< face > &) |
operator MeshedSurfaceProxy< face > () const | |
Conversion operator to MeshedSurfaceProxy. | |
![]() | |
PrimitivePatch (const ::Foam::List< face > &faces, const Field< point > &points) | |
Construct from components. | |
PrimitivePatch (::Foam::List< face > &faces, Field< point > &points, const bool reUse) | |
Construct from components, reuse storage. | |
PrimitivePatch (const PrimitivePatch< face,::Foam::List, pointField, point > &) | |
Construct as copy. | |
virtual | ~PrimitivePatch () |
void | clearOut () |
void | clearGeom () |
void | clearTopology () |
void | clearPatchMeshAddr () |
label | nPoints () const |
Return number of points supporting patch faces. | |
label | nEdges () const |
Return number of edges in patch. | |
const edgeList & | edges () const |
Return list of edges, address into LOCAL point list. | |
label | nInternalEdges () const |
Number of internal edges. | |
bool | isInternalEdge (const label edgeI) const |
Is internal edge? | |
const labelList & | boundaryPoints () const |
Return list of boundary points,. | |
const labelListList & | faceFaces () const |
Return face-face addressing. | |
const labelListList & | edgeFaces () const |
Return edge-face addressing. | |
const labelListList & | faceEdges () const |
Return face-edge addressing. | |
const labelListList & | pointEdges () const |
Return point-edge addressing. | |
const labelListList & | pointFaces () const |
Return point-face addressing. | |
const List< face > & | localFaces () const |
Return patch faces addressing into local point list. | |
const labelList & | meshPoints () const |
Return labelList of mesh points in patch. They are constructed. | |
const Map< label > & | meshPointMap () const |
Mesh point map. Given the global point index find its. | |
const Field< point > & | localPoints () const |
Return pointField of points in patch. | |
const labelList & | localPointOrder () const |
Return orders the local points for most efficient search. | |
label | whichPoint (const label gp) const |
Given a global point index, return the local point index. | |
label | whichEdge (const edge &) const |
Given an edge in local point labels, return its. | |
labelList | meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const |
Return labels of patch edges in the global edge list using. | |
labelList | meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const |
Return labels of patch edges in the global edge list using. | |
const Field< point > & | faceCentres () const |
Return face centres for patch. | |
const Field< point > & | faceNormals () const |
Return face normals for patch. | |
const Field< point > & | pointNormals () const |
Return point normals for patch. | |
List< objectHit > | projectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const |
Project vertices of patch onto another patch. | |
List< objectHit > | projectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const |
Project vertices of patch onto another patch. | |
const labelListList & | edgeLoops () const |
Return list of closed loops of boundary vertices. | |
surfaceTopo | surfaceType () const |
Calculate surface type formed by patch. | |
bool | checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const |
Check surface formed by patch for manifoldness (see above). | |
bool | checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const |
Checks primitivePatch for faces sharing point but not edge. | |
virtual void | movePoints (const Field< point > &) |
Correct patch after moving points. | |
void | operator= (const PrimitivePatch< face,::Foam::List, pointField, point > &) |
Assignment. | |
![]() | |
List () | |
Null constructor. | |
List (const label) | |
Construct with given size. | |
List (const label, const face &) | |
Construct with given size and value for all elements. | |
List (const List< face > &) | |
Copy constructor. | |
List (const Xfer< List< face > > &) | |
Construct by transferring the parameter contents. | |
List (List< face > &, bool reUse) | |
Construct as copy or re-use as specified. | |
List (const UList< face > &, const unallocLabelList &mapAddressing) | |
Construct as subset. | |
List (InputIterator first, InputIterator last) | |
Construct given start and end iterators. | |
List (const FixedList< face, Size > &) | |
Construct as copy of FixedList<T, Size> | |
List (const PtrList< face > &) | |
Construct as copy of PtrList<T> | |
List (const SLList< face > &) | |
Construct as copy of SLList<T> | |
List (const IndirectList< face > &) | |
Construct as copy of IndirectList<T> | |
List (const UIndirectList< face > &) | |
Construct as copy of UIndirectList<T> | |
List (const BiIndirectList< face > &) | |
Construct as copy of BiIndirectList<T> | |
List (Istream &) | |
Construct from Istream. | |
autoPtr< List< face > > | clone () const |
Clone. | |
~List () | |
void | resize (const label) |
Reset size of List. | |
void | resize (const label, const face &) |
Reset size of List and value for new elements. | |
void | setSize (const label) |
Reset size of List. | |
void | setSize (const label, const face &) |
Reset size of List and value for new elements. | |
void | append (const UList< face > &) |
Append a List at the end of this list. | |
void | append (const UIndirectList< face > &) |
Append a UIndirectList at the end of this list. | |
void | transfer (List< face > &) |
Transfer the contents of the argument List into this list. | |
void | transfer (DynamicList< face, SizeInc, SizeMult, SizeDiv > &) |
Transfer the contents of the argument List into this list. | |
void | transfer (SortableList< face > &) |
Transfer the contents of the argument List into this list. | |
face & | newElmt (const label) |
Return subscript-checked element of UList. | |
void | operator= (const UList< face > &) |
Assignment from UList operator. Takes linear time. | |
void | operator= (const List< face > &) |
Assignment operator. Takes linear time. | |
void | operator= (const SLList< face > &) |
Assignment from SLList operator. Takes linear time. | |
void | operator= (const IndirectList< face > &) |
Assignment from IndirectList operator. Takes linear time. | |
void | operator= (const UIndirectList< face > &) |
Assignment from UIndirectList operator. Takes linear time. | |
void | operator= (const BiIndirectList< face > &) |
Assignment from BiIndirectList operator. Takes linear time. | |
void | operator= (const face &) |
Assignment of all entries to the given value. | |
![]() | |
UList () | |
Null constructor. | |
UList (face *__restrict__ v, label size) | |
Construct from components. | |
label | fcIndex (const label i) const |
Return the forward circular index, i.e. the next index. | |
label | rcIndex (const label i) const |
Return the reverse circular index, i.e. the previous index. | |
label | byteSize () const |
Return the binary size in number of characters of the UList. | |
const face * | cdata () const |
Return a const pointer to the first data element,. | |
face * | data () |
Return a pointer to the first data element,. | |
void | checkStart (const label start) const |
Check start is within valid range (0 ... size-1). | |
void | checkSize (const label size) const |
Check size is within valid range (0 ... size). | |
void | checkIndex (const label i) const |
Check index i is within valid range (0 ... size-1). | |
void | writeEntry (Ostream &) const |
Write the UList as a dictionary entry. | |
void | writeEntry (const word &keyword, Ostream &) const |
Write the UList as a dictionary entry with keyword. | |
void | assign (const UList< face > &) |
Assign elements to those from UList. | |
face & | operator[] (const label) |
Return element of UList. | |
const face & | operator[] (const label) const |
Return element of constant UList. | |
operator const Foam::List< face > & () const | |
Allow cast to a const List<T>&. | |
iterator | begin () |
Return an iterator to begin traversing the UList. | |
const_iterator | begin () const |
Return const_iterator to begin traversing the constant UList. | |
iterator | end () |
Return an iterator to end traversing the UList. | |
const_iterator | end () const |
Return const_iterator to end traversing the constant UList. | |
const_iterator | cbegin () const |
Return const_iterator to begin traversing the constant UList. | |
const_iterator | cend () const |
Return const_iterator to end traversing the constant UList. | |
reverse_iterator | rbegin () |
Return reverse_iterator to begin reverse traversing the UList. | |
const_reverse_iterator | rbegin () const |
Return const_reverse_iterator to begin reverse traversing the UList. | |
reverse_iterator | rend () |
Return reverse_iterator to end reverse traversing the UList. | |
const_reverse_iterator | rend () const |
Return const_reverse_iterator to end reverse traversing the UList. | |
const_reverse_iterator | crbegin () const |
Return const_reverse_iterator to begin reverse traversing the UList. | |
const_reverse_iterator | crend () const |
Return const_reverse_iterator to end reverse traversing the UList. | |
label | max_size () const |
Return size of the largest possible UList. | |
bool | empty () const |
Return true if the UList is empty (ie, size() is zero). | |
void | swap (UList< face > &) |
Swap two ULists of the same type in constant time. | |
bool | operator== (const UList< face > &) const |
Equality operation on ULists of the same type. | |
bool | operator!= (const UList< face > &) const |
The opposite of the equality operation. Takes linear time. | |
bool | operator< (const UList< face > &) const |
Compare two ULists lexicographically. Takes linear time. | |
bool | operator> (const UList< face > &) const |
Compare two ULists lexicographically. Takes linear time. | |
bool | operator<= (const UList< face > &) const |
Return true if !(a > b). Takes linear time. | |
bool | operator>= (const UList< face > &) const |
Return true if !(a < b). Takes linear time. | |
![]() | |
surfaceFormatsCore () | |
Construct null. | |
virtual | ~surfaceFormatsCore () |
Additional Inherited Members | |
![]() | |
static autoPtr< sampledSurface > | New (const word &name, const polyMesh &, const dictionary &) |
Return a reference to the selected surface. | |
![]() | |
virtual void | clearGeom () const |
![]() | |
cuttingPlane (const plane &) | |
Construct plane description without cutting. | |
void | reCut (const primitiveMesh &, const UList< label > &cellIdLabels=UList< label >::null()) |
recut mesh with existing planeDesc, restricted to a list of cells | |
virtual void | remapFaces (const UList< label > &faceMap) |
remap action on triangulation or cleanup | |
![]() | |
void | transcribe (MeshedSurface< face > &) |
Transfer points/zones and transcribe face -> triFace. | |
void | checkZones () |
basic sanity check on zones | |
pointField & | storedPoints () |
Non-const access to global points. | |
List< face > & | storedFaces () |
Non-const access to the faces. | |
surfZoneList & | storedZones () |
Non-const access to the zones. | |
void | sortFacesAndStore (const Xfer< List< face > > &unsortedFaces, const Xfer< List< label > > &zoneIds, const bool sorted) |
sort faces by zones and store sorted faces |
sampledPlane | ( | const word & | name, |
const polyMesh & | mesh, | ||
const plane & | planeDesc, | ||
const word & | zoneName = word::null |
||
) |
Construct from components.
Definition at line 44 of file sampledPlane.C.
References polyMesh::cellZones(), Foam::endl(), ZoneMesh< ZoneType, MeshType >::findZoneID(), and Foam::Info.
sampledPlane | ( | const word & | name, |
const polyMesh & | mesh, | ||
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 68 of file sampledPlane.C.
References polyMesh::cellZones(), Foam::endl(), ZoneMesh< ZoneType, MeshType >::findZoneID(), dictionary::found(), coordinateSystem::globalPosition(), coordinateSystem::globalVector(), Foam::Info, and dictionary::readIfPresent().
|
virtual |
Definition at line 108 of file sampledPlane.C.
TypeName | ( | "sampledPlane" | ) |
Runtime type information.
|
virtual |
Does the surface need an update?
Implements sampledSurface.
Definition at line 114 of file sampledPlane.C.
|
virtual |
Mark the surface as needing an update.
May also free up unneeded data. Return false if surface was already marked as expired.
Implements sampledSurface.
Definition at line 120 of file sampledPlane.C.
References sampledSurface::clearGeom().
|
virtual |
Update the surface as required.
Do nothing (and return false) if no update was needed
Implements sampledSurface.
Definition at line 135 of file sampledPlane.C.
References polyMesh::cellZones(), sampledSurface::clearGeom(), Foam::endl(), ZoneMesh< ZoneType, MeshType >::findZoneID(), mesh, and Foam::Pout.
|
inlinevirtual |
|
inlinevirtual |
|
inline |
For every face original cell in mesh.
Definition at line 140 of file sampledPlane.H.
References cuttingPlane::cutCells().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
sample field on surface
Implements sampledSurface.
|
virtual |
|
virtual |
interpolate field on surface
Implements sampledSurface.
Definition at line 222 of file sampledPlane.C.
|
virtual |
interpolate field on surface
Implements sampledSurface.
Definition at line 232 of file sampledPlane.C.
|
virtual |
interpolate field on surface
Implements sampledSurface.
Definition at line 241 of file sampledPlane.C.
|
virtual |
interpolate field on surface
Implements sampledSurface.
Definition at line 251 of file sampledPlane.C.
|
virtual |
interpolate field on surface
Implements sampledSurface.
Definition at line 261 of file sampledPlane.C.
|
virtual |
Write.
Reimplemented from sampledSurface.
Definition at line 269 of file sampledPlane.C.
References Foam::name(), points, and List< T >::size().