Container for data on surfaces used for surface-driven refinement. Contains all the data about the level of refinement needed per surface. More...
#include <autoMesh/refinementSurfaces.H>
Container for data on surfaces used for surface-driven refinement. Contains all the data about the level of refinement needed per surface.
Definition at line 58 of file refinementSurfaces.H.
Public Member Functions | |
refinementSurfaces (const searchableSurfaces &allGeometry, const PtrList< dictionary > &) | |
Construct from surfaces and dictionaries.
| |
refinementSurfaces (const searchableSurfaces &allGeometry, const dictionary &) | |
Construct from surfaces and dictionary.
| |
const searchableSurfaces & | geometry () const |
const labelList & | surfaces () const |
const wordList & | names () const |
Names of surfaces.
| |
const wordList & | faceZoneNames () const |
Per 'interface' surface : name of faceZone to put faces into.
| |
const wordList & | cellZoneNames () const |
Per 'interface' surface : name of cellZone to put cells into.
| |
labelList | getUnnamedSurfaces () const |
Get indices of unnamed surfaces (surfaces without faceZoneName)
| |
labelList | getNamedSurfaces () const |
Get indices of named surfaces (surfaces with faceZoneName)
| |
labelList | getClosedNamedSurfaces () const |
Get indices of closed named surfaces.
| |
const labelList & | regionOffset () const |
From local region number to global region number.
| |
const labelList & | minLevel () const |
From global region number to refinement level.
| |
const labelList & | maxLevel () const |
From global region number to refinement level.
| |
const scalarField & | perpendicularAngle () const |
From global region number to perpendicular angle.
| |
label | globalRegion (const label surfI, const label regionI) const |
From surface and region on surface to global region.
| |
label | minLevel (const label surfI, const label regionI) const |
Min level for surface and region on surface.
| |
label | maxLevel (const label surfI, const label regionI) const |
Max level for surface and region on surface.
| |
label | nRegions () const |
void | setMinLevelFields (const shellSurfaces &shells) |
Calculate minLevelFields.
| |
void | findHigherIntersection (const pointField &start, const pointField &end, const labelList ¤tLevel, labelList &surfaces, labelList &surfaceLevel) const |
Find intersection of edge. Return -1 or first surface.
| |
void | findAllHigherIntersections (const pointField &start, const pointField &end, const labelList ¤tLevel, List< vectorList > &surfaceNormal, labelListList &surfaceLevel) const |
Find all intersections of edge. Unsorted order.
| |
void | findNearestIntersection (const labelList &surfacesToTest, const pointField &start, const pointField &end, labelList &surface1, List< pointIndexHit > &hit1, labelList ®ion1, labelList &surface2, List< pointIndexHit > &hit2, labelList ®ion2) const |
Find intersection nearest to the endpoints. surface1,2 are.
| |
void | findAnyIntersection (const pointField &start, const pointField &end, labelList &surfaces, List< pointIndexHit > &) const |
Used for debugging only: find intersection of edge.
| |
void | findNearest (const labelList &surfacesToTest, const pointField &samples, const scalarField &nearestDistSqr, labelList &surfaces, List< pointIndexHit > &) const |
Find nearest point on surfaces.
| |
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.
| |
void | findInside (const labelList &surfacesToTest, const pointField &pt, labelList &insideSurfaces) const |
Detect if a point is 'inside' (closed) surfaces.
|
refinementSurfaces | ( | const searchableSurfaces & | allGeometry, |
const PtrList< dictionary > & | surfaceDicts | ||
) |
Construct from surfaces and dictionaries.
Definition at line 40 of file refinementSurfaces.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::findIndex(), forAll, forAllConstIter, dictionary::found(), dictionary::lookup(), Foam::max(), Foam::min(), readScalar, regionName, and PtrList< T >::size().
refinementSurfaces | ( | const searchableSurfaces & | allGeometry, |
const dictionary & | surfacesDict | ||
) |
Construct from surfaces and dictionary.
Definition at line 254 of file refinementSurfaces.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, forAllConstIter, dictionary::found(), dictionary::lookup(), searchableSurfaces::names(), readScalar, and dictionary::subDict().
const searchableSurfaces& geometry | ( | ) | const [inline]
|
Definition at line 127 of file refinementSurfaces.H.
const labelList& surfaces | ( | ) | const [inline]
|
Definition at line 132 of file refinementSurfaces.H.
Referenced by autoSnapDriver::calcNearestSurface(), and autoSnapDriver::repatchToSurface().
const wordList& names | ( | ) | const [inline]
|
Names of surfaces.
Definition at line 138 of file refinementSurfaces.H.
const wordList& faceZoneNames | ( | ) | const [inline]
|
Per 'interface' surface : name of faceZone to put faces into.
Definition at line 144 of file refinementSurfaces.H.
Referenced by meshRefinement::balance(), autoSnapDriver::calcNearestSurface(), and autoSnapDriver::repatchToSurface().
const wordList& cellZoneNames | ( | ) | const [inline]
|
Per 'interface' surface : name of cellZone to put cells into.
Definition at line 150 of file refinementSurfaces.H.
Foam::labelList getUnnamedSurfaces | ( | ) | const |
Get indices of unnamed surfaces (surfaces without faceZoneName)
Definition at line 438 of file refinementSurfaces.C.
References forAll, and List< T >::size().
Foam::labelList getNamedSurfaces | ( | ) | const |
Get indices of named surfaces (surfaces with faceZoneName)
Definition at line 457 of file refinementSurfaces.C.
References forAll.
Foam::labelList getClosedNamedSurfaces | ( | ) | const |
Get indices of closed named surfaces.
Definition at line 476 of file refinementSurfaces.C.
References forAll, List< T >::setSize(), and List< T >::size().
const labelList& regionOffset | ( | ) | const [inline]
|
From local region number to global region number.
Definition at line 165 of file refinementSurfaces.H.
const labelList& minLevel | ( | ) | const [inline]
|
From global region number to refinement level.
Definition at line 171 of file refinementSurfaces.H.
const labelList& maxLevel | ( | ) | const [inline]
|
From global region number to refinement level.
Definition at line 177 of file refinementSurfaces.H.
const scalarField& perpendicularAngle | ( | ) | const [inline]
|
From global region number to perpendicular angle.
Definition at line 183 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 192 of file refinementSurfaces.H.
Referenced by refinementSurfaces::maxLevel(), refinementSurfaces::minLevel(), and autoSnapDriver::repatchToSurface().
label minLevel | ( | const label | surfI, |
const label | regionI | ||
) | const [inline]
|
Min level for surface and region on surface.
Definition at line 198 of file refinementSurfaces.H.
References refinementSurfaces::globalRegion().
label maxLevel | ( | const label | surfI, |
const label | regionI | ||
) | const [inline]
|
Max level for surface and region on surface.
Definition at line 204 of file refinementSurfaces.H.
References refinementSurfaces::globalRegion().
label nRegions | ( | ) | const [inline]
|
Definition at line 209 of file refinementSurfaces.H.
References List< T >::size().
void setMinLevelFields | ( | const shellSurfaces & | shells ) |
Calculate minLevelFields.
Definition at line 556 of file refinementSurfaces.C.
References searchableSurface::coordinates(), searchableSurface::findNearest(), forAll, searchableSurface::getRegion(), searchableSurface::globalSize(), Foam::max(), searchableSurface::regions(), List< T >::size(), and Foam::sqr().
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 621 of file refinementSurfaces.C.
References searchableSurface::findLineAny(), forAll, searchableSurface::getField(), Foam::identity(), searchableSurface::regions(), Foam::returnReduce(), List< T >::setSize(), and List< T >::size().
void findAllHigherIntersections | ( | const pointField & | start, |
const pointField & | end, | ||
const labelList & | currentLevel, | ||
List< vectorList > & | surfaceNormal, | ||
labelListList & | surfaceLevel | ||
) | const |
Find all intersections of edge. Unsorted order.
Definition at line 765 of file refinementSurfaces.C.
References List< T >::clear(), forAll, List< T >::setSize(), and List< T >::size().
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 849 of file refinementSurfaces.C.
References forAll, List< T >::setSize(), and List< T >::size().
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 975 of file refinementSurfaces.C.
References searchableSurfacesQueries::findAnyIntersection().
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 996 of file refinementSurfaces.C.
References searchableSurfacesQueries::findNearest(), and forAll.
Referenced by autoSnapDriver::calcNearestSurface().
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 1029 of file refinementSurfaces.C.
References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, List< T >::setSize(), and List< T >::size().
Referenced by autoSnapDriver::repatchToSurface().
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 1137 of file refinementSurfaces.C.
References forAll, searchableSurface::INSIDE, searchableSurface::OUTSIDE, List< T >::setSize(), and List< T >::size().