Go to the documentation of this file.00001 gmvFile << "tracers " << particles.size() << nl;
00002 for
00003 (
00004 Cloud<passiveParticle>::iterator elmnt = particles.begin();
00005 elmnt != particles.end();
00006 ++elmnt
00007 )
00008 {
00009 gmvFile << elmnt().position().x() << " ";
00010 }
00011 gmvFile << nl;
00012
00013 for
00014 (
00015 Cloud<passiveParticle>::iterator elmnt = particles.begin();
00016 elmnt != particles.end();
00017 ++elmnt
00018 )
00019 {
00020 gmvFile << elmnt().position().y() << " ";
00021 }
00022 gmvFile << nl;
00023
00024 for
00025 (
00026 Cloud<passiveParticle>::iterator elmnt = particles.begin();
00027 elmnt != particles.end();
00028 ++elmnt
00029 )
00030 {
00031 gmvFile << elmnt().position().z() << " ";
00032 }
00033 gmvFile << nl;
00034
00035 forAll(lagrangianScalarNames, i)
00036 {
00037 word name = lagrangianScalarNames[i];
00038
00039 IOField<scalar> s
00040 (
00041 IOobject
00042 (
00043 name,
00044 runTime.timeName(),
00045 cloud::prefix,
00046 mesh,
00047 IOobject::MUST_READ,
00048 IOobject::NO_WRITE
00049 )
00050 );
00051
00052 if (s.size())
00053 {
00054 gmvFile << name << nl;
00055
00056 for (label n = 0; n < s.size(); n++)
00057 {
00058 gmvFile << s[n] << token::SPACE;
00059 }
00060 gmvFile << nl;
00061 }
00062
00063
00064 }
00065
00066 forAll(lagrangianVectorNames, i)
00067 {
00068 word name = lagrangianVectorNames[i];
00069
00070 IOField<vector> v
00071 (
00072 IOobject
00073 (
00074 name,
00075 runTime.timeName(),
00076 cloud::prefix,
00077 mesh,
00078 IOobject::MUST_READ,
00079 IOobject::NO_WRITE
00080 )
00081 );
00082
00083 if (v.size())
00084 {
00085 gmvFile << name + "x" << nl;
00086
00087 for (label n = 0; n < v.size(); n++)
00088 {
00089 gmvFile << v[n].x() << token::SPACE;
00090 }
00091 gmvFile << nl;
00092
00093 gmvFile << name + "y" << nl;
00094
00095 for (label n = 0; n < v.size(); n++)
00096 {
00097 gmvFile << v[n].y() << token::SPACE;
00098 }
00099 gmvFile << nl;
00100
00101 gmvFile << name + "z" << nl;
00102
00103 for (label n = 0; n < v.size(); n++)
00104 {
00105 gmvFile << v[n].z() << token::SPACE;
00106 }
00107 gmvFile << nl;
00108 }
00109
00110 }
00111
00112
00113 gmvFile << "endtrace"<< nl;
00114
00115