Changeset 7843


Ignore:
Timestamp:
04/12/11 10:42:07 (14 years ago)
Author:
Mathieu Morlighem
Message:

Fixed penalties for Pattyn-MacAyeal: check that the two nodes are on base

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp

    r7833 r7843  
    5858        /*Create Penpair for penalties: */
    5959        IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,"penalties");
     60        IoModelFetchData(&iomodel->gridonbed,NULL,NULL,iomodel_handle,"gridonbed");
    6061
    6162        for(i=0;i<iomodel->numpenalties;i++){
     
    6566                        /*In debugging mode, check that the second node is in the same cpu*/
    6667                        _assert_(iomodel->my_vertices[(int)iomodel->penalties[2*i+1]-1]);
     68
     69                        /*Skip if one of the two is not on the bed*/
     70                        if(!iomodel->gridonbed[(int)iomodel->penalties[2*i+0]-1] || !iomodel->gridonbed[(int)iomodel->penalties[2*i+1]-1]) continue;
    6771
    6872                        /*Get node ids*/
     
    8185        /*free ressources: */
    8286        xfree((void**)&iomodel->penalties);
     87        xfree((void**)&iomodel->gridonbed);
    8388
    8489
Note: See TracChangeset for help on using the changeset viewer.