Public Member Functions | Private Member Functions | Private Attributes
triSurface2DCheck Class Reference
Collaboration diagram for triSurface2DCheck:
Collaboration graph
[legend]

Public Member Functions

 triSurface2DCheck (const triSurf &surface)
 Construct from octree. More...
 
 ~triSurface2DCheck ()
 
bool is2DSurface () const
 checks if the surface is a 2D triangulation More...
 
void createSubsets ()
 create subset containing invalid facets More...
 

Private Member Functions

void createCovarianceMatrix ()
 create covariance matrix More...
 
 triSurface2DCheck (const triSurface2DCheck &)
 Disallow default bitwise copy construct. More...
 
void operator= (const triSurface2DCheck &)
 Disallow default bitwise assignment. More...
 

Private Attributes

const triSurfsurf_
 reference to triSurf More...
 
symmTensor covarianceMatrix_
 covariance matrix More...
 

Detailed Description

Definition at line 49 of file triSurface2DCheck.H.

Constructor & Destructor Documentation

◆ triSurface2DCheck() [1/2]

triSurface2DCheck ( const triSurface2DCheck )
private

Disallow default bitwise copy construct.

◆ triSurface2DCheck() [2/2]

triSurface2DCheck ( const triSurf surface)

Construct from octree.

Definition at line 57 of file triSurface2DCheck.C.

References triSurface2DCheck::createCovarianceMatrix().

Here is the call graph for this function:

◆ ~triSurface2DCheck()

Definition at line 65 of file triSurface2DCheck.C.

Member Function Documentation

◆ createCovarianceMatrix()

void createCovarianceMatrix ( )
private

create covariance matrix

find the normal vector of the best-fitting plane

Definition at line 39 of file triSurface2DCheck.C.

References triSurface2DCheck::covarianceMatrix_, triSurfAddressing::facetNormals(), forAll, Foam::mag(), triSurface2DCheck::surf_, Foam::symm(), and SymmTensor< scalar >::zero.

Referenced by triSurface2DCheck::triSurface2DCheck().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

void operator= ( const triSurface2DCheck )
private

Disallow default bitwise assignment.

◆ is2DSurface()

bool is2DSurface ( ) const

checks if the surface is a 2D triangulation

the smallest eigenvalue must be zero in case all face normals lie in a plane

calculate the plane normal as a cross prduct of the two eigenVectors spanning the plane

check if the plane is in the x-y plane of the coordinate system

this could be a 2D surface, but it is not in the x-y plane

check if the points in the 2D surface have uniform z coordinates

Definition at line 70 of file triSurface2DCheck.C.

References triSurface2DCheck::covarianceMatrix_, Foam::eigenValues(), Foam::eigenVector(), Foam::endl(), forAll, Foam::Info, Foam::mag(), boundBox::max(), boundBox::min(), n, p, points, triSurfPoints::points(), triSurface2DCheck::surf_, WarningIn, and Vector< Cmpt >::z().

Referenced by cartesian2DMeshGenerator::cartesian2DMeshGenerator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createSubsets()

void createSubsets ( )

create subset containing invalid facets

create a subset containing faces having non-zero z coordinate of the normals

create a subset containing points which are not in z-min and z-max planes

Definition at line 130 of file triSurface2DCheck.C.

References triSurfFacets::addFacetSubset(), triSurfFacets::addFacetToSubset(), triSurfPoints::addPointSubset(), triSurfPoints::addPointToSubset(), triSurfAddressing::facetNormals(), forAll, Foam::mag(), boundBox::max(), boundBox::min(), p, points, triSurfPoints::points(), triSurface2DCheck::surf_, and Vector< Cmpt >::z().

Referenced by cartesian2DMeshGenerator::cartesian2DMeshGenerator().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ surf_

const triSurf& surf_
private

◆ covarianceMatrix_

symmTensor covarianceMatrix_
private

covariance matrix

Definition at line 56 of file triSurface2DCheck.H.

Referenced by triSurface2DCheck::createCovarianceMatrix(), and triSurface2DCheck::is2DSurface().


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