Changeset 748


Ignore:
Timestamp:
06/03/09 14:56:49 (16 years ago)
Author:
seroussi
Message:

fixed diagnostic mixed Hutter/MacAyeal

Location:
issm/trunk/src/c/ModelProcessorx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp

    r653 r748  
    319319                                materials->AddObject(matice);
    320320               
    321                                 #ifdef _PARALLEL_
    322                                 /*Now that we are here, we can also start building the list of grids belonging to this node partition: we use
    323                                  *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_grids
    325                                  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                                 #endif
    330321                        } //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
    331332
    332333                #ifdef _PARALLEL_
     
    445446                                materials->AddObject(matice);
    446447                               
    447                                 #ifdef _PARALLEL_
    448                                 /*Now that we are here, we can also start building the list of grids belonging to this node partition: we use
    449                                  *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_grids
    451                                  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                                 #endif
    459448                        }
     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
    460462
    461463                #ifdef _PARALLEL_
     
    577579        ModelFetchData((void**)&model->gridonbed,NULL,NULL,model_handle,"gridonbed","Matrix","Mat");
    578580        ModelFetchData((void**)&model->gridonsurface,NULL,NULL,model_handle,"gridonsurface","Matrix","Mat");
     581        ModelFetchData((void**)&model->gridonhutter,NULL,NULL,model_handle,"gridonhutter","Matrix","Mat");
    579582
    580583        /*Get number of dofs per node: */
     
    583586        for (i=0;i<model->numberofnodes;i++){
    584587        #ifdef _PARALLEL_
     588
    585589        /*keep only this partition's nodes:*/
    586590        if((my_grids[i]==1)){
     
    589593                node_id=i+1; //matlab indexing
    590594                       
    591                
    592595               
    593596                #ifdef _PARALLEL_
     
    635638                        }
    636639                }
     640                if (model->gridonhutter[i]){
     641                        for(k=1;k<=node_numdofs;k++){
     642                                node->FreezeDof(k);
     643                        }
     644                }
    637645                /*Add node to nodes dataset: */
    638646                nodes->AddObject(node);
     
    656664        xfree((void**)&model->gridonbed);
    657665        xfree((void**)&model->gridonsurface);
     666        xfree((void**)&model->gridonhutter);
    658667        xfree((void**)&model->uppernodes);
    659668               
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp

    r741 r748  
    424424
    425425        #ifdef _PARALLEL_
    426         } //if(npart[i]==my_rank)
     426        } //if(my_grids[i])
    427427        #endif
    428428        }
Note: See TracChangeset for help on using the changeset viewer.