Go to the documentation of this file.
34 #include "primitiveMesh.H"
53 mkDir(time().rootPath()/time().caseName()/
"fluentInterface");
56 ofstream fluentMeshFile
62 time().caseName() +
".msh"
72 <<
"(0 \"Grid dimensions:\")" <<
std::endl;
90 label nFcs = nFaces();
106 fluentMeshFile.setf(
ios::hex, ios::basefield);
120 <<
p[pointI].x() <<
" "
142 fluentMeshFile <<
" ";
144 fluentMeshFile << l.
size() <<
" ";
148 fluentMeshFile << l[lI] + 1 <<
" ";
151 fluentMeshFile << nei[faceI] + 1 <<
" ";
152 fluentMeshFile << own[faceI] + 1 <<
std::endl;
157 label nWrittenFaces = own.size();
165 boundaryMesh()[patchI].faceCells();
171 <<
"(13 (" << patchI + 10 <<
" " << nWrittenFaces + 1
177 if (isA<wallFvPatch>(
boundary()[patchI]))
183 isA<symmetryPlaneFvPatch>(
boundary()[patchI])
184 || isA<symmetryFvPatch>(
boundary()[patchI])
201 fluentMeshFile <<
" ";
203 fluentMeshFile << l.
size() <<
" ";
210 fluentMeshFile << l[lI] + 1 <<
" ";
213 fluentMeshFile << patchFaceCells[faceI] + 1 <<
" 0" <<
std::endl;
231 bool hasWarned =
false;
235 if (
cells[cellI].model() == tet)
237 fluentMeshFile <<
" " << 2;
239 else if (
cells[cellI].model() ==
hex)
241 fluentMeshFile <<
" " << 4;
243 else if (
cells[cellI].model() == pyr)
245 fluentMeshFile <<
" " << 5;
247 else if (
cells[cellI].model() == prism)
249 fluentMeshFile <<
" " << 6;
258 <<
"foamMeshToFluent: cell shape for cell "
259 << cellI <<
" only supported by Fluent polyhedral meshes."
261 <<
" Suppressing any further messages for polyhedral"
262 <<
" cells." <<
endl;
264 fluentMeshFile <<
" " << 7;
274 fluentMeshFile <<
"(39 (1 fluid fluid-1)())" <<
std::endl;
275 fluentMeshFile <<
"(39 (2 interior interior-1)())" <<
std::endl;
281 <<
"(39 (" << patchI + 10 <<
" ";
284 if (isA<wallFvPatch>(
boundary()[patchI]))
286 fluentMeshFile <<
"wall ";
290 isA<symmetryPlaneFvPatch>(
boundary()[patchI])
291 || isA<symmetryFvPatch>(
boundary()[patchI])
294 fluentMeshFile <<
"symmetry ";
298 fluentMeshFile <<
"pressure-outlet ";
const cellShapeList & cellShapes
vectorField pointField
pointField is a vectorField.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
faceListList boundary(nPatches)
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
Ostream & endl(Ostream &os)
Add newline and flush stream.
fluentFvMesh(const IOobject &io)
Construct from IOobject.
labelList patchFaces(const polyBoundaryMesh &patches, const wordList &names)
virtual int precision() const =0
Get precision of output field.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
IOstream & dec(IOstream &io)
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or NULL.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
IOstream & scientific(IOstream &io)
IOstream & hex(IOstream &io)
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
void size(const label)
Override size to be inconsistent with allocated storage.
UList< label > labelUList
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
void writeFluentMesh() const
Write Fluent mesh.
#define WarningInFunction
Report a warning using Foam::Warning.