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 ®ionOffset, 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 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 local region number to global region number. 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 scalarField & | perpendicularAngle () 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 ¤tLevel, 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 ¤tLevel, 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 ¤tLevel, 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 ®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 | 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... | |
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 60 of file refinementSurfaces.H.
refinementSurfaces | ( | const searchableSurfaces & | allGeometry, |
const dictionary & | surfacesDict, | ||
const label | gapLevelIncrement | ||
) |
Construct from surfaces and dictionary.
Definition at line 39 of file refinementSurfaces.C.
References Foam::clone(), dictionary::clone(), dict, entry::dict(), Foam::endl(), ILList< LListBase, T >::erase(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, forAllConstIter(), dictionary::found(), IOWarningInFunction, entry::keyword(), dictionary::lookup(), dictionary::lookupEntryPtr(), dictionary::lookupOrDefault(), dictionary::readIfPresent(), readScalar, searchableSurface::regions(), PtrList< T >::set(), dictionary::subDict(), and dictionary::toc().
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().
|
delete |
Disallow default bitwise copy construction.
|
inline |
Definition at line 130 of file refinementSurfaces.H.
Referenced by meshRefinement::zonify().
|
inline |
Definition at line 135 of file refinementSurfaces.H.
Referenced by meshRefinement::createZoneBaffles(), snappySnapDriver::detectNearSurfaces(), snappySnapDriver::doSnap(), listPlusEqOp< T >::operator()(), snappySnapDriver::repatchToSurface(), and meshRefinement::zonify().
|
inline |
Names of surfaces.
Definition at line 141 of file refinementSurfaces.H.
Referenced by snappySnapDriver::doSnap(), meshRefinement::mergeBaffles(), and meshRefinement::zonify().
|
inline |
Definition at line 146 of file refinementSurfaces.H.
Referenced by meshRefinement::balance(), snappySnapDriver::calcNearestSurface(), meshRefinement::createZoneBaffles(), snappySnapDriver::detectNearSurfaces(), snappySnapDriver::doSnap(), meshRefinement::mergeBaffles(), listPlusEqOp< T >::operator()(), snappySnapDriver::repatchToSurface(), and meshRefinement::zonify().
|
inline |
From local region number to global region number.
Definition at line 152 of file refinementSurfaces.H.
|
inline |
From global region number to refinement level.
Definition at line 158 of file refinementSurfaces.H.
|
inline |
From global region number to refinement level.
Definition at line 164 of file refinementSurfaces.H.
|
inline |
From global region number to small gap refinement level.
Definition at line 170 of file refinementSurfaces.H.
|
inline |
From global region number to perpendicular angle.
Definition at line 176 of file refinementSurfaces.H.
|
inline |
From global region number to patch type.
Definition at line 182 of file refinementSurfaces.H.
From surface and region on surface to global region.
Definition at line 191 of file refinementSurfaces.H.
Referenced by refinementSurfaces::maxLevel(), refinementSurfaces::minLevel(), listPlusEqOp< T >::operator()(), and snappySnapDriver::repatchToSurface().
Min level for surface and region on surface.
Definition at line 197 of file refinementSurfaces.H.
References refinementSurfaces::globalRegion().
Max level for surface and region on surface.
Definition at line 203 of file refinementSurfaces.H.
References refinementSurfaces::globalRegion().
|
inline |
Definition at line 208 of file refinementSurfaces.H.
References refinementSurfaces::findAllHigherIntersections(), refinementSurfaces::findAnyIntersection(), refinementSurfaces::findHigherIntersection(), refinementSurfaces::findInside(), refinementSurfaces::findNearest(), refinementSurfaces::findNearestIntersection(), refinementSurfaces::findNearestRegion(), refinementSurfaces::operator=(), samples(), refinementSurfaces::setMinLevelFields(), and List< T >::size().
void setMinLevelFields | ( | const shellSurfaces & | shells | ) |
Calculate minLevelFields.
Definition at line 398 of file refinementSurfaces.C.
References searchableSurface::boundingSpheres(), refinementSurfaces::findHigherIntersection(), searchableSurface::findNearest(), forAll, searchableSurface::getRegion(), searchableSurface::globalSize(), Foam::max(), searchableSurface::regions(), setField(), and List< T >::size().
Referenced by refinementSurfaces::nRegions(), and refinementSurfaces::refinementSurfaces().
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().
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().
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().
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().
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.
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().
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().
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().
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.
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().
|
delete |
Disallow default bitwise assignment.
Referenced by refinementSurfaces::nRegions().