Public Types | Public Member Functions | List of all members
cellClassification Class Reference

'Cuts' a mesh with a surface. More...

Inheritance diagram for cellClassification:
Inheritance graph
[legend]
Collaboration diagram for cellClassification:
Collaboration graph
[legend]

Public Types

enum  cType { NOTSET, INSIDE, OUTSIDE, CUT }
 
enum  pointStatus { UNSET, MESH, NONMESH, MIXED }
 
- Public Types inherited from List
typedef SubList< TsubList
 

Public Member Functions

 ClassName ("cellClassification")
 
 cellClassification (const polyMesh &mesh, const meshSearch &meshQuery, const triSurfaceSearch &surfQuery, const pointField &outsidePoints)
 
 cellClassification (const polyMesh &mesh, const labelList &cellType)
 
 cellClassification (const cellClassification &)
 
const polyMeshmesh () const
 
label trimCutCells (const label nLayers, const label meshType, const label fillType)
 
label growSurface (const label meshType, const label fillType)
 
label fillHangingCells (const label meshType, const label fillType, const label maxIter)
 
label fillRegionEdges (const label meshType, const label fillType, const label maxIter)
 
label fillRegionPoints (const label meshType, const label fillType, const label maxIter)
 
void writeStats (Ostream &os) const
 
void operator= (const cellClassification &)
 
- Public Member Functions inherited from List
constexpr List () noexcept
 
 List (const label len)
 
 List (const label len, const T &val)
 
 List (const label len, const Foam::zero)
 
 List (const Foam::one, const T &val)
 
 List (const Foam::one, T &&val)
 
 List (const Foam::one, const Foam::zero)
 
 List (const List< T > &a)
 
 List (const UList< T > &a)
 
 List (List< T > &a, bool reuse)
 
 List (const UList< T > &list, const labelUList &indices)
 
template<unsigned N>
 List (const UList< T > &list, const FixedList< label, N > &indices)
 
template<unsigned N>
 List (const FixedList< T, N > &list)
 
 List (const PtrList< T > &list)
 
 List (const SLList< T > &list)
 
template<class Addr >
 List (const IndirectListBase< T, Addr > &list)
 
 List (std::initializer_list< T > list)
 
 List (List< T > &&list)
 
template<int SizeMin>
 List (DynamicList< T, SizeMin > &&list)
 
 List (SortableList< T > &&list)
 
 List (SLList< T > &&list)
 
 List (Istream &is)
 
autoPtr< List< T > > clone () const
 
 ~List ()
 
void clear ()
 
void resize (const label len)
 
void resize (const label len, const T &val)
 
void resize_nocopy (const label len)
 
void setSize (const label n)
 
void setSize (const label n, const T &val)
 
void append (const T &val)
 
void append (T &&val)
 
void append (const UList< T > &list)
 
template<class Addr >
void append (const IndirectListBase< T, Addr > &list)
 
label appendUniq (const T &val)
 
void transfer (List< T > &list)
 
template<int SizeMin>
void transfer (DynamicList< T, SizeMin > &list)
 
void transfer (SortableList< T > &list)
 
TnewElmt (const label i)
 
void operator= (const UList< T > &a)
 
void operator= (const List< T > &list)
 
void operator= (const SLList< T > &list)
 
template<class Addr >
void operator= (const IndirectListBase< T, Addr > &list)
 
template<unsigned N>
void operator= (const FixedList< T, N > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
void operator= (List< T > &&list)
 
template<int SizeMin>
void operator= (DynamicList< T, SizeMin > &&list)
 
void operator= (SortableList< T > &&list)
 
void operator= (SLList< T > &&list)
 
IstreamreadList (Istream &is)
 
void shallowCopy (const UList< T > &)=delete
 
template<class TypeT = T>
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set (const label i, bool val=true)
 
template<class T >
 List (const label len)
 
template<class T >
 List (const label len, const T &val)
 
template<class T >
 List (const label len, const Foam::zero)
 
template<class T >
 List (const Foam::one, const T &val)
 
template<class T >
 List (const Foam::one, T &&val)
 
template<class T >
 List (const Foam::one, const Foam::zero)
 
template<class T >
 List (const UList< T > &a)
 
template<class T >
 List (const List< T > &a)
 
template<class T >
 List (List< T > &a, bool reuse)
 
template<class T >
 List (const UList< T > &list, const labelUList &indices)
 
template<class T >
 List (const PtrList< T > &list)
 
template<class T >
 List (const SLList< T > &list)
 
template<class T >
 List (std::initializer_list< T > list)
 
template<class T >
 List (List< T > &&list)
 
template<class T >
 List (SortableList< T > &&list)
 
template<class T >
 List (SLList< T > &&list)
 
template<class T >
void transfer (List< T > &list)
 
template<class T >
void transfer (SortableList< T > &list)
 
template<class T >
void operator= (const UList< T > &a)
 
template<class T >
void operator= (const List< T > &list)
 
template<class T >
void operator= (const SLList< T > &list)
 
template<class T >
void operator= (std::initializer_list< T > list)
 
template<class T >
void operator= (List< T > &&list)
 
template<class T >
void operator= (SortableList< T > &&list)
 
template<class T >
void operator= (SLList< T > &&list)
 
IstreamreadList (Istream &is)
 
template<class T >
constexpr List () noexcept
 
void resize (const label newLen)
 
template<class T >
void append (const T &val)
 
template<class T >
void append (T &&val)
 
template<class T >
void append (const UList< T > &list)
 
template<class T >
void operator= (const T &val)
 
template<class T >
void operator= (const Foam::zero)
 
template<class T >
 List (Istream &is)
 
IstreamreadList (Istream &is)
 

Additional Inherited Members

- Static Public Member Functions inherited from List
static const List< T > & null ()
 

Detailed Description

'Cuts' a mesh with a surface.

Divides cells into three types

Used in various meshing programs.

Has various utility functions to deal with 'features' on this level where the mesh still has all inside and outside cells.

Concepts

Seen from above:

Ok:
     A | A
       |
     --+---
       |
     B | B

Not ok:
     A | B
       |
    ---+---
       |
     B | A

because this latter situation would cause the surface after subsetting type A or B to be multiply connected across this edge. And also when snapping the edge end points to the surface it might cause some twisted faces if the surface is normal to the edge (and smoothing the surface would not help since the points on the edge would be 'pulled' from two different sides)

Source files

Definition at line 113 of file cellClassification.H.

Member Enumeration Documentation

◆ cType

enum cType
Enumerator
NOTSET 
INSIDE 
OUTSIDE 
CUT 

Definition at line 123 of file cellClassification.H.

◆ pointStatus

Enumerator
UNSET 
MESH 
NONMESH 
MIXED 

Definition at line 134 of file cellClassification.H.

Constructor & Destructor Documentation

◆ cellClassification() [1/3]

cellClassification ( const polyMesh mesh,
const meshSearch meshQuery,
const triSurfaceSearch surfQuery,
const pointField outsidePoints 
)

Definition at line 475 of file cellClassification.C.

◆ cellClassification() [2/3]

cellClassification ( const polyMesh mesh,
const labelList cellType 
)

Definition at line 496 of file cellClassification.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ cellClassification() [3/3]

Definition at line 514 of file cellClassification.C.

Member Function Documentation

◆ ClassName()

ClassName ( "cellClassification"  )

◆ mesh()

const polyMesh& mesh ( ) const
inline

Definition at line 216 of file cellClassification.H.

◆ trimCutCells()

Foam::label trimCutCells ( const label  nLayers,
const label  meshType,
const label  fillType 
)

Definition at line 527 of file cellClassification.C.

References cellClassification::CUT, forAll, and Foam::type().

Here is the call graph for this function:

◆ growSurface()

Foam::label growSurface ( const label  meshType,
const label  fillType 
)

Definition at line 613 of file cellClassification.C.

References forAll, and Foam::type().

Here is the call graph for this function:

◆ fillHangingCells()

Foam::label fillHangingCells ( const label  meshType,
const label  fillType,
const label  maxIter 
)

Definition at line 670 of file cellClassification.C.

References Foam::endl(), forAll, and Foam::Pout.

Here is the call graph for this function:

◆ fillRegionEdges()

Foam::label fillRegionEdges ( const label  meshType,
const label  fillType,
const label  maxIter 
)

Definition at line 727 of file cellClassification.C.

References PrimitivePatch< FaceList, PointField >::edgeFaces(), Foam::endl(), forAll, and Foam::Pout.

Here is the call graph for this function:

◆ fillRegionPoints()

Foam::label fillRegionPoints ( const label  meshType,
const label  fillType,
const label  maxIter 
)

◆ writeStats()

void writeStats ( Ostream os) const

Definition at line 864 of file cellClassification.C.

References Foam::BitOps::count(), Foam::endl(), and os().

Here is the call graph for this function:

◆ operator=()

void operator= ( const cellClassification rhs)

Definition at line 876 of file cellClassification.C.

References List::operator=().

Here is the call graph for this function:

The documentation for this class was generated from the following files: