Ignore:
Timestamp:
05/21/10 12:12:38 (15 years ago)
Author:
Mathieu Morlighem
Message:

some fixing

File:
1 edited

Legend:

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

    r3875 r3877  
    459459
    460460        return tria;
     461}
     462/*}}}*/
     463/*FUNCTION Penta::GaussFromNode {{{1*/
     464double* Penta::GaussFromNode(Node* node){
     465
     466        /*variable declaration*/
     467        int i,pos;
     468        double*  gauss=NULL;
     469
     470        /*Allocate gauss*/
     471        gauss=(double*)xmalloc(4*sizeof(double));
     472
     473        for(i=0;i<6;i++){
     474                if (node==nodes[i]){
     475                        switch(i){
     476                                case 0:
     477                                        gauss[0]=1.0; gauss[1]=0.0; gauss[2]=0.0; gauss[3]= -1.0;
     478                                        return gauss;
     479                                case 1:
     480                                        gauss[0]=0.0; gauss[1]=1.0; gauss[2]=0.0; gauss[3]= -1.0;
     481                                        return gauss;
     482                                case 2:
     483                                        gauss[0]=0.0; gauss[1]=0.0; gauss[2]=1.0; gauss[3]= -1.0;
     484                                        return gauss;
     485                                case 3:
     486                                        gauss[0]=1.0; gauss[1]=0.0; gauss[2]=0.0; gauss[3]=1.0;
     487                                        return gauss;
     488                                case 4:
     489                                        gauss[0]=0.0; gauss[1]=1.0; gauss[2]=0.0; gauss[3]=1.0;
     490                                        return gauss;
     491                                case 5:
     492                                        gauss[0]=0.0; gauss[1]=0.0; gauss[2]=1.0; gauss[3]=1.0;
     493                                        return gauss;
     494                        }
     495                }
     496        }
     497
     498        /*output error if not found*/
     499        ISSMERROR("Node not found in Penta");
    461500}
    462501/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.