34 template<
class FaceList,
class Po
intField>
38 if (boundaryPointsPtr_)
42 <<
"boundaryPoints already calculated" 51 <<
"Calculating boundary points from existing addressing" 54 bp.reserve(2*nBoundaryEdges());
56 for (
const edge&
e : boundaryEdges())
59 bp.insert(
e.second());
65 <<
"Calculating boundary points with manual edge addressing" 74 const List<face_type>& locFcs = localFaces();
78 for (
const auto&
f : locFcs)
80 edgeCount +=
f.nEdges();
84 HashTable<label, edge, Hash<edge>> knownEdges(2*edgeCount);
86 for (
const auto&
f : locFcs)
88 const label numEdges =
f.nEdges();
90 for (label edgei = 0; edgei < numEdges; ++edgei)
92 ++ knownEdges(
f.edge(edgei));
106 bp.reserve(2*edgeCount);
110 const edge&
e = iter.key();
114 bp.insert(
e.first());
115 bp.insert(
e.second());
120 boundaryPointsPtr_.reset(
new labelList(bp.sortedToc()));
127 template<
class FaceList,
class Po
intField>
133 point_type::uniform(ROOTVGREAT),
134 point_type::uniform(-ROOTVGREAT)
140 for (
const label pointi : meshPoints())
149 for (
const face_type&
f : *
this)
151 for (
const label pointi :
f)
163 template<
class FaceList,
class Po
intField>
167 scalar radiusSqr = 0;
169 const point_type& fc = this->faceCentres()[facei];
171 for (
const label fp : this->
operator[](facei))
173 const scalar sqrDist =
magSqr(fc - points_[fp]);
174 if (radiusSqr < sqrDist)
const T & first() const noexcept
Access the first element.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Pair< point_type > box() const
The enclosing (bounding) box for the patch points.
A list of faces which address into the list of points.
const dimensionedScalar e
Elementary charge.
An ordered pair of two objects of type <T> with first() and second() elements.
#define DebugInFunction
Report an information message using Foam::Info.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
#define DebugInfo
Report an information message using Foam::Info.
scalar sphere(const label facei) const
The enclosing (bounding) sphere radius^2 for specified face.
List< label > labelList
A List of labels.
const T & second() const noexcept
Access the second element.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
forAllConstIters(mixture.phases(), phase)