Changeset 1835
- Timestamp:
- 08/24/09 17:54:12 (16 years ago)
- Location:
- issm/trunk/src/c/ModelProcessorx/DiagnosticHutter
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp
r741 r1835 11 11 #include "../../objects/objects.h" 12 12 #include "../../shared/shared.h" 13 #include "../ Model.h"13 #include "../IoModel.h" 14 14 15 15 16 void CreateConstraintsDiagnosticHutter(DataSet** pconstraints, Model* model,ConstDataHandlemodel_handle){16 void CreateConstraintsDiagnosticHutter(DataSet** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){ 17 17 18 18 int i,j; … … 40 40 41 41 /*Now, is the flag ishutter on? otherwise, do nothing: */ 42 if (! model->ishutter)goto cleanup_and_return;42 if (!iomodel->ishutter)goto cleanup_and_return; 43 43 44 44 count=0; 45 45 46 46 /*Fetch data: */ 47 ModelFetchData((void**)&model->gridonhutter,NULL,NULL,model_handle,"gridonhutter","Matrix","Mat");47 IoModelFetchData((void**)&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter","Matrix","Mat"); 48 48 49 49 /*vx and vy are spc'd if we are not on gridonhutter: */ 50 for (i=0;i< model->numberofnodes;i++){50 for (i=0;i<iomodel->numberofnodes;i++){ 51 51 #ifdef _PARALLEL_ 52 52 /*keep only this partition's nodes:*/ 53 if(( model->my_grids[i])){53 if((iomodel->my_grids[i])){ 54 54 #endif 55 55 56 if (!(int) model->gridonhutter[i]){56 if (!(int)iomodel->gridonhutter[i]){ 57 57 58 58 spc_sid=count; … … 81 81 82 82 /*Free data: */ 83 xfree((void**)& model->gridonhutter);83 xfree((void**)&iomodel->gridonhutter); 84 84 85 85 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp
r1648 r1835 12 12 #include "../../shared/shared.h" 13 13 #include "../../MeshPartitionx/MeshPartitionx.h" 14 #include "../ Model.h"15 16 17 void CreateElementsNodesAndMaterialsDiagnosticHutter(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, Model* model,ConstDataHandlemodel_handle){14 #include "../IoModel.h" 15 16 17 void CreateElementsNodesAndMaterialsDiagnosticHutter(DataSet** pelements,DataSet** pnodes, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle){ 18 18 19 19 … … 113 113 114 114 /*Now, is the flag ishutter on? otherwise, do nothing: */ 115 if (! model->ishutter)goto cleanup_and_return;115 if (!iomodel->ishutter)goto cleanup_and_return; 116 116 117 117 /*Width of elements: */ 118 if(strcmp( model->meshtype,"2d")==0){118 if(strcmp(iomodel->meshtype,"2d")==0){ 119 119 elements_width=3; //tria elements 120 120 } … … 125 125 #ifdef _PARALLEL_ 126 126 /*Determine parallel partitioning of elements: we use Metis for now. First load the data, then partition*/ 127 if(strcmp( model->meshtype,"2d")==0){127 if(strcmp(iomodel->meshtype,"2d")==0){ 128 128 /*load elements: */ 129 ModelFetchData((void**)&model->elements,NULL,NULL,model_handle,"elements","Matrix","Mat");129 IoModelFetchData((void**)&iomodel->elements,NULL,NULL,iomodel_handle,"elements","Matrix","Mat"); 130 130 } 131 131 else{ 132 132 /*load elements2d: */ 133 ModelFetchData((void**)&model->elements2d,NULL,NULL,model_handle,"elements2d","Matrix","Mat");134 } 135 136 MeshPartitionx(&epart, &npart, model->numberofelements,model->numberofnodes,model->elements, model->numberofelements2d,model->numberofnodes2d,model->elements2d,model->numlayers,elements_width,model->meshtype,num_procs);133 IoModelFetchData((void**)&iomodel->elements2d,NULL,NULL,iomodel_handle,"elements2d","Matrix","Mat"); 134 } 135 136 MeshPartitionx(&epart, &npart,iomodel->numberofelements,iomodel->numberofnodes,iomodel->elements, iomodel->numberofelements2d,iomodel->numberofnodes2d,iomodel->elements2d,iomodel->numlayers,elements_width, iomodel->meshtype,num_procs); 137 137 138 138 /*Free elements and elements2d: */ 139 xfree((void**)& model->elements);140 xfree((void**)& model->elements2d);139 xfree((void**)&iomodel->elements); 140 xfree((void**)&iomodel->elements2d); 141 141 142 142 /*Used later on: */ 143 my_grids=(int*)xcalloc( model->numberofnodes,sizeof(int));144 #endif 145 146 #ifdef _PARALLEL_ 147 if(strcmp( model->meshtype,"2d")==0){148 ModelFetchData((void**)&model->elements,NULL,NULL,model_handle,"elements","Matrix","Mat");149 for (i=0;i< model->numberofelements;i++){143 my_grids=(int*)xcalloc(iomodel->numberofnodes,sizeof(int)); 144 #endif 145 146 #ifdef _PARALLEL_ 147 if(strcmp(iomodel->meshtype,"2d")==0){ 148 IoModelFetchData((void**)&iomodel->elements,NULL,NULL,iomodel_handle,"elements","Matrix","Mat"); 149 for (i=0;i<iomodel->numberofelements;i++){ 150 150 if(my_rank==epart[i]){ 151 151 /*Now that we are here, we can also start building the list of grids belonging to this node partition: we use … … 154 154 will hold which grids belong to this partition*/ 155 155 156 my_grids[(int)*( model->elements+elements_width*i+0)-1]=1;157 my_grids[(int)*( model->elements+elements_width*i+1)-1]=1;158 my_grids[(int)*( model->elements+elements_width*i+2)-1]=1;156 my_grids[(int)*(iomodel->elements+elements_width*i+0)-1]=1; 157 my_grids[(int)*(iomodel->elements+elements_width*i+1)-1]=1; 158 my_grids[(int)*(iomodel->elements+elements_width*i+2)-1]=1; 159 159 } 160 160 } 161 161 } 162 162 else{ 163 ModelFetchData((void**)&model->elements,NULL,NULL,model_handle,"elements","Matrix","Mat");164 for (i=0;i< model->numberofelements;i++){163 IoModelFetchData((void**)&iomodel->elements,NULL,NULL,iomodel_handle,"elements","Matrix","Mat"); 164 for (i=0;i<iomodel->numberofelements;i++){ 165 165 if(my_rank==epart[i]){ 166 my_grids[(int)*( model->elements+elements_width*i+0)-1]=1;167 my_grids[(int)*( model->elements+elements_width*i+1)-1]=1;168 my_grids[(int)*( model->elements+elements_width*i+2)-1]=1;169 my_grids[(int)*( model->elements+elements_width*i+3)-1]=1;170 my_grids[(int)*( model->elements+elements_width*i+4)-1]=1;171 my_grids[(int)*( model->elements+elements_width*i+5)-1]=1;166 my_grids[(int)*(iomodel->elements+elements_width*i+0)-1]=1; 167 my_grids[(int)*(iomodel->elements+elements_width*i+1)-1]=1; 168 my_grids[(int)*(iomodel->elements+elements_width*i+2)-1]=1; 169 my_grids[(int)*(iomodel->elements+elements_width*i+3)-1]=1; 170 my_grids[(int)*(iomodel->elements+elements_width*i+4)-1]=1; 171 my_grids[(int)*(iomodel->elements+elements_width*i+5)-1]=1; 172 172 } 173 173 } … … 176 176 /*From the element partitioning, we can determine which grids are on the inside of this cpu's 177 177 *element partition, and which are on its border with other nodes:*/ 178 gridborder=NewVec( model->numberofnodes);179 180 for (i=0;i< model->numberofnodes;i++){178 gridborder=NewVec(iomodel->numberofnodes); 179 180 for (i=0;i<iomodel->numberofnodes;i++){ 181 181 if(my_grids[i])VecSetValue(gridborder,i,1,ADD_VALUES); 182 182 } … … 192 192 #ifdef _DEBUG_ 193 193 if(my_rank==0){ 194 for (i=0;i< model->numberofnodes;i++){194 for (i=0;i<iomodel->numberofnodes;i++){ 195 195 printf("Grid id %i Border grid %lf\n",i+1,my_bordergrids[i]); 196 196 } … … 203 203 204 204 /*Fetch data temporarily needed: */ 205 ModelFetchData((void**)&model->gridonhutter,NULL,NULL,model_handle,"gridonhutter","Matrix","Mat");206 ModelFetchData((void**)&model->thickness,NULL,NULL,model_handle,"thickness","Matrix","Mat");207 ModelFetchData((void**)&model->surface,NULL,NULL,model_handle,"surface","Matrix","Mat");208 ModelFetchData((void**)&model->bed,NULL,NULL,model_handle,"bed","Matrix","Mat");209 ModelFetchData((void**)&model->gridonsurface,NULL,NULL,model_handle,"gridonsurface","Matrix","Mat");210 ModelFetchData((void**)&model->gridonbed,NULL,NULL,model_handle,"gridonbed","Matrix","Mat");211 ModelFetchData((void**)&model->uppernodes,NULL,NULL,model_handle,"uppergrids","Matrix","Mat");212 ModelFetchData((void**)&model->drag,NULL,NULL,model_handle,"drag","Matrix","Mat");213 ModelFetchData((void**)&model->B,NULL,NULL,model_handle,"B","Matrix","Mat");214 ModelFetchData((void**)&model->n,NULL,NULL,model_handle,"n","Matrix","Mat");205 IoModelFetchData((void**)&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter","Matrix","Mat"); 206 IoModelFetchData((void**)&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness","Matrix","Mat"); 207 IoModelFetchData((void**)&iomodel->surface,NULL,NULL,iomodel_handle,"surface","Matrix","Mat"); 208 IoModelFetchData((void**)&iomodel->bed,NULL,NULL,iomodel_handle,"bed","Matrix","Mat"); 209 IoModelFetchData((void**)&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface","Matrix","Mat"); 210 IoModelFetchData((void**)&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed","Matrix","Mat"); 211 IoModelFetchData((void**)&iomodel->uppernodes,NULL,NULL,iomodel_handle,"uppergrids","Matrix","Mat"); 212 IoModelFetchData((void**)&iomodel->drag,NULL,NULL,iomodel_handle,"drag","Matrix","Mat"); 213 IoModelFetchData((void**)&iomodel->B,NULL,NULL,iomodel_handle,"B","Matrix","Mat"); 214 IoModelFetchData((void**)&iomodel->n,NULL,NULL,iomodel_handle,"n","Matrix","Mat"); 215 215 216 216 /*2d mesh: */ 217 if (strcmp( model->meshtype,"2d")==0){218 219 for (i=0;i< model->numberofnodes;i++){217 if (strcmp(iomodel->meshtype,"2d")==0){ 218 219 for (i=0;i<iomodel->numberofnodes;i++){ 220 220 #ifdef _PARALLEL_ 221 221 /*keep only this partition's nodes:*/ … … 223 223 #endif 224 224 225 if( model->gridonhutter[i]){225 if(iomodel->gridonhutter[i]){ 226 226 227 227 /*Deal with sing element: */ 228 228 sing_id=i+1; 229 229 sing_mid=i+1; //refers to the corresponding material property card 230 sing_mparid= model->numberofnodes+1;//refers to the corresponding matpar property card230 sing_mparid=iomodel->numberofnodes+1;//refers to the corresponding matpar property card 231 231 sing_g=i+1; 232 sing_h= model->thickness[i];233 sing_k= model->drag[i];232 sing_h=iomodel->thickness[i]; 233 sing_k=iomodel->drag[i]; 234 234 235 235 /*Create sing element using its constructor:*/ … … 241 241 /*Deal with material property card: */ 242 242 matice_mid=i+1; //same as the material id from the geom2 elements. 243 matice_B= model->B[i];244 matice_n=(double) model->n[1]; //n defined on elements not grids, so take the first value everywhere243 matice_B=iomodel->B[i]; 244 matice_n=(double)iomodel->n[1]; //n defined on elements not grids, so take the first value everywhere 245 245 246 246 /*Create matice using its constructor:*/ … … 255 255 #endif 256 256 257 } //for (i=0;i< model->numberofnodes;i++)258 } //if (strcmp( model->meshtype,"2d")==0)257 } //for (i=0;i<iomodel->numberofnodes;i++) 258 } //if (strcmp(iomodel->meshtype,"2d")==0) 259 259 else{ 260 260 261 for (i=0;i< model->numberofnodes;i++){261 for (i=0;i<iomodel->numberofnodes;i++){ 262 262 #ifdef _PARALLEL_ 263 263 /*keep only this partition's nodes:*/ … … 265 265 #endif 266 266 267 if( model->gridonhutter[i]){268 269 if(! model->gridonsurface[i]){267 if(iomodel->gridonhutter[i]){ 268 269 if(!iomodel->gridonsurface[i]){ 270 270 271 271 /*Deal with sing element: */ 272 272 beam_id=i+1; 273 273 beam_mid=i+1; //refers to the corresponding material property card 274 beam_mparid= model->numberofnodes-model->numberofnodes2d+1;//refers to the corresponding matpar property card274 beam_mparid=iomodel->numberofnodes-iomodel->numberofnodes2d+1;//refers to the corresponding matpar property card 275 275 beam_g[0]=i+1; 276 beam_g[1]=(int) model->uppernodes[i]; //grid that lays right on top277 beam_h[0]= model->thickness[i];278 beam_h[1]= model->thickness[(int)(model->uppernodes[i]-1)];279 beam_s[0]= model->surface[i];280 beam_s[1]= model->surface[(int)(model->uppernodes[i]-1)];281 beam_b[0]= model->bed[i];282 beam_b[1]= model->bed[(int)(model->uppernodes[i]-1)];283 beam_k[0]= model->drag[i];284 beam_k[1]= model->drag[(int)(model->uppernodes[i]-1)];285 286 beam_onbed=(bool) model->gridonbed[i];276 beam_g[1]=(int)iomodel->uppernodes[i]; //grid that lays right on top 277 beam_h[0]=iomodel->thickness[i]; 278 beam_h[1]=iomodel->thickness[(int)(iomodel->uppernodes[i]-1)]; 279 beam_s[0]=iomodel->surface[i]; 280 beam_s[1]=iomodel->surface[(int)(iomodel->uppernodes[i]-1)]; 281 beam_b[0]=iomodel->bed[i]; 282 beam_b[1]=iomodel->bed[(int)(iomodel->uppernodes[i]-1)]; 283 beam_k[0]=iomodel->drag[i]; 284 beam_k[1]=iomodel->drag[(int)(iomodel->uppernodes[i]-1)]; 285 286 beam_onbed=(bool)iomodel->gridonbed[i]; 287 287 288 288 /*Create beam element ubeam its constructor:*/ … … 294 294 /*Deal with material property card: */ 295 295 matice_mid=i+1; //same as the material id from the geom2 elements. 296 matice_B= model->B[i];297 matice_n=(double) model->n[1]; //n defined on elements not grids, so take the first value everywhere296 matice_B=iomodel->B[i]; 297 matice_n=(double)iomodel->n[1]; //n defined on elements not grids, so take the first value everywhere 298 298 299 299 /*Create matice ubeam its constructor:*/ … … 309 309 #endif 310 310 311 } //for (i=0;i< model->numberofnodes;i++)312 313 } //if (strcmp( model->meshtype,"2d")==0)311 } //for (i=0;i<iomodel->numberofnodes;i++) 312 313 } //if (strcmp(iomodel->meshtype,"2d")==0) 314 314 315 315 316 316 /*Free data: */ 317 xfree((void**)& model->elements);318 xfree((void**)& model->gridonhutter);319 xfree((void**)& model->thickness);320 xfree((void**)& model->surface);321 xfree((void**)& model->bed);322 xfree((void**)& model->gridonsurface);323 xfree((void**)& model->uppernodes);324 xfree((void**)& model->drag);325 xfree((void**)& model->B);326 xfree((void**)& model->n);317 xfree((void**)&iomodel->elements); 318 xfree((void**)&iomodel->gridonhutter); 319 xfree((void**)&iomodel->thickness); 320 xfree((void**)&iomodel->surface); 321 xfree((void**)&iomodel->bed); 322 xfree((void**)&iomodel->gridonsurface); 323 xfree((void**)&iomodel->uppernodes); 324 xfree((void**)&iomodel->drag); 325 xfree((void**)&iomodel->B); 326 xfree((void**)&iomodel->n); 327 327 328 328 329 329 /*Add one constant material property to materials: */ 330 matpar_mid= model->numberofnodes-model->numberofnodes2d+1; //put it at the end of the materials331 matpar_g= model->g;332 matpar_rho_ice= model->rho_ice;333 matpar_rho_water= model->rho_water;334 matpar_thermalconductivity= model->thermalconductivity;335 matpar_heatcapacity= model->heatcapacity;336 matpar_latentheat= model->latentheat;337 matpar_beta= model->beta;338 matpar_meltingpoint= model->meltingpoint;339 matpar_mixed_layer_capacity= model->mixed_layer_capacity;340 matpar_thermal_exchange_velocity= model->thermal_exchange_velocity;330 matpar_mid=iomodel->numberofnodes-iomodel->numberofnodes2d+1; //put it at the end of the materials 331 matpar_g=iomodel->g; 332 matpar_rho_ice=iomodel->rho_ice; 333 matpar_rho_water=iomodel->rho_water; 334 matpar_thermalconductivity=iomodel->thermalconductivity; 335 matpar_heatcapacity=iomodel->heatcapacity; 336 matpar_latentheat=iomodel->latentheat; 337 matpar_beta=iomodel->beta; 338 matpar_meltingpoint=iomodel->meltingpoint; 339 matpar_mixed_layer_capacity=iomodel->mixed_layer_capacity; 340 matpar_thermal_exchange_velocity=iomodel->thermal_exchange_velocity; 341 341 342 342 /*Create matpar object using its constructor: */ … … 351 351 352 352 /*First fetch data: */ 353 if (strcmp( model->meshtype,"3d")==0){354 ModelFetchData((void**)&model->deadgrids,NULL,NULL,model_handle,"deadgrids","Matrix","Mat");355 ModelFetchData((void**)&model->uppernodes,NULL,NULL,model_handle,"uppergrids","Matrix","Mat");356 } 357 ModelFetchData((void**)&model->x,NULL,NULL,model_handle,"x","Matrix","Mat");358 ModelFetchData((void**)&model->y,NULL,NULL,model_handle,"y","Matrix","Mat");359 ModelFetchData((void**)&model->z,NULL,NULL,model_handle,"z","Matrix","Mat");360 ModelFetchData((void**)&model->thickness,NULL,NULL,model_handle,"thickness","Matrix","Mat");361 ModelFetchData((void**)&model->bed,NULL,NULL,model_handle,"bed","Matrix","Mat");362 ModelFetchData((void**)&model->gridonbed,NULL,NULL,model_handle,"gridonbed","Matrix","Mat");363 ModelFetchData((void**)&model->gridonsurface,NULL,NULL,model_handle,"gridonsurface","Matrix","Mat");364 ModelFetchData((void**)&model->gridonhutter,NULL,NULL,model_handle,"gridonhutter","Matrix","Mat");365 ModelFetchData((void**)&model->gridonicesheet,NULL,NULL,model_handle,"gridonicesheet","Matrix","Mat");366 ModelFetchData((void**)&model->gridoniceshelf,NULL,NULL,model_handle,"gridoniceshelf","Matrix","Mat");353 if (strcmp(iomodel->meshtype,"3d")==0){ 354 IoModelFetchData((void**)&iomodel->deadgrids,NULL,NULL,iomodel_handle,"deadgrids","Matrix","Mat"); 355 IoModelFetchData((void**)&iomodel->uppernodes,NULL,NULL,iomodel_handle,"uppergrids","Matrix","Mat"); 356 } 357 IoModelFetchData((void**)&iomodel->x,NULL,NULL,iomodel_handle,"x","Matrix","Mat"); 358 IoModelFetchData((void**)&iomodel->y,NULL,NULL,iomodel_handle,"y","Matrix","Mat"); 359 IoModelFetchData((void**)&iomodel->z,NULL,NULL,iomodel_handle,"z","Matrix","Mat"); 360 IoModelFetchData((void**)&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness","Matrix","Mat"); 361 IoModelFetchData((void**)&iomodel->bed,NULL,NULL,iomodel_handle,"bed","Matrix","Mat"); 362 IoModelFetchData((void**)&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed","Matrix","Mat"); 363 IoModelFetchData((void**)&iomodel->gridonsurface,NULL,NULL,iomodel_handle,"gridonsurface","Matrix","Mat"); 364 IoModelFetchData((void**)&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter","Matrix","Mat"); 365 IoModelFetchData((void**)&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet","Matrix","Mat"); 366 IoModelFetchData((void**)&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf","Matrix","Mat"); 367 367 368 368 /*Get number of dofs per node: */ 369 DistributeNumDofs(&node_numdofs, model->analysis_type,model->sub_analysis_type);370 371 for (i=0;i< model->numberofnodes;i++){369 DistributeNumDofs(&node_numdofs,iomodel->analysis_type,iomodel->sub_analysis_type); 370 371 for (i=0;i<iomodel->numberofnodes;i++){ 372 372 #ifdef _PARALLEL_ 373 373 /*keep only this partition's nodes:*/ … … 389 389 #endif 390 390 391 node_x[0]= model->x[i];392 node_x[1]= model->y[i];393 node_x[2]= model->z[i];394 node_sigma=( model->z[i]-model->bed[i])/(model->thickness[i]);391 node_x[0]=iomodel->x[i]; 392 node_x[1]=iomodel->y[i]; 393 node_x[2]=iomodel->z[i]; 394 node_sigma=(iomodel->z[i]-iomodel->bed[i])/(iomodel->thickness[i]); 395 395 396 node_onbed=(int) model->gridonbed[i];397 node_onsurface=(int) model->gridonsurface[i];398 node_onshelf=(int) model->gridoniceshelf[i];399 node_onsheet=(int) model->gridonicesheet[i];400 401 if (strcmp( model->meshtype,"3d")==0){402 if (isnan( model->uppernodes[i])){396 node_onbed=(int)iomodel->gridonbed[i]; 397 node_onsurface=(int)iomodel->gridonsurface[i]; 398 node_onshelf=(int)iomodel->gridoniceshelf[i]; 399 node_onsheet=(int)iomodel->gridonicesheet[i]; 400 401 if (strcmp(iomodel->meshtype,"3d")==0){ 402 if (isnan(iomodel->uppernodes[i])){ 403 403 node_upper_node_id=node_id; //nodes on surface do not have upper nodes, only themselves. 404 404 } 405 405 else{ 406 node_upper_node_id=(int) model->uppernodes[i];406 node_upper_node_id=(int)iomodel->uppernodes[i]; 407 407 } 408 408 } … … 416 416 417 417 /*set single point constraints.: */ 418 if (! model->gridonhutter[i]){418 if (!iomodel->gridonhutter[i]){ 419 419 for(k=1;k<=node_numdofs;k++){ 420 420 node->FreezeDof(k); … … 437 437 438 438 /*Clean fetched data: */ 439 xfree((void**)& model->deadgrids);440 xfree((void**)& model->x);441 xfree((void**)& model->y);442 xfree((void**)& model->z);443 xfree((void**)& model->thickness);444 xfree((void**)& model->bed);445 xfree((void**)& model->gridonbed);446 xfree((void**)& model->gridonsurface);447 xfree((void**)& model->gridonhutter);448 xfree((void**)& model->uppernodes);449 xfree((void**)& model->gridonicesheet);450 xfree((void**)& model->gridoniceshelf);451 452 453 /*Keep partitioning information into model*/454 model->epart=epart;455 model->my_grids=my_grids;456 model->my_bordergrids=my_bordergrids;457 458 /*Keep partitioning information into model*/439 xfree((void**)&iomodel->deadgrids); 440 xfree((void**)&iomodel->x); 441 xfree((void**)&iomodel->y); 442 xfree((void**)&iomodel->z); 443 xfree((void**)&iomodel->thickness); 444 xfree((void**)&iomodel->bed); 445 xfree((void**)&iomodel->gridonbed); 446 xfree((void**)&iomodel->gridonsurface); 447 xfree((void**)&iomodel->gridonhutter); 448 xfree((void**)&iomodel->uppernodes); 449 xfree((void**)&iomodel->gridonicesheet); 450 xfree((void**)&iomodel->gridoniceshelf); 451 452 453 /*Keep partitioning information into iomodel*/ 454 iomodel->epart=epart; 455 iomodel->my_grids=my_grids; 456 iomodel->my_bordergrids=my_bordergrids; 457 458 /*Keep partitioning information into iomodel*/ 459 459 #ifdef _PARALLEL_ 460 460 xfree((void**)&all_numgrids); … … 462 462 VecFree(&gridborder); 463 463 #endif 464 model->npart=npart;464 iomodel->npart=npart; 465 465 466 466 cleanup_and_return: -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp
r308 r1835 11 11 #include "../../shared/shared.h" 12 12 #include "../../include/macros.h" 13 #include "../ Model.h"13 #include "../IoModel.h" 14 14 15 15 16 void CreateLoadsDiagnosticHutter(DataSet** ploads, Model* model,ConstDataHandlemodel_handle){16 void CreateLoadsDiagnosticHutter(DataSet** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){ 17 17 18 18 DataSet* loads = NULL; … … 22 22 23 23 /*Now, is the flag ishutter on? otherwise, do nothing: */ 24 if (! model->ishutter)goto cleanup_and_return;24 if (!iomodel->ishutter)goto cleanup_and_return; 25 25 26 26 cleanup_and_return:
Note:
See TracChangeset
for help on using the changeset viewer.