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
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 #include <molecule/md.H>
00051 #include <finiteVolume/fvCFD.H>
00052
00053
00054
00055 int main(int argc, char *argv[])
00056 {
00057 # include <OpenFOAM/setRootCase.H>
00058 # include <OpenFOAM/createTime.H>
00059 # include <OpenFOAM/createMesh.H>
00060
00061 IOdictionary mdInitialiseDict
00062 (
00063 IOobject
00064 (
00065 "mdInitialiseDict",
00066 runTime.system(),
00067 runTime,
00068 IOobject::MUST_READ,
00069 IOobject::NO_WRITE,
00070 false
00071 )
00072 );
00073
00074 IOdictionary idListDict
00075 (
00076 IOobject
00077 (
00078 "idList",
00079 mesh.time().constant(),
00080 mesh,
00081 IOobject::NO_READ,
00082 IOobject::AUTO_WRITE
00083 )
00084 );
00085
00086 potential pot(mesh, mdInitialiseDict, idListDict);
00087
00088 moleculeCloud molecules(mesh, pot, mdInitialiseDict);
00089
00090 label totalMolecules = molecules.size();
00091
00092 if (Pstream::parRun())
00093 {
00094 reduce(totalMolecules, sumOp<label>());
00095 }
00096
00097 Info<< nl << "Total number of molecules added: " << totalMolecules
00098 << nl << endl;
00099
00100 IOstream::defaultPrecision(15);
00101
00102 if (!mesh.write())
00103 {
00104 FatalErrorIn(args.executable())
00105 << "Failed writing moleculeCloud."
00106 << nl << exit(FatalError);
00107 }
00108
00109 Info<< nl << "ClockTime = " << runTime.elapsedClockTime() << " s"
00110 << nl << endl;
00111
00112 Info << nl << "End\n" << endl;
00113
00114 return 0;
00115 }
00116
00117
00118