Changeset 17759
- Timestamp:
- 04/17/14 16:07:55 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r17680 r17759 2133 2133 2134 2134 this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum); 2135 this->InputDepthAverageAtBase(DamageDEnum,DamageDbarEnum);2135 if(this->material->IsDamage())this->InputDepthAverageAtBase(DamageDEnum,DamageDbarEnum); 2136 2136 if(this->inputs->GetInput(VxEnum)) this->InputDepthAverageAtBase(VxEnum,VxAverageEnum); 2137 2137 if(this->inputs->GetInput(VyEnum)) this->InputDepthAverageAtBase(VyEnum,VyAverageEnum); … … 3425 3425 /*Depth Average B*/ 3426 3426 this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum); 3427 this->InputDepthAverageAtBase(DamageDEnum,DamageDbarEnum);3427 if(this->material->IsDamage())this->InputDepthAverageAtBase(DamageDEnum,DamageDbarEnum); 3428 3428 3429 3429 /*Collapse element to the base*/ … … 3445 3445 /*Depth Average B and D*/ 3446 3446 this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum); 3447 this->InputDepthAverageAtBase(DamageDEnum,DamageDbarEnum);3447 if(this->material->IsDamage())this->InputDepthAverageAtBase(DamageDEnum,DamageDbarEnum); 3448 3448 3449 3449 /*Collapse element to the base*/ … … 3464 3464 /*Depth Average B and D*/ 3465 3465 this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum); 3466 this->InputDepthAverageAtBase(DamageDEnum,DamageDbarEnum);3466 if(this->material->IsDamage())this->InputDepthAverageAtBase(DamageDEnum,DamageDbarEnum); 3467 3467 3468 3468 /*Collapse element to the base*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r17707 r17759 3114 3114 Input* adjointx_input=inputs->GetInput(AdjointxEnum); _assert_(adjointx_input); 3115 3115 Input* adjointy_input=inputs->GetInput(AdjointyEnum); _assert_(adjointy_input); 3116 Input* rheologyd_input=inputs->GetInput(DamageDbarEnum); _assert_(rheologyd_input); 3116 if(this->material->IsDamage()){ 3117 Input* rheologyd_input=inputs->GetInput(DamageDbarEnum); _assert_(rheologyd_input); 3118 } 3117 3119 3118 3120 /* Start looping on the number of gaussian points: */ -
issm/trunk-jpl/src/c/classes/Materials/Material.h
r17281 r17759 39 39 virtual IssmDouble GetD()=0; 40 40 virtual IssmDouble GetDbar()=0; 41 virtual bool IsDamage()=0; 41 42 42 43 }; -
issm/trunk-jpl/src/c/classes/Materials/Matice.cpp
r17757 r17759 31 31 this->helement=NULL; 32 32 this->element=NULL; 33 this->isdamaged=NULL; 33 34 return; 34 35 } … … 51 52 int materialtype; 52 53 iomodel->Constant(&materialtype,MaterialsEnum); 53 if(materialtype==MatdamageiceEnum) this->isdamage = true;54 else if(materialtype==MaticeEnum) this->isdamage = false;54 if(materialtype==MatdamageiceEnum) this->isdamaged = true; 55 else if(materialtype==MaticeEnum) this->isdamaged = false; 55 56 else _error_("Material type not recognized"); 56 57 … … 206 207 IssmDouble Matice::GetD(){ 207 208 208 _assert_(this->isdamage );209 _assert_(this->isdamaged); 209 210 /*Output*/ 210 211 IssmDouble D; 211 element->inputs->GetInputAverage(&D,DamageDEnum);212 if(this->isdamaged)element->inputs->GetInputAverage(&D,DamageDEnum); 212 213 return D; 213 214 } … … 216 217 IssmDouble Matice::GetDbar(){ 217 218 218 _assert_(this->isdamage );219 _assert_(this->isdamaged); 219 220 /*Output*/ 220 221 IssmDouble Dbar; 221 element->inputs->GetInputAverage(&Dbar,DamageDbarEnum);222 if(this->isdamaged)element->inputs->GetInputAverage(&Dbar,DamageDbarEnum); 222 223 return Dbar; 224 } 225 /*}}}*/ 226 /*FUNCTION Matice::IsDamage() {{{*/ 227 bool Matice::IsDamage(){ 228 229 return this->isdamaged; 223 230 } 224 231 /*}}}*/ … … 246 253 B=GetB(); _assert_(B>0.); 247 254 n=GetN(); _assert_(n>0.); 248 if(this->isdamage ){255 if(this->isdamaged){ 249 256 D=GetD(); 250 257 _assert_(D>=0. && D<1.); … … 299 306 B=GetBbar(); _assert_(B>0.); 300 307 n=GetN(); _assert_(n>0.); 301 if(this->isdamage ){308 if(this->isdamaged){ 302 309 D=GetDbar(); 303 310 _assert_(D>=0. && D<1.); … … 351 358 352 359 /*Get D and n*/ 353 if(this->isdamage ){360 if(this->isdamaged){ 354 361 D=GetDbar(); /* GetD()? */ 355 362 _assert_(D>=0. && D<1.); -
issm/trunk-jpl/src/c/classes/Materials/Matice.h
r17757 r17759 24 24 private: 25 25 int mid; 26 bool isdamage ;26 bool isdamaged; 27 27 Hook *helement; 28 28 Element *element; … … 68 68 IssmDouble GetDbar(); 69 69 IssmDouble GetN(); 70 bool IsDamage(); 70 71 /*}}}*/ 71 72 }; -
issm/trunk-jpl/src/c/classes/Materials/Matpar.h
r17738 r17759 96 96 IssmDouble GetD(){_error_("not supported");}; 97 97 IssmDouble GetDbar(){_error_("not supported");}; 98 bool IsDamage(){_error_("not supported");}; 98 99 /*}}}*/ 99 100 /*Numerics: {{{*/
Note:
See TracChangeset
for help on using the changeset viewer.