visuLambertCoord.edp 6.23 KB
Newer Older
Olivier Bonnefon's avatar
Olivier Bonnefon committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
load "BinaryIO";
include "paramsTS.edp";
include "myMacro.edp";
include "defGeomGen.edp"
include "defDofsGen.edp"


mesh ThALL=readmesh("../france.msh");
	
plot(ThALL,wait=true);

fespace VALL(ThALL,P1);

VALL vall;
VALL vabuf;

matrix IVA0=interpolate(VALL,Vh0,inside=1);
matrix IVA1=interpolate(VALL,Vh1,inside=1);
matrix IVA2=interpolate(VALL,Vh2,inside=1);
matrix IVA3=interpolate(VALL,Vh3,inside=1);
matrix IVA4=interpolate(VALL,Vh4,inside=1);
matrix IVA5=interpolate(VALL,Vh5,inside=1);
matrix IVA6=interpolate(VALL,Vh6,inside=1);
matrix IVA7=interpolate(VALL,Vh7,inside=1);
matrix IVA8=interpolate(VALL,Vh8,inside=1);
matrix IVA9=interpolate(VALL,Vh9,inside=1);
matrix IVA10=interpolate(VALL,Vh10,inside=1);
matrix IVA11=interpolate(VALL,Vh11,inside=1);
matrix IVA12=interpolate(VALL,Vh12,inside=1);
matrix IVA13=interpolate(VALL,Vh13,inside=1);
matrix IVA14=interpolate(VALL,Vh14,inside=1);

int curStep=0;
int numRun=0;
int size;
//mesh ThALL=readmesh("../france.msh");
//fespace VALL(ThALL,P1);
fespace VALL0(ThALL,P0);
VALL UALL;
UALL=0;
plot(ThALL,UALL);

VALL0 nuT;
for (int i=0;i<ThALL.nt;i++)
  nuT[][i]=i;


int NlocationsLamberts=2;
real[int] Xlambert(NlocationsLamberts);
real[int] Ylambert(NlocationsLamberts);
int[int] numDoflambert(NlocationsLamberts);
//coordonne avignon en lambert II etendu
Xlambert[0]=798256;
Ylambert[0]=1886174;
//coordonne paris en lambert II etendu
Xlambert[1]=601638;
Ylambert[1]=2428265;

for (int i=0;i<NlocationsLamberts;i++){
  int numT=nuT(Xlambert[i],Ylambert[i]);
  numDoflambert[i]=ThALL[numT][0];
  UALL[][numDoflambert[i]]=1;
}

plot(ThALL,UALL);
string REPSIMU="../SAVE/LOW/";
ofstream pTraj("traj.txt");
{
  GetSizeVec(size,REPSIMU+"u2d0__rep_"+string(numRun));
  real[int] u0(size);
  LoadVec(u0,REPSIMU+"u2d0__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d1__rep_"+string(numRun));
  real[int] u1(size);
  LoadVec(u1,REPSIMU+"u2d1__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d2__rep_"+string(numRun));
  real[int] u2(size);
  LoadVec(u2,REPSIMU+"u2d2__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d3__rep_"+string(numRun));
  real[int] u3(size);
  LoadVec(u3,REPSIMU+"u2d3__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d4__rep_"+string(numRun));
  real[int] u4(size);
  LoadVec(u4,REPSIMU+"u2d4__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d5__rep_"+string(numRun));
  real[int] u5(size);
  LoadVec(u5,REPSIMU+"u2d5__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d6__rep_"+string(numRun));
  real[int] u6(size);
  LoadVec(u6,REPSIMU+"u2d6__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d7__rep_"+string(numRun));
  real[int] u7(size);
  LoadVec(u7,REPSIMU+"u2d7__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d8__rep_"+string(numRun));
  real[int] u8(size);
  LoadVec(u8,REPSIMU+"u2d8__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d9__rep_"+string(numRun));
  real[int] u9(size);
  LoadVec(u9,REPSIMU+"u2d9__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d10__rep_"+string(numRun));
  real[int] u10(size);
  LoadVec(u10,REPSIMU+"u2d10__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d11__rep_"+string(numRun));
  real[int] u11(size);
  LoadVec(u11,REPSIMU+"u2d11__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d12__rep_"+string(numRun));
  real[int] u12(size);
  LoadVec(u12,REPSIMU+"u2d12__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d13__rep_"+string(numRun));
  real[int] u13(size);
  LoadVec(u13,REPSIMU+"u2d13__rep_"+string(numRun));
  
  GetSizeVec(size,REPSIMU+"u2d14__rep_"+string(numRun));
  real[int] u14(size);
  LoadVec(u14,REPSIMU+"u2d14__rep_"+string(numRun));
  int nbCallSave=0;
  for (CURYEAR=FIRSTYEAR; CURYEAR<=LASTYEAR; CURYEAR++){
    int firstStep=0;
    if (CURYEAR==2011)
      firstStep=362-122;
    for ( curStep=firstStep;curStep<nbSteps-1;curStep++){
      cout<<CURYEAR<<" "<<curStep<<endl;
      utm12d0[]=u0(nbCallSave*utm12d0.n:(nbCallSave+1)*utm12d0.n);
      utm12d1[]=u1(nbCallSave*utm12d1.n:(nbCallSave+1)*utm12d1.n);
      utm12d2[]=u2(nbCallSave*utm12d2.n:(nbCallSave+1)*utm12d2.n);
      utm12d3[]=u3(nbCallSave*utm12d3.n:(nbCallSave+1)*utm12d3.n);
      utm12d4[]=u4(nbCallSave*utm12d4.n:(nbCallSave+1)*utm12d4.n);
      utm12d5[]=u5(nbCallSave*utm12d5.n:(nbCallSave+1)*utm12d5.n);
      utm12d6[]=u6(nbCallSave*utm12d6.n:(nbCallSave+1)*utm12d6.n);
      utm12d7[]=u7(nbCallSave*utm12d7.n:(nbCallSave+1)*utm12d7.n);
      utm12d8[]=u8(nbCallSave*utm12d8.n:(nbCallSave+1)*utm12d8.n);
      utm12d9[]=u9(nbCallSave*utm12d9.n:(nbCallSave+1)*utm12d9.n);
      utm12d10[]=u10(nbCallSave*utm12d10.n:(nbCallSave+1)*utm12d10.n);
      utm12d11[]=u11(nbCallSave*utm12d11.n:(nbCallSave+1)*utm12d11.n);
      utm12d12[]=u12(nbCallSave*utm12d12.n:(nbCallSave+1)*utm12d12.n);
      utm12d13[]=u13(nbCallSave*utm12d13.n:(nbCallSave+1)*utm12d13.n);
      utm12d14[]=u14(nbCallSave*utm12d14.n:(nbCallSave+1)*utm12d14.n);
      

      
      VALL vabuf=0;
      VALL vall=0;
      vabuf[]=IVA0*utm12d0[];
      adddofs(vall,vabuf);
      vabuf[]=IVA1*utm12d1[];
      adddofs(vall,vabuf);
      vabuf[]=IVA2*utm12d2[];
      adddofs(vall,vabuf);
      vabuf[]=IVA3*utm12d3[];
      adddofs(vall,vabuf);
      vabuf[]=IVA4*utm12d4[];
      adddofs(vall,vabuf);
      vabuf[]=IVA5*utm12d5[];
      adddofs(vall,vabuf);
      vabuf[]=IVA6*utm12d6[];
      adddofs(vall,vabuf);
      vabuf[]=IVA7*utm12d7[];
      adddofs(vall,vabuf);
      vabuf[]=IVA8*utm12d8[];
      adddofs(vall,vabuf);
      vabuf[]=IVA9*utm12d9[];
      adddofs(vall,vabuf);
      vabuf[]=IVA10*utm12d10[];
      adddofs(vall,vabuf);
      vabuf[]=IVA11*utm12d11[];
      adddofs(vall,vabuf);
      vabuf[]=IVA12*utm12d12[];
      adddofs(vall,vabuf);
      vabuf[]=IVA13*utm12d13[];
      adddofs(vall,vabuf);
      vabuf[]=IVA14*utm12d14[];
      adddofs(vall,vabuf);
      for (int i=0;i<NlocationsLamberts;i++){
        pTraj<<vall(Xlambert[i],Ylambert[i])<<" ";
      }
      pTraj<<"\n";
      if (0 && !(nbCallSave % 10)){
        plot(utm12d0,utm12d1,utm12d2,utm12d3,utm12d4,utm12d5,utm12d6,utm12d7,utm12d8,utm12d9,utm12d10,utm12d11,utm12d12,utm12d13,utm12d14,
             cmm="rep "+string(numRun)+" year="+string(CURYEAR)+" step="+string(curStep),value=true,fill=true,wait=false);
        plot(vall,cmm="all",value=true,fill=true,wait=false);
      }
      
      nbCallSave++;
    }
  }
}