Go to the documentation of this file.
54 mkDir(time().rootPath()/time().caseName()/
"fluentInterface");
57 std::ofstream fluentMeshFile
62 / time().caseName() +
".msh"
71 <<
"(0 \"Grid dimensions:\")" <<
std::endl;
89 label nFcs = nFaces();
105 fluentMeshFile.setf(
ios::hex, ios::basefield);
119 <<
p[pointi].x() <<
" "
141 fluentMeshFile <<
" ";
143 fluentMeshFile << l.size() <<
" ";
147 fluentMeshFile << l[lI] + 1 <<
" ";
150 fluentMeshFile << nei[facei] + 1 <<
" ";
151 fluentMeshFile << own[facei] + 1 <<
std::endl;
156 label nWrittenFaces = own.size();
161 const faceUList& patchFaces = boundaryMesh()[patchi];
164 boundaryMesh()[patchi].faceCells();
170 <<
"(13 (" << patchi + 10 <<
" " << nWrittenFaces + 1
171 <<
" " << nWrittenFaces + patchFaces.size() <<
" ";
173 nWrittenFaces += patchFaces.size();
176 if (isA<wallFvPatch>(
boundary()[patchi]))
182 isA<symmetryPlaneFvPatch>(
boundary()[patchi])
183 || isA<symmetryFvPatch>(
boundary()[patchi])
200 fluentMeshFile <<
" ";
202 fluentMeshFile << l.size() <<
" ";
209 fluentMeshFile << l[lI] + 1 <<
" ";
212 fluentMeshFile << patchFaceCells[facei] + 1 <<
" 0" <<
std::endl;
230 bool hasWarned =
false;
234 if (
cells[celli].model() == tet)
236 fluentMeshFile <<
" " << 2;
238 else if (
cells[celli].model() ==
hex)
240 fluentMeshFile <<
" " << 4;
242 else if (
cells[celli].model() == pyr)
244 fluentMeshFile <<
" " << 5;
246 else if (
cells[celli].model() == prism)
248 fluentMeshFile <<
" " << 6;
257 <<
"foamMeshToFluent: cell shape for cell "
258 << celli <<
" only supported by Fluent polyhedral meshes."
260 <<
" Suppressing any further messages for polyhedral"
261 <<
" cells." <<
endl;
263 fluentMeshFile <<
" " << 7;
273 fluentMeshFile <<
"(39 (1 fluid fluid-1)())" <<
std::endl;
274 fluentMeshFile <<
"(39 (2 interior interior-1)())" <<
std::endl;
280 <<
"(39 (" << patchi + 10 <<
" ";
283 if (isA<wallFvPatch>(
boundary()[patchi]))
285 fluentMeshFile <<
"wall ";
289 isA<symmetryPlaneFvPatch>(
boundary()[patchi])
290 || isA<symmetryFvPatch>(
boundary()[patchi])
293 fluentMeshFile <<
"symmetry ";
297 fluentMeshFile <<
"pressure-outlet ";
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
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.
virtual int precision() const =0
Get precision of output field.
#define forAll(list, i)
Loop across all elements in list.
IOstream & dec(IOstream &io)
messageStream Info
Information stream (uses stdout - output is on the master only)
static const cellModel & ref(const modelType model)
Look up reference to cellModel by enumeration. Fatal on failure.
IOstream & scientific(IOstream &io)
IOstream & hex(IOstream &io)
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
UList< face > faceUList
A UList of faces.
List< face > faceList
A List of faces.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
UList< label > labelUList
A UList of labels.
bool mkDir(const fileName &pathName, mode_t mode=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.