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

Last change on this file since 20500 was 20500, checked in by Mathieu Morlighem, 9 years ago

merged trunk-jpl and trunk for revision 20497

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