Go to the documentation of this file.
42 const twoDPointCorrector* correct2DPtr
79 mesh.time().constant(),
85 if (motionObj.headerOk())
87 Info<<
"Reading " <<
mesh.time().constant() /
"motionProperties"
90 IOdictionary motionProperties(motionObj);
92 Switch twoDMotion(motionProperties.lookup(
"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;
144 const edgeList& edges = mesh_.edges();
148 const edge&
e = edges[edgeI];
150 vector eVec(
e.vec(mesh_.points()));
152 scalar eMag =
mag(eVec);
156 if (
mag(eVec &
x) > 1-edgeTol_)
158 minX =
min(minX, eMag);
159 maxX =
max(maxX, eMag);
162 else if (
mag(eVec &
y) > 1-edgeTol_)
164 minY =
min(minY, eMag);
165 maxY =
max(maxY, eMag);
168 else if (
mag(eVec & z) > 1-edgeTol_)
170 minZ =
min(minZ, eMag);
171 maxZ =
max(maxZ, eMag);
176 minOther =
min(minOther, eMag);
177 maxOther =
max(maxOther, eMag);
181 os <<
"Mesh bounding box:" << boundBox(mesh_.points()) <<
nl <<
nl
182 <<
"Mesh edge statistics:" <<
nl
183 <<
" x aligned : number:" << nX <<
"\tminLen:" << minX
184 <<
"\tmaxLen:" << maxX <<
nl
185 <<
" y aligned : number:" << nY <<
"\tminLen:" << minY
186 <<
"\tmaxLen:" << maxY <<
nl
187 <<
" z aligned : number:" << nZ <<
"\tminLen:" << minZ
188 <<
"\tmaxLen:" << maxZ <<
nl
189 <<
" other : number:" << mesh_.nEdges() - nX - nY - nZ
190 <<
"\tminLen:" << minOther
191 <<
"\tmaxLen:" << maxOther <<
nl <<
endl;
195 return min(minY,
min(minZ, minOther));
197 else if (normalDir_ == 1)
199 return min(minX,
min(minZ, minOther));
201 else if (normalDir_ == 2)
203 return min(minX,
min(minY, minOther));
207 return min(minX,
min(minY,
min(minZ, minOther)));
static const scalar edgeTol_
#define forAll(list, i)
Loop across all elements in list.
scalar minLen(Ostream &os) const
Calculate minimum edge length and print.
direction getNormalDir(const twoDPointCorrector *) const
If 2d get component of normal dir.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const double e
Elementary charge.
Vector< scalar > vector
A scalar version of the templated Vector.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const dimensionedScalar e
Elementary charge.
edgeStats(const edgeStats &)
Disallow default bitwise copy construct.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
A normal distribution model.