Changeset 17354


Ignore:
Timestamp:
02/26/14 11:28:57 (11 years ago)
Author:
seroussi
Message:

NEW: added basal functions and derivatives in Segment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/SegRef.cpp

    r17309 r17354  
    9999                        basis[1]=(1.+gauss->coord1)/2.;
    100100                        return;
     101                case P2Enum:
     102                        basis[0]=(gauss->coord1-1.)*gauss->coord1/2.;
     103                        basis[1]=gauss->coord1*(1.+gauss->coord1)/2.;
     104                        basis[2]=(1.-gauss->coord1)*(1.+gauss->coord1);
     105                        return;
    101106                default:
    102107                        _error_("Element type "<<EnumToStringx(element_type)<<" not supported yet");
     
    167172                        dbasis[1] = 0.5;
    168173                        return;
     174                case P2Enum:
     175                        /*Nodal function 1*/
     176                        dbasis[0] = (gauss->coord1-1.)/2. + gauss->coord1/2.;
     177                        dbasis[1] = (1.+gauss->coord1)/2. + gauss->coord1/2.;
     178                        dbasis[2] = -2.*gauss->coord1;
     179                        return;
    169180                default:
    170181                        _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet");
Note: See TracChangeset for help on using the changeset viewer.