45 const twoDPointCorrector* correct2DPtr
52 const vector& normal = correct2DPtr->planeNormal();
81 mesh.time().constant(),
83 IOobject::MUST_READ_IF_MODIFIED,
87 if (motionObj.typeHeaderOk<IOdictionary>(
true))
89 Info<<
"Reading " <<
mesh.time().constant() /
"motionProperties"
92 IOdictionary motionProperties(motionObj);
94 if (motionProperties.get<
bool>(
"twoDMotion"))
98 autoPtr<twoDPointCorrector> correct2DPtr
100 new twoDPointCorrector(
mesh)
103 normalDir_ = getNormalDir(&correct2DPtr());
112 const polyMesh&
mesh,
113 const twoDPointCorrector* correct2DPtr
117 normalDir_(getNormalDir(correct2DPtr))
130 scalar maxX = -GREAT;
134 scalar maxY = -GREAT;
138 scalar maxZ = -GREAT;
141 scalar minOther = GREAT;
142 scalar maxOther = -GREAT;
146 for (
const edge&
e : edges)
150 scalar eMag =
mag(eVec);
156 minX =
min(minX, eMag);
157 maxX =
max(maxX, eMag);
162 minY =
min(minY, eMag);
163 maxY =
max(maxY, eMag);
168 minZ =
min(minZ, eMag);
169 maxZ =
max(maxZ, eMag);
174 minOther =
min(minOther, eMag);
175 maxOther =
max(maxOther, eMag);
179 os <<
"Mesh bounding box:" << boundBox(mesh_.
points()) <<
nl <<
nl
180 <<
"Mesh edge statistics:" <<
nl
181 <<
" x aligned : number:" << nX <<
"\tminLen:" << minX
182 <<
"\tmaxLen:" << maxX <<
nl
183 <<
" y aligned : number:" << nY <<
"\tminLen:" << minY
184 <<
"\tmaxLen:" << maxY <<
nl
185 <<
" z aligned : number:" << nZ <<
"\tminLen:" << minZ
186 <<
"\tmaxLen:" << maxZ <<
nl
187 <<
" other : number:" << mesh_.
nEdges() - nX - nY - nZ
188 <<
"\tminLen:" << minOther
189 <<
"\tmaxLen:" << maxOther <<
nl <<
endl;
193 return min(minY,
min(minZ, minOther));
195 else if (normalDir_ == 1)
197 return min(minX,
min(minZ, minOther));
199 else if (normalDir_ == 2)
201 return min(minX,
min(minY, minOther));
205 return min(minX,
min(minY,
min(minZ, minOther)));
Helper class to calculate minimum edge length on mesh.
static const scalar edgeTol_
const scalar & minLen() const
virtual const pointField & points() const
Return raw points.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
label nEdges() const
Number of mesh edges.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
List< edge > edgeList
A List of edges.
constexpr char nl
The newline '\n' character (0x0a)