Changeset 983
- Timestamp:
- 06/13/09 19:31:00 (16 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Matice.cpp
r976 r983 20 20 return; 21 21 } 22 Matice::Matice(int matice_mid,double matice_B,double matice_ Bbar,double matice_n){22 Matice::Matice(int matice_mid,double matice_B,double matice_n){ 23 23 mid=matice_mid; 24 24 B=matice_B; 25 Bbar=matice_Bbar;26 25 n=matice_n; 27 26 return; … … 36 35 printf(" mid: %i\n",mid); 37 36 printf(" B: %g\n",B); 38 printf(" Bbar: %g\n",Bbar);39 37 printf(" n: %g\n",n); 40 38 return; … … 45 43 printf(" mid: %i\n",mid); 46 44 printf(" B: %g\n",B); 47 printf(" Bbar: %g\n",Bbar);48 45 printf(" n: %g\n",n); 49 46 return; … … 66 63 memcpy(marshalled_dataset,&mid,sizeof(mid));marshalled_dataset+=sizeof(mid); 67 64 memcpy(marshalled_dataset,&B,sizeof(B));marshalled_dataset+=sizeof(B); 68 memcpy(marshalled_dataset,&Bbar,sizeof(Bbar));marshalled_dataset+=sizeof(Bbar);69 65 memcpy(marshalled_dataset,&n,sizeof(n));marshalled_dataset+=sizeof(n); 70 66 … … 75 71 int Matice::MarshallSize(){ 76 72 77 return sizeof(mid)+sizeof(B)+sizeof( Bbar)+sizeof(n)+sizeof(int); //sizeof(int) for enum type73 return sizeof(mid)+sizeof(B)+sizeof(n)+sizeof(int); //sizeof(int) for enum type 78 74 } 79 75 … … 95 91 memcpy(&mid,marshalled_dataset,sizeof(mid));marshalled_dataset+=sizeof(mid); 96 92 memcpy(&B,marshalled_dataset,sizeof(B));marshalled_dataset+=sizeof(B); 97 memcpy(&Bbar,marshalled_dataset,sizeof(Bbar));marshalled_dataset+=sizeof(Bbar);98 93 memcpy(&n,marshalled_dataset,sizeof(n));marshalled_dataset+=sizeof(n); 99 94 … … 129 124 void Matice::SetB(double B_param){ 130 125 B=B_param; 131 }132 133 134 #undef __FUNCT__135 #define __FUNCT__ "Matice::SetBbar"136 void Matice::SetBbar(double Bbar_param){137 Bbar=Bbar_param;138 126 } 139 127 … … 169 157 if (n==1){ 170 158 /*Viscous behaviour! viscosity=B: */ 171 viscosity=B bar;159 viscosity=B; 172 160 } 173 161 else{ … … 189 177 else{ 190 178 e=(n-1)/2/n; 191 viscosity=2*B bar/(2*pow(A,e));179 viscosity=2*B/(2*pow(A,e)); 192 180 } 193 181 } … … 398 386 } 399 387 400 double Matice::GetBbar(){401 return Bbar;402 }403 404 388 double Matice::GetN(){ 405 389 return n; -
issm/trunk/src/c/objects/Matice.h
r976 r983 13 13 int mid; 14 14 double B; 15 double Bbar;16 15 double n; 17 16 … … 19 18 20 19 Matice(); 21 Matice(int mid,double B,double Bbar,doublen);20 Matice(int mid,double B,double n); 22 21 ~Matice(); 23 22 … … 34 33 void UpdateFromInputs(void* inputs); 35 34 void SetB(double B_param); 36 void SetBbar(double Bbar_param);37 35 void GetViscosity2d(double* pviscosity, double* pepsilon); 38 36 void GetViscosity2(double* pviscosity2, double* pepsilon); … … 41 39 Object* copy(); 42 40 double GetB(); 43 double GetBbar();44 41 double GetN(); 45 42 -
issm/trunk/src/c/objects/Node.cpp
r881 r983 281 281 if(clone){ 282 282 /*This node is a clone, don't update the dofs!: */ 283 283 return; 284 284 } 285 285 … … 777 777 /*do nothing, we only update grids belonging to the exterior layers: */ 778 778 } 779 } 779 if (dof==6){ 780 printf("new z = %g\n",this->x[2]); 781 printf("bed = %g\n",bed[dof]); 782 printf("thick = %g\n",thickness[dof]); 783 printf("onsurface = %i\n",onsurface); 784 printf("onbed = %i\n",onbed); 785 } 786 } -
issm/trunk/src/c/objects/Penta.cpp
r976 r983 1113 1113 temperature_average=(temperature_list[0]+temperature_list[1]+temperature_list[2]+temperature_list[3]+temperature_list[4]+temperature_list[5])/6.0; 1114 1114 B_average=Paterson(temperature_average); 1115 matice->SetB bar(B_average);1115 matice->SetB(B_average); 1116 1116 } 1117 1117 } … … 3756 3756 } 3757 3757 3758 if(id==1){ 3759 printf( "z1 %10.10lf \n",xyz_list[0][2]); 3760 printf( "z2 %10.10lf \n",xyz_list[1][2]); 3761 printf( "z3 %10.10lf \n",xyz_list[2][2]); 3762 printf( "z4 %10.10lf \n",xyz_list[3][2]); 3763 printf( "z5 %10.10lf \n",xyz_list[4][2]); 3764 printf( "z6 %10.10lf \n",xyz_list[5][2]); 3765 printf( "Jdet%10.10lf \n",Jdet); 3766 } 3758 3767 /*Add pe_g to global vector pg: */ 3759 3768 VecSetValues(pg,numdof,doflist,(const double*)P_terms,ADD_VALUES); -
issm/trunk/src/c/objects/Tria.cpp
r978 r983 1450 1450 temperature_average=(temperature_list[0]+temperature_list[1]+temperature_list[2])/3.0; 1451 1451 B_average=Paterson(temperature_average); 1452 matice->SetB bar(B_average);1452 matice->SetB(B_average); 1453 1453 } 1454 1454 1455 1455 if(inputs->Recover("B",&B_list[0],1,dofs,3,(void**)nodes)){ 1456 1456 B_average=(B_list[0]+B_list[1]+B_list[2])/3.0; 1457 matice->SetB bar(B_average);1457 matice->SetB(B_average); 1458 1458 } 1459 1459
Note:
See TracChangeset
for help on using the changeset viewer.