Changeset 3824


Ignore:
Timestamp:
05/18/10 15:55:12 (15 years ago)
Author:
seroussi
Message:

nan in lower and upper elements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r3822 r3824  
    5858        penta_matice_id=index+1; //refers to the corresponding ice material object
    5959        penta_matpar_id=iomodel->numberofelements+1; //refers to the constant material parameters object
    60         penta_elements_ids[0]=(int)(iomodel->upperelements[index]);
    61         penta_elements_ids[1]=(int)(iomodel->lowerelements[index]);
     60
     61        if isnan(iomodel->upperelements[index]){
     62                penta_elements_ids[0]=this->id; //upper penta is the same penta
     63        }
     64        else{
     65                penta_elements_ids[0]=(int)(iomodel->upperelements[index]);
     66        }
     67        if isnan(iomodel->lowerelements[index]){
     68                penta_elements_ids[1]=this->id; //lower penta is the same penta
     69        }
     70        else{
     71                penta_elements_ids[1]=(int)(iomodel->lowerelements[index]);
     72        }
    6273
    6374        this->InitHookNodes(penta_node_ids); this->nodes=NULL;
Note: See TracChangeset for help on using the changeset viewer.