CFDEMcoupling  2.4
 All Classes
twoWayFiles.H
1 /*---------------------------------------------------------------------------*\
2  CFDEMcoupling - Open Source CFD-DEM coupling
3 
4  CFDEMcoupling is part of the CFDEMproject
5  www.cfdem.com
6  Christoph Goniva, christoph.goniva@cfdem.com
7  Copyright 2009-2012 JKU Linz
8  Copyright 2012- DCS Computing GmbH, Linz
9 -------------------------------------------------------------------------------
10 License
11  This file is part of CFDEMcoupling.
12 
13  CFDEMcoupling is free software; you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by the
15  Free Software Foundation; either version 3 of the License, or (at your
16  option) any later version.
17 
18  CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with CFDEMcoupling; if not, write to the Free Software Foundation,
25  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 
27 Description
28  This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
29  and OpenFOAM(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
30 
31  two way DEM-CFD coupling via files
32 
33 Class
34  twoWayFiles
35 
36 SourceFiles
37  twoWayFiles.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef twoWayFiles_H
42 #define twoWayFiles_H
43 
44 #include "dataExchangeModel.H"
45 #include "OFstream.H"
46 #include "sys/stat.h"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class twoWayFiles Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public dataExchangeModel
60 {
61 private:
62 
63  // private data
64  dictionary propsDict_;
65 
66  // private member functions
67 
68  const char* wordToChar(word&) const;
69 
70  const char* fileNameToChar(fileName&) const;
71 
72  fileName getFilePath(word&, bool) const;
73 
74  void renameFilePath(fileName&,word&) const;
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("twoWayFiles");
80 
81 
82  // Constructors
83 
84  //- Construct from components
86  (
87  const dictionary& dict,
88  cfdemCloud& sm
89  );
90 
91  // Destructor
92 
93  ~twoWayFiles();
94 
95 
96  // Member Functions
97  void getData
98  (
99  word name,
100  word type,
101  double ** const& field,
102  label step
103  ) const;
104 
105  void getData
106  (
107  word name,
108  word type,
109  int ** const& field,
110  label step
111  ) const {FatalError<<"function not implemented !!! twoWayFiles::getData!!!\n" << abort(FatalError);};
112 
113  void giveData
114  (
115  word name,
116  word type,
117  double ** const& field,
118  const char* datatype = ""
119  ) const;
120 
121  word myType() const{return typeName; };
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #endif
132 
133 // ************************************************************************* //
Definition: dataExchangeModel.H:53
Definition: twoWayFiles.H:57
Definition: cfdemCloud.H:81