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 refinementRegions &shells, const scalar level0EdgeLength, const bool extendedRefinementSpan) |
Calculate the refinement level for every element. 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 38 of file refinementSurfaces.C.
References dictionary::clone(), Foam::clone(), dict, entry::dict(), Foam::endl(), HashTable< T, Key, Hash >::erase(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, forAllConstIter, dictionary::found(), IOWarningInFunction, entry::keyword(), dictionary::lookup(), dictionary::lookupEntryPtr(), dictionary::lookupOrDefault(), searchableSurfaces::names(), refinementSurfaces::nRegions(), regionNames(), searchableSurface::regions(), PtrList< T >::set(), List< T >::setSize(), HashTable< T, Key, Hash >::size(), UPtrList< T >::size(), HashTable< T, Key, 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 300 of file refinementSurfaces.C.
References forAll, refinementSurfaces::patchInfo(), and Foam::constant::mathematical::pi().
|
delete |
Disallow default bitwise copy construction.
|
inline |
Definition at line 130 of file refinementSurfaces.H.
|
inline |
Definition at line 135 of file refinementSurfaces.H.
Referenced by snappySnapDriver::detectNearSurfaces(), snappySnapDriver::doSnap(), and snappySnapDriver::repatchToSurface().
|
inline |
Names of surfaces.
Definition at line 141 of file refinementSurfaces.H.
Referenced by snappySnapDriver::doSnap().
|
inline |
Definition at line 146 of file refinementSurfaces.H.
Referenced by snappySnapDriver::calcNearestSurface(), snappySnapDriver::detectNearSurfaces(), snappySnapDriver::doSnap(), and snappySnapDriver::repatchToSurface().
|
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.
Referenced by refinementSurfaces::refinementSurfaces().
From surface and region on surface to global region.
Definition at line 191 of file refinementSurfaces.H.
Referenced by refinementSurfaces::maxLevel(), refinementSurfaces::minLevel(), 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 List< T >::size().
Referenced by refinementSurfaces::refinementSurfaces().
void setMinLevelFields | ( | const refinementRegions & | shells, |
const scalar | level0EdgeLength, | ||
const bool | extendedRefinementSpan | ||
) |
Calculate the refinement level for every element.
of the searchablesurface
Definition at line 337 of file refinementSurfaces.C.
References searchableSurface::boundingSpheres(), searchableSurface::findNearest(), forAll, searchableSurface::getRegion(), searchableSurface::globalSize(), Foam::max(), searchableSurface::regions(), setField(), and List< T >::size().
Referenced by meshRefinement::meshRefinement().
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 411 of file refinementSurfaces.C.
References searchableSurface::findLineAny(), forAll, searchableSurface::getField(), Foam::identityMap(), searchableSurface::regions(), Foam::returnReduce(), List< T >::setSize(), and List< T >::size().
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 554 of file refinementSurfaces.C.
References List< T >::clear(), searchableSurface::findLineAll(), forAll, searchableSurface::getNormal(), searchableSurface::getRegion(), n, List< T >::setSize(), and List< T >::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 642 of file refinementSurfaces.C.
References searchableSurface::findLineAll(), 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 732 of file refinementSurfaces.C.
References searchableSurface::findLine(), forAll, searchableSurface::getRegion(), List< T >::setSize(), and List< T >::size().
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 862 of file refinementSurfaces.C.
References 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 985 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 1006 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 1039 of file refinementSurfaces.C.
References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), List< T >::setSize(), and List< 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 1102 of file refinementSurfaces.C.
References Foam::findIndices(), searchableSurfacesQueries::findNearest(), forAll, samples(), 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 1178 of file refinementSurfaces.C.
References surfaceZonesInfo::areaSelectionAlgoNames, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, searchableSurface::getVolumeType(), searchableSurface::hasVolumeType(), surfaceZonesInfo::INSIDE, volumeType::inside, IOobject::name(), surfaceZonesInfo::OUTSIDE, volumeType::outside, List< T >::setSize(), and List< T >::size().
|
delete |
Disallow default bitwise assignment.