Changeset 19388
- Timestamp:
- 06/04/15 04:55:58 (10 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r19375 r19388 367 367 if DAMAGEEVOLUTION 368 368 issm_sources += ./analyses/DamageEvolutionAnalysis.cpp 369 issm_sources += ./modules/Damagex/Damagex.cpp 369 370 endif 370 371 if STRESSBALANCE -
issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp
r19386 r19388 130 130 IssmDouble damage,B,n,epseff; 131 131 IssmDouble eps_xx,eps_yy,eps_xy,eps1,eps2,epstmp; 132 int domaintype ,damagelaw;132 int domaintype; 133 133 134 134 /*Fetch number of vertices and allocate output*/ … … 140 140 element->FindParam(&stress_threshold,DamageStressThresholdEnum); 141 141 element->FindParam(&domaintype,DomainTypeEnum); 142 element->FindParam(&damagelaw,DamageLawEnum);143 142 144 143 /*Compute stress tensor: */ … … 202 201 IssmDouble J2s,Chi,Psi,PosPsi,NegPsi; 203 202 IssmDouble damage,tau_xx,tau_xy,tau_xz,tau_yy,tau_yz,tau_zz,stressMaxPrincipal; 204 int equivstress,domaintype,d amagelaw,dim;203 int equivstress,domaintype,dim; 205 204 206 205 /*Fetch number of vertices and allocate output*/ … … 215 214 element->FindParam(&stress_threshold,DamageStressThresholdEnum); 216 215 element->FindParam(&domaintype,DomainTypeEnum); 217 element->FindParam(&damagelaw,DamageLawEnum);218 216 219 217 /*Get problem dimension*/ … … 291 289 Psi=Chi-stress_threshold; 292 290 NegPsi=max(-Chi,0.); /* healing only for compressive stresses */ 293 294 if(damagelaw==1){ 295 PosPsi=max(Psi,0.); 296 f[i]= c1*(pow(PosPsi,c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3); 297 } 298 else if(damagelaw==2){ 299 PosPsi=max(Psi,1.); 300 f[i]= c1*(pow(log10(PosPsi),c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3); 301 } 302 else _error_("damage law not supported"); 291 PosPsi=max(Psi,0.); 292 f[i]= c1*(pow(PosPsi,c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3); 303 293 } 304 294 else{ … … 312 302 Psi=Chi-stress_threshold; 313 303 NegPsi=max(-Chi,0.); /* healing only for compressive stresses */ 314 if(damagelaw==1){ 315 PosPsi=max(Psi,0.); 316 f[i]= c1*(pow(PosPsi,c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3); 317 } 318 else if(damagelaw==2){ 319 PosPsi=max(Psi,1.); 320 f[i]= c1*(pow(log10(PosPsi),c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3); 321 } 322 else _error_("damage law not supported"); 304 PosPsi=max(Psi,0.); 305 f[i]= c1*(pow(PosPsi,c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3); 323 306 } 324 307 } … … 534 517 break; 535 518 case 2: 536 this->CreateDamageFInputPralong(element);537 break;538 case 3:539 519 this->CreateDamageFInputExp(element); 540 520 break; -
issm/trunk-jpl/src/c/cores/damage_core.cpp
r19386 r19388 28 28 29 29 if(VerboseSolution()) _printf0_(" computing damage\n"); 30 Damagex(femmodel); /* optionally calculate damage analytically first */ 30 31 femmodel->SetCurrentConfiguration(DamageEvolutionAnalysisEnum); 31 32 if(stabilization==4){ -
issm/trunk-jpl/src/c/modules/modules.h
r19047 r19388 20 20 #include "./CreateNodalConstraintsx/CreateNodalConstraintsx.h" 21 21 #include "./CreateJacobianMatrixx/CreateJacobianMatrixx.h" 22 #include "./Damagex/Damagex.h" 22 23 #include "./DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.h" 23 24 #include "./ExpToLevelSetx/ExpToLevelSetx.h"
Note:
See TracChangeset
for help on using the changeset viewer.