Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "writeFluentFields.H"
00032
00033
00034
00035 namespace Foam
00036 {
00037
00038
00039
00040 void writeFluentField
00041 (
00042 const volVectorField& phi,
00043 const label fluentFieldIdentifier,
00044 Ostream& stream
00045 )
00046 {
00047 const vectorField& phiInternal = phi.internalField();
00048
00049
00050 stream
00051 << "(300 ("
00052 << fluentFieldIdentifier << " "
00053 << "1 "
00054
00055 << "3 "
00056 << "0 0 "
00057 << "1 " << phiInternal.size()
00058 << ")(" << endl;
00059
00060 forAll (phiInternal, cellI)
00061 {
00062 stream
00063 << phiInternal[cellI].x() << " "
00064 << phiInternal[cellI].y() << " "
00065 << phiInternal[cellI].z() << " "
00066 << endl;
00067 }
00068
00069 stream
00070 << "))" << endl;
00071
00072 label nWrittenFaces = phiInternal.size();
00073
00074
00075 forAll (phi.boundaryField(), patchI)
00076 {
00077 const vectorField& patchPhi = phi.boundaryField()[patchI];
00078
00079
00080 stream
00081 << "(300 ("
00082 << fluentFieldIdentifier << " "
00083 << patchI + 10 << " "
00084 << "3 "
00085 << "0 0 "
00086 << nWrittenFaces + 1 << " " << nWrittenFaces + patchPhi.size()
00087
00088 << ")(" << endl;
00089
00090 nWrittenFaces += patchPhi.size();
00091
00092 forAll (patchPhi, faceI)
00093 {
00094 stream
00095 << patchPhi[faceI].x() << " "
00096 << patchPhi[faceI].y() << " "
00097 << patchPhi[faceI].z() << " "
00098 << endl;
00099 }
00100
00101 stream
00102 << "))" << endl;
00103 }
00104 }
00105
00106
00107 }
00108
00109