Go to the documentation of this file.
63 os <<
"v " << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
endl;
78 os <<
"l " << vertI + 1 <<
' ' << vertI + 2 <<
endl;
92 Pout<<
"Writing cell info to " << fName <<
" as vectors at the cellCentres"
104 scalar minDist = GREAT;
113 scalar scale = 0.5*minDist;
115 writeOBJ(xDirStream, ctr, ctr + scale*dirs[cellI], vertI);
131 <<
"is not normal to plane defined in dynamicMeshDict."
133 <<
"Either make case 3D or adjust vector."
165 <<
"useHexTopology specified but cell " << cellI
166 <<
" on face " << patchFaceI <<
" of patch " << pp.
name()
170 const vector& cutDir = ppField[patchFaceI];
186 changedFaces[patchFaceI] = meshFaceI;
187 changedFacesInfo[patchFaceI] =
199 changedFaces[patchFaceI] = pp.
start() + patchFaceI;
200 changedFacesInfo[patchFaceI] =
233 <<
"Cell " << cellI <<
" never visited to determine "
234 <<
"local coordinate system" <<
endl
235 <<
"Using direction " << defaultDir <<
" instead" <<
endl;
237 dirField[cellI] = defaultDir;
241 else if (index == -2)
244 dirField[cellI] =
cellInfo[cellI].n();
248 else if (index == -1)
251 <<
"Illegal index " << index <<
endl
263 Pout<<
"Calculated local coords for " << defaultDir
265 <<
" Geometric cut cells : " << nGeom <<
endl
266 <<
" Topological cut cells : " << nTopo <<
endl
267 <<
" Unset cells : " << nUnset <<
endl
287 bool wantNormal =
false;
288 bool wantTan1 =
false;
289 bool wantTan2 =
false;
293 directionType wantedDir = directionTypeNames_[wantedDirs[i]];
295 if (wantedDir == NORMAL)
299 else if (wantedDir == TAN1)
303 else if (wantedDir == TAN2)
314 if (coordSystem ==
"global")
319 check2D(correct2DPtr, tan1);
322 check2D(correct2DPtr, tan2);
327 Pout<<
"Global Coordinate system:" <<
endl
329 <<
" tan1 : " << tan1 <<
endl
330 <<
" tan2 : " << tan2
346 else if (coordSystem ==
"patchLocal")
350 const word patchName(patchDict.
lookup(
"patch"));
357 <<
"Cannot find patch "
374 <<
"Discarding user specified tan1 since 2D case." <<
endl
375 <<
"Recalculated tan1 from face normal and planeNormal as "
384 if (wantNormal || wantTan2)
398 this->operator[](nDirs++) = normalDirs;
402 if (wantTan1 || wantTan2)
417 this->operator[](nDirs++) = tan1Dirs;
424 this->operator[](nDirs++) = tan2Dirs;
430 <<
"Unknown coordinate system "
431 << coordSystem <<
endl
432 <<
"Known types are global and patchLocal"
static const NamedEnum< directionType, 3 > directionTypeNames_
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
label findPatchID(const word &patchName) const
Find patch index given a name.
A class for handling words, derived from string.
A class for handling file names.
const vector & planeNormal() const
Return plane normal.
#define forAll(list, i)
Loop across all elements in list.
void writeOBJ(Ostream &os, label &vertI, const tetPoints &tet)
A class for managing temporary objects.
static void check2D(const twoDPointCorrector *correct2DPtr, const vector &vec)
Check if vec has no component in 2D normal direction. Exits if.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
label nTotalCells() const
Return total number of cells in decomposed mesh.
directionType
Enumeration listing the possible coordinate directions.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< word > wordList
A List of words.
Class applies a two-dimensional correction to mesh motion point field.
A cellMatcher for hex cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
A patch is a list of labels that address the faces in the global face list.
static label edgeToFaceIndex(const primitiveMesh &mesh, const label cellI, const label faceI, const label edgeI)
Given edge on hex cell find corresponding edge on face. Is either.
virtual const labelList & faceOwner() const
Return face owner.
const labelListList & cellCells() const
Holds direction in which to split cell (in fact a local coordinate axes). Information is a label and ...
A list of keyword definitions, which are a keyword followed by any number of values (e....
static vectorField propagateDirection(const polyMesh &mesh, const bool useTopo, const polyPatch &pp, const vectorField &ppField, const vector &defaultDir)
Get coordinate direction for all cells in mesh by propagating from.
errorManip< error > abort(error &err)
directions(const directions &)
Disallow default bitwise copy construct.
const double e
Elementary charge.
label start() const
Return start label of this patch in the polyMesh face list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const vectorField & cellCentres() const
Holds information regarding type of cell. Used in inside/outside determination in cellClassification.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
prefixOSstream Pout(cout, "Pout")
const Field< PointType > & faceNormals() const
Return face normals for patch.
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static void writeOBJ(Ostream &os, const point &pt)
For debugging. Write point coordinate.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const globalMeshData & globalData() const
Return parallel info.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const word & name() const
Return name.
#define WarningInFunction
Report a warning using Foam::Warning.
const List< Type > & allCellInfo() const
Get allCellInfo.
Initialise the NamedEnum HashTable from the static list of names.
A normal distribution model.
Cell-face mesh analysis engine.