source: branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/EXTERNAL/AGRIF/LIB/WorkWithlistofcoupled.c @ 5445

Last change on this file since 5445 was 5445, checked in by davestorkey, 5 years ago

Clear SVN keywords from 2015/dev_r5021_UKMO1_CICE_coupling branch.

File size: 5.0 KB
Line 
1/******************************************************************************/
2/*                                                                            */
3/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
4/*                                                                            */
5/* Copyright or    or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)           */
6/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
7/* This software is governed by the CeCILL-C license under French law and     */
8/* abiding by the rules of distribution of free software.  You can  use,      */
9/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
10/* license as circulated by CEA, CNRS and INRIA at the following URL          */
11/* "http://www.cecill.info".                                                  */
12/*                                                                            */
13/* As a counterpart to the access to the source code and  rights to copy,     */
14/* modify and redistribute granted by the license, users are provided only    */
15/* with a limited warranty  and the software's author,  the holder of the     */
16/* economic rights,  and the successive licensors  have only  limited         */
17/* liability.                                                                 */
18/*                                                                            */
19/* In this respect, the user's attention is drawn to the risks associated     */
20/* with loading,  using,  modifying and/or developing or reproducing the      */
21/* software by the user in light of its specific status of free software,     */
22/* that may mean  that it is complicated to manipulate,  and  that  also      */
23/* therefore means  that it is reserved for developers  and  experienced      */
24/* professionals having in-depth computer knowledge. Users are therefore      */
25/* encouraged to load and test the software's suitability as regards their    */
26/* requirements in conditions enabling the security of their systems and/or   */
27/* data to be ensured and,  more generally, to use and operate it in the      */
28/* same conditions as regards security.                                       */
29/*                                                                            */
30/* The fact that you are presently reading this means that you have had       */
31/* knowledge of the CeCILL-C license and that you accept its terms.           */
32/******************************************************************************/
33/* version 1.7                                                                */
34/******************************************************************************/
35#include <stdio.h>
36#include <stdlib.h>
37#include <string.h>
38
39#include "decl.h"
40
41/******************************************************************************/
42/*                          varisallocatable_0                                */
43/******************************************************************************/
44/* Firstpass 0                                                                */
45/******************************************************************************/
46/*                                                                            */
47/******************************************************************************/
48int variscoupled_0(char *ident)
49{
50   listallocate *newvaralloc;
51  listvarpointtovar *pointtmplist; 
52  listcouple *coupletmp;   
53  int out;
54
55   out =0;
56   if (firstpass == 0 )
57   {
58  pointtmplist = List_CouplePointed_Var;
59  while ( pointtmplist && out == 0)
60  {
61      coupletmp = pointtmplist->t_couple;
62      while ( coupletmp && out == 0)
63      {
64           /* we should find the same variable name in the same subroutine    */
65           if ( !strcasecmp(ident,coupletmp->c_namevar) &&
66                !strcasecmp(subroutinename,
67                                       pointtmplist->t_cursubroutine) &&
68                 strcasecmp(coupletmp->c_namepointedvar,"")
69              )
70           {
71              out = 1;
72           }
73         coupletmp = coupletmp->suiv;
74     }
75     pointtmplist = pointtmplist->suiv;
76   }
77   }
78   return out;
79}
80
81char * getcoupledname_0(char *ident)
82{
83   listallocate *newvaralloc;
84  listvarpointtovar *pointtmplist; 
85  listcouple *coupletmp;   
86  int out;
87
88   out =0;
89   if (firstpass == 0 )
90   {
91  pointtmplist = List_CouplePointed_Var;
92  while ( pointtmplist && out == 0)
93  {
94      coupletmp = pointtmplist->t_couple;
95      while ( coupletmp && out == 0)
96      {
97           /* we should find the same variable name in the same subroutine    */
98           if ( !strcasecmp(ident,coupletmp->c_namevar) &&
99                !strcasecmp(subroutinename,
100                                       pointtmplist->t_cursubroutine) &&
101                 strcasecmp(coupletmp->c_namepointedvar,"")
102              )
103           {
104              return(coupletmp->c_namepointedvar);
105           }
106         coupletmp = coupletmp->suiv;
107     }
108     pointtmplist = pointtmplist->suiv;
109   }
110   }
111}
Note: See TracBrowser for help on using the repository browser.