source: XIOS/dev/dev_cmip6_omp/src/generate_fortran_interface.cpp @ 1606

Last change on this file since 1606 was 1492, checked in by oabramkina, 6 years ago

Updating fortran interface for attributes that have been recently introduced and the following filters:

duplicate_scalar_to_axis
reduce_axis_to_axis
reduce_scalar_to_scalar
reorder_domain
temporal_splitting.

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:eol-style set to native
File size: 13.8 KB
Line 
1#include "xios.hpp"
2#include "generate_interface.hpp"
3#include "indent.hpp"
4#include "attribute_template.hpp"
5#include "object_template.hpp"
6#include "group_template.hpp"
7#include "node_type.hpp"
8
9int main (int argc, char ** argv, char ** UNUSED (env))
10{
11//  string path="./src/attr_interface/";
12  string path="./interface/";
13
14  CContext* context=CContext::create("interface");
15  CCalendarWrapper calendarWrapper;
16  CScalar scalar;
17  CScalarGroup scalargroup;
18  CAxis axis;
19  CAxisGroup axisgroup;
20  CField field;
21  CFieldGroup fieldgroup;
22  CVariable variable;
23  CVariableGroup variablegroup;
24  CDomain domain;
25  CDomainGroup domaingroup;
26  CGrid grid;
27  CGridGroup gridgroup;
28
29  CFile afile;
30  CFileGroup filegroup;
31
32  CInterpolateDomain interpolateDomain;
33  CZoomDomain zoomDomain;
34  CGenerateRectilinearDomain genDomain;
35  CComputeConnectivityDomain compConDomain;
36  CExpandDomain expandDomain;
37  CReorderDomain reorderDomain;
38
39  CInterpolateAxis interpolateAxis;
40  CZoomAxis zoomAxis;
41  CInverseAxis inverseAxis;
42  CReduceDomainToAxis reduceDomainToAxis;
43  CReduceAxisToAxis reduceAxisToAxis;
44  CExtractDomainToAxis extractDomainToAxis;
45  CTemporalSplitting temporalSplitting;
46
47  CReduceAxisToScalar reduceAxisToScalar;
48  CExtractAxisToScalar extractAxisToScalar;
49  CReduceDomainToScalar reduceDomainToScalar;
50  CDuplicateScalarToAxis duplicateScalarToAxis;
51  CReduceScalarToScalar reduceScalarToScalar;
52 
53  ostringstream oss;
54  ofstream file;
55
56  file.open((path+"scalar_interface_attr.F90").c_str());
57  scalar.generateFortran2003Interface(file);
58  file.close();
59
60  file.open((path+"icscalar_attr.cpp").c_str());
61  scalar.generateCInterface(file);
62  file.close();
63
64  file.open((path+"iscalar_attr.F90").c_str());
65  scalar.generateFortranInterface(file);
66  file.close();
67
68  file.open((path+"scalargroup_interface_attr.F90").c_str());
69  scalargroup.generateFortran2003Interface(file);
70  file.close();
71
72  file.open((path+"icscalargroup_attr.cpp").c_str());
73  scalargroup.generateCInterface(file);
74  file.close();
75
76  file.open((path+"iscalargroup_attr.F90").c_str());
77  scalargroup.generateFortranInterface(file);
78  file.close();
79
80  file.open((path+"axis_interface_attr.F90").c_str());
81  axis.generateFortran2003Interface(file);
82  file.close();
83
84  file.open((path+"icaxis_attr.cpp").c_str());
85  axis.generateCInterface(file);
86  file.close();
87
88  file.open((path+"iaxis_attr.F90").c_str());
89  axis.generateFortranInterface(file);
90  file.close();
91
92  file.open((path+"axisgroup_interface_attr.F90").c_str());
93  axisgroup.generateFortran2003Interface(file);
94  file.close();
95
96  file.open((path+"icaxisgroup_attr.cpp").c_str());
97  axisgroup.generateCInterface(file);
98  file.close();
99
100  file.open((path+"iaxisgroup_attr.F90").c_str());
101  axisgroup.generateFortranInterface(file);
102  file.close();
103
104  file.open((path+"domain_interface_attr.F90").c_str());
105  domain.generateFortran2003Interface(file);
106  file.close();
107
108  file.open((path+"icdomain_attr.cpp").c_str());
109  domain.generateCInterface(file);
110  file.close();
111
112  file.open((path+"idomain_attr.F90").c_str());
113  domain.generateFortranInterface(file);
114  file.close();
115
116  file.open((path+"domaingroup_interface_attr.F90").c_str());
117  domaingroup.generateFortran2003Interface(file);
118  file.close();
119
120  file.open((path+"icdomaingroup_attr.cpp").c_str());
121  domaingroup.generateCInterface(file);
122  file.close();
123
124  file.open((path+"idomaingroup_attr.F90").c_str());
125  domaingroup.generateFortranInterface(file);
126  file.close();
127
128
129  file.open((path+"grid_interface_attr.F90").c_str());
130  grid.generateFortran2003Interface(file);
131  file.close();
132
133  file.open((path+"icgrid_attr.cpp").c_str());
134  grid.generateCInterface(file);
135  file.close();
136
137  file.open((path+"igrid_attr.F90").c_str());
138  grid.generateFortranInterface(file);
139  file.close();
140
141  file.open((path+"gridgroup_interface_attr.F90").c_str());
142  gridgroup.generateFortran2003Interface(file);
143  file.close();
144
145  file.open((path+"icgridgroup_attr.cpp").c_str());
146  gridgroup.generateCInterface(file);
147  file.close();
148
149  file.open((path+"igridgroup_attr.F90").c_str());
150  gridgroup.generateFortranInterface(file);
151  file.close();
152
153
154  file.open((path+"field_interface_attr.F90").c_str());
155  field.generateFortran2003Interface(file);
156  file.close();
157
158  file.open((path+"icfield_attr.cpp").c_str());
159  field.generateCInterface(file);
160  file.close();
161
162  file.open((path+"ifield_attr.F90").c_str());
163  field.generateFortranInterface(file);
164  file.close();
165
166  file.open((path+"fieldgroup_interface_attr.F90").c_str());
167  fieldgroup.generateFortran2003Interface(file);
168  file.close();
169
170  file.open((path+"icfieldgroup_attr.cpp").c_str());
171  fieldgroup.generateCInterface(file);
172  file.close();
173
174  file.open((path+"ifieldgroup_attr.F90").c_str());
175  fieldgroup.generateFortranInterface(file);
176  file.close();
177
178
179
180  file.open((path+"variable_interface_attr.F90").c_str());
181  variable.generateFortran2003Interface(file);
182  file.close();
183
184  file.open((path+"icvariable_attr.cpp").c_str());
185  variable.generateCInterface(file);
186  file.close();
187
188  file.open((path+"ivariable_attr.F90").c_str());
189  variable.generateFortranInterface(file);
190  file.close();
191
192  file.open((path+"variablegroup_interface_attr.F90").c_str());
193  variablegroup.generateFortran2003Interface(file);
194  file.close();
195
196  file.open((path+"icvariablegroup_attr.cpp").c_str());
197  variablegroup.generateCInterface(file);
198  file.close();
199
200  file.open((path+"ivariablegroup_attr.F90").c_str());
201  variablegroup.generateFortranInterface(file);
202  file.close();
203
204
205
206  file.open((path+"file_interface_attr.F90").c_str());
207  afile.generateFortran2003Interface(file);
208  file.close();
209
210  file.open((path+"icfile_attr.cpp").c_str());
211  afile.generateCInterface(file);
212  file.close();
213
214  file.open((path+"ifile_attr.F90").c_str());
215  afile.generateFortranInterface(file);
216  file.close();
217
218  file.open((path+"filegroup_interface_attr.F90").c_str());
219  filegroup.generateFortran2003Interface(file);
220  file.close();
221
222  file.open((path+"icfilegroup_attr.cpp").c_str());
223  filegroup.generateCInterface(file);
224  file.close();
225
226  file.open((path+"ifilegroup_attr.F90").c_str());
227  filegroup.generateFortranInterface(file);
228  file.close();
229
230
231  file.open((path+"calendar_wrapper_interface_attr.F90").c_str());
232  calendarWrapper.generateFortran2003Interface(file);
233  file.close();
234
235  file.open((path+"iccalendar_wrapper_attr.cpp").c_str());
236  calendarWrapper.generateCInterface(file);
237  file.close();
238
239  file.open((path+"icalendar_wrapper_attr.F90").c_str());
240  calendarWrapper.generateFortranInterface(file);
241  file.close();
242
243  /*!
244    Domain transformations
245  */
246  file.open((path+"zoom_domain_interface_attr.F90").c_str());
247  zoomDomain.generateFortran2003Interface(file);
248  file.close();
249
250  file.open((path+"iczoom_domain_attr.cpp").c_str());
251  zoomDomain.generateCInterface(file);
252  file.close();
253
254  file.open((path+"izoom_domain_attr.F90").c_str());
255  zoomDomain.generateFortranInterface(file);
256  file.close();
257
258  file.open((path+"interpolate_domain_interface_attr.F90").c_str());
259  interpolateDomain.generateFortran2003Interface(file);
260  file.close();
261
262  file.open((path+"icinterpolate_domain_attr.cpp").c_str());
263  interpolateDomain.generateCInterface(file);
264  file.close();
265
266  file.open((path+"iinterpolate_domain_attr.F90").c_str());
267  interpolateDomain.generateFortranInterface(file);
268  file.close();
269
270  file.open((path+"generate_rectilinear_domain_interface_attr.F90").c_str());
271  genDomain.generateFortran2003Interface(file);
272  file.close();
273
274  file.open((path+"icgenerate_rectilinear_domain_attr.cpp").c_str());
275  genDomain.generateCInterface(file);
276  file.close();
277
278  file.open((path+"igenerate_rectilinear_domain_attr.F90").c_str());
279  genDomain.generateFortranInterface(file);
280  file.close();
281
282  file.open((path+"compute_connectivity_domain_interface_attr.F90").c_str());
283  compConDomain.generateFortran2003Interface(file);
284  file.close();
285
286  file.open((path+"iccompute_connectivity_domain_attr.cpp").c_str());
287  compConDomain.generateCInterface(file);
288  file.close();
289
290  file.open((path+"icompute_connectivity_domain_attr.F90").c_str());
291  compConDomain.generateFortranInterface(file);
292  file.close();
293
294  file.open((path+"expand_domain_interface_attr.F90").c_str());
295  expandDomain.generateFortran2003Interface(file);
296  file.close();
297
298  file.open((path+"icexpand_domain_attr.cpp").c_str());
299  expandDomain.generateCInterface(file);
300  file.close();
301
302  file.open((path+"iexpand_domain_attr.F90").c_str());
303  expandDomain.generateFortranInterface(file);
304  file.close();
305
306  file.open((path+"reorder_domain_interface_attr.F90").c_str());
307  reorderDomain.generateFortran2003Interface(file);
308  file.close();
309
310  file.open((path+"icreorder_domain_attr.cpp").c_str());
311  reorderDomain.generateCInterface(file);
312  file.close();
313
314  file.open((path+"ireorder_domain_attr.F90").c_str());
315  reorderDomain.generateFortranInterface(file);
316
317  file.close();
318 
319  /*!
320    Axis transformations
321  */
322  file.open((path+"zoom_axis_interface_attr.F90").c_str());
323  zoomAxis.generateFortran2003Interface(file);
324  file.close();
325
326  file.open((path+"iczoom_axis_attr.cpp").c_str());
327  zoomAxis.generateCInterface(file);
328  file.close();
329
330  file.open((path+"izoom_axis_attr.F90").c_str());
331  zoomAxis.generateFortranInterface(file);
332  file.close();
333
334  file.open((path+"interpolate_axis_interface_attr.F90").c_str());
335  interpolateAxis.generateFortran2003Interface(file);
336  file.close();
337
338  file.open((path+"icinterpolate_axis_attr.cpp").c_str());
339  interpolateAxis.generateCInterface(file);
340  file.close();
341
342  file.open((path+"iinterpolate_axis_attr.F90").c_str());
343  interpolateAxis.generateFortranInterface(file);
344  file.close();
345
346  file.open((path+"inverse_axis_interface_attr.F90").c_str());
347  inverseAxis.generateFortran2003Interface(file);
348  file.close();
349
350  file.open((path+"icinverse_axis_attr.cpp").c_str());
351  inverseAxis.generateCInterface(file);
352  file.close();
353
354  file.open((path+"iinverse_axis_attr.F90").c_str());
355  inverseAxis.generateFortranInterface(file);
356  file.close();
357
358  file.open((path+"reduce_domain_to_axis_interface_attr.F90").c_str());
359  reduceDomainToAxis.generateFortran2003Interface(file);
360  file.close();
361 
362  file.open((path+"icreduce_domain_to_axis_attr.cpp").c_str());
363  reduceDomainToAxis.generateCInterface(file);
364  file.close();
365
366  file.open((path+"ireduce_domain_to_axis_attr.F90").c_str());
367  reduceDomainToAxis.generateFortranInterface(file);
368  file.close();
369
370  file.open((path+"reduce_axis_to_axis_interface_attr.F90").c_str());
371  reduceAxisToAxis.generateFortran2003Interface(file);
372  file.close();
373 
374  file.open((path+"icreduce_axis_to_axis_attr.cpp").c_str());
375  reduceAxisToAxis.generateCInterface(file);
376  file.close();
377
378  file.open((path+"ireduce_axis_to_axis_attr.F90").c_str());
379  reduceAxisToAxis.generateFortranInterface(file);
380  file.close();
381 
382  file.open((path+"extract_domain_to_axis_interface_attr.F90").c_str());
383  extractDomainToAxis.generateFortran2003Interface(file);
384  file.close();
385
386  file.open((path+"icextract_domain_to_axis_attr.cpp").c_str());
387  extractDomainToAxis.generateCInterface(file);
388  file.close();
389
390  file.open((path+"iextract_domain_to_axis_attr.F90").c_str());
391  extractDomainToAxis.generateFortranInterface(file);
392  file.close();
393
394
395  file.open((path+"temporal_splitting_interface_attr.F90").c_str());
396  temporalSplitting.generateFortran2003Interface(file);
397  file.close();
398
399  file.open((path+"ictemporal_splitting_attr.cpp").c_str());
400  temporalSplitting.generateCInterface(file);
401  file.close();
402
403  file.open((path+"itemporal_splitting_attr.F90").c_str());
404  temporalSplitting.generateFortranInterface(file);
405  file.close();
406
407
408  file.open((path+"duplicate_scalar_to_axis_interface_attr.F90").c_str());
409  duplicateScalarToAxis.generateFortran2003Interface(file);
410  file.close();
411 
412  file.open((path+"icduplicate_scalar_to_axis_attr.cpp").c_str());
413  duplicateScalarToAxis.generateCInterface(file);
414  file.close();
415 
416  file.open((path+"iduplicate_scalar_to_axis_attr.F90").c_str());
417  duplicateScalarToAxis.generateFortranInterface(file);
418  file.close();
419  /*!
420    Scalar transformations
421  */
422  file.open((path+"reduce_axis_to_scalar_interface_attr.F90").c_str());
423  reduceAxisToScalar.generateFortran2003Interface(file);
424  file.close();
425
426  file.open((path+"icreduce_axis_to_scalar_attr.cpp").c_str());
427  reduceAxisToScalar.generateCInterface(file);
428  file.close();
429
430  file.open((path+"ireduce_axis_to_scalar_attr.F90").c_str());
431  reduceAxisToScalar.generateFortranInterface(file);
432  file.close();
433
434  file.open((path+"extract_axis_to_scalar_interface_attr.F90").c_str());
435  extractAxisToScalar.generateFortran2003Interface(file);
436  file.close();
437
438  file.open((path+"icextract_axis_to_scalar_attr.cpp").c_str());
439  extractAxisToScalar.generateCInterface(file);
440  file.close();
441
442  file.open((path+"iextract_axis_to_scalar_attr.F90").c_str());
443  extractAxisToScalar.generateFortranInterface(file);
444  file.close();
445
446
447  file.open((path+"reduce_domain_to_scalar_interface_attr.F90").c_str());
448  reduceDomainToScalar.generateFortran2003Interface(file);
449  file.close();
450
451  file.open((path+"icreduce_domain_to_scalar_attr.cpp").c_str());
452  reduceDomainToScalar.generateCInterface(file);
453  file.close();
454
455  file.open((path+"ireduce_domain_to_scalar_attr.F90").c_str());
456  reduceDomainToScalar.generateFortranInterface(file);
457  file.close();
458
459
460  file.open((path+"reduce_scalar_to_scalar_interface_attr.F90").c_str());
461  reduceScalarToScalar.generateFortran2003Interface(file);
462  file.close();
463
464  file.open((path+"icreduce_scalar_to_scalar_attr.cpp").c_str());
465  reduceScalarToScalar.generateCInterface(file);
466  file.close();
467
468  file.open((path+"ireduce_scalar_to_scalar_attr.F90").c_str());
469  reduceScalarToScalar.generateFortranInterface(file);
470  file.close();
471
472
473
474
475
476  file.open((path+"context_interface_attr.F90").c_str());
477  context->generateFortran2003Interface(file);
478  file.close();
479
480  file.open((path+"iccontext_attr.cpp").c_str());
481  context->generateCInterface(file);
482  file.close();
483
484  file.open((path+"icontext_attr.F90").c_str());
485  context->generateFortranInterface(file);
486  file.close();
487}
Note: See TracBrowser for help on using the repository browser.