refinementSurfaces Class Reference

Container for data on surfaces used for surface-driven refinement. Contains all the data about the level of refinement needed per surface. More...

Public Member Functions

 refinementSurfaces (const searchableSurfaces &allGeometry, const dictionary &, const label gapLevelIncrement)
 Construct from surfaces and dictionary. More...
 
 refinementSurfaces (const searchableSurfaces &allGeometry, const labelList &surfaces, const wordList &names, const PtrList< surfaceZonesInfo > &surfZones, const labelList &regionOffset, const labelList &minLevel, const labelList &maxLevel, const labelList &gapLevel, const scalarField &perpendicularAngle, PtrList< dictionary > &patchInfo)
 Construct from components. More...
 
 refinementSurfaces (const refinementSurfaces &)=delete
 Disallow default bitwise copy construction. More...
 
const searchableSurfacesgeometry () const
 
const labelListsurfaces () const
 
const wordListnames () const
 Names of surfaces. More...
 
const PtrList< surfaceZonesInfo > & surfZones () const
 
const labelListregionOffset () const
 From local region number to global region number. More...
 
const labelListminLevel () const
 From global region number to refinement level. More...
 
const labelListmaxLevel () const
 From global region number to refinement level. More...
 
const labelListgapLevel () const
 From global region number to small gap refinement level. More...
 
const scalarFieldperpendicularAngle () const
 From global region number to perpendicular angle. More...
 
const PtrList< dictionary > & patchInfo () const
 From global region number to patch type. More...
 
label globalRegion (const label surfi, const label regioni) const
 From surface and region on surface to global region. More...
 
label minLevel (const label surfi, const label regioni) const
 Min level for surface and region on surface. More...
 
label maxLevel (const label surfi, const label regioni) const
 Max level for surface and region on surface. More...
 
label nRegions () const
 
void setMinLevelFields (const refinementRegions &shells, const scalar level0EdgeLength, const bool extendedRefinementSpan)
 Calculate the refinement level for every element. More...
 
void findHigherIntersection (const pointField &start, const pointField &end, const labelList &currentLevel, labelList &surfaces, labelList &surfaceLevel) const
 Find intersection of edge. Return -1 or first surface. More...
 
void findAllHigherIntersections (const pointField &start, const pointField &end, const labelList &currentLevel, const labelList &globalRegionLevel, List< vectorList > &surfaceNormal, labelListList &surfaceLevel) const
 Find all intersections of edge. Unsorted order. More...
 
void findAllHigherIntersections (const pointField &start, const pointField &end, const labelList &currentLevel, const labelList &globalRegionLevel, List< pointList > &surfaceLocation, List< vectorList > &surfaceNormal, labelListList &surfaceLevel) const
 Find all intersections of edge. Unsorted order. More...
 
void findNearestIntersection (const labelList &surfacesToTest, const pointField &start, const pointField &end, labelList &surface1, List< pointIndexHit > &hit1, labelList &region1, labelList &surface2, List< pointIndexHit > &hit2, labelList &region2) const
 Find intersection nearest to the endpoints. surface1,2 are. More...
 
void findNearestIntersection (const labelList &surfacesToTest, const pointField &start, const pointField &end, labelList &surface1, List< pointIndexHit > &hit1, labelList &region1, vectorField &normal1, labelList &surface2, List< pointIndexHit > &hit2, labelList &region2, vectorField &normal2) const
 findNearestIntersection but also get normals More...
 
void findAnyIntersection (const pointField &start, const pointField &end, labelList &surfaces, List< pointIndexHit > &) const
 Used for debugging only: find intersection of edge. More...
 
void findNearest (const labelList &surfacesToTest, const pointField &samples, const scalarField &nearestDistSqr, labelList &surfaces, List< pointIndexHit > &) const
 Find nearest point on surfaces. More...
 
void findNearestRegion (const labelList &surfacesToTest, const pointField &samples, const scalarField &nearestDistSqr, labelList &hitSurface, labelList &hitRegion) const
 Find nearest point on surfaces. Return surface and region on. More...
 
void findNearestRegion (const labelList &surfacesToTest, const pointField &samples, const scalarField &nearestDistSqr, labelList &hitSurface, List< pointIndexHit > &hitinfo, labelList &hitRegion, vectorField &hitNormal) const
 Find nearest point on surfaces. Return surface, region and. More...
 
void findInside (const labelList &surfacesToTest, const pointField &pt, labelList &insideSurfaces) const
 Detect if a point is 'inside' (closed) surfaces. More...
 
void operator= (const refinementSurfaces &)=delete
 Disallow default bitwise assignment. More...
 

Detailed Description

Container for data on surfaces used for surface-driven refinement. Contains all the data about the level of refinement needed per surface.

Source files

Definition at line 60 of file refinementSurfaces.H.

Constructor & Destructor Documentation

◆ refinementSurfaces() [1/3]

◆ refinementSurfaces() [2/3]

refinementSurfaces ( const searchableSurfaces allGeometry,
const labelList surfaces,
const wordList names,
const PtrList< surfaceZonesInfo > &  surfZones,
const labelList regionOffset,
const labelList minLevel,
const labelList maxLevel,
const labelList gapLevel,
const scalarField perpendicularAngle,
PtrList< dictionary > &  patchInfo 
)

Construct from components.

Definition at line 300 of file refinementSurfaces.C.

References forAll, refinementSurfaces::patchInfo(), and Foam::constant::mathematical::pi().

Here is the call graph for this function:

◆ refinementSurfaces() [3/3]

refinementSurfaces ( const refinementSurfaces )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ geometry()

const searchableSurfaces& geometry ( ) const
inline

Definition at line 130 of file refinementSurfaces.H.

◆ surfaces()

const labelList& surfaces ( ) const
inline

Definition at line 135 of file refinementSurfaces.H.

Referenced by snappySnapDriver::detectNearSurfaces(), snappySnapDriver::doSnap(), and snappySnapDriver::repatchToSurface().

Here is the caller graph for this function:

◆ names()

const wordList& names ( ) const
inline

Names of surfaces.

Definition at line 141 of file refinementSurfaces.H.

Referenced by snappySnapDriver::doSnap().

Here is the caller graph for this function:

◆ surfZones()

const PtrList<surfaceZonesInfo>& surfZones ( ) const
inline

◆ regionOffset()

const labelList& regionOffset ( ) const
inline

From local region number to global region number.

Definition at line 152 of file refinementSurfaces.H.

◆ minLevel() [1/2]

const labelList& minLevel ( ) const
inline

From global region number to refinement level.

Definition at line 158 of file refinementSurfaces.H.

◆ maxLevel() [1/2]

const labelList& maxLevel ( ) const
inline

From global region number to refinement level.

Definition at line 164 of file refinementSurfaces.H.

◆ gapLevel()

const labelList& gapLevel ( ) const
inline

From global region number to small gap refinement level.

Definition at line 170 of file refinementSurfaces.H.

◆ perpendicularAngle()

const scalarField& perpendicularAngle ( ) const
inline

From global region number to perpendicular angle.

Definition at line 176 of file refinementSurfaces.H.

◆ patchInfo()

const PtrList<dictionary>& patchInfo ( ) const
inline

From global region number to patch type.

Definition at line 182 of file refinementSurfaces.H.

Referenced by refinementSurfaces::refinementSurfaces().

Here is the caller graph for this function:

◆ globalRegion()

label globalRegion ( const label  surfi,
const label  regioni 
) const
inline

From surface and region on surface to global region.

Definition at line 191 of file refinementSurfaces.H.

Referenced by refinementSurfaces::maxLevel(), refinementSurfaces::minLevel(), and snappySnapDriver::repatchToSurface().

Here is the caller graph for this function:

◆ minLevel() [2/2]

label minLevel ( const label  surfi,
const label  regioni 
) const
inline

Min level for surface and region on surface.

Definition at line 197 of file refinementSurfaces.H.

References refinementSurfaces::globalRegion().

Here is the call graph for this function:

◆ maxLevel() [2/2]

label maxLevel ( const label  surfi,
const label  regioni 
) const
inline

Max level for surface and region on surface.

Definition at line 203 of file refinementSurfaces.H.

References refinementSurfaces::globalRegion().

Here is the call graph for this function:

◆ nRegions()

label nRegions ( ) const
inline

Definition at line 208 of file refinementSurfaces.H.

References List< T >::size().

Referenced by refinementSurfaces::refinementSurfaces().

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

◆ setMinLevelFields()

void setMinLevelFields ( const refinementRegions shells,
const scalar  level0EdgeLength,
const bool  extendedRefinementSpan 
)

Calculate the refinement level for every element.

of the searchablesurface

Definition at line 337 of file refinementSurfaces.C.

References searchableSurface::boundingSpheres(), searchableSurface::findNearest(), forAll, searchableSurface::getRegion(), searchableSurface::globalSize(), Foam::max(), searchableSurface::regions(), setField(), and List< T >::size().

Referenced by meshRefinement::meshRefinement().

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

◆ findHigherIntersection()

void findHigherIntersection ( const pointField start,
const pointField end,
const labelList currentLevel,
labelList surfaces,
labelList surfaceLevel 
) const

Find intersection of edge. Return -1 or first surface.

with higher (than currentLevel) minlevel. Return surface number and level.

Definition at line 411 of file refinementSurfaces.C.

References searchableSurface::findLineAny(), forAll, searchableSurface::getField(), Foam::identityMap(), searchableSurface::regions(), Foam::returnReduce(), List< T >::setSize(), and List< T >::size().

Here is the call graph for this function:

◆ findAllHigherIntersections() [1/2]

void findAllHigherIntersections ( const pointField start,
const pointField end,
const labelList currentLevel,
const labelList globalRegionLevel,
List< vectorList > &  surfaceNormal,
labelListList surfaceLevel 
) const

Find all intersections of edge. Unsorted order.

Definition at line 554 of file refinementSurfaces.C.

References List< T >::clear(), searchableSurface::findLineAll(), forAll, searchableSurface::getNormal(), searchableSurface::getRegion(), n, List< T >::setSize(), and List< T >::size().

Here is the call graph for this function:

◆ findAllHigherIntersections() [2/2]

void findAllHigherIntersections ( const pointField start,
const pointField end,
const labelList currentLevel,
const labelList globalRegionLevel,
List< pointList > &  surfaceLocation,
List< vectorList > &  surfaceNormal,
labelListList surfaceLevel 
) const

Find all intersections of edge. Unsorted order.

Definition at line 642 of file refinementSurfaces.C.

References searchableSurface::findLineAll(), forAll, searchableSurface::getNormal(), searchableSurface::getRegion(), n, List< T >::setSize(), and List< T >::size().

Here is the call graph for this function:

◆ findNearestIntersection() [1/2]

void findNearestIntersection ( const labelList surfacesToTest,
const pointField start,
const pointField end,
labelList surface1,
List< pointIndexHit > &  hit1,
labelList region1,
labelList surface2,
List< pointIndexHit > &  hit2,
labelList region2 
) const

Find intersection nearest to the endpoints. surface1,2 are.

not indices into surfacesToTest but refinement surface indices. Returns surface, region on surface (so not global surface) and position on surface.

Definition at line 732 of file refinementSurfaces.C.

References searchableSurface::findLine(), forAll, searchableSurface::getRegion(), List< T >::setSize(), and List< T >::size().

Referenced by snappySnapDriver::detectNearSurfaces().

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

◆ findNearestIntersection() [2/2]

void findNearestIntersection ( const labelList surfacesToTest,
const pointField start,
const pointField end,
labelList surface1,
List< pointIndexHit > &  hit1,
labelList region1,
vectorField normal1,
labelList surface2,
List< pointIndexHit > &  hit2,
labelList region2,
vectorField normal2 
) const

findNearestIntersection but also get normals

Definition at line 862 of file refinementSurfaces.C.

References searchableSurface::findLine(), forAll, searchableSurface::getNormal(), searchableSurface::getRegion(), List< T >::setSize(), List< T >::size(), and Foam::Zero.

Here is the call graph for this function:

◆ findAnyIntersection()

void findAnyIntersection ( const pointField start,
const pointField end,
labelList surfaces,
List< pointIndexHit > &  hitinfo 
) const

Used for debugging only: find intersection of edge.

Definition at line 985 of file refinementSurfaces.C.

References searchableSurfacesQueries::findAnyIntersection().

Here is the call graph for this function:

◆ findNearest()

void findNearest ( const labelList surfacesToTest,
const pointField samples,
const scalarField nearestDistSqr,
labelList surfaces,
List< pointIndexHit > &  hitinfo 
) const

Find nearest point on surfaces.

Definition at line 1006 of file refinementSurfaces.C.

References searchableSurfacesQueries::findNearest(), forAll, and samples().

Referenced by snappySnapDriver::calcNearestSurface().

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

◆ findNearestRegion() [1/2]

void findNearestRegion ( const labelList surfacesToTest,
const pointField samples,
const scalarField nearestDistSqr,
labelList hitSurface,
labelList hitRegion 
) const

Find nearest point on surfaces. Return surface and region on.

surface (so not global surface)

Definition at line 1039 of file refinementSurfaces.C.

References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), List< T >::setSize(), and List< T >::size().

Referenced by snappySnapDriver::calcNearestSurface(), and snappySnapDriver::repatchToSurface().

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

◆ findNearestRegion() [2/2]

void findNearestRegion ( const labelList surfacesToTest,
const pointField samples,
const scalarField nearestDistSqr,
labelList hitSurface,
List< pointIndexHit > &  hitinfo,
labelList hitRegion,
vectorField hitNormal 
) const

Find nearest point on surfaces. Return surface, region and.

normal on surface (so not global surface)

Definition at line 1102 of file refinementSurfaces.C.

References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), List< T >::setSize(), List< T >::size(), and Foam::Zero.

Here is the call graph for this function:

◆ findInside()

void findInside ( const labelList surfacesToTest,
const pointField pt,
labelList insideSurfaces 
) const

◆ operator=()

void operator= ( const refinementSurfaces )
delete

Disallow default bitwise assignment.


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