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 #ifndef liggghtsCommandModel_H
00033 #define liggghtsCommandModel_H
00034
00035 #include "fvCFD.H"
00036 #include "cfdemCloud.H"
00037 #include "dataExchangeModel.H"
00038
00039
00040 namespace Foam
00041 {
00042
00043
00044
00045
00046
00047 class liggghtsCommandModel
00048 {
00049
00050 protected:
00051
00052
00053 const dictionary& dict_;
00054
00055 cfdemCloud& particleCloud_;
00056
00057 string strCommand_;
00058
00059 int nextRun_;
00060
00061 int lastRun_;
00062
00063 Switch runFirst_;
00064
00065 Switch runLast_;
00066
00067 Switch runEveryCouplingStep_;
00068
00069 Switch runEveryWriteStep_;
00070
00071 scalar startTime_;
00072
00073 scalar endTime_;
00074
00075 scalar timeInterval_;
00076
00077 int firstCouplingStep_;
00078
00079 int lastCouplingStep_;
00080
00081 int couplingStepInterval_;
00082
00083 public:
00084
00085
00086 TypeName("liggghtsCommandModel");
00087
00088
00089
00090
00091 declareRunTimeSelectionTable
00092 (
00093 autoPtr,
00094 liggghtsCommandModel,
00095 dictionary,
00096 (
00097 const dictionary& dict,
00098 cfdemCloud& sm,
00099 int i
00100 ),
00101 (dict,sm,i)
00102 );
00103
00104
00105
00106
00107
00108 liggghtsCommandModel
00109 (
00110 const dictionary& dict,
00111 cfdemCloud& sm,
00112 int i
00113 );
00114
00115
00116
00117
00118 virtual ~liggghtsCommandModel();
00119
00120
00121
00122
00123 static autoPtr<liggghtsCommandModel> New
00124 (
00125 const dictionary& dict,
00126 cfdemCloud& sm,
00127 word liggghtsCommandType,
00128 int i
00129 );
00130
00131
00132
00133
00134 virtual const char* command()=0;
00135
00136 void checkTimeMode(dictionary&);
00137
00138 void checkTimeSettings(dictionary&);
00139
00140 virtual bool runCommand(int)=0;
00141
00142 bool runThisCommand(int);
00143
00144
00145
00146 int nextRun(){return nextRun_;};
00147
00148 int lastRun(){return lastRun_;};
00149
00150 virtual word name()=0;
00151
00152 };
00153
00154
00155
00156
00157 }
00158
00159
00160
00161 #endif
00162
00163