Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tecwrap.C
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: tecwrap.C,v 1.3 2008/12/06 08:45:06 mtcampbe Exp $
24 //
25 // Purpose: Wrappers for TECPLOT functions so can use TECPLOT even when have
26 // conflict with lower/uppercase and trailing underscores.
27 //
28 // Description: None
29 //
30 // Notes: None
31 //
32 // Copyright: (c) 2005 by the University of Illinois
33 
34 #include <string>
35 
36 using namespace std;
37 
38 #include "TECIO.h"
39 
40 #undef TECINI100
41 #undef TECZNE100
42 #undef TECDAT100
43 #undef TECNOD100
44 #undef TECEND100
45 #undef TECFIL100
46 
47 
48 extern "C" {
49  int TECINI100(char *Title,
50  char *Variables,
51  char *FName,
52  char *ScratchDir,
53  int *Debug,
54  int *VIsDouble,
55  int TitleLen,
56  int VariablesLen,
57  int FNameLen,
58  int ScratchDirLen);
59  int TECINI100_(char *Title,
60  char *Variables,
61  char *FName,
62  char *ScratchDir,
63  int *Debug,
64  int *VIsDouble,
65  int TitleLen,
66  int VariablesLen,
67  int FNameLen,
68  int ScratchDirLen);
69  int TECZNE100(char *ZoneTitle,
70  int *ZoneType,
71  int *IMxOrNumPts,
72  int *JMxOrNumElements,
73  int *KMx,
74  int *ICellMx,
75  int *JCellMx,
76  int *KCellMx,
77  int *IsBlock,
78  int *NumFaceConnections,
79  int *FaceNeighborMode,
80  int *ValueLocation,
81  int *ShareVarFromZone,
82  int *ShareConnectivityFromZone,
83  int ZoneTitleLen);
84  int TECZNE100_(char *ZoneTitle,
85  int *ZoneType,
86  int *IMxOrNumPts,
87  int *JMxOrNumElements,
88  int *KMx,
89  int *ICellMx,
90  int *JCellMx,
91  int *KCellMx,
92  int *IsBlock,
93  int *NumFaceConnections,
94  int *FaceNeighborMode,
95  int *ValueLocation,
96  int *ShareVarFromZone,
97  int *ShareConnectivityFromZone,
98  int ZoneTitleLen);
99  int TECDAT100(int *N,
100  void *FieldData,
101  int *IsDouble);
102  int TECDAT100_(int *N,
103  void *FieldData,
104  int *IsDouble);
105  int TECNOD100(int *NData);
106  int TECNOD100_(int *NData);
107  int TECEND100(void);
108  int TECEND100_(void);
109  int TECFIL100(int *F);
110  int TECFIL100_(int *F);
111 };
112 
113 
114 //
115 // TECINI100
116 //
117 
118 int TECINI100(char *Title,
119  char *Variables,
120  char *FName,
121  char *ScratchDir,
122  int *Debug,
123  int *VIsDouble,
124  int TitleLen,
125  int VariablesLen,
126  int FNameLen,
127  int ScratchDirLen) {
128 
129  string TitleS(Title,TitleLen);
130  string VariablesS(Variables,VariablesLen);
131  string FNameS(FName,FNameLen);
132  string ScratchDirS(ScratchDir,ScratchDirLen);
133 
134  return (tecini100((char *)TitleS.c_str(),
135  (char *)VariablesS.c_str(),
136  (char *)FNameS.c_str(),
137  (char *)ScratchDirS.c_str(),
138  Debug,
139  VIsDouble));
140 }
141 
142 int TECINI100_(char *Title,
143  char *Variables,
144  char *FName,
145  char *ScratchDir,
146  int *Debug,
147  int *VIsDouble,
148  int TitleLen,
149  int VariablesLen,
150  int FNameLen,
151  int ScratchDirLen) {
152 
153  string TitleS(Title,TitleLen);
154  string VariablesS(Variables,VariablesLen);
155  string FNameS(FName,FNameLen);
156  string ScratchDirS(ScratchDir,ScratchDirLen);
157 
158  return (tecini100((char *)TitleS.c_str(),
159  (char *)VariablesS.c_str(),
160  (char *)FNameS.c_str(),
161  (char *)ScratchDirS.c_str(),
162  Debug,
163  VIsDouble));
164 }
165 
166 //
167 // TECZNE100
168 //
169 
170 int TECZNE100(char *ZoneTitle,
171  int *ZoneType,
172  int *IMxOrNumPts,
173  int *JMxOrNumElements,
174  int *KMx,
175  int *ICellMx,
176  int *JCellMx,
177  int *KCellMx,
178  int *IsBlock,
179  int *NumFaceConnections,
180  int *FaceNeighborMode,
181  int *ValueLocation,
182  int *ShareVarFromZone,
183  int *ShareConnectivityFromZone,
184  int ZoneTitleLen) {
185 
186  string ZoneTitleS(ZoneTitle,ZoneTitleLen);
187 
188  return (teczne100((char *)ZoneTitle,
189  ZoneType,
190  IMxOrNumPts,
191  JMxOrNumElements,
192  KMx,
193  ICellMx,
194  JCellMx,
195  KCellMx,
196  IsBlock,
197  NumFaceConnections,
198  FaceNeighborMode,
199  ValueLocation,
200  ShareVarFromZone,
201  ShareConnectivityFromZone));
202 
203 }
204 
205 int TECZNE100_(char *ZoneTitle,
206  int *ZoneType,
207  int *IMxOrNumPts,
208  int *JMxOrNumElements,
209  int *KMx,
210  int *ICellMx,
211  int *JCellMx,
212  int *KCellMx,
213  int *IsBlock,
214  int *NumFaceConnections,
215  int *FaceNeighborMode,
216  int *ValueLocation,
217  int *ShareVarFromZone,
218  int *ShareConnectivityFromZone,
219  int ZoneTitleLen) {
220 
221  string ZoneTitleS(ZoneTitle,ZoneTitleLen);
222 
223  return (teczne100((char *)ZoneTitle,
224  ZoneType,
225  IMxOrNumPts,
226  JMxOrNumElements,
227  KMx,
228  ICellMx,
229  JCellMx,
230  KCellMx,
231  IsBlock,
232  NumFaceConnections,
233  FaceNeighborMode,
234  ValueLocation,
235  ShareVarFromZone,
236  ShareConnectivityFromZone));
237 }
238 
239 //
240 // TECDAT100
241 //
242 
243 int TECDAT100(int *N,
244  void *FieldData,
245  int *IsDouble) {
246 
247  return (tecdat100(N,
248  FieldData,
249  IsDouble));
250 }
251 
252 int TECDAT100_(int *N,
253  void *FieldData,
254  int *IsDouble) {
255 
256  return (tecdat100(N,
257  FieldData,
258  IsDouble));
259 }
260 
261 //
262 // TECNOD100
263 //
264 
265 int TECNOD100(int *NData) {
266 
267  return(tecnod100(NData));
268 
269 }
270 
271 int TECNOD100_(int *NData) {
272 
273  return(tecnod100(NData));
274 
275 }
276 
277 //
278 // TECEND100
279 //
280 
281 int TECEND100(void) {
282 
283  return(tecend100());
284 
285 }
286 
287 int TECEND100_(void) {
288 
289  return(tecend100());
290 
291 }
292 
293 
294 //
295 // TECFIL100
296 //
297 
298 int TECFIL100(int *F) {
299 
300  return(tecfil100(F));
301 
302 }
303 
304 int TECFIL100_(int *F) {
305 
306  return(tecfil100(F));
307 
308 }
309 
310 
311 
312 // RCS Revision history:
313 //
314 // $Log: tecwrap.C,v $
315 // Revision 1.3 2008/12/06 08:45:06 mtcampbe
316 // Updated license.
317 //
318 // Revision 1.2 2008/11/19 22:18:17 mtcampbe
319 // Added Illinois Open Source License/Copyright
320 //
321 // Revision 1.1 2005/05/03 20:35:32 haselbac
322 // Initial revision
323 //
324 
325 
326 
327 
328 
329 
int TECDAT100(int *N, void *FieldData, int *IsDouble)
Definition: tecwrap.C:243
int TECFIL100(int *F)
Definition: tecwrap.C:298
int TECEND100(void)
Definition: tecwrap.C:281
int TECINI100(char *Title, char *Variables, char *FName, char *ScratchDir, int *Debug, int *VIsDouble, int TitleLen, int VariablesLen, int FNameLen, int ScratchDirLen)
Definition: tecwrap.C:118
int TECEND100_(void)
Definition: tecwrap.C:287
int TECINI100_(char *Title, char *Variables, char *FName, char *ScratchDir, int *Debug, int *VIsDouble, int TitleLen, int VariablesLen, int FNameLen, int ScratchDirLen)
Definition: tecwrap.C:142
int TECDAT100_(int *N, void *FieldData, int *IsDouble)
Definition: tecwrap.C:252
int TECNOD100_(int *NData)
Definition: tecwrap.C:271
int TECNOD100(int *NData)
Definition: tecwrap.C:265
int TECZNE100_(char *ZoneTitle, int *ZoneType, int *IMxOrNumPts, int *JMxOrNumElements, int *KMx, int *ICellMx, int *JCellMx, int *KCellMx, int *IsBlock, int *NumFaceConnections, int *FaceNeighborMode, int *ValueLocation, int *ShareVarFromZone, int *ShareConnectivityFromZone, int ZoneTitleLen)
Definition: tecwrap.C:205
int TECZNE100(char *ZoneTitle, int *ZoneType, int *IMxOrNumPts, int *JMxOrNumElements, int *KMx, int *ICellMx, int *JCellMx, int *KCellMx, int *IsBlock, int *NumFaceConnections, int *FaceNeighborMode, int *ValueLocation, int *ShareVarFromZone, int *ShareConnectivityFromZone, int ZoneTitleLen)
Definition: tecwrap.C:170
int TECFIL100_(int *F)
Definition: tecwrap.C:304