source: issm/oecreview/Archive/17802-17983/ISSM-17923-17924.diff@ 17986

Last change on this file since 17986 was 17986, checked in by Mathieu Morlighem, 11 years ago

New release

File size: 13.7 KB
RevLine 
[17986]1Index: ../trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
2===================================================================
3--- ../trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp (revision 17923)
4+++ ../trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp (revision 17924)
5@@ -31,8 +31,6 @@
6
7 int stabilization,finiteelement,smb_model;
8 bool dakota_analysis;
9- bool issmbgradients;
10- bool ispdd;
11 bool isdelta18o;
12 bool isgroundingline;
13 bool islevelset;
14Index: ../trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeYAnalysis.cpp
15===================================================================
16--- ../trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeYAnalysis.cpp (revision 17923)
17+++ ../trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeYAnalysis.cpp (revision 17924)
18@@ -118,7 +118,6 @@
19 }
20
21 /*Intermediaries */
22- int input_enum;
23 IssmDouble Jdet,thickness,slope[2];
24 IssmDouble taud_y,norms,normv,vx,vy;
25 IssmDouble *xyz_list = NULL;
26Index: ../trunk-jpl/src/c/analyses/LsfReinitializationAnalysis.cpp
27===================================================================
28--- ../trunk-jpl/src/c/analyses/LsfReinitializationAnalysis.cpp (revision 17923)
29+++ ../trunk-jpl/src/c/analyses/LsfReinitializationAnalysis.cpp (revision 17924)
30@@ -111,7 +111,7 @@
31
32 /*Intermediaries */
33 const int dim = 2;
34- int i,row,col,stabilization;
35+ int row,col,stabilization;
36 IssmDouble Jdet,D_scalar;
37 IssmDouble dtau = 1.;
38 IssmDouble mu = 1.;
39@@ -398,7 +398,7 @@
40 void LsfReinitializationAnalysis::SetDistanceOnIntersectedElements(FemModel* femmodel){/*{{{*/
41
42 /* Intermediaries */
43- int i,k;
44+ int i;
45 IssmDouble dmaxp,dmaxm,val;
46 Element* element;
47
48Index: ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
49===================================================================
50--- ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp (revision 17923)
51+++ ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp (revision 17924)
52@@ -3197,7 +3197,7 @@
53
54 /*Intermediaries*/
55 bool mainlyfloating;
56- int i,dim,domaintype,epssize;
57+ int dim,domaintype;
58 int migration_style,point1;
59 IssmDouble alpha2,Jdet,fraction1,fraction2;
60 IssmDouble gllevelset,phi=1.;
61@@ -5259,7 +5259,7 @@
62 ElementVector* StressbalanceAnalysis::CreatePVectorCouplingHOFSFriction(Element* element){/*{{{*/
63
64 /*Intermediaries*/
65- int i,j,approximation;
66+ int i,approximation;
67 int dim=3;
68 IssmDouble Jdet,Jdet2d,FSreconditioning;
69 IssmDouble bed_normal[3];
70Index: ../trunk-jpl/src/c/modules/ModelProcessorx/CreateEdges.cpp
71===================================================================
72--- ../trunk-jpl/src/c/modules/ModelProcessorx/CreateEdges.cpp (revision 17923)
73+++ ../trunk-jpl/src/c/modules/ModelProcessorx/CreateEdges.cpp (revision 17924)
74@@ -148,7 +148,7 @@
75 /*Intermediaries*/
76 bool isv1,isv2;
77 int facenbv,v1,v2;
78- int id_edge,id_element,id_face;
79+ int id_edge,id_element;
80 int elementnbe;
81
82 /*Mesh dependent variables*/
83Index: ../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
84===================================================================
85--- ../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp (revision 17923)
86+++ ../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp (revision 17924)
87@@ -18,10 +18,10 @@
88 void CreateParameters(Parameters* parameters,IoModel* iomodel,char* rootpath,FILE* toolkitsoptionsfid,const int solution_type){
89
90 int i,j,m,k;
91- int numoutputs,domaintype,materialtype,smb_model;
92+ int numoutputs,materialtype,smb_model;
93 char** requestedoutputs = NULL;
94 IssmDouble time;
95- bool ispdd,isdelta18o;
96+ bool isdelta18o;
97
98 /*parameters for mass flux:*/
99 int mass_flux_num_profiles = 0;
100Index: ../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
101===================================================================
102--- ../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp (revision 17923)
103+++ ../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp (revision 17924)
104@@ -32,7 +32,6 @@
105 void IoModelToConstraintsx(Constraints* constraints,IoModel* iomodel,IssmDouble* spcdata,int M,int N,int analysis_type,int finite_element,int dof){
106
107 /*intermediary: */
108- bool isnan;
109 int i,j,count,elementnbv,numfacevertices;
110 IssmDouble value;
111 IssmDouble *times = NULL;
112@@ -40,7 +39,7 @@
113 bool spcpresent = false;
114
115 /*Higher-order finite elements*/
116- int v1,v2,v3,v4;
117+ int v1,v2;
118 bool *my_edges = NULL;
119 bool *my_faces = NULL;
120 bool *boundaryedge = NULL;
121Index: ../trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp
122===================================================================
123--- ../trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp (revision 17923)
124+++ ../trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp (revision 17924)
125@@ -199,7 +199,7 @@
126 /*Variables*/
127 ISSM_MPI_Comm comm;
128 int num_procs;
129- int i,j;
130+ int i;
131 int nnz,local_nnz;
132 int *irn_loc = NULL;
133 int *jcn_loc = NULL;
134@@ -216,9 +216,9 @@
135 comm = IssmComm::GetComm();
136
137 /*First, some checks*/
138- if (Kff_M!=Kff_N)_error_("stiffness matrix Kff should be square");
139- if (uf_M!=Kff_M || uf_M!=pf_M)_error_("solution vector should be the same size as stiffness matrix Kff and load vector pf");
140- if (uf_m!=Kff_m || uf_m!=pf_m)_error_("solution vector should be locally the same size as stiffness matrix Kff and load vector pf");
141+ if(Kff_M!=Kff_N)_error_("stiffness matrix Kff should be square");
142+ if(uf_M!=Kff_M || uf_M!=pf_M)_error_("solution vector should be the same size as stiffness matrix Kff and load vector pf");
143+ if(uf_m!=Kff_m || uf_m!=pf_m)_error_("solution vector should be locally the same size as stiffness matrix Kff and load vector pf");
144
145 /*Initialize matrix */
146 /*figure out number of non-zero entries: */
147Index: ../trunk-jpl/src/c/toolkits/issm/IssmMpiSparseMat.h
148===================================================================
149--- ../trunk-jpl/src/c/toolkits/issm/IssmMpiSparseMat.h (revision 17923)
150+++ ../trunk-jpl/src/c/toolkits/issm/IssmMpiSparseMat.h (revision 17924)
151@@ -140,15 +140,12 @@
152 /*FUNCTION Echo{{{*/
153 void Echo(void){
154
155- int my_rank;
156- int i,j,k;
157-
158 /*Do a synchronized dump across all the rows: */
159- my_rank=IssmComm::GetRank();
160- for(i=0;i<IssmComm::GetSize();i++){
161- if (my_rank==i){
162+ int my_rank=IssmComm::GetRank();
163+ for(int i=0;i<IssmComm::GetSize();i++){
164+ if(my_rank==i){
165 _printf_("cpu " << i << " #rows: " << this->m << "\n");
166- for (j=0;j<this->m;j++){
167+ for(int j=0;j<this->m;j++){
168 _printf_("row " << j << ":");
169 this->matrix[j]->Echo();
170 _printf_("\n");
171@@ -189,7 +186,6 @@
172 int this_row_numvalues;
173 int* this_row_cols = NULL;
174 int* this_row_mods = NULL;
175- doubletype* this_row_values = NULL;
176 int* numvalues_perrow = NULL;
177 int row;
178
179@@ -377,7 +373,7 @@
180
181 doubletype norm,local_norm;
182 doubletype absolute;
183- int i,j;
184+ int i;
185
186 switch(mode){
187 case NORM_INF:
188@@ -420,9 +416,6 @@
189 /*FUNCTION MatMult{{{*/
190 void MatMult(IssmAbsVec<doubletype>* Xin,IssmAbsVec<doubletype>* AXin){
191
192- int i,j;
193- doubletype *X_serial = NULL;
194-
195 /*A check on the types: */
196 if(IssmVecTypeFromToolkitOptions()!=MpiEnum)_error_("MatMult operation only possible with 'mpi' vectors");
197
198@@ -431,11 +424,11 @@
199 IssmMpiVec<doubletype>* AX=(IssmMpiVec<doubletype>*)AXin;
200
201 /*Serialize input Xin: */
202- X_serial=X->ToMPISerial();
203+ doubletype* X_serial=X->ToMPISerial();
204
205 /*Every cpu has a serial version of the input vector. Use it to do the Matrix-Vector multiply
206 *locally and plug it into AXin: */
207- for(i=0;i<this->m;i++){
208+ for(int i=0;i<this->m;i++){
209 AX->vector[i]=this->matrix[i]->Mult(X_serial);
210 }
211
212Index: ../trunk-jpl/src/c/cores/transient_core.cpp
213===================================================================
214--- ../trunk-jpl/src/c/cores/transient_core.cpp (revision 17923)
215+++ ../trunk-jpl/src/c/cores/transient_core.cpp (revision 17924)
216@@ -19,16 +19,15 @@
217 void transient_core(FemModel* femmodel){
218
219 /*parameters: */
220- int i;
221 IssmDouble starttime,finaltime,dt,yts;
222- bool isstressbalance,ismasstransport,isFS,isthermal,isgroundingline,isgia,islevelset,isdamageevolution,ishydrology;
223- bool save_results,dakota_analysis;
224- bool time_adapt=false;
225- int output_frequency;
226- int domaintype,groundingline_migration,smb_model;
227- int numoutputs = 0;
228- Analysis *analysis = NULL;
229- char** requested_outputs = NULL;
230+ bool isstressbalance,ismasstransport,isFS,isthermal,isgroundingline,isgia,islevelset,isdamageevolution,ishydrology;
231+ bool save_results,dakota_analysis;
232+ bool time_adapt=false;
233+ int output_frequency;
234+ int domaintype,groundingline_migration;
235+ int numoutputs = 0;
236+ Analysis *analysis = NULL;
237+ char** requested_outputs = NULL;
238
239
240 /*intermediary: */
241Index: ../trunk-jpl/src/c/cores/masstransport_core.cpp
242===================================================================
243--- ../trunk-jpl/src/c/cores/masstransport_core.cpp (revision 17923)
244+++ ../trunk-jpl/src/c/cores/masstransport_core.cpp (revision 17924)
245@@ -12,10 +12,9 @@
246 void masstransport_core(FemModel* femmodel){
247
248 /*parameters: */
249- int i;
250 int numoutputs,domaintype;
251 bool save_results;
252- bool issmbgradients,ispdd,isdelta18o,isFS,isfreesurface,dakota_analysis;
253+ bool isFS,isfreesurface,dakota_analysis;
254 int solution_type;
255 char** requested_outputs = NULL;
256
257Index: ../trunk-jpl/src/c/cores/steadystate_core.cpp
258===================================================================
259--- ../trunk-jpl/src/c/cores/steadystate_core.cpp (revision 17923)
260+++ ../trunk-jpl/src/c/cores/steadystate_core.cpp (revision 17924)
261@@ -20,7 +20,6 @@
262 void steadystate_core(FemModel* femmodel){
263
264 /*intermediary: */
265- int i;
266 int step;
267 Vector<IssmDouble>* ug = NULL;
268 Vector<IssmDouble>* ug_old = NULL;
269Index: ../trunk-jpl/src/c/cores/controlm1qn3_core.cpp
270===================================================================
271--- ../trunk-jpl/src/c/cores/controlm1qn3_core.cpp (revision 17923)
272+++ ../trunk-jpl/src/c/cores/controlm1qn3_core.cpp (revision 17924)
273@@ -127,8 +127,7 @@
274 void simul(long* indic,long* n,double* X,double* pf,double* G,long izs[1],float rzs[1],void* dzs){
275
276 /*Recover Femmodel*/
277- double f;
278- int intn,solution_type;
279+ int solution_type;
280 FemModel *femmodel = (FemModel*)dzs;
281
282 /*Recover responses*/
283Index: ../trunk-jpl/src/c/classes/Materials/Matpar.cpp
284===================================================================
285--- ../trunk-jpl/src/c/classes/Materials/Matpar.cpp (revision 17923)
286+++ ../trunk-jpl/src/c/classes/Materials/Matpar.cpp (revision 17924)
287@@ -20,7 +20,6 @@
288 /*FUNCTION Matpar::Matpar(int matpar_mid,IoModel* iomodel){{{*/
289 Matpar::Matpar(int matpar_mid, IoModel* iomodel){
290
291- bool ispdd;
292 bool isefficientlayer;
293 int hydrology_model,smb_model;
294 iomodel->Constant(&hydrology_model,HydrologyModelEnum);
295Index: ../trunk-jpl/src/c/classes/kriging/Observations.cpp
296===================================================================
297--- ../trunk-jpl/src/c/classes/kriging/Observations.cpp (revision 17923)
298+++ ../trunk-jpl/src/c/classes/kriging/Observations.cpp (revision 17924)
299@@ -352,7 +352,6 @@
300 /*Intermediaries*/
301 int i,j,n_obs;
302 IssmPDouble prediction,error;
303- IssmPDouble numerator,denominator,ratio;
304 IssmPDouble *x = NULL;
305 IssmPDouble *y = NULL;
306 IssmPDouble *obs = NULL;
307Index: ../trunk-jpl/src/c/classes/Loads/Riftfront.cpp
308===================================================================
309--- ../trunk-jpl/src/c/classes/Loads/Riftfront.cpp (revision 17923)
310+++ ../trunk-jpl/src/c/classes/Loads/Riftfront.cpp (revision 17924)
311@@ -38,11 +38,8 @@
312 int riftfront_node_ids[2];
313 int riftfront_elem_ids[2];
314 int riftfront_matpar_id;
315- int riftfront_type;
316- int riftfront_fill;
317 IssmDouble riftfront_friction;
318 IssmDouble riftfront_fractionincrement;
319- bool riftfront_shelf;
320 int penalty_lock;
321
322 /*intermediary: */
323Index: ../trunk-jpl/src/c/classes/Elements/Element.cpp
324===================================================================
325--- ../trunk-jpl/src/c/classes/Elements/Element.cpp (revision 17923)
326+++ ../trunk-jpl/src/c/classes/Elements/Element.cpp (revision 17924)
327@@ -592,7 +592,7 @@
328 void Element::InputCreate(IssmDouble* vector,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){/*{{{*/
329
330 /*Intermediaries*/
331- int i,t,row;
332+ int i,t;
333 IssmDouble time;
334
335 /*Branch on type of vector: nodal or elementary: */
336Index: ../trunk-jpl/src/c/classes/IoModel.cpp
337===================================================================
338--- ../trunk-jpl/src/c/classes/IoModel.cpp (revision 17923)
339+++ ../trunk-jpl/src/c/classes/IoModel.cpp (revision 17924)
340@@ -285,7 +285,6 @@
341 /*FUNCTION IoModel::StartTrace{{{*/
342 void IoModel::StartTrace(void){
343
344- int i;
345 bool autodiff = false;
346 bool keep=false;
347 IssmDouble gcTriggerRatio;
348Index: ../trunk-jpl/src/c/classes/Massfluxatgate.h
349===================================================================
350--- ../trunk-jpl/src/c/classes/Massfluxatgate.h (revision 17923)
351+++ ../trunk-jpl/src/c/classes/Massfluxatgate.h (revision 17924)
352@@ -30,9 +30,9 @@
353 /*Massfluxatgate constructors, destructors :*/
354 /*FUNCTION Massfluxatgate() {{{*/
355 Massfluxatgate(){
356- this->name = 0;
357- this->numsegments = 0;
358- this->segments = 0;
359+ this->name = 0;
360+ this->numsegments = 0;
361+ this->segments = 0;
362 }
363 /*}}}*/
364 /*FUNCTION Massfluxatgate(char* name, int numsegments, doubletype* segments) {{{*/
Note: See TracBrowser for help on using the repository browser.