1 | /******************************************************************************/ |
---|
2 | /* */ |
---|
3 | /* CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran) */ |
---|
4 | /* */ |
---|
5 | /* Copyright (C) 2005 Laurent Debreu (Laurent.Debreu@imag.fr) */ |
---|
6 | /* Cyril Mazauric (Cyril.Mazauric@imag.fr) */ |
---|
7 | /* */ |
---|
8 | /* This program is free software; you can redistribute it and/or modify */ |
---|
9 | /* it */ |
---|
10 | /* */ |
---|
11 | /* This program is distributed in the hope that it will be useful, */ |
---|
12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ |
---|
13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ |
---|
14 | /* GNU General Public License for more details. */ |
---|
15 | /* */ |
---|
16 | /******************************************************************************/ |
---|
17 | #define LONGNOM 800 |
---|
18 | #define LONGLIGNE 800 |
---|
19 | |
---|
20 | /******************************************************************************/ |
---|
21 | /*********** Declaration of structures used in conv ***************************/ |
---|
22 | /******************************************************************************/ |
---|
23 | |
---|
24 | typedef struct |
---|
25 | { |
---|
26 | char first[LONGNOM]; |
---|
27 | char last[LONGNOM]; |
---|
28 | } typedim ; /* fortran dimension as 'ndeb:nfin' */ |
---|
29 | |
---|
30 | typedef struct listdim |
---|
31 | { |
---|
32 | typedim dim; |
---|
33 | struct listdim *suiv; |
---|
34 | } listdim; /* list of the dimensions of a variable */ |
---|
35 | |
---|
36 | typedef struct variable |
---|
37 | { |
---|
38 | char typevar[LONGNOM]; |
---|
39 | char nomvar[LONGNOM] ; |
---|
40 | char oldname[LONGNOM] ; |
---|
41 | char dimchar[LONGNOM]; |
---|
42 | listdim *dimension; |
---|
43 | int nbdim; |
---|
44 | struct variable *vinit; |
---|
45 | int common; |
---|
46 | int positioninblock; |
---|
47 | int module; |
---|
48 | int save; |
---|
49 | int VariableIsParameter; |
---|
50 | int PublicDeclare; |
---|
51 | int PrivateDeclare; |
---|
52 | int ExternalDeclare; |
---|
53 | char modulename[LONGNOM]; |
---|
54 | char commonname[LONGNOM]; |
---|
55 | char vallengspec[LONGNOM]; |
---|
56 | char nameinttypename[LONGNOM]; |
---|
57 | int lengspecgiven; |
---|
58 | int pointedvar; |
---|
59 | char commoninfile[LONGNOM]; |
---|
60 | char subroutinename[LONGNOM]; |
---|
61 | int dimensiongiven; |
---|
62 | int c_star; |
---|
63 | int typegiven; |
---|
64 | int isparameter; |
---|
65 | char precision[LONGNOM]; |
---|
66 | char initialvalue[LONGNOM]; |
---|
67 | int indicetabvars; |
---|
68 | int pointerdeclare; |
---|
69 | int optionaldeclare; |
---|
70 | int allocatable; |
---|
71 | char IntentSpec[LONGNOM]; |
---|
72 | int dimsempty; |
---|
73 | char readedlistdimension[LONGNOM]; |
---|
74 | } variable ; /* type of a variable */ |
---|
75 | /* typevar : type (integer, real, ...) */ |
---|
76 | /* nomvar : name of the variable */ |
---|
77 | /* dimension : list of dimensions of the variable */ |
---|
78 | /* nbdim: 1 if the variable is 1d, etc ... */ |
---|
79 | /* precision : Name of the variable which */ |
---|
80 | /* determine the precision. example : wp in the */ |
---|
81 | /* case where REAL(wp) */ |
---|
82 | |
---|
83 | typedef struct listvar |
---|
84 | { |
---|
85 | variable *var ; |
---|
86 | struct listvar * suiv; |
---|
87 | } listvar ; /* list of variables */ |
---|
88 | |
---|
89 | |
---|
90 | typedef struct listvarcommon |
---|
91 | { |
---|
92 | char nomvar[LONGNOM] ; |
---|
93 | char commonname[LONGNOM]; |
---|
94 | char commoninfile[LONGNOM]; |
---|
95 | char subroutinename[LONGNOM]; |
---|
96 | int dimensiongiven; |
---|
97 | int nbdim; |
---|
98 | int indicetabvars; |
---|
99 | int positioninblock; |
---|
100 | listdim *dimension; |
---|
101 | char readedlistdimension[LONGNOM]; |
---|
102 | struct listvarcommon * suiv; |
---|
103 | } listvarcommon ; /* list of variables in common block */ |
---|
104 | |
---|
105 | |
---|
106 | typedef struct listusemodule |
---|
107 | { |
---|
108 | char usemodule[LONGNOM]; |
---|
109 | char charusemodule[LONGNOM]; |
---|
110 | char cursubroutine[LONGNOM]; |
---|
111 | int firstuse; |
---|
112 | struct listusemodule * suiv; |
---|
113 | } listusemodule; /* list of names */ |
---|
114 | |
---|
115 | typedef struct listparameter |
---|
116 | { |
---|
117 | char name[LONGNOM]; |
---|
118 | char modulename[LONGNOM]; |
---|
119 | struct listparameter * suiv; |
---|
120 | } listparameter ; /* list of names */ |
---|
121 | |
---|
122 | typedef struct listnamelist |
---|
123 | { |
---|
124 | char name[LONGNOM]; |
---|
125 | struct listnamelist * suiv; |
---|
126 | } listnamelist ; /* list of names */ |
---|
127 | |
---|
128 | typedef struct listname |
---|
129 | { |
---|
130 | char name[LONGNOM]; |
---|
131 | struct listname* suiv; |
---|
132 | } listname ; /* list of names */ |
---|
133 | |
---|
134 | listname *listimplicitnone; |
---|
135 | |
---|
136 | typedef struct listmodule |
---|
137 | { |
---|
138 | char module[LONGNOM]; |
---|
139 | int InstanceShouldMade; |
---|
140 | int Instance; |
---|
141 | struct listmodule * suiv; |
---|
142 | } listmodule; /* list of names */ |
---|
143 | |
---|
144 | |
---|
145 | |
---|
146 | typedef struct listcouple |
---|
147 | { |
---|
148 | char namevar[LONGNOM]; |
---|
149 | char namepointedvar[LONGNOM]; |
---|
150 | struct listcouple * suiv; |
---|
151 | } listcouple; /* list of names */ |
---|
152 | |
---|
153 | |
---|
154 | typedef struct listnom |
---|
155 | { |
---|
156 | char nom[LONGNOM]; |
---|
157 | listcouple *couple; |
---|
158 | struct listnom * suiv; |
---|
159 | } listnom; /* list of names */ |
---|
160 | |
---|
161 | |
---|
162 | typedef struct listallocate |
---|
163 | { |
---|
164 | char nomvar[LONGNOM]; |
---|
165 | char subroutine[LONGNOM]; |
---|
166 | char module[LONGNOM]; |
---|
167 | struct listallocate * suiv; |
---|
168 | } listallocate ; |
---|
169 | |
---|
170 | |
---|
171 | typedef struct listvarpointtovar |
---|
172 | { |
---|
173 | char usemodule[LONGNOM]; |
---|
174 | char cursubroutine[LONGNOM]; |
---|
175 | listcouple *couple; |
---|
176 | struct listvarpointtovar* suiv; |
---|
177 | }listvarpointtovar ; /* list of names */ |
---|
178 | |
---|
179 | |
---|
180 | typedef struct listindice |
---|
181 | { |
---|
182 | int indice; |
---|
183 | struct listindice * suiv; |
---|
184 | } listindice; /* list of indiced */ |
---|
185 | |
---|
186 | |
---|
187 | typedef struct listparameters |
---|
188 | { |
---|
189 | char initial[LONGNOM]; |
---|
190 | char nom[LONGNOM]; |
---|
191 | char subroutinename[LONGNOM]; |
---|
192 | struct listparameters * suiv; |
---|
193 | } listparameters; /* list of parameters */ |
---|
194 | |
---|
195 | typedef struct |
---|
196 | { |
---|
197 | char name[LONGNOM]; |
---|
198 | char filename[LONGNOM]; |
---|
199 | int inclcommon; |
---|
200 | listvar *lvar; |
---|
201 | } common; |
---|
202 | |
---|
203 | typedef struct listcommons |
---|
204 | { |
---|
205 | common *curcommon ; |
---|
206 | struct listcommons *suiv; |
---|
207 | } listcommons ; |
---|
208 | |
---|
209 | |
---|
210 | typedef struct listcommonsname |
---|
211 | { |
---|
212 | char nom[LONGNOM] ; |
---|
213 | listnom *subroutine; |
---|
214 | struct listcommonsname *suiv; |
---|
215 | } listcommonsname ; |
---|
216 | |
---|
217 | |
---|
218 | |
---|
219 | int fortran77; /* = 1; the code has been writen in */ |
---|
220 | /* fortran77 else in fortran 90 */ |
---|
221 | /******************************************************************************/ |
---|
222 | /**************** *** COMMON Variables *** *********************************/ |
---|
223 | /******************************************************************************/ |
---|
224 | |
---|
225 | int positioninblock; |
---|
226 | char commonvar[LONGNOM]; |
---|
227 | char commonblockname[LONGNOM]; |
---|
228 | listdim *commondim; |
---|
229 | |
---|
230 | /******************************************************************************/ |
---|
231 | /**************** *** AGRIF Variables *** *********************************/ |
---|
232 | /******************************************************************************/ |
---|
233 | int inagrifcallargument; |
---|
234 | int adduseagrifutil; |
---|
235 | |
---|
236 | int InAgrifParentDef; |
---|
237 | |
---|
238 | /******************************************************************************/ |
---|
239 | /**************** *** VAR DEF Variables *** *******************************/ |
---|
240 | /******************************************************************************/ |
---|
241 | int oldindicemaxtabvars; /* Number of variables in the model i.e. last */ |
---|
242 | int indicemaxtabvars; /* Number of variables in the model i.e. last */ |
---|
243 | /* indice used in the tabvars table */ |
---|
244 | int PublicDeclare; /* Variable has been declared as PUBLIC */ |
---|
245 | int PrivateDeclare; /* Variable has been declared as PRIVATE */ |
---|
246 | int ExternalDeclare; /* Variable has been declared as EXTERNAL */ |
---|
247 | int PrecisionGiven; /* A precision has been given for the variable */ |
---|
248 | int CharacterSizeGiven; /* A size for the character has been given */ |
---|
249 | int InitialValueGiven; /* An initial value has been given */ |
---|
250 | int formatdeclare; |
---|
251 | int inttypename; |
---|
252 | int Allocatabledeclare; |
---|
253 | int lengspecgiven; |
---|
254 | int SaveDeclare; |
---|
255 | int pointerdeclare; |
---|
256 | int optionaldeclare; |
---|
257 | int VariableIsParameter; |
---|
258 | int dimsgiven; |
---|
259 | int IntentDeclare; |
---|
260 | int c_star; |
---|
261 | char DeclType[LONGNOM]; |
---|
262 | char nameinttypename[LONGNOM]; |
---|
263 | char InitValue[LONGNOM*2]; |
---|
264 | char IntentSpec[LONGNOM]; |
---|
265 | char NamePrecision[LONGNOM]; |
---|
266 | char CharacterSize[LONGNOM]; |
---|
267 | char curmodulename[LONGNOM]; |
---|
268 | char vallengspec[LONGNOM]; |
---|
269 | char subroutinename[LONGNOM]; |
---|
270 | |
---|
271 | /******************************************************************************/ |
---|
272 | /**************** *** TOAMR Variables *** *********************************/ |
---|
273 | /******************************************************************************/ |
---|
274 | char Alloctreatedname[LONGNOM]; |
---|
275 | |
---|
276 | /******************************************************************************/ |
---|
277 | /**************** *** CONV Variables *** **********************************/ |
---|
278 | /******************************************************************************/ |
---|
279 | int coeffrafx; /* space refinement factor in the x */ |
---|
280 | int coeffrafy; /* space refinement factor in the y */ |
---|
281 | int coeffrafz; /* space refinement factor in the z */ |
---|
282 | int coeffraftx; /* time refinement factor in the x */ |
---|
283 | int coeffrafty; /* time refinement factor in the y */ |
---|
284 | int coeffraftz; /* time refinement factor in the z */ |
---|
285 | int regridding; /* number of time steps between two regridding */ |
---|
286 | int dimprob ; /* dimension of the problem : 1 for 1D,2 for 2D, */ |
---|
287 | /* 3 for 3D */ |
---|
288 | int rafmaxx; |
---|
289 | int rafmaxy; |
---|
290 | int rafmaxz; |
---|
291 | int userefficiency; /* = 1 efficiency is given in the input */ |
---|
292 | int minwidth; /* minimum width of the rectangles in the */ |
---|
293 | /* clustering algorithm */ |
---|
294 | int onlyfixedgrids; /* = 1 if onlyfixedgrids is true */ |
---|
295 | int todebug; |
---|
296 | int fixedgrids; /* = 1 if fixedgrids is true */ |
---|
297 | int efficiency; /* efficacity of the clustering algorithm */ |
---|
298 | /* (by percent) */ |
---|
299 | char nbmaillesX[LONGNOM]; /* number of cells in the x direction */ |
---|
300 | char nbmaillesY[LONGNOM]; /* number of cells in the y direction */ |
---|
301 | char nbmaillesZ[LONGNOM]; /* number of cells in the z direction */ |
---|
302 | int IndicenbmaillesX; |
---|
303 | int IndicenbmaillesY; |
---|
304 | int IndicenbmaillesZ; |
---|
305 | |
---|
306 | listvar *listvartempo; |
---|
307 | variable *variabletempo; |
---|
308 | |
---|
309 | listdim *curdim; |
---|
310 | variable *curvar; |
---|
311 | listvar *globliste; |
---|
312 | listvar *globvarforcommon; |
---|
313 | listvar *globparam; |
---|
314 | listvar *listdatavariable; |
---|
315 | listvar *listargsubroutine; |
---|
316 | listvar *varofsubroutineliste; |
---|
317 | listvar *varsubroutine; |
---|
318 | listvar *listvarindoloop; |
---|
319 | listvar *finglobliste; |
---|
320 | listvar *tmplocallist; |
---|
321 | listvar *parameterlist; |
---|
322 | listvar *globalvarofusefile2; |
---|
323 | listvar *globalvarofusefile; |
---|
324 | listvar *functionlistvar; |
---|
325 | listvar *listenotgriddepend; /* List of the variables which are not grid dependent */ |
---|
326 | listvarcommon *commonlist; |
---|
327 | listusemodule *listofmodulebysubroutine; |
---|
328 | listusemodule *listofincludebysubroutine; |
---|
329 | listusemodule *listofmoduletmp; |
---|
330 | listusemodule *tmpuselocallist; |
---|
331 | listparameter *tmpparameterlocallist2; |
---|
332 | listparameter *tmpparameterlocallist; |
---|
333 | listmodule *listmoduleinfile; |
---|
334 | listnamelist *listenamelist; |
---|
335 | listnom *NewModuleList; |
---|
336 | listnom *listofmodules; |
---|
337 | listnom *modulelist; |
---|
338 | listnom *Listofvariableinagriffunction; |
---|
339 | listnom *listofsubroutinewhereagrifisused; |
---|
340 | listallocate *AllocateList; |
---|
341 | listvarpointtovar *Listofvarpointtovar; |
---|
342 | /* variables which are pointed to an other one */ |
---|
343 | listindice *Listofavailableindices; |
---|
344 | /* List of available indices in the tabvars table */ |
---|
345 | int indeclarationvar; |
---|
346 | int inmodulemeet; |
---|
347 | int incalldeclare; |
---|
348 | int Did_filetoparse_treated; |
---|
349 | int aftercontainsdeclare; /* Signale si l'on vient d'un contains ou non */ |
---|
350 | int colnum; |
---|
351 | int callagrifinitgrids; |
---|
352 | int callmpiinit; |
---|
353 | int firstpass; |
---|
354 | int listofvarofusemodulecreated; |
---|
355 | int couldaddvariable; |
---|
356 | int Savemeet; |
---|
357 | int pointedvar; |
---|
358 | int agrif_parentcall; |
---|
359 | int didvariableadded; |
---|
360 | int infunctiondeclare; |
---|
361 | int SubloopScalar; /* =1 we should put in argument of sub_loop */ |
---|
362 | /* only */ |
---|
363 | /* scalar and not table u(1,1,1) in place of u */ |
---|
364 | int checkexistcommon; |
---|
365 | int insubroutinedeclare; |
---|
366 | int tmpdeclaration_everdone; |
---|
367 | char meetagrifinitgrids[LONGNOM]; |
---|
368 | char meetmpiinit[LONGNOM]; |
---|
369 | char mpiinitvar[LONGNOM]; |
---|
370 | int paramdeclaration_everdone; |
---|
371 | int inmoduledeclare; |
---|
372 | int IntegerIShouldBeAdd; |
---|
373 | int AllocEmpty; |
---|
374 | int dimsempty; |
---|
375 | char *NameTamponfile; |
---|
376 | char toprintglob[LONGNOM]; |
---|
377 | char recorddimension[LONGNOM]; |
---|
378 | char tmpvargridname[LONGLIGNE]; |
---|
379 | char curdimchar[10]; |
---|
380 | char OriginalFileName[LONGNOM]; /* Name of the parsing file*/ |
---|
381 | char EmptyChar[LONGNOM]; /* An empty char */ |
---|
382 | char commonfile[LONGNOM]; |
---|
383 | char curfilename[LONGNOM]; |
---|
384 | char commonfile_main[LONGNOM]; /* name of the common file */ |
---|
385 | char nomfileoutput[LONGNOM]; |
---|
386 | char curbuf[100*LONGNOM]; |
---|
387 | char motparse[LONGNOM]; |
---|
388 | char charusemodule[LONGNOM]; |
---|
389 | char subofagrifinitgrids[LONGNOM]; |
---|
390 | char motparse1[LONGNOM]; |
---|
391 | char curfile[LONGNOM]; /* name of the current file */ |
---|
392 | char mainfile[LONGNOM]; /* name of the configuration file */ |
---|
393 | char nomdir[LONGNOM]; /* name of the directory where include files are put */ |
---|
394 | char commondirout[LONGNOM]; /* name of the directory where comon files are put */ |
---|
395 | char commondirin[LONGNOM]; /* name of the directory containing the common files */ |
---|
396 | char filetoparse[LONGNOM]; /* name of the file where all the module file are listed */ |
---|
397 | |
---|
398 | FILE *fortranout; /* Output File */ |
---|
399 | FILE *fortranin; /* Input File */ |
---|
400 | FILE *oldfortranout; |
---|
401 | FILE *subloop; |
---|
402 | FILE *commontomoduleout; |
---|
403 | FILE *paramtomoduleout; |
---|
404 | FILE *inputmodule; |
---|
405 | FILE *allocationagrif; |
---|
406 | |
---|
407 | long int pos_cur; /* current position in the output file */ |
---|
408 | long int pos_curagrifparent; |
---|
409 | /* current position in the output file */ |
---|
410 | long int pos_curcall; /* current position in the output file */ |
---|
411 | long int pos_curuse; /* current position in the output file */ |
---|
412 | long int pos_cur_decl; /* current position in the output file */ |
---|
413 | long int pos_curdata; /* current position in the output file */ |
---|
414 | long int pos_curparameter;/* current position in the output file */ |
---|
415 | long int pos_curcommon; /* current position in the output file */ |
---|
416 | long int pos_curinit; /* current position in the output file */ |
---|
417 | long int pos_curinclude; /* final position of a line in file */ |
---|
418 | long int pos_end; /* final position of a line in file */ |
---|
419 | |
---|
420 | |
---|
421 | /******************************************************************************/ |
---|
422 | /*********** Declaration of externals subroutines *****************************/ |
---|
423 | /***************************************************** ************************/ |
---|
424 | |
---|
425 | /******************************************************************************/ |
---|
426 | /*********** UtilNotGridDep.c *************************************************/ |
---|
427 | /******************************************************************************/ |
---|
428 | extern void ajoutenotgriddep (char *name); |
---|
429 | extern void RemoveNotgriddependFromGlobliste(); |
---|
430 | extern int VarIsNonGridDepend(char *name); |
---|
431 | extern void DECL_0_NonGridDepDeclaration(listvar *listtomodify); |
---|
432 | /******************************************************************************/ |
---|
433 | /*********** WriteInFile.c ****************************************************/ |
---|
434 | /******************************************************************************/ |
---|
435 | extern void tofich_reste (FILE * filout, char *s,int returnlineornot); |
---|
436 | extern void tofich (FILE * filout, char *s,int returnlineornot); |
---|
437 | extern void tofich_blanc (FILE * filout, int size); |
---|
438 | extern void RemoveWordCUR(FILE * filout, long int position, |
---|
439 | long int sizetoremove); |
---|
440 | extern void RemoveWordSET(FILE * filout, long int position, |
---|
441 | long int sizetoremove); |
---|
442 | /******************************************************************************/ |
---|
443 | /*********** Writedeclarations.c **********************************************/ |
---|
444 | /******************************************************************************/ |
---|
445 | extern void WriteBeginDeclaration(variable *v,char ligne[LONGLIGNE]); |
---|
446 | extern void WriteScalarDeclaration(variable *v,char ligne[LONGLIGNE]); |
---|
447 | extern void WriteTableDeclaration(variable * v,char ligne[LONGLIGNE],int tmpok); |
---|
448 | extern void ModifTableDeclaration(variable * v,char ligne[LONGLIGNE]); |
---|
449 | extern void writevardeclaration (listvar * var_record, FILE *fileout); |
---|
450 | extern void NonGridDepDeclaration(listvar * deb_common); |
---|
451 | extern void writedeclaration (listvar * deb_common, FILE *fileout, |
---|
452 | listvar *presentinthislist); |
---|
453 | extern void writesub_loopdeclaration (listvar * deb_common, FILE *fileout); |
---|
454 | extern void writedeclarationintoamr (listvar * deb_common, FILE *fileout, |
---|
455 | listvar *listin , char commonname[LONGNOM]); |
---|
456 | extern void writedeclarationsubroutinedeclaration(listvar * deb_common, |
---|
457 | FILE *fileout,listvar *listin); |
---|
458 | /******************************************************************************/ |
---|
459 | /*********** WorkWithvarofsubroutineliste.c ***********************************/ |
---|
460 | /******************************************************************************/ |
---|
461 | extern void CleanThelistvarofsubroutineliste(); |
---|
462 | extern void UpdatevarofsubroutinelisteWithcommonlist(); |
---|
463 | extern void OPTI_1_ajoutvarofsubroutine(listvar *listtoadd); |
---|
464 | extern void COM_1_UpdatevarsubroutineWithvarofsubroutinelist(); |
---|
465 | /******************************************************************************/ |
---|
466 | /*********** toamr.c **********************************************************/ |
---|
467 | /******************************************************************************/ |
---|
468 | extern char *variablenameroottabvars (variable * var); |
---|
469 | extern char *variablenametabvars (variable * var, int iorindice); |
---|
470 | extern char *variablecurgridtabvars (variable * var,int ParentOrCurgrid); |
---|
471 | extern char *vargridnametabvars (variable * var,int iorindice); |
---|
472 | extern char *vargridcurgridtabvars (variable * var,int ParentOrCurgrid); |
---|
473 | extern char *vargridparam (variable * v, int whichone); |
---|
474 | extern void write_probdimagrif_file(); |
---|
475 | extern void write_includeagrif_file(); |
---|
476 | extern void write_keysagrif_file(); |
---|
477 | extern void write_clusteringagrif_file(); |
---|
478 | extern void write_modtypeagrif_file(); |
---|
479 | extern void write_createvarnameagrif_file(variable *v,FILE *createvarname, |
---|
480 | int *InitEmpty); |
---|
481 | extern void write_Setnumberofcells_file(); |
---|
482 | extern void write_Getnumberofcells_file(); |
---|
483 | extern void write_initialisationsagrif_file(variable *v,FILE *initproc, |
---|
484 | int *VarnameEmpty); |
---|
485 | extern listnom *write_allocation(listvar *newvar,variable *v, |
---|
486 | listnom *listedesnoms, |
---|
487 | FILE *alloccalls, |
---|
488 | FILE *instanceUSE, |
---|
489 | FILE *modulealloc, |
---|
490 | int *IndiceMax); |
---|
491 | extern void creefichieramr (char *NameTampon); |
---|
492 | /******************************************************************************/ |
---|
493 | /*********** dependfile.c *****************************************************/ |
---|
494 | /******************************************************************************/ |
---|
495 | extern void Writethedependnbxnbyfile_fromgloliste(); |
---|
496 | extern void Readthedependnbxnbyfile_fromgloliste(); |
---|
497 | extern void Writethedependlistofmoduleused(char *NameTampon ); |
---|
498 | extern void Readthedependlistofmoduleused(char *NameTampon); |
---|
499 | extern void WritedependParameterList(char *NameTampon ); |
---|
500 | extern listparameter *ReaddependParameterList(char *NameTampon, |
---|
501 | listparameter *listout); |
---|
502 | extern void Writethedependfile(char *NameTampon, listvar *input ); |
---|
503 | extern void Recordtmplocallist( char *NameTampon); |
---|
504 | extern listvar *Recordglobalvarofusefile( char *NameTampon , listvar *listout); |
---|
505 | extern void Writethedependavailablefile(); |
---|
506 | extern void Readthedependavailablefile(); |
---|
507 | extern int Did_filetoparse_readed(char *NameTampon); |
---|
508 | /******************************************************************************/ |
---|
509 | /*********** SubLoopCreation.c ************************************************/ |
---|
510 | /******************************************************************************/ |
---|
511 | extern void OPTI_0_writeheadnewsubforsub(); |
---|
512 | extern void OPTI_0_writeheadnewsubforfunc(); |
---|
513 | extern void OPTI_0_writesubroutinedeclaration(listvar *listtomodify); |
---|
514 | extern void WriteVariablelist_subloop(FILE *outputfile); |
---|
515 | extern void WriteVariablelist_subloop_Call(FILE *outputfile); |
---|
516 | extern void WriteVariablelist_subloop_Def(FILE *outputfile); |
---|
517 | extern void WriteHeadofSubroutineLoop(); |
---|
518 | extern void OPTI_0_closeandcallsubloopandincludeit(int suborfun, |
---|
519 | char endsub[LONGNOM], char optname[LONGNOM]); |
---|
520 | /******************************************************************************/ |
---|
521 | /*********** WorkWithglobliste.c **********************************************/ |
---|
522 | /******************************************************************************/ |
---|
523 | extern void CompareNewparsingandoldone(); |
---|
524 | extern void decl_1_ajoutevar(listvar *listtoadd); |
---|
525 | extern void decl_1_ajoutevarsave(listvar *listtoadd); |
---|
526 | extern void UpdateIndiceTabvarsofGlobliste(); |
---|
527 | extern void UpdateIndiceTabvarsofGloblisteFromCommon(); |
---|
528 | extern void COM_1_UpdateGloblisteWithcommonlist(); |
---|
529 | /******************************************************************************/ |
---|
530 | /*********** WorkWithlistvarindoloop.c ****************************************/ |
---|
531 | /******************************************************************************/ |
---|
532 | extern void OPTI_1_cleanlistvarfordoloop(int endsuborfunc); |
---|
533 | extern void OPTI_1_ajoutevarindoloop(char *ident); |
---|
534 | extern void ajoutevarindoloop (char *name); |
---|
535 | extern void ajoutevarindoloop_definedimension (char *name); |
---|
536 | extern void CleanFromThelistvarindoloopTheAgrifSubArguments(); |
---|
537 | extern void CleanThelistvarindoloop (); |
---|
538 | extern void ModifyThelistvarindoloop(); |
---|
539 | extern void CompleteThelistvarindoloop(); |
---|
540 | /******************************************************************************/ |
---|
541 | /*********** test.c ***********************************************************/ |
---|
542 | /******************************************************************************/ |
---|
543 | extern int tests_entrees(); |
---|
544 | /******************************************************************************/ |
---|
545 | /*********** WorkWithlistdatavariable.c ***************************************/ |
---|
546 | /******************************************************************************/ |
---|
547 | extern void DATA_n_CompleteDataList (char *name,char *values); |
---|
548 | extern void DATA_1_CompleteGlobListeWithDatalist (); |
---|
549 | /******************************************************************************/ |
---|
550 | /*********** UtilAgrif.c ******************************************************/ |
---|
551 | /******************************************************************************/ |
---|
552 | extern int AGRIF_n_Vartonumber(char *tokname); |
---|
553 | extern int AGRIF_n_Agrif_in_Tok_NAME(char *tokname); |
---|
554 | extern void AGRIF_1_completeListofvariableinagriffunction(char *ident); |
---|
555 | extern void AGRIF_0_ModifyTheVariableName(char *ident); |
---|
556 | extern void AGRIF_n_AddsubroutineTolistsubwhereagrifused(); |
---|
557 | extern void AGRIF_n_AddUseAgrifUtil(); |
---|
558 | extern void AGRIF_0_NotifyAgrifFunction(char *ident); |
---|
559 | extern void AGRIF_0_ModifyTheAgrifFunction(char *ident); |
---|
560 | extern void AGRIF_0_AgriffunctionModify(char *ident,int whichone); |
---|
561 | extern void AGRIF_0_AddUseAgrifInModuleDeclaration(); |
---|
562 | /******************************************************************************/ |
---|
563 | /*********** WorkWithParameterlist.c ******************************************/ |
---|
564 | /******************************************************************************/ |
---|
565 | extern void COM_1_AddvartoParamlist(listvar *listin); |
---|
566 | extern void COM_1_UpdateparameterlistWithlistvarindoloop(); |
---|
567 | /******************************************************************************/ |
---|
568 | /*********** WorkWithAllocatelist.c *******************************************/ |
---|
569 | /******************************************************************************/ |
---|
570 | extern void OPTI_1_AddIdentToTheAllocateList(char *nom); |
---|
571 | extern int OPTI_0_IsAllocateInThisSubroutine(); |
---|
572 | extern int OPTI_0_IsVarAllocatable(char *ident); |
---|
573 | extern int OPTI_0_varisallocatable(char *ident); |
---|
574 | /******************************************************************************/ |
---|
575 | /*********** UtilCharacter.c **************************************************/ |
---|
576 | /******************************************************************************/ |
---|
577 | extern void FindAndChangeNameToTabvars(char name[LONGNOM], |
---|
578 | char toprint[LONGNOM],listvar * listtosee, int ParentOrCurgrid); |
---|
579 | extern char *ChangeTheInitalvaluebyTabvarsName(char *nom,listvar *listtoread, |
---|
580 | int whichone); |
---|
581 | extern void IsVarInUseFile(char *nom); |
---|
582 | extern listnom *DecomposeTheNameinlistnom(char *nom, listnom * listout); |
---|
583 | extern void DecomposeTheName(char *nom); |
---|
584 | /******************************************************************************/ |
---|
585 | /*********** UtilListe.c ******************************************************/ |
---|
586 | /******************************************************************************/ |
---|
587 | extern listvar *AddListvarToListvar(listvar *l,listvar *glob, |
---|
588 | int ValueFirstpass); |
---|
589 | extern void CreateAndFillin_Curvar(char *type,char *tokname, |
---|
590 | listdim *dims,variable *curvar); |
---|
591 | extern listvar *duplicatelistvar(listvar * orig); |
---|
592 | extern listdim *insertdim(listdim *lin,typedim nom); |
---|
593 | extern listdim *reverse(listdim *lin); |
---|
594 | extern void change_dim_char(listdim *lin,listvar * l); |
---|
595 | extern int num_dims(listdim *d); |
---|
596 | extern variable *createvar(char *nom,listdim *d); |
---|
597 | extern listvar *insertvar(listvar *lin,variable *v); |
---|
598 | extern listvar *settype(char *nom,listvar *lin); |
---|
599 | /******************************************************************************/ |
---|
600 | /*********** UtilFile.c *******************************************************/ |
---|
601 | /******************************************************************************/ |
---|
602 | extern FILE * associate (char *filename); |
---|
603 | extern FILE * associateaplus (char *filename); |
---|
604 | extern long int setposcur(); |
---|
605 | extern long int setposcurinoldfortranout(); |
---|
606 | extern void decl_0_modifdeclarationssave(listvar *listtomodify); |
---|
607 | extern void OPTI_0_copyuse(char *namemodule); |
---|
608 | extern void OPTI_0_copyuseonly(char *namemodule); |
---|
609 | /******************************************************************************/ |
---|
610 | /*********** WorkWithlistofmodulebysubroutine.c *******************************/ |
---|
611 | /******************************************************************************/ |
---|
612 | extern void RecordUseModulesVariables(); |
---|
613 | extern void RecordUseModulesUseModulesVariables(); |
---|
614 | extern void Addmoduletothelist(char *name); |
---|
615 | extern void WriteUsemoduleDeclaration(); |
---|
616 | /******************************************************************************/ |
---|
617 | /*********** WorkWithlistmoduleinfile.c ***************************************/ |
---|
618 | /******************************************************************************/ |
---|
619 | extern void MOD_1_FillInlistmodule(); |
---|
620 | extern void MOD_1_InstanceShouldMadeTo0InModule(); |
---|
621 | extern void MOD_1_InstanceShouldMadeTo1InModule(); |
---|
622 | extern void MOD_1_InstanceTo1InModule(); |
---|
623 | extern int MOD_n_InstanceShouldMadeInModule(); |
---|
624 | extern int MOD_n_InstanceInModule(); |
---|
625 | /******************************************************************************/ |
---|
626 | /*********** UtilFortran.c ****************************************************/ |
---|
627 | /******************************************************************************/ |
---|
628 | extern void initdimprob(int dimprobmod, char * nx, char * ny,char* nz); |
---|
629 | extern int Variableshouldberemove(char *nom); |
---|
630 | extern int variableisglobal(listvar *curvar, listvar *listin); |
---|
631 | extern int variableisparameterglobal(listvar *curvar, listparameter *listin); |
---|
632 | extern void addi_0_addsubroutine_inst_back_alloc(int moduleorcontains); |
---|
633 | extern int OPTI_0_IsTabvarsUseInArgument(); |
---|
634 | extern int ImplicitNoneInSubroutine(); |
---|
635 | extern int OPTI_0_varispointer(char *ident); |
---|
636 | /******************************************************************************/ |
---|
637 | /*********** DiversListe.c ****************************************************/ |
---|
638 | /******************************************************************************/ |
---|
639 | extern void COM_1_AddCommonvartolist(); |
---|
640 | extern listnom *Addtolistnom(char *nom, listnom *listin); |
---|
641 | extern listname *Add_listname(char *nom,listname *input); |
---|
642 | extern void Add_ModuleTo_listofmodules(char *nom); |
---|
643 | extern int ModuleIsDefineInInputFile(char *name); |
---|
644 | extern void AddNameToListNamelist(char * name); |
---|
645 | extern void Addmoduletothelisttmp(char *name); |
---|
646 | extern void Add_ModuleTo_Modulelist(char *nom); |
---|
647 | extern void OPTI_1_completelistvarpointtovar(char *namemodule, |
---|
648 | listcouple *couple); |
---|
649 | extern void Addincludetothelist(char *name); |
---|
650 | extern void WriteIncludeDeclaration(); |
---|
651 | /******************************************************************************/ |
---|
652 | extern void processfortran(char *fichier_entree); |
---|