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, const bool dryRun) | |
| Construct from surfaces and dictionary. More... | |
| refinementSurfaces (const searchableSurfaces &allGeometry, const labelList &surfaces, const wordList &names, const PtrList< surfaceZonesInfo > &surfZones, const labelList ®ionOffset, const labelList &minLevel, const labelList &maxLevel, const labelList &gapLevel, const scalarField &perpendicularAngle, PtrList< dictionary > &patchInfo, const bool dryRun) | |
| Construct from components. More... | |
| const searchableSurfaces & | geometry () const |
| const labelList & | surfaces () const |
| const wordList & | names () const |
| Names of surfaces. More... | |
| const PtrList< surfaceZonesInfo > & | surfZones () const |
| const labelList & | regionOffset () const |
| From surface to starting global region. More... | |
| const labelList & | minLevel () const |
| From global region number to refinement level. More... | |
| const labelList & | maxLevel () const |
| From global region number to refinement level. More... | |
| const labelList & | gapLevel () const |
| From global region number to small gap refinement level. More... | |
| const labelList & | blockLevel () const |
| From global region number to cell level at which blockage detection is applied. More... | |
| const labelList & | leakLevel () const |
| From global region number to cell level at which leakage detection is applied. labelMax if not set. More... | |
| const List< FixedList< label, 3 > > & | extendedGapLevel () const |
| From global region number to specification of gap and its. More... | |
| const List< volumeType > & | extendedGapMode () const |
| From global region number to side of surface to detect. More... | |
| const boolList & | gapSelf () const |
| From global region number to whether to detect gaps to same. More... | |
| const List< FixedList< label, 4 > > & | extendedCurvatureLevel () const |
| From global region number to specification of curvature. More... | |
| const scalarField & | perpendicularAngle () const |
| From global region number to perpendicular angle. More... | |
| const PtrList< dictionary > & | patchInfo () const |
| From global region number to patch type. More... | |
| const boolList & | addBufferLayers () const |
| From global region number to whether to add buffer layers. More... | |
| label | globalRegion (const label surfI, const label regionI) const |
| From surface and region on surface to global region. More... | |
| labelPair | whichSurface (const label globalRegionI) const |
| From global region to surface + 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 |
| labelList | maxGapLevel () const |
| Per surface the maximum extendedGapLevel over all its regions. More... | |
| labelList | maxCurvatureLevel () const |
| Per surface the maximum curvatureLevel over all its regions. More... | |
| void | setMinLevelFields (const shellSurfaces &shells) |
| Calculate minLevelFields according to both surface- and. More... | |
| void | setCurvatureMinLevelFields (const scalar cosAngle, const scalar level0EdgeLength) |
| Update minLevelFields according to (triSurface-only) curvature. More... | |
| void | findHigherIntersection (const shellSurfaces &shells, const pointField &start, const pointField &end, const labelList ¤tLevel, labelList &surfaces, labelList &surfaceLevel) const |
| Find intersection of edge. Return -1 or first surface. More... | |
| void | findAllIntersections (const pointField &start, const pointField &end, const labelList ¤tLevel, const labelList &globalMinLevel, const labelList &globalMaxLevel, List< vectorList > &surfaceNormal, labelListList &surfaceLevel) const |
| Find all intersections of edge with any surface with applicable. More... | |
| void | findAllIntersections (const pointField &start, const pointField &end, const labelList ¤tLevel, const labelList &globalMinLevel, const labelList &globalMaxLevel, List< pointList > &surfaceLocation, List< vectorList > &surfaceNormal, labelListList &surfaceLevel) const |
| Find all intersections of edge with any surface with applicable. More... | |
| 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. More... | |
| void | findNearestIntersection (const labelList &surfacesToTest, const pointField &start, const pointField &end, labelList &surface1, List< pointIndexHit > &hit1, labelList ®ion1, vectorField &normal1, labelList &surface2, List< pointIndexHit > &hit2, labelList ®ion2, vectorField &normal2) const |
| findNearestIntersection but also get normals More... | |
| void | findNearestIntersection (const pointField &start, const pointField &end, labelList &surfaces, vectorField &normal) const |
| Find nearest (to start only) intersection of edge. More... | |
| void | findNearestIntersection (const pointField &start, const pointField &end, labelList &surfaces, labelList ®ions, List< pointIndexHit > &, vectorField &normal) const |
| Find nearest (to start only) intersection of edge. More... | |
| void | findNearestIntersection (const pointField &start, const pointField &end, labelList &surfaces, List< pointIndexHit > &, vectorField &normal) const |
| Find nearest (to start only) intersection of edge. 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 | findNearest (const labelList &surfacesToTest, const labelListList ®ions, const pointField &samples, const scalarField &nearestDistSqr, labelList &hitSurface, List< pointIndexHit > &hitInfo) const |
| Find nearest point on selected regions of surfaces. More... | |
| void | findNearestRegion (const labelList &surfacesToTest, const labelListList ®ions, const pointField &samples, const scalarField &nearestDistSqr, labelList &hitSurface, List< pointIndexHit > &hitInfo, labelList &hitRegion, vectorField &hitNormal) const |
| Find nearest point on selected regions of surfaces. More... | |
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 59 of file refinementSurfaces.H.
| refinementSurfaces | ( | const searchableSurfaces & | allGeometry, |
| const dictionary & | surfacesDict, | ||
| const label | gapLevelIncrement, | ||
| const bool | dryRun | ||
| ) |
Construct from surfaces and dictionary.
Definition at line 150 of file refinementSurfaces.C.
References dictionary::clone(), dict, entry::dict(), Foam::endl(), ILList< LListBase, T >::erase(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::findEntry(), forAll, forAllConstIters(), dictionary::found(), dictionary::get(), dictionary::getOrDefault(), IOWarningInFunction, entry::keyword(), Foam::labelMax, volumeType::MIXED, dictionary::readIfPresent(), keyType::REGEX, regionNames, s, PtrList< T >::set(), List< T >::set(), dictionary::set(), volumeType::str(), dictionary::subDict(), Foam::fieldTypes::surface, dictionary::toc(), volumeType::UNKNOWN, and Foam::Zero.

| 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, | ||
| const bool | dryRun | ||
| ) |
Construct from components.
Definition at line 671 of file refinementSurfaces.C.
References forAll, and PtrList< T >::set().

|
inline |
Definition at line 238 of file refinementSurfaces.H.
Referenced by snappySnapDriver::calcNearestSurface().

|
inline |
Definition at line 243 of file refinementSurfaces.H.
Referenced by snappySnapDriver::calcNearestSurface(), snappySnapDriver::detectNearSurfaces(), and snappySnapDriver::repatchToSurface().

|
inline |
Names of surfaces.
Definition at line 251 of file refinementSurfaces.H.
|
inline |
Definition at line 256 of file refinementSurfaces.H.
Referenced by snappySnapDriver::calcNearestSurface(), snappySnapDriver::detectNearSurfaces(), and snappySnapDriver::repatchToSurface().

|
inline |
From surface to starting global region.
Definition at line 264 of file refinementSurfaces.H.
|
inline |
From global region number to refinement level.
Definition at line 272 of file refinementSurfaces.H.
|
inline |
From global region number to refinement level.
Definition at line 280 of file refinementSurfaces.H.
|
inline |
From global region number to small gap refinement level.
Definition at line 288 of file refinementSurfaces.H.
|
inline |
From global region number to cell level at which blockage detection is applied.
Definition at line 297 of file refinementSurfaces.H.
|
inline |
From global region number to cell level at which leakage detection is applied. labelMax if not set.
Definition at line 306 of file refinementSurfaces.H.
From global region number to specification of gap and its.
refinement: 3 labels specifying
Definition at line 320 of file refinementSurfaces.H.
|
inline |
From global region number to side of surface to detect.
Definition at line 328 of file refinementSurfaces.H.
|
inline |
From global region number to whether to detect gaps to same.
surface (in gap refinement)
Definition at line 338 of file refinementSurfaces.H.
From global region number to specification of curvature.
refinement: 4 labels specifying
Definition at line 354 of file refinementSurfaces.H.
|
inline |
From global region number to perpendicular angle.
Definition at line 362 of file refinementSurfaces.H.
|
inline |
From global region number to patch type.
Definition at line 370 of file refinementSurfaces.H.
|
inline |
From global region number to whether to add buffer layers.
when snapping
Definition at line 380 of file refinementSurfaces.H.
|
inline |
From surface and region on surface to global region.
Definition at line 391 of file refinementSurfaces.H.
Referenced by snappySnapDriver::calcNearestSurface(), refinementSurfaces::maxLevel(), refinementSurfaces::minLevel(), and snappySnapDriver::repatchToSurface().

| Foam::labelPair whichSurface | ( | const label | globalRegionI | ) | const |
From global region to surface + region.
Definition at line 711 of file refinementSurfaces.C.
|
inline |
Min level for surface and region on surface.
Definition at line 404 of file refinementSurfaces.H.
References refinementSurfaces::globalRegion().

|
inline |
Max level for surface and region on surface.
Definition at line 412 of file refinementSurfaces.H.
References refinementSurfaces::globalRegion().

|
inline |
Definition at line 417 of file refinementSurfaces.H.
References UList< T >::size().

| Foam::labelList maxGapLevel | ( | ) | const |
Per surface the maximum extendedGapLevel over all its regions.
Definition at line 776 of file refinementSurfaces.C.
References forAll, Foam::max(), regionNames, and Foam::Zero.

| Foam::labelList maxCurvatureLevel | ( | ) | const |
Per surface the maximum curvatureLevel over all its regions.
Definition at line 795 of file refinementSurfaces.C.
References forAll, Foam::max(), regionNames, and Foam::Zero.

| void setMinLevelFields | ( | const shellSurfaces & | shells | ) |
Calculate minLevelFields according to both surface- and.
shell-based levels
Definition at line 817 of file refinementSurfaces.C.
References searchableSurface::boundingSpheres(), Foam::endl(), searchableSurface::findNearest(), forAll, searchableSurface::getRegion(), searchableSurface::globalSize(), Foam::Info, Foam::labelMax, Foam::max(), Foam::min(), IOobject::name(), points, PrimitivePatch< FaceList, PointField >::points(), Foam::returnReduce(), setField(), UList< T >::size(), and Foam::Zero.

| void setCurvatureMinLevelFields | ( | const scalar | cosAngle, |
| const scalar | level0EdgeLength | ||
| ) |
Update minLevelFields according to (triSurface-only) curvature.
?If locally have a cached field override the
surface-based level ignore any curvature? if (minLevelField[i] > surfMin[i]) { // Ignore curvature } else if (surfMin[i] == surfMax[i]) { // Ignore curvature. Bypass calculation below. } else
Definition at line 952 of file refinementSurfaces.C.
References searchableSurface::boundingSpheres(), triSurfaceTools::curvatures(), f(), searchableSurface::findNearest(), forAll, searchableSurface::getField(), searchableSurface::getRegion(), Foam::max(), Foam::min(), Foam::constant::atomic::mp, points, setField(), UList< T >::size(), and Foam::Zero.

| void findHigherIntersection | ( | const shellSurfaces & | shells, |
| 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 1262 of file refinementSurfaces.C.
References Foam::SVG::end, searchableSurface::findLineAny(), forAll, searchableSurface::getRegion(), Foam::identity(), p0, Foam::returnReduceAnd(), List< T >::setSize(), and UList< T >::size().

| void findAllIntersections | ( | const pointField & | start, |
| const pointField & | end, | ||
| const labelList & | currentLevel, | ||
| const labelList & | globalMinLevel, | ||
| const labelList & | globalMaxLevel, | ||
| List< vectorList > & | surfaceNormal, | ||
| labelListList & | surfaceLevel | ||
| ) | const |
Find all intersections of edge with any surface with applicable.
min/max refinement level. Unsorted order.
Definition at line 1424 of file refinementSurfaces.C.
References List< T >::clear(), Foam::SVG::end, forAll, n, List< T >::setSize(), UList< T >::size(), and Foam::fieldTypes::surface.

| void findAllIntersections | ( | const pointField & | start, |
| const pointField & | end, | ||
| const labelList & | currentLevel, | ||
| const labelList & | globalMinLevel, | ||
| const labelList & | globalMaxLevel, | ||
| List< pointList > & | surfaceLocation, | ||
| List< vectorList > & | surfaceNormal, | ||
| labelListList & | surfaceLevel | ||
| ) | const |
Find all intersections of edge with any surface with applicable.
min/max refinement level. Unsorted order.
Definition at line 1515 of file refinementSurfaces.C.
References Foam::SVG::end, forAll, n, List< T >::setSize(), UList< T >::size(), and Foam::fieldTypes::surface.

| 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 1692 of file refinementSurfaces.C.
References Foam::SVG::end, forAll, List< T >::setSize(), UList< T >::size(), and Foam::fieldTypes::surface.
Referenced by snappySnapDriver::detectNearSurfaces().


| 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 1822 of file refinementSurfaces.C.
References Foam::SVG::end, searchableSurface::findLine(), forAll, searchableSurface::getNormal(), searchableSurface::getRegion(), List< T >::setSize(), UList< T >::size(), and Foam::Zero.

| void findNearestIntersection | ( | const pointField & | start, |
| const pointField & | end, | ||
| labelList & | surfaces, | ||
| vectorField & | normal | ||
| ) | const |
Find nearest (to start only) intersection of edge.
Definition at line 1945 of file refinementSurfaces.C.
References Foam::SVG::end, searchableSurface::findLine(), forAll, searchableSurface::getNormal(), List< T >::setSize(), UList< T >::size(), and Foam::Zero.

| void findNearestIntersection | ( | const pointField & | start, |
| const pointField & | end, | ||
| labelList & | surfaces, | ||
| labelList & | regions, | ||
| List< pointIndexHit > & | hitInfo1, | ||
| vectorField & | normal | ||
| ) | const |
Find nearest (to start only) intersection of edge.
Definition at line 1988 of file refinementSurfaces.C.
References Foam::SVG::end, searchableSurface::findLine(), forAll, searchableSurface::getNormal(), searchableSurface::getRegion(), List< T >::setSize(), UList< T >::size(), and Foam::Zero.

| void findNearestIntersection | ( | const pointField & | start, |
| const pointField & | end, | ||
| labelList & | surfaces, | ||
| List< pointIndexHit > & | hitInfo1, | ||
| vectorField & | normal | ||
| ) | const |
Find nearest (to start only) intersection of edge.
Definition at line 2041 of file refinementSurfaces.C.
References Foam::SVG::end, searchableSurface::findLine(), forAll, searchableSurface::getNormal(), List< T >::setSize(), UList< T >::size(), and Foam::Zero.

| 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 2091 of file refinementSurfaces.C.
References Foam::SVG::end, and 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 2112 of file refinementSurfaces.C.
References searchableSurfacesQueries::findNearest(), forAll, and samples().
Referenced by snappySnapDriver::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 2145 of file refinementSurfaces.C.
References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), List< T >::setSize(), and UList< T >::size().
Referenced by snappySnapDriver::calcNearestSurface(), and snappySnapDriver::repatchToSurface().


| 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 2208 of file refinementSurfaces.C.
References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), List< T >::setSize(), UList< T >::size(), and Foam::Zero.

| 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 2329 of file refinementSurfaces.C.
References surfaceZonesInfo::areaSelectionAlgoNames, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, surfaceZonesInfo::INSIDE, volumeType::INSIDE, surfaceZonesInfo::OUTSIDE, volumeType::OUTSIDE, List< T >::setSize(), UList< T >::size(), and Foam::fieldTypes::surface.

| void findNearest | ( | const labelList & | surfacesToTest, |
| const labelListList & | regions, | ||
| const pointField & | samples, | ||
| const scalarField & | nearestDistSqr, | ||
| labelList & | hitSurface, | ||
| List< pointIndexHit > & | hitInfo | ||
| ) | const |
Find nearest point on selected regions of surfaces.
Definition at line 2392 of file refinementSurfaces.C.
References searchableSurfacesQueries::findNearest(), forAll, and samples().

| void findNearestRegion | ( | const labelList & | surfacesToTest, |
| const labelListList & | regions, | ||
| const pointField & | samples, | ||
| const scalarField & | nearestDistSqr, | ||
| labelList & | hitSurface, | ||
| List< pointIndexHit > & | hitInfo, | ||
| labelList & | hitRegion, | ||
| vectorField & | hitNormal | ||
| ) | const |
Find nearest point on selected regions of surfaces.
Definition at line 2429 of file refinementSurfaces.C.
References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), List< T >::setSize(), UList< T >::size(), and Foam::Zero.
