source: issm/oecreview/Archive/17984-18295/ISSM-18170-18171.diff@ 18296

Last change on this file since 18296 was 18296, checked in by Mathieu Morlighem, 11 years ago

Added 17984-18295

File size: 14.9 KB
  • ../trunk-jpl/src/c/classes/Elements/PentaRef.cpp

     
    2323#define NUMNODESP1xP3 12
    2424#define NUMNODESP2xP1 12
    2525#define NUMNODESP2    18
     26#define NUMNODESP2b   19
    2627#define NUMNODESP2xP4 30
    2728
    2829/*Object constructors and destructor*/
     
    237238                        basis[16]=4.*gauss->coord3*gauss->coord1*(1.-zeta*zeta);
    238239                        basis[17]=4.*gauss->coord1*gauss->coord2*(1.-zeta*zeta);
    239240                        return;
     241                case P2bubbleEnum: case P2bubblecondensedEnum:
     242                        /*Corner nodes*/
     243                        basis[ 0]=gauss->coord1*(2.*gauss->coord1-1.)*zeta*(zeta-1.)/2.;
     244                        basis[ 1]=gauss->coord2*(2.*gauss->coord2-1.)*zeta*(zeta-1.)/2.;
     245                        basis[ 2]=gauss->coord3*(2.*gauss->coord3-1.)*zeta*(zeta-1.)/2.;
     246                        basis[ 3]=gauss->coord1*(2.*gauss->coord1-1.)*zeta*(zeta+1.)/2.;
     247                        basis[ 4]=gauss->coord2*(2.*gauss->coord2-1.)*zeta*(zeta+1.)/2.;
     248                        basis[ 5]=gauss->coord3*(2.*gauss->coord3-1.)*zeta*(zeta+1.)/2.;
     249                        /*mid-sides of quads*/
     250                        basis[ 6]=gauss->coord1*(2.*gauss->coord1-1.)*(1.-zeta*zeta);
     251                        basis[ 7]=gauss->coord2*(2.*gauss->coord2-1.)*(1.-zeta*zeta);
     252                        basis[ 8]=gauss->coord3*(2.*gauss->coord3-1.)*(1.-zeta*zeta);
     253                        /*mid-sides of triangles*/
     254                        basis[ 9]=4.*gauss->coord3*gauss->coord2*zeta*(zeta-1.)/2.;
     255                        basis[10]=4.*gauss->coord3*gauss->coord1*zeta*(zeta-1.)/2.;
     256                        basis[11]=4.*gauss->coord1*gauss->coord2*zeta*(zeta-1.)/2.;
     257                        basis[12]=4.*gauss->coord3*gauss->coord2*zeta*(zeta+1.)/2.;
     258                        basis[13]=4.*gauss->coord3*gauss->coord1*zeta*(zeta+1.)/2.;
     259                        basis[14]=4.*gauss->coord1*gauss->coord2*zeta*(zeta+1.)/2.;
     260                        /*quad faces*/
     261                        basis[15]=4.*gauss->coord3*gauss->coord2*(1.-zeta*zeta);
     262                        basis[16]=4.*gauss->coord3*gauss->coord1*(1.-zeta*zeta);
     263                        basis[17]=4.*gauss->coord1*gauss->coord2*(1.-zeta*zeta);
     264                        /*bubble*/
     265                        basis[18]=27.*gauss->coord1*gauss->coord2*gauss->coord3*(1.+zeta)*(1.-zeta);
     266                        return;
    240267                case P2xP4Enum :
    241268                        /*Corner nodes*/
    242269                        basis[ 0]=gauss->coord1*(2.*gauss->coord1-1.)*(2./3.)*(zeta-1.)*(zeta-0.5 )*(zeta)*(zeta+0.5);
     
    572599                        dbasis[NUMNODESP2*1+17] = (1.-zeta*zeta)*(-2.*SQRT3/3.*(gauss->coord1+gauss->coord2));
    573600                        dbasis[NUMNODESP2*2+17] = -2.*zeta*4.*gauss->coord1*gauss->coord2;
    574601                        return;
     602                case P2bubbleEnum: case P2bubblecondensedEnum:
     603                        /*Nodal function 1*/
     604                        dbasis[NUMNODESP2b*0+0 ] = .5*zeta*(zeta-1.)*(-2.*gauss->coord1 + 0.5);
     605                        dbasis[NUMNODESP2b*1+0 ] = .5*zeta*(zeta-1.)*(-2.*SQRT3/3.*gauss->coord1 + SQRT3/6.);
     606                        dbasis[NUMNODESP2b*2+0 ] = .5*(2.*zeta-1.)*gauss->coord1*(2.*gauss->coord1-1.);
     607                        /*Nodal function 2*/
     608                        dbasis[NUMNODESP2b*0+1 ] = .5*zeta*(zeta-1.)*(+2.*gauss->coord2 - 0.5);
     609                        dbasis[NUMNODESP2b*1+1 ] = .5*zeta*(zeta-1.)*(-2.*SQRT3/3.*gauss->coord2 + SQRT3/6.);
     610                        dbasis[NUMNODESP2b*2+1 ] = .5*(2.*zeta-1.)*gauss->coord2*(2.*gauss->coord2-1.);
     611                        /*Nodal function 3*/
     612                        dbasis[NUMNODESP2b*0+2 ] = 0.;
     613                        dbasis[NUMNODESP2b*1+2 ] = .5*zeta*(zeta-1.)*(4.*SQRT3/3.*gauss->coord3 - SQRT3/3.);
     614                        dbasis[NUMNODESP2b*2+2 ] = .5*(2.*zeta-1.)*gauss->coord3*(2.*gauss->coord3-1.);
     615                        /*Nodal function 4*/
     616                        dbasis[NUMNODESP2b*0+3 ] = .5*zeta*(zeta+1.)*(-2.*gauss->coord1 + 0.5);
     617                        dbasis[NUMNODESP2b*1+3 ] = .5*zeta*(zeta+1.)*(-2.*SQRT3/3.*gauss->coord1 + SQRT3/6.);
     618                        dbasis[NUMNODESP2b*2+3 ] = .5*(2.*zeta+1.)*gauss->coord1*(2.*gauss->coord1-1.);
     619                        /*Nodal function 5*/
     620                        dbasis[NUMNODESP2b*0+4 ] = .5*zeta*(zeta+1.)*(+2.*gauss->coord2 - 0.5);
     621                        dbasis[NUMNODESP2b*1+4 ] = .5*zeta*(zeta+1.)*(-2.*SQRT3/3.*gauss->coord2 + SQRT3/6.);
     622                        dbasis[NUMNODESP2b*2+4 ] = .5*(2.*zeta+1.)*gauss->coord2*(2.*gauss->coord2-1.);
     623                        /*Nodal function 6*/
     624                        dbasis[NUMNODESP2b*0+5 ] = 0.;
     625                        dbasis[NUMNODESP2b*1+5 ] = .5*zeta*(zeta+1.)*(4.*SQRT3/3.*gauss->coord3 - SQRT3/3.);
     626                        dbasis[NUMNODESP2b*2+5 ] = .5*(2.*zeta+1.)*gauss->coord3*(2.*gauss->coord3-1.);
     627
     628                        /*Nodal function 7*/
     629                        dbasis[NUMNODESP2b*0+6 ] = (-2.*gauss->coord1 + 0.5)*(1.-zeta*zeta);
     630                        dbasis[NUMNODESP2b*1+6 ] = (-2.*SQRT3/3.*gauss->coord1 + SQRT3/6.)*(1.-zeta*zeta);
     631                        dbasis[NUMNODESP2b*2+6 ] = -2.*zeta*gauss->coord1*(2.*gauss->coord1-1.);
     632                        /*Nodal function 8*/
     633                        dbasis[NUMNODESP2b*0+7 ] = (+2.*gauss->coord2 - 0.5)*(1.-zeta*zeta);
     634                        dbasis[NUMNODESP2b*1+7 ] = (-2.*SQRT3/3.*gauss->coord2 + SQRT3/6.)*(1.-zeta*zeta);
     635                        dbasis[NUMNODESP2b*2+7 ] = -2.*zeta*gauss->coord2*(2.*gauss->coord2-1.);
     636                        /*Nodal function 9*/
     637                        dbasis[NUMNODESP2b*0+8 ] = 0.;
     638                        dbasis[NUMNODESP2b*1+8 ] = (+4.*SQRT3/3.*gauss->coord3 - SQRT3/3.)*(1.-zeta*zeta);
     639                        dbasis[NUMNODESP2b*2+8 ] = -2.*zeta*gauss->coord3*(2.*gauss->coord3-1.);
     640
     641                        /*Nodal function 10*/
     642                        dbasis[NUMNODESP2b*0+9 ] = zeta*(zeta-1.)*gauss->coord3;
     643                        dbasis[NUMNODESP2b*1+9 ] = .5*zeta*(zeta-1.)*(+4.*SQRT3/3.*gauss->coord2 - 2.*SQRT3/3.*gauss->coord3);
     644                        dbasis[NUMNODESP2b*2+9 ] = 2.*gauss->coord3*gauss->coord2*(2.*zeta-1.);
     645                        /*Nodal function 11*/
     646                        dbasis[NUMNODESP2b*0+10] = -zeta*(zeta-1.)*gauss->coord3;
     647                        dbasis[NUMNODESP2b*1+10] = .5*zeta*(zeta-1.)*(+4.*SQRT3/3.*gauss->coord1 - 2.*SQRT3/3.*gauss->coord3);
     648                        dbasis[NUMNODESP2b*2+10] = 2.*gauss->coord3*gauss->coord1*(2.*zeta-1.);
     649                        /*Nodal function 12*/
     650                        dbasis[NUMNODESP2b*0+11] = zeta*(zeta-1.)*(gauss->coord1-gauss->coord2);
     651                        dbasis[NUMNODESP2b*1+11] = .5*zeta*(zeta-1.)*(-2.*SQRT3/3.*(gauss->coord1+gauss->coord2));
     652                        dbasis[NUMNODESP2b*2+11] = 2.*gauss->coord1*gauss->coord2*(2.*zeta-1.);
     653                        /*Nodal function 13*/
     654                        dbasis[NUMNODESP2b*0+12] = zeta*(zeta+1.)*gauss->coord3;
     655                        dbasis[NUMNODESP2b*1+12] = .5*zeta*(zeta+1.)*(+4.*SQRT3/3.*gauss->coord2 - 2.*SQRT3/3.*gauss->coord3);
     656                        dbasis[NUMNODESP2b*2+12] = 2.*gauss->coord3*gauss->coord2*(2.*zeta+1.);
     657                        /*Nodal function 14*/
     658                        dbasis[NUMNODESP2b*0+13] = -zeta*(zeta+1.)*gauss->coord3;
     659                        dbasis[NUMNODESP2b*1+13] = .5*zeta*(zeta+1.)*(+4.*SQRT3/3.*gauss->coord1 - 2.*SQRT3/3.*gauss->coord3);
     660                        dbasis[NUMNODESP2b*2+13] = 2.*gauss->coord3*gauss->coord1*(2.*zeta+1.);
     661                        /*Nodal function 15*/
     662                        dbasis[NUMNODESP2b*0+14] = zeta*(zeta+1.)*(gauss->coord1-gauss->coord2);
     663                        dbasis[NUMNODESP2b*1+14] = .5*zeta*(zeta+1.)*(-2.*SQRT3/3.*(gauss->coord1+gauss->coord2));
     664                        dbasis[NUMNODESP2b*2+14] = 2.*gauss->coord1*gauss->coord2*(2.*zeta+1.);
     665
     666                        /*Nodal function 16*/
     667                        dbasis[NUMNODESP2b*0+15] = 2.*gauss->coord3*(1.-zeta*zeta);
     668                        dbasis[NUMNODESP2b*1+15] = (1.-zeta*zeta)*(+4.*SQRT3/3.*gauss->coord2 - 2.*SQRT3/3.*gauss->coord3);
     669                        dbasis[NUMNODESP2b*2+15] = -2.*zeta*4.*gauss->coord3*gauss->coord2;
     670                        /*Nodal function 17*/
     671                        dbasis[NUMNODESP2b*0+16] = -2.*gauss->coord3*(1.-zeta*zeta);
     672                        dbasis[NUMNODESP2b*1+16] = (1.-zeta*zeta)*(+4.*SQRT3/3.*gauss->coord1 - 2.*SQRT3/3.*gauss->coord3);
     673                        dbasis[NUMNODESP2b*2+16] = -2.*zeta*4.*gauss->coord3*gauss->coord1;
     674                        /*Nodal function 18*/
     675                        dbasis[NUMNODESP2b*0+17] = 2.*(gauss->coord1-gauss->coord2)*(1.-zeta*zeta);
     676                        dbasis[NUMNODESP2b*1+17] = (1.-zeta*zeta)*(-2.*SQRT3/3.*(gauss->coord1+gauss->coord2));
     677                        dbasis[NUMNODESP2b*2+17] = -2.*zeta*4.*gauss->coord1*gauss->coord2;
     678
     679                        /*Nodal function 19*/
     680                        dbasis[NUMNODESP2b*0+18] = 27.*(1.+zeta)*(1.-zeta)*(-.5*gauss->coord2*gauss->coord3 + .5*gauss->coord1*gauss->coord3);
     681                        dbasis[NUMNODESP2b*1+18] = 27.*(1.+zeta)*(1.-zeta)*SQRT3*(-1./6.*gauss->coord2*gauss->coord3 - 1./6.*gauss->coord1*gauss->coord3 +1./3.*gauss->coord1*gauss->coord2);
     682                        dbasis[NUMNODESP2b*2+18] = -54*gauss->coord1*gauss->coord2*gauss->coord3*zeta;
     683                        return;
    575684                case P2xP4Enum :
    576685                        /*Nodal function 1*/
    577686                        dbasis[NUMNODESP2xP4*0+0 ] = (-2* gauss->coord1 + 0.5 ) *(2./3.) *(zeta - 1.)*(zeta - 0.5)*(zeta)*(zeta+0.5) ;
     
    840949                case P1bubbleEnum:          return NUMNODESP1b;
    841950                case P1bubblecondensedEnum: return NUMNODESP1b;
    842951                case P2Enum:                return NUMNODESP2;
     952                case P2bubbleEnum:          return NUMNODESP2b;
     953                case P2bubblecondensedEnum: return NUMNODESP2b;
    843954                case P2xP1Enum:             return NUMNODESP2xP1;
    844955                case P1xP2Enum:             return NUMNODESP1xP2;
    845956                case P1P1Enum:              return NUMNODESP1*2;
  • ../trunk-jpl/src/c/classes/Elements/Penta.cpp

     
    22332233                        penta_node_ids[16]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofedges+iomodel->elementtofaceconnectivity[5*index+3]+1;
    22342234                        penta_node_ids[17]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofedges+iomodel->elementtofaceconnectivity[5*index+4]+1;
    22352235                        break;
     2236                case P2bubbleEnum: case P2bubblecondensedEnum:
     2237                        numnodes         = 19;
     2238                        penta_node_ids   = xNew<int>(numnodes);
     2239                        penta_node_ids[ 0]=iomodel->nodecounter+iomodel->elements[6*index+0];
     2240                        penta_node_ids[ 1]=iomodel->nodecounter+iomodel->elements[6*index+1];
     2241                        penta_node_ids[ 2]=iomodel->nodecounter+iomodel->elements[6*index+2];
     2242                        penta_node_ids[ 3]=iomodel->nodecounter+iomodel->elements[6*index+3];
     2243                        penta_node_ids[ 4]=iomodel->nodecounter+iomodel->elements[6*index+4];
     2244                        penta_node_ids[ 5]=iomodel->nodecounter+iomodel->elements[6*index+5];
     2245                        penta_node_ids[ 6]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->elementtoedgeconnectivity[9*index+0]+1;
     2246                        penta_node_ids[ 7]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->elementtoedgeconnectivity[9*index+1]+1;
     2247                        penta_node_ids[ 8]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->elementtoedgeconnectivity[9*index+2]+1;
     2248                        penta_node_ids[ 9]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->elementtoedgeconnectivity[9*index+3]+1;
     2249                        penta_node_ids[10]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->elementtoedgeconnectivity[9*index+4]+1;
     2250                        penta_node_ids[11]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->elementtoedgeconnectivity[9*index+5]+1;
     2251                        penta_node_ids[12]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->elementtoedgeconnectivity[9*index+6]+1;
     2252                        penta_node_ids[13]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->elementtoedgeconnectivity[9*index+7]+1;
     2253                        penta_node_ids[14]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->elementtoedgeconnectivity[9*index+8]+1;
     2254                        penta_node_ids[15]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofedges+iomodel->elementtofaceconnectivity[5*index+2]+1;
     2255                        penta_node_ids[16]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofedges+iomodel->elementtofaceconnectivity[5*index+3]+1;
     2256                        penta_node_ids[17]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofedges+iomodel->elementtofaceconnectivity[5*index+4]+1;
     2257                        penta_node_ids[18]=iomodel->nodecounter+iomodel->numberofvertices+iomodel->numberofedges+iomodel->numberoffaces+index+1;
     2258                        break;
    22362259                case P1P1Enum: case P1P1GLSEnum:
    22372260                        numnodes         = 12;
    22382261                        penta_node_ids   = xNew<int>(numnodes);
  • ../trunk-jpl/src/c/classes/gauss/GaussPenta.cpp

     
    646646                                default: _error_("node index should be in [0 17]");
    647647                        }
    648648                        break;
     649                case P2bubbleEnum: case P2bubblecondensedEnum:
     650                        switch(iv){
     651                                case 0: coord1=1.; coord2=0.; coord3=0.; coord4=-1.; break;
     652                                case 1: coord1=0.; coord2=1.; coord3=0.; coord4=-1.; break;
     653                                case 2: coord1=0.; coord2=0.; coord3=1.; coord4=-1.; break;
     654                                case 3: coord1=1.; coord2=0.; coord3=0.; coord4=+1.; break;
     655                                case 4: coord1=0.; coord2=1.; coord3=0.; coord4=+1.; break;
     656                                case 5: coord1=0.; coord2=0.; coord3=1.; coord4=+1.; break;
     657
     658                                case 6: coord1=1.; coord2=0.; coord3=0.; coord4=0.; break;
     659                                case 7: coord1=0.; coord2=1.; coord3=0.; coord4=0.; break;
     660                                case 8: coord1=0.; coord2=0.; coord3=1.; coord4=0.; break;
     661
     662                                case  9: coord1=0.; coord2=.5; coord3=.5; coord4=-1.;break;
     663                                case 10: coord1=.5; coord2=0.; coord3=.5; coord4=-1.;break;
     664                                case 11: coord1=.5; coord2=.5; coord3=0.; coord4=-1.;break;
     665                                case 12: coord1=0.; coord2=.5; coord3=.5; coord4=+1.;break;
     666                                case 13: coord1=.5; coord2=0.; coord3=.5; coord4=+1.;break;
     667                                case 14: coord1=.5; coord2=.5; coord3=0.; coord4=+1.;break;
     668
     669                                case 15: coord1=0.; coord2=.5; coord3=.5; coord4=0.;break;
     670                                case 16: coord1=.5; coord2=0.; coord3=.5; coord4=0.;break;
     671                                case 17: coord1=.5; coord2=.5; coord3=0.; coord4=0.;break;
     672
     673                                case 18: coord1=1./3.; coord2=1./3.; coord3=1./3.; coord4=0.;  break;
     674                                default: _error_("node index should be in [0 18]");
     675                        }
     676                        break;
    649677                case P2xP4Enum:
    650678                        switch(iv){
    651679                                case 0: coord1=1.; coord2=0.; coord3=0.; coord4=-1.; break;
  • ../trunk-jpl/src/m/classes/flowequation.py

     
    7676                        md = checkfield(md,'fieldname','flowequation.isHO','numel',[1],'values',[0,1])
    7777                        md = checkfield(md,'fieldname','flowequation.isFS','numel',[1],'values',[0,1])
    7878                        md = checkfield(md,'fieldname','flowequation.fe_SSA','values',['P1','P1bubble','P1bubblecondensed','P2','P2bubble'])
    79                         md = checkfield(md,'fieldname','flowequation.fe_HO' ,'values',['P1','P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2','P1xP3','P2xP4'])
     79                        md = checkfield(md,'fieldname','flowequation.fe_HO' ,'values',['P1','P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2','P2bubble','P1xP3','P2xP4'])
    8080                        md = checkfield(md,'fieldname','flowequation.fe_FS' ,'values',['P1P1','P1P1GLS','MINIcondensed','MINI','TaylorHood','XTaylorHood','OneLayerP4z'])
    8181                        md = checkfield(md,'fieldname','flowequation.borderSSA','size',[md.mesh.numberofvertices],'values',[0,1])
    8282                        md = checkfield(md,'fieldname','flowequation.borderHO','size',[md.mesh.numberofvertices],'values',[0,1])
  • ../trunk-jpl/src/m/classes/flowequation.m

     
    132132                                md = checkfield(md,'fieldname','flowequation.isHO','numel',[1],'values',[0 1]);
    133133                                md = checkfield(md,'fieldname','flowequation.isFS','numel',[1],'values',[0 1]);
    134134                                md = checkfield(md,'fieldname','flowequation.fe_SSA','values',{'P1','P1bubble','P1bubblecondensed','P2','P2bubble'});
    135                                 md = checkfield(md,'fieldname','flowequation.fe_HO' ,'values',{'P1','P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2','P1xP3','P2xP4'});
     135                                md = checkfield(md,'fieldname','flowequation.fe_HO' ,'values',{'P1','P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2','P2bubble','P1xP3','P2xP4'});
    136136                                md = checkfield(md,'fieldname','flowequation.fe_FS' ,'values',{'P1P1','P1P1GLS','MINIcondensed','MINI','TaylorHood','XTaylorHood','OneLayerP4z'});
    137137                                md = checkfield(md,'fieldname','flowequation.XTH_r','numel',[1],'>',0.);
    138138                                md = checkfield(md,'fieldname','flowequation.XTH_theta','numel',[1],'>=',0.,'<',0.5);
Note: See TracBrowser for help on using the repository browser.