Changeset 4456


Ignore:
Timestamp:
07/08/10 08:25:07 (15 years ago)
Author:
seroussi
Message:

fixed problem with nodes in loads -> node_id depend on iomodel->nodecounter

Location:
issm/trunk/src/c/objects/Loads
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Loads/Icefront.cpp

    r4452 r4456  
    5656        icefront_mparid=iomodel->numberofelements+1; //matlab indexing
    5757
    58         icefront_node_ids[0]=(int)*(iomodel->pressureload+segment_width*i+0);
    59         icefront_node_ids[1]=(int)*(iomodel->pressureload+segment_width*i+1);
     58        icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+0);
     59        icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+1);
    6060
    6161        if (in_analysis_type==DiagnosticHorizAnalysisEnum){
     
    6565                else if ((int)*(iomodel->elements_type+2*element+0)==PattynFormulationEnum){ //this is a real 3d element, icefront will be 3d.
    6666                        icefront_type=QuadIceFrontEnum;
    67                         icefront_node_ids[2]=(int)*(iomodel->pressureload+segment_width*i+2);
    68                         icefront_node_ids[3]=(int)*(iomodel->pressureload+segment_width*i+3);
     67                        icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+2);
     68                        icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+3);
    6969                }
    7070                else ISSMERROR(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0));
     
    7373                //We have a Stokes element, so we need a 3d Icefront
    7474                icefront_type=QuadIceFrontEnum;
    75                 icefront_node_ids[2]=(int)*(iomodel->pressureload+segment_width*i+2);
    76                 icefront_node_ids[3]=(int)*(iomodel->pressureload+segment_width*i+3);
     75                icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+2);
     76                icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+3);
    7777        }
    7878        else ISSMERROR("analysis_type %s not supported yet!",EnumAsString(in_analysis_type));
  • issm/trunk/src/c/objects/Loads/Numericalflux.cpp

    r4433 r4456  
    8686                /*3: We have the id of the elements and the position of the vertices in the index
    8787                 * we can compute their dofs!*/
    88                 numericalflux_node_ids[0]=3*(e1-1)+pos1;       //ex: 1 2 3
    89                 numericalflux_node_ids[1]=3*(e1-1)+(pos1%3)+1; //ex: 2 3 1
    90                 numericalflux_node_ids[2]=3*(e2-1)+pos2;           //ex: 1 2 3
    91                 numericalflux_node_ids[3]=3*(e2-1)+((pos2+1)%3)+1; //ex: 3 1 2
     88                numericalflux_node_ids[0]=iomodel->nodecounter+3*(e1-1)+pos1;       //ex: 1 2 3
     89                numericalflux_node_ids[1]=iomodel->nodecounter+3*(e1-1)+(pos1%3)+1; //ex: 2 3 1
     90                numericalflux_node_ids[2]=iomodel->nodecounter+3*(e2-1)+pos2;           //ex: 1 2 3
     91                numericalflux_node_ids[3]=iomodel->nodecounter+3*(e2-1)+((pos2+1)%3)+1; //ex: 3 1 2
    9292        }
    9393        else{
     
    102102                /*3: We have the id of the elements and the position of the vertices in the index
    103103                 * we can compute their dofs!*/
    104                 numericalflux_node_ids[0]=3*(e1-1)+pos1;
    105                 numericalflux_node_ids[1]=3*(e1-1)+(pos1%3)+1;
     104                numericalflux_node_ids[0]=iomodel->nodecounter+3*(e1-1)+pos1;
     105                numericalflux_node_ids[1]=iomodel->nodecounter+3*(e1-1)+(pos1%3)+1;
    106106        }
    107107
  • issm/trunk/src/c/objects/Loads/Pengrid.cpp

    r4405 r4456  
    5050       
    5151        /*hooks: */
    52         pengrid_node_id=index+1;
     52        pengrid_node_id=iomodel->nodecounter+index+1;
    5353        pengrid_element_id=iomodel->singlenodetoelementconnectivity[index];
    5454        pengrid_matpar_id=iomodel->numberofelements+1; //refers to the constant material parameters object
  • issm/trunk/src/c/objects/Loads/Riftfront.cpp

    r4396 r4456  
    5858
    5959        /*hooks: */
    60         riftfront_node_ids[0]=grid1;
    61         riftfront_node_ids[1]=grid2;
     60        riftfront_node_ids[0]=iomodel->nodecounter+grid1;
     61        riftfront_node_ids[1]=iomodel->nodecounter+grid2;
    6262        riftfront_matpar_id=iomodel->numberofelements+1; //matlab indexing
    6363
Note: See TracChangeset for help on using the changeset viewer.