Changeset 5663
- Timestamp:
- 09/03/10 09:47:15 (15 years ago)
- Location:
- issm/trunk/src/c/objects/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r5662 r5663 20 20 21 21 /*Element macros*/ 22 #define NUMVERTICES 6 22 #define NUMVERTICES 6 23 #define NUMVERTICES2D 3 24 #define NDOF1 1 25 #define NDOF2 2 26 #define NDOF3 3 27 #define NDOF4 4 23 28 24 29 /*Penta constructors and destructor*/ … … 2302 2307 /*Collapsed formulation: */ 2303 2308 int i; 2304 const int NDOF2=2;2305 2309 const int numdofs=NDOF2*NUMVERTICES; 2306 2310 int* doflist=NULL; … … 2386 2390 2387 2391 /* node data: */ 2388 const int NUMVERTICES3d=6; 2389 const int NUMVERTICES2d=3; 2390 const int numdof2d=2*NUMVERTICES2d; 2391 double xyz_list[NUMVERTICES3d][3]; 2392 const int numdof2d=2*NUMVERTICES2D; 2393 double xyz_list[NUMVERTICES][3]; 2392 2394 int* doflist=NULL; 2393 2395 … … 2497 2499 2498 2500 /* Get node coordinates and dof list: */ 2499 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES3d);2501 GetVerticesCoordinates(&xyz_list[0][0], nodes,NUMVERTICES); 2500 2502 tria->GetDofList(&doflist,MacAyealApproximationEnum); //Pattyn dof list 2501 2503 … … 2715 2717 2716 2718 int i,j; 2717 const int DOFPERGRID=4; 2718 const int numdof=NUMVERTICES*DOFPERGRID; 2719 const int numdof=NUMVERTICES*NDOF4; 2719 2720 int* doflist=NULL; 2720 2721 2721 const int NUMVERTICES2d=3; 2722 const int numdof2d=NUMVERTICES2d*DOFPERGRID; 2722 const int numdof2d=NUMVERTICES2D*NDOF4; 2723 2723 2724 2724 /*Collapsed formulation: */ … … 2727 2727 /*Grid data: */ 2728 2728 double xyz_list[NUMVERTICES][3]; 2729 double xyz_list_tria[NUMVERTICES2 d][3];2729 double xyz_list_tria[NUMVERTICES2D][3]; 2730 2730 double bed_normal[3]; 2731 2731 … … 2872 2872 friction=new Friction("3d",inputs,matpar,analysis_type); 2873 2873 2874 for(i=0;i<NUMVERTICES2 d;i++){2874 for(i=0;i<NUMVERTICES2D;i++){ 2875 2875 for(j=0;j<3;j++){ 2876 2876 xyz_list_tria[i][j]=xyz_list[i][j]; … … 2970 2970 2971 2971 /* node data: */ 2972 const int NDOF1=1;2973 2972 const int numdof=NDOF1*NUMVERTICES; 2974 2973 double xyz_list[NUMVERTICES][3]; … … 3148 3147 3149 3148 /* node data: */ 3150 const int NDOF1=1;3151 3149 const int numdof=NDOF1*NUMVERTICES; 3152 3150 double xyz_list[NUMVERTICES][3]; … … 3480 3478 int i,j,k; 3481 3479 3482 const int NDOF2=2;3483 3480 const int numdofs=NDOF2*NUMVERTICES; 3484 3481 int* doflist=NULL; … … 3667 3664 3668 3665 /* node data: */ 3669 const int NDOF2=2;3670 3666 const int numdof=NDOF2*NUMVERTICES; 3671 3667 double xyz_list[NUMVERTICES][3]; … … 3756 3752 /*indexing: */ 3757 3753 int i,j; 3758 3759 const int DOFPERGRID=4; 3760 const int numdof=NUMVERTICES*DOFPERGRID; 3761 const int NUMVERTICES2d=3; 3762 int numdof2d=NUMVERTICES2d*DOFPERGRID; 3754 const int numdof=NUMVERTICES*NDOF4; 3755 int numdof2d=NUMVERTICES2D*NDOF4; 3763 3756 int* doflist=NULL; 3764 3757 … … 3767 3760 3768 3761 /*parameters: */ 3769 double xyz_list_tria[NUMVERTICES2 d][3];3762 double xyz_list_tria[NUMVERTICES2D][3]; 3770 3763 double xyz_list[NUMVERTICES][3]; 3771 3764 double bed_normal[3]; … … 3889 3882 /* Build gaussian vector */ 3890 3883 for(i=0;i<NUMVERTICES+1;i++){ 3891 Pe_gaussian[i* DOFPERGRID+2]=-rho_ice*gravity*Jdet*gauss_weight*l1l7[i];3884 Pe_gaussian[i*NDOF4+2]=-rho_ice*gravity*Jdet*gauss_weight*l1l7[i]; 3892 3885 } 3893 3886 … … 3934 3927 if ( (onbed==1) && (shelf==1)){ 3935 3928 3936 for(i=0;i<NUMVERTICES2 d;i++){3929 for(i=0;i<NUMVERTICES2D;i++){ 3937 3930 for(j=0;j<3;j++){ 3938 3931 xyz_list_tria[i][j]=xyz_list[i][j]; … … 3970 3963 BedNormal(&bed_normal[0],xyz_list_tria); 3971 3964 3972 for(i=0;i<NUMVERTICES2 d;i++){3965 for(i=0;i<NUMVERTICES2D;i++){ 3973 3966 for(j=0;j<3;j++){ 3974 Pe_temp[i* DOFPERGRID+j]+=water_pressure*gauss_weight*Jdet2d*L[i]*bed_normal[j];3967 Pe_temp[i*NDOF4+j]+=water_pressure*gauss_weight*Jdet2d*L[i]*bed_normal[j]; 3975 3968 } 3976 3969 } … … 4025 4018 4026 4019 /* node data: */ 4027 const int NDOF1=1;4028 4020 const int numdof=NDOF1*NUMVERTICES; 4029 4021 double xyz_list[NUMVERTICES][3]; … … 4189 4181 int found=0; 4190 4182 4191 const int NDOF1=1;4192 4183 const int numdof=NUMVERTICES*NDOF1; 4193 4184 int* doflist=NULL; … … 5267 5258 int i; 5268 5259 5269 const int NUMVERTICES2d=3;5270 5260 const int numdofpervertex=2; 5271 5261 const int numdof=numdofpervertex*NUMVERTICES; 5272 const int numdof2d=numdofpervertex*NUMVERTICES2 d;5262 const int numdof2d=numdofpervertex*NUMVERTICES2D; 5273 5263 int* doflistp=NULL; 5274 5264 int* doflistm=NULL; -
issm/trunk/src/c/objects/Elements/Tria.cpp
r5662 r5663 21 21 /*Element macros*/ 22 22 #define NUMVERTICES 3 23 #define NDOF1 1 24 #define NDOF2 2 25 #define NDOF3 3 26 #define NDOF4 4 23 27 24 28 /*Tria constructors and destructor*/ … … 628 632 629 633 /*constants: */ 630 const int NDOF2=2;631 634 const int numdof=NDOF2*NUMVERTICES; 632 635 … … 899 902 void Tria::GradjB(Vec gradient){ 900 903 901 /* constants*/902 const int NDOF2=2;903 904 904 /*Intermediaries*/ 905 905 int i,ig; … … 978 978 979 979 /* node data: */ 980 const int NDOF2=2;981 980 double xyz_list[NUMVERTICES][3]; 982 981 int doflist1[NUMVERTICES]; … … 1603 1602 /* node data: */ 1604 1603 const int numdof=2*NUMVERTICES; 1605 const int NDOF2=2;1606 1604 double xyz_list[NUMVERTICES][3]; 1607 1605 … … 1705 1703 /* node data: */ 1706 1704 const int numdof=2*NUMVERTICES; 1707 const int NDOF2=2;1708 1705 double xyz_list[NUMVERTICES][3]; 1709 1706 … … 1816 1813 /* node data: */ 1817 1814 const int numdof=2*NUMVERTICES; 1818 const int NDOF2=2;1819 1815 double xyz_list[NUMVERTICES][3]; 1820 1816 … … 1924 1920 /* node data: */ 1925 1921 const int numdof=2*NUMVERTICES; 1926 const int NDOF2=2;1927 1922 double xyz_list[NUMVERTICES][3]; 1928 1923 … … 2035 2030 /* node data: */ 2036 2031 const int numdof=2*NUMVERTICES; 2037 const int NDOF2=2;2038 2032 double xyz_list[NUMVERTICES][3]; 2039 2033 … … 2475 2469 2476 2470 /* node data: */ 2477 const int NDOF1=1;2478 2471 const int numdof=NDOF1*NUMVERTICES; 2479 2472 double xyz_list[NUMVERTICES][3]; … … 2630 2623 2631 2624 /* node data: */ 2632 const int NDOF1=1;2633 2625 const int numdof=NDOF1*NUMVERTICES; 2634 2626 double xyz_list[NUMVERTICES][3]; … … 2718 2710 2719 2711 /* node data: */ 2720 const int NDOF1=1;2721 2712 const int numdof=NDOF1*NUMVERTICES; 2722 2713 double xyz_list[NUMVERTICES][3]; … … 3378 3369 int i; 3379 3370 int connectivity; 3380 const int NDOF2=2;3381 3371 const int numdofs=NUMVERTICES*NDOF2; 3382 3372 int* doflist=NULL; … … 3414 3404 3415 3405 /* node data: */ 3416 const int NDOF1=1;3417 3406 const int numdof=NDOF1*NUMVERTICES; 3418 3407 double xyz_list[NUMVERTICES][3]; … … 3516 3505 int i,j; 3517 3506 3518 const int NDOF1=1;3519 3507 const int numdof=NUMVERTICES*NDOF1; 3520 3508 int* doflist=NULL; … … 3587 3575 3588 3576 /* node data: */ 3589 const int NDOF1=1;3590 3577 const int numdof=NDOF1*NUMVERTICES; 3591 3578 double xyz_list[NUMVERTICES][3]; … … 3756 3743 3757 3744 /* node data: */ 3758 const int NDOF1=1;3759 3745 const int numdof=NDOF1*NUMVERTICES; 3760 3746 double xyz_list[NUMVERTICES][3]; … … 3865 3851 /*constants: */ 3866 3852 const int numnodes=3; 3867 const int NDOF1=1;3868 3853 const int numdof=NDOF1*numnodes; 3869 3854 … … 3915 3900 3916 3901 /* node data: */ 3917 const int NDOF1=1;3918 3902 const int numdof=NDOF1*NUMVERTICES; 3919 3903 double xyz_list[NUMVERTICES][3]; … … 3999 3983 4000 3984 /* node data: */ 4001 const int NDOF1=1;4002 3985 const int numdof=NDOF1*NUMVERTICES; 4003 3986 double xyz_list[NUMVERTICES][3]; … … 4070 4053 4071 4054 /* node data: */ 4072 const int NDOF1=1;4073 4055 const int numdof=NDOF1*NUMVERTICES; 4074 4056 double xyz_list[NUMVERTICES][3]; … … 4141 4123 4142 4124 /* node data: */ 4143 const int NDOF1=1;4144 4125 const int numdof=NDOF1*NUMVERTICES; 4145 4126 double xyz_list[NUMVERTICES][3]; … … 4207 4188 4208 4189 /* node data: */ 4209 const int NDOF1=1;4210 4190 const int numdof=NDOF1*NUMVERTICES; 4211 4191 double xyz_list[NUMVERTICES][3]; … … 4301 4281 /* node data: */ 4302 4282 const int numdof=2*NUMVERTICES; 4303 const int NDOF2=2;4304 4283 double xyz_list[NUMVERTICES][3]; 4305 4284 int* doflist=NULL; … … 4499 4478 /* node data: */ 4500 4479 const int numdof=2*NUMVERTICES; 4501 const int NDOF2=2;4502 4480 double xyz_list[NUMVERTICES][3]; 4503 4481 int* doflist=NULL; … … 4720 4698 4721 4699 /* node data: */ 4722 const int NDOF4=4;4723 4700 const int numdof=NDOF4*NUMVERTICES; 4724 4701 double xyz_list[NUMVERTICES][3]; … … 4936 4913 /*Collapsed formulation: */ 4937 4914 int i; 4938 const int NDOF2=2;4939 4915 const int numdofs=NDOF2*NUMVERTICES; 4940 4916 int* doflist=NULL; … … 5012 4988 5013 4989 /* node data: */ 5014 const int NDOF1=1;5015 4990 const int numdof=NDOF1*NUMVERTICES; 5016 4991 double xyz_list[NUMVERTICES][3]; … … 5088 5063 5089 5064 /* node data: */ 5090 const int NDOF1=1;5091 5065 const int numdof=NDOF1*NUMVERTICES; 5092 5066 double xyz_list[NUMVERTICES][3]; … … 5160 5134 5161 5135 /* node data: */ 5162 const int NDOF1=1;5163 5136 const int numdof=NDOF1*NUMVERTICES; 5164 5137 double xyz_list[NUMVERTICES][3]; … … 5239 5212 int i,found; 5240 5213 5241 const int NDOF1=1;5242 5214 const int numdof=NUMVERTICES*NDOF1; 5243 5215 int* doflist=NULL; … … 5332 5304 int i,found; 5333 5305 5334 const int NDOF1=1;5335 5306 const int numdof=NUMVERTICES*NDOF1; 5336 5307 int* doflist=NULL; … … 5880 5851 5881 5852 /* node data: */ 5882 const int NDOF2=2;5883 5853 double xyz_list[NUMVERTICES][3]; 5884 5854 int doflist1[NUMVERTICES];
Note:
See TracChangeset
for help on using the changeset viewer.