Changeset 3098


Ignore:
Timestamp:
02/23/10 16:08:37 (15 years ago)
Author:
Mathieu Morlighem
Message:

Now pressure load has one extra column

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

Legend:

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

    r2959 r3098  
    8888               
    8989                if (strcmp(iomodel->meshtype,"2d")==0){
    90                         segment_width=3;
     90                        segment_width=4;
    9191                        element_type=TriaEnum();
    9292                }
    9393                else{
    94                         segment_width=5;
     94                        segment_width=6;
    9595                        element_type=PentaEnum();
    9696                }
    9797
    9898
    99                 element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-1)-1); //element is in the last column
     99                element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (grid1 grid2 ... elem fill)
    100100
    101101                #ifdef _PARALLEL_
     
    115115                icefront_mparid=iomodel->numberofelements+1; //matlab indexing
    116116                icefront_sid=i+1; //matlab indexing
    117                 icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-1); //matlab indexing
     117                icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
    118118                icefront_element_type=element_type;
    119119
     
    253253
    254254}
    255 
    256 
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp

    r2959 r3098  
    7373        for (i=0;i<numberofpressureloads;i++){
    7474               
    75                 segment_width=5;
     75                segment_width=6;
    7676
    77                 element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-1)-1); //element is in the last column
     77                element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (grid1 grid2 ... elem fill)
    7878
    7979                #ifdef _PARALLEL_
     
    9292                icefront_mparid=iomodel->numberofelements+1; //matlab indexing
    9393                icefront_sid=count+1; //matlab indexing
    94                 icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-1); //matlab indexing
     94                icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
    9595                icefront_element_type=PentaEnum();
    9696
     
    127127        xfree((void**)&iomodel->bed);
    128128
    129 
    130 
    131 
    132129        //create penalties for grids on the base of icesheet. We must have wb=ub*db/dx+vb*db/dy
    133130
     
    160157        }
    161158
    162 
    163 
    164159        xfree((void**)&iomodel->gridonbed);
    165160        xfree((void**)&iomodel->gridonstokes);
     
    176171
    177172}
    178 
    179 
Note: See TracChangeset for help on using the changeset viewer.