Changeset 18171 for issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp
- Timestamp:
- 06/20/14 11:31:45 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp
r18078 r18171 24 24 #define NUMNODESP2xP1 12 25 25 #define NUMNODESP2 18 26 #define NUMNODESP2b 19 26 27 #define NUMNODESP2xP4 30 27 28 … … 237 238 basis[16]=4.*gauss->coord3*gauss->coord1*(1.-zeta*zeta); 238 239 basis[17]=4.*gauss->coord1*gauss->coord2*(1.-zeta*zeta); 240 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); 239 266 return; 240 267 case P2xP4Enum : … … 572 599 dbasis[NUMNODESP2*1+17] = (1.-zeta*zeta)*(-2.*SQRT3/3.*(gauss->coord1+gauss->coord2)); 573 600 dbasis[NUMNODESP2*2+17] = -2.*zeta*4.*gauss->coord1*gauss->coord2; 601 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; 574 683 return; 575 684 case P2xP4Enum : … … 841 950 case P1bubblecondensedEnum: return NUMNODESP1b; 842 951 case P2Enum: return NUMNODESP2; 952 case P2bubbleEnum: return NUMNODESP2b; 953 case P2bubblecondensedEnum: return NUMNODESP2b; 843 954 case P2xP1Enum: return NUMNODESP2xP1; 844 955 case P1xP2Enum: return NUMNODESP1xP2;
Note:
See TracChangeset
for help on using the changeset viewer.