Changeset 4174
- Timestamp:
- 06/23/10 14:49:50 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk/src/c/objects/Elements/Tria.cpp ¶
r4172 r4174 549 549 double rho_ice,rho_water; 550 550 551 /*recover material parameters: */ 552 rho_ice=matpar->GetRhoIce(); 553 rho_water=matpar->GetRhoWater(); 554 555 ISSMERROR("not supported yet!"); 551 /*If shelf: hydrostatic equilibrium*/ 552 if (this->GetShelf()){ 553 554 /*recover material parameters: */ 555 rho_ice=matpar->GetRhoIce(); 556 rho_water=matpar->GetRhoWater(); 557 558 } 559 /*If sheet: surface = bed + thickness*/ 560 else{ 561 ISSMERROR("not supported yet!"); 562 } 556 563 } 557 564 /*}}}*/ … … 5477 5484 5478 5485 /*some checks: */ 5479 if(!xinput || !yinput)ISSMERROR("%s%s%s%s%s"," input ",EnumAsString(XEnum)," or input ",EnumAsString(YEnum)," could not be found!"); 5480 if(xinput->Enum()!=yinput->Enum())ISSMERROR("%s%s%s%s%s"," input ",EnumAsString(XEnum)," and input ",EnumAsString(YEnum)," are not of the same type!"); 5486 if(!xinput || !yinput) ISSMERROR("%s%s%s%s%s"," input ",EnumAsString(XEnum)," or input ",EnumAsString(YEnum)," could not be found!"); 5481 5487 5482 5488 /*Scale: */ -
TabularUnified issm/trunk/src/c/objects/Inputs/BeamVertexInput.cpp ¶
r4057 r4174 23 23 } 24 24 /*}}}*/ 25 /*FUNCTION BeamVertexInput::BeamVertexInput( double* values){{{1*/25 /*FUNCTION BeamVertexInput::BeamVertexInput(int in_enum_type, double* values){{{1*/ 26 26 BeamVertexInput::BeamVertexInput(int in_enum_type,double* in_values){ 27 27 … … 269 269 xbeamvertexinput=(BeamVertexInput*)xinput; 270 270 271 /*Carry out the AXPY operation:*/ 272 for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xbeamvertexinput->values[i]; 271 /*Carry out the AXPY operation depending on type:*/ 272 switch(xinput->Enum()){ 273 274 case BeamVertexInputEnum: 275 for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xbeamvertexinput->values[i]; 276 return; 277 278 default: 279 ISSMERROR("not implemented yet"); 280 } 273 281 274 282 } -
TabularUnified issm/trunk/src/c/objects/Inputs/BoolInput.cpp ¶
r4057 r4174 236 236 xboolinput=(BoolInput*)xinput; 237 237 238 /*Carry out the AXPY operation:*/ 239 this->value=this->value+scalar*xboolinput->value; 238 /*Carry out the AXPY operation depending on type:*/ 239 switch(xinput->Enum()){ 240 241 case BoolInputEnum: 242 this->value=(bool)(this->value+scalar*xboolinput->value); 243 return; 244 245 default: 246 ISSMERROR("not implemented yet"); 247 } 240 248 241 249 } -
TabularUnified issm/trunk/src/c/objects/Inputs/DoubleInput.cpp ¶
r4057 r4174 247 247 xdoubleinput=(DoubleInput*)xinput; 248 248 249 /*Carry out the AXPY operation:*/ 250 this->value=this->value+scalar*xdoubleinput->value; 249 /*Carry out the AXPY operation depending on type:*/ 250 switch(xinput->Enum()){ 251 252 case DoubleInputEnum: 253 this->value=this->value+scalar*xdoubleinput->value; 254 return; 255 256 default: 257 ISSMERROR("not implemented yet"); 258 } 251 259 252 260 } -
TabularUnified issm/trunk/src/c/objects/Inputs/IntInput.cpp ¶
r4057 r4174 236 236 xintinput=(IntInput*)xinput; 237 237 238 /*Carry out the AXPY operation:*/ 239 dvalue=(double)this->value+scalar*(double)xintinput->value; 240 this->value=(int)dvalue; 238 /*Carry out the AXPY operation depending on type:*/ 239 switch(xinput->Enum()){ 240 241 case IntInputEnum: 242 dvalue=(double)this->value+scalar*(double)xintinput->value; 243 this->value=(int)dvalue; 244 return; 245 246 default: 247 ISSMERROR("not implemented yet"); 248 } 241 249 242 250 } -
TabularUnified issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp ¶
r4057 r4174 918 918 xpentavertexinput=(PentaVertexInput*)xinput; 919 919 920 /*Carry out the AXPY operation:*/ 921 for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xpentavertexinput->values[i]; 920 /*Carry out the AXPY operation depending on type:*/ 921 switch(xinput->Enum()){ 922 923 case PentaVertexInputEnum: 924 for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xpentavertexinput->values[i]; 925 return; 926 927 default: 928 ISSMERROR("not implemented yet"); 929 } 922 930 923 931 } -
TabularUnified issm/trunk/src/c/objects/Inputs/SingVertexInput.cpp ¶
r4057 r4174 237 237 xsingvertexinput=(SingVertexInput*)xinput; 238 238 239 /*Carry out the AXPY operation:*/ 240 this->value=this->value+scalar*xsingvertexinput->value; 239 /*Carry out the AXPY operation depending on type:*/ 240 switch(xinput->Enum()){ 241 242 case SingVertexInputEnum: 243 this->value=this->value+scalar*xsingvertexinput->value; 244 return; 245 246 default: 247 ISSMERROR("not implemented yet"); 248 } 241 249 242 250 } -
TabularUnified issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp ¶
r4057 r4174 492 492 xtriavertexinput=(TriaVertexInput*)xinput; 493 493 494 /*Carry out the AXPY operation:*/ 495 for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xtriavertexinput->values[i]; 494 /*Carry out the AXPY operation depending on type:*/ 495 switch(xinput->Enum()){ 496 497 case TriaVertexInputEnum : 498 for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xtriavertexinput->values[i]; 499 return; 500 501 default : 502 ISSMERROR("not implemented yet"); 503 } 496 504 497 505 } -
TabularUnified issm/trunk/src/mex/VerticesDof/VerticesDof.cpp ¶
r4173 r4174 15 15 16 16 /* output datasets: */ 17 Vec *partition=NULL;18 Vec *tpartition=NULL;17 Vec partition=NULL; 18 Vec tpartition=NULL; 19 19 20 20 /*Boot module: */ … … 32 32 33 33 /*partition and tpartition should be incremented by 1: */ 34 VecShift(partition ->vector,1.0); //matlab indexing starts at 1.35 VecShift(tpartition ->vector,1.0);34 VecShift(partition,1.0); //matlab indexing starts at 1. 35 VecShift(tpartition,1.0); 36 36 37 37 /*write output datasets: */
Note:
See TracChangeset
for help on using the changeset viewer.