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... | |
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 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 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 |
labelList | maxGapLevel () const |
Per surface the maximum extendedGapLevel over all its regions. More... | |
void | setMinLevelFields (const shellSurfaces &shells) |
Calculate minLevelFields. 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 | 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 | 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, 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... | |
Private Member Functions | |
labelList | findHigherLevel (const searchableSurface &geom, const shellSurfaces &shells, const List< pointIndexHit > &intersectionInfo, const labelList &surfaceLevel) const |
Given intersection results with geom detect local shell refinement. More... | |
refinementSurfaces (const refinementSurfaces &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const refinementSurfaces &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const searchableSurfaces & | allGeometry_ |
Reference to all geometry. More... | |
labelList | surfaces_ |
Indices of surfaces that are refinement ones. More... | |
wordList | names_ |
Surface name (word) More... | |
PtrList< surfaceZonesInfo > | surfZones_ |
List of surface zone (face and cell zone) information. More... | |
labelList | regionOffset_ |
From local region number to global region number. More... | |
labelList | minLevel_ |
From global region number to refinement level. More... | |
labelList | maxLevel_ |
From global region number to refinement level. More... | |
labelList | gapLevel_ |
From global region number to small-gap level. More... | |
List< FixedList< label, 3 > > | extendedGapLevel_ |
From global region number to small-gap level specification. More... | |
List< volumeType > | extendedGapMode_ |
From global region number to side of surface to detect. More... | |
scalarField | perpendicularAngle_ |
From global region number to perpendicular angle. More... | |
PtrList< dictionary > | patchInfo_ |
From global region number to patchType. 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.
|
private |
Disallow default bitwise copy construct.
refinementSurfaces | ( | const searchableSurfaces & | allGeometry, |
const dictionary & | surfacesDict, | ||
const label | gapLevelIncrement | ||
) |
Construct from surfaces and dictionary.
Definition at line 124 of file refinementSurfaces.C.
References dictionary::clone(), dict, entry::dict(), Foam::endl(), HashTable< nil, word, string::hash >::erase(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, forAllConstIter(), dictionary::found(), IOWarningInFunction, entry::keyword(), dictionary::lookup(), dictionary::lookupEntryPtr(), dictionary::lookupOrDefault(), readScalar, PtrList::set(), FixedList::setSize(), HashTable< nil, word, string::hash >::size(), HashTable< nil, word, string::hash >::sortedToc(), 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 482 of file refinementSurfaces.C.
References forAll, and PtrList::set().
|
private |
Given intersection results with geom detect local shell refinement.
level (possibly cached on triangles of geom)
Definition at line 39 of file refinementSurfaces.C.
References DynamicList::append(), shellSurfaces::findHigherLevel(), forAll, searchableSurface::getField(), Foam::max(), Foam::reduce(), Foam::returnReduce(), samples(), and List::size().
|
private |
Disallow default bitwise assignment.
|
inline |
Definition at line 152 of file refinementSurfaces.H.
References refinementSurfaces::allGeometry_.
Referenced by autoSnapDriver::calcNearestSurface().
|
inline |
Definition at line 157 of file refinementSurfaces.H.
References refinementSurfaces::surfaces_.
Referenced by autoSnapDriver::calcNearestFace(), autoSnapDriver::calcNearestSurface(), createRefinementSurfaces(), autoSnapDriver::detectNearSurfaces(), main(), and autoSnapDriver::repatchToSurface().
|
inline |
Names of surfaces.
Definition at line 163 of file refinementSurfaces.H.
References refinementSurfaces::names_.
Referenced by createRefinementSurfaces(), and main().
|
inline |
Definition at line 168 of file refinementSurfaces.H.
References refinementSurfaces::surfZones_.
Referenced by autoSnapDriver::calcNearestFace(), autoSnapDriver::calcNearestSurface(), autoSnapDriver::detectNearSurfaces(), main(), and autoSnapDriver::repatchToSurface().
|
inline |
From local region number to global region number.
Definition at line 174 of file refinementSurfaces.H.
References refinementSurfaces::regionOffset_.
|
inline |
From global region number to refinement level.
Definition at line 180 of file refinementSurfaces.H.
References refinementSurfaces::minLevel_.
Referenced by createRefinementSurfaces().
|
inline |
From global region number to refinement level.
Definition at line 186 of file refinementSurfaces.H.
References refinementSurfaces::maxLevel_.
Referenced by createRefinementSurfaces().
|
inline |
From global region number to small gap refinement level.
Definition at line 192 of file refinementSurfaces.H.
References refinementSurfaces::gapLevel_.
Referenced by createRefinementSurfaces().
From global region number to specification of gap and its.
refinement: 3 labels specifying
Definition at line 203 of file refinementSurfaces.H.
|
inline |
From global region number to side of surface to detect.
Definition at line 209 of file refinementSurfaces.H.
References refinementSurfaces::extendedGapMode_.
|
inline |
From global region number to perpendicular angle.
Definition at line 215 of file refinementSurfaces.H.
References refinementSurfaces::perpendicularAngle_.
|
inline |
From global region number to patch type.
Definition at line 221 of file refinementSurfaces.H.
References refinementSurfaces::patchInfo_.
Referenced by main().
From surface and region on surface to global region.
Definition at line 230 of file refinementSurfaces.H.
References refinementSurfaces::regionOffset_.
Referenced by autoSnapDriver::calcNearestFace(), autoSnapDriver::calcNearestSurface(), createRefinementSurfaces(), main(), refinementSurfaces::maxGapLevel(), refinementSurfaces::maxLevel(), refinementSurfaces::minLevel(), and autoSnapDriver::repatchToSurface().
Min level for surface and region on surface.
Definition at line 236 of file refinementSurfaces.H.
References refinementSurfaces::globalRegion(), and refinementSurfaces::minLevel_.
Max level for surface and region on surface.
Definition at line 242 of file refinementSurfaces.H.
References refinementSurfaces::globalRegion(), and refinementSurfaces::maxLevel_.
|
inline |
Definition at line 247 of file refinementSurfaces.H.
References refinementSurfaces::minLevel_, and List::size().
Referenced by main().
Foam::labelList maxGapLevel | ( | ) | const |
Per surface the maximum extendedGapLevel over all its regions.
Definition at line 573 of file refinementSurfaces.C.
References refinementSurfaces::allGeometry_, refinementSurfaces::extendedGapLevel_, forAll, refinementSurfaces::globalRegion(), Foam::max(), List::size(), and refinementSurfaces::surfaces_.
void setMinLevelFields | ( | const shellSurfaces & | shells | ) |
Calculate minLevelFields.
Definition at line 594 of file refinementSurfaces.C.
References searchableSurface::boundingSpheres(), Foam::endl(), shellSurfaces::findHigherLevel(), searchableSurface::findNearest(), forAll, searchableSurface::getRegion(), searchableSurface::globalSize(), Foam::Info, Foam::labelMax, Foam::max(), Foam::min(), IOobject::name(), points, PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::returnReduce(), and setField().
Referenced by main().
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 723 of file refinementSurfaces.C.
References searchableSurface::findLineAny(), forAll, searchableSurface::getRegion(), Foam::identity(), Foam::returnReduce(), List::setSize(), and List::size().
Referenced by meshRefinement::updateIntersections().
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 885 of file refinementSurfaces.C.
References List::clear(), forAll, n, List::setSize(), and List::size().
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 973 of file refinementSurfaces.C.
References forAll, n, List::setSize(), and List::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 1063 of file refinementSurfaces.C.
References forAll, and List::setSize().
Referenced by autoSnapDriver::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 1193 of file refinementSurfaces.C.
References searchableSurface::findLine(), forAll, searchableSurface::getNormal(), searchableSurface::getRegion(), List::setSize(), and Vector< scalar >::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 1316 of file refinementSurfaces.C.
References searchableSurface::findLine(), forAll, searchableSurface::getNormal(), List::setSize(), and Vector< scalar >::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 1359 of file refinementSurfaces.C.
References searchableSurface::findLine(), forAll, searchableSurface::getNormal(), List::setSize(), and Vector< scalar >::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 1409 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 1430 of file refinementSurfaces.C.
References searchableSurfacesQueries::findNearest(), forAll, and samples().
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 1463 of file refinementSurfaces.C.
References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), List::setSize(), and List::size().
Referenced by autoSnapDriver::calcNearestFace(), autoSnapDriver::calcNearestSurface(), and autoSnapDriver::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 1526 of file refinementSurfaces.C.
References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), List::setSize(), List::size(), and Vector< scalar >::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 1647 of file refinementSurfaces.C.
References surfaceZonesInfo::areaSelectionAlgoNames, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, volumeType::INSIDE, surfaceZonesInfo::INSIDE, geometryBase::name(), surfaceZonesInfo::OUTSIDE, volumeType::OUTSIDE, and List::setSize().
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 1710 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 1747 of file refinementSurfaces.C.
References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), List::setSize(), List::size(), and Vector< scalar >::zero.
|
private |
Reference to all geometry.
Definition at line 65 of file refinementSurfaces.H.
Referenced by refinementSurfaces::geometry(), and refinementSurfaces::maxGapLevel().
|
private |
Indices of surfaces that are refinement ones.
Definition at line 68 of file refinementSurfaces.H.
Referenced by refinementSurfaces::maxGapLevel(), and refinementSurfaces::surfaces().
|
private |
Surface name (word)
Definition at line 71 of file refinementSurfaces.H.
Referenced by refinementSurfaces::names().
|
private |
List of surface zone (face and cell zone) information.
Definition at line 74 of file refinementSurfaces.H.
Referenced by refinementSurfaces::surfZones().
|
private |
From local region number to global region number.
Definition at line 77 of file refinementSurfaces.H.
Referenced by refinementSurfaces::globalRegion(), and refinementSurfaces::regionOffset().
|
private |
From global region number to refinement level.
Definition at line 80 of file refinementSurfaces.H.
Referenced by refinementSurfaces::minLevel(), and refinementSurfaces::nRegions().
|
private |
From global region number to refinement level.
Definition at line 83 of file refinementSurfaces.H.
Referenced by refinementSurfaces::maxLevel().
|
private |
From global region number to small-gap level.
Definition at line 86 of file refinementSurfaces.H.
Referenced by refinementSurfaces::gapLevel().
From global region number to small-gap level specification.
Definition at line 89 of file refinementSurfaces.H.
Referenced by refinementSurfaces::maxGapLevel().
|
private |
From global region number to side of surface to detect.
Definition at line 92 of file refinementSurfaces.H.
Referenced by refinementSurfaces::extendedGapMode().
|
private |
From global region number to perpendicular angle.
Definition at line 95 of file refinementSurfaces.H.
Referenced by refinementSurfaces::perpendicularAngle().
|
private |
From global region number to patchType.
Definition at line 98 of file refinementSurfaces.H.
Referenced by refinementSurfaces::patchInfo().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.