Public Member Functions | List of all members
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...
 
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 shellSurfaces &shells)
 Calculate minLevelFields. 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...
 

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 ( const searchableSurfaces allGeometry,
const dictionary surfacesDict,
const label  gapLevelIncrement 
)
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 304 of file refinementSurfaces.C.

References forAll, PtrList< T >::set(), and refinementSurfaces::setMinLevelFields().

Here is the call graph for this function:

Member Function Documentation

const searchableSurfaces& geometry ( ) const
inline

Definition at line 136 of file refinementSurfaces.H.

Referenced by meshRefinement::zonify().

Here is the caller graph for this function:

const labelList& surfaces ( ) const
inline
const wordList& names ( ) const
inline

Names of surfaces.

Definition at line 147 of file refinementSurfaces.H.

Referenced by snappySnapDriver::doSnap(), meshRefinement::mergeBaffles(), and meshRefinement::zonify().

Here is the caller graph for this function:

const PtrList<surfaceZonesInfo>& surfZones ( ) const
inline
const labelList& regionOffset ( ) const
inline

From local region number to global region number.

Definition at line 158 of file refinementSurfaces.H.

const labelList& minLevel ( ) const
inline

From global region number to refinement level.

Definition at line 164 of file refinementSurfaces.H.

const labelList& maxLevel ( ) const
inline

From global region number to refinement level.

Definition at line 170 of file refinementSurfaces.H.

const labelList& gapLevel ( ) const
inline

From global region number to small gap refinement level.

Definition at line 176 of file refinementSurfaces.H.

const scalarField& perpendicularAngle ( ) const
inline

From global region number to perpendicular angle.

Definition at line 182 of file refinementSurfaces.H.

const PtrList<dictionary>& patchInfo ( ) const
inline

From global region number to patch type.

Definition at line 188 of file refinementSurfaces.H.

label globalRegion ( const label  surfI,
const label  regionI 
) const
inline

From surface and region on surface to global region.

Definition at line 197 of file refinementSurfaces.H.

Referenced by refinementSurfaces::maxLevel(), refinementSurfaces::minLevel(), listPlusEqOp< T >::operator()(), and snappySnapDriver::repatchToSurface().

Here is the caller graph for this function:

label minLevel ( const label  surfI,
const label  regionI 
) const
inline

Min 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:

label maxLevel ( const label  surfI,
const label  regionI 
) const
inline

Max level for surface and region on surface.

Definition at line 209 of file refinementSurfaces.H.

References refinementSurfaces::globalRegion().

Here is the call graph for this function:

label nRegions ( ) const
inline
void setMinLevelFields ( const shellSurfaces shells)
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 460 of file refinementSurfaces.C.

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

Referenced by refinementSurfaces::nRegions(), and refinementSurfaces::setMinLevelFields().

Here is the call graph for this function:

Here is the caller graph for this function:

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 604 of file refinementSurfaces.C.

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

Referenced by refinementSurfaces::findHigherIntersection(), and refinementSurfaces::nRegions().

Here is the call graph for this function:

Here is the caller graph for this function:

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 692 of file refinementSurfaces.C.

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

Here is the call graph for this function:

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 782 of file refinementSurfaces.C.

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

Referenced by meshRefinement::createZoneBaffles(), snappySnapDriver::detectNearSurfaces(), refinementSurfaces::findAllHigherIntersections(), refinementSurfaces::nRegions(), and meshRefinement::zonify().

Here is the call graph for this function:

Here is the caller graph for this function:

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 912 of file refinementSurfaces.C.

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

Here is the call graph for this function:

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 1035 of file refinementSurfaces.C.

References refinementSurfaces::findNearest().

Referenced by refinementSurfaces::findNearestIntersection(), and refinementSurfaces::nRegions().

Here is the call graph for this function:

Here is the caller graph for this function:

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 1056 of file refinementSurfaces.C.

References refinementSurfaces::findNearestRegion(), and forAll.

Referenced by snappySnapDriver::calcNearestSurface(), refinementSurfaces::findAnyIntersection(), and refinementSurfaces::nRegions().

Here is the call graph for this function:

Here is the caller graph for this function:

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 1089 of file refinementSurfaces.C.

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

Referenced by snappySnapDriver::calcNearestSurface(), refinementSurfaces::findNearest(), refinementSurfaces::nRegions(), listPlusEqOp< T >::operator()(), and snappySnapDriver::repatchToSurface().

Here is the call graph for this function:

Here is the caller graph for this function:

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 1152 of file refinementSurfaces.C.

References Foam::findIndices(), refinementSurfaces::findInside(), forAll, List< T >::setSize(), List< T >::size(), and Foam::Zero.

Here is the call graph for this function:

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

Detect if a point is 'inside' (closed) surfaces.

Returns -1 if not, returns first surface it is.

Definition at line 1273 of file refinementSurfaces.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, searchableSurface::getVolumeType(), searchableSurface::hasVolumeType(), IOobject::name(), List< T >::setSize(), and List< T >::size().

Referenced by refinementSurfaces::findNearestRegion(), meshRefinement::mergeBaffles(), and refinementSurfaces::nRegions().

Here is the call graph for this function:

Here is the caller graph for this function:


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