source: issm/trunk/src/c/modules/Damagex/Damagex.cpp@ 24686

Last change on this file since 24686 was 24686, checked in by Mathieu Morlighem, 5 years ago

merged trunk-jpl and trunk for revision 24684

File size: 1.1 KB
Line 
1/*!\file Damagex
2 * \brief: compute damage
3 */
4
5#include "./Damagex.h"
6#include "../InputDuplicatex/InputDuplicatex.h"
7#include "../../shared/shared.h"
8#include "../../toolkits/toolkits.h"
9
10void Damagex(FemModel* femmodel){
11
12 /*Recover Damage law Enum*/
13 int damagelaw;
14 femmodel->parameters->FindParam(&damagelaw,DamageLawEnum);
15
16 /*Calculate damage*/
17 switch(damagelaw){
18 case 0:
19 if(VerboseModule()) _printf0_(" computing damage analytically\n");
20 InputDuplicatex(femmodel,DamageDEnum,DamageDOldEnum);
21 InputDuplicatex(femmodel,DamageDbarEnum,DamageDbarOldEnum);
22 femmodel->ElementOperationx(&Element::ComputeNewDamage);
23 break;
24 case 1:
25 case 2:
26 if(VerboseModule()) _printf0_(" computing damage using source term in advection scheme\n");
27 /* Damage calculated using source term in DamageEvolutionAnalysis */
28 break;
29 case 3:
30 if(VerboseModule()) _printf0_(" computing damage using source term in advection scheme\n");
31 /* Damage calculated using source term in DamageEvolutionAnalysis */
32 break;
33 default:
34 _error_("Damage law "<<EnumToStringx(damagelaw)<<" not implemented yet");
35 }
36}
Note: See TracBrowser for help on using the repository browser.