Changeset 748
- Timestamp:
- 06/03/09 14:56:49 (16 years ago)
- Location:
- issm/trunk/src/c/ModelProcessorx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp
r653 r748 319 319 materials->AddObject(matice); 320 320 321 #ifdef _PARALLEL_322 /*Now that we are here, we can also start building the list of grids belonging to this node partition: we use323 *the element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing)324 into the grid coordinates. If we start plugging 1 into my_grids for each index[n][i] (i=0:2), then my_grids325 will hold which grids belong to this partition*/326 my_grids[(int)*(model->elements+elements_width*i+0)-1]=1;327 my_grids[(int)*(model->elements+elements_width*i+1)-1]=1;328 my_grids[(int)*(model->elements+elements_width*i+2)-1]=1;329 #endif330 321 } //if(!HutterEnum) 322 323 #ifdef _PARALLEL_ 324 /*Now that we are here, we can also start building the list of grids belonging to this node partition: we use 325 *the element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing) 326 into the grid coordinates. If we start plugging 1 into my_grids for each index[n][i] (i=0:2), then my_grids 327 will hold which grids belong to this partition*/ 328 my_grids[(int)*(model->elements+elements_width*i+0)-1]=1; 329 my_grids[(int)*(model->elements+elements_width*i+1)-1]=1; 330 my_grids[(int)*(model->elements+elements_width*i+2)-1]=1; 331 #endif 331 332 332 333 #ifdef _PARALLEL_ … … 445 446 materials->AddObject(matice); 446 447 447 #ifdef _PARALLEL_448 /*Now that we are here, we can also start building the list of grids belonging to this node partition: we use449 *the element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing)450 into the grid coordinates. If we start plugging 1 into my_grids for each index[n][i] (i=0:2), then my_grids451 will hold which grids belong to this partition*/452 my_grids[(int)*(model->elements+elements_width*i+0)-1]=1;453 my_grids[(int)*(model->elements+elements_width*i+1)-1]=1;454 my_grids[(int)*(model->elements+elements_width*i+2)-1]=1;455 my_grids[(int)*(model->elements+elements_width*i+3)-1]=1;456 my_grids[(int)*(model->elements+elements_width*i+4)-1]=1;457 my_grids[(int)*(model->elements+elements_width*i+5)-1]=1;458 #endif459 448 } 449 450 #ifdef _PARALLEL_ 451 /*Now that we are here, we can also start building the list of grids belonging to this node partition: we use 452 *the element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing) 453 into the grid coordinates. If we start plugging 1 into my_grids for each index[n][i] (i=0:2), then my_grids 454 will hold which grids belong to this partition*/ 455 my_grids[(int)*(model->elements+elements_width*i+0)-1]=1; 456 my_grids[(int)*(model->elements+elements_width*i+1)-1]=1; 457 my_grids[(int)*(model->elements+elements_width*i+2)-1]=1; 458 my_grids[(int)*(model->elements+elements_width*i+3)-1]=1; 459 my_grids[(int)*(model->elements+elements_width*i+4)-1]=1; 460 my_grids[(int)*(model->elements+elements_width*i+5)-1]=1; 461 #endif 460 462 461 463 #ifdef _PARALLEL_ … … 577 579 ModelFetchData((void**)&model->gridonbed,NULL,NULL,model_handle,"gridonbed","Matrix","Mat"); 578 580 ModelFetchData((void**)&model->gridonsurface,NULL,NULL,model_handle,"gridonsurface","Matrix","Mat"); 581 ModelFetchData((void**)&model->gridonhutter,NULL,NULL,model_handle,"gridonhutter","Matrix","Mat"); 579 582 580 583 /*Get number of dofs per node: */ … … 583 586 for (i=0;i<model->numberofnodes;i++){ 584 587 #ifdef _PARALLEL_ 588 585 589 /*keep only this partition's nodes:*/ 586 590 if((my_grids[i]==1)){ … … 589 593 node_id=i+1; //matlab indexing 590 594 591 592 595 593 596 #ifdef _PARALLEL_ … … 635 638 } 636 639 } 640 if (model->gridonhutter[i]){ 641 for(k=1;k<=node_numdofs;k++){ 642 node->FreezeDof(k); 643 } 644 } 637 645 /*Add node to nodes dataset: */ 638 646 nodes->AddObject(node); … … 656 664 xfree((void**)&model->gridonbed); 657 665 xfree((void**)&model->gridonsurface); 666 xfree((void**)&model->gridonhutter); 658 667 xfree((void**)&model->uppernodes); 659 668 -
issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp
r741 r748 424 424 425 425 #ifdef _PARALLEL_ 426 } //if( npart[i]==my_rank)426 } //if(my_grids[i]) 427 427 #endif 428 428 }
Note:
See TracChangeset
for help on using the changeset viewer.