Changeset 16214


Ignore:
Timestamp:
09/20/13 12:17:51 (12 years ago)
Author:
cborstad
Message:

CHG: rather than use penalties, enforce limits on damage in InputUpdateFromSolutionDamageEvolution. As a result, the damage_core only needs to call solutionsequence_linear

Location:
issm/trunk-jpl/src/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/damage_core.cpp

    r16188 r16214  
    3030
    3131        femmodel->SetCurrentConfiguration(DamageEvolutionAnalysisEnum);
    32         solutionsequence_damage_nonlinear(femmodel);
     32        solutionsequence_linear(femmodel);
    3333
    3434        if(save_results){
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r16208 r16214  
    71267126        int         i;
    71277127        IssmDouble  values[numdof];
    7128         int        *doflist = NULL;
     7128        IssmDouble  max_damage;
     7129        int                     *doflist = NULL;
    71297130
    71307131        /*Get dof list: */
    71317132        GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
     7133
     7134        /*Get user-supplied max_damage: */
     7135        this->parameters->FindParam(&max_damage,DamageMaxDamageEnum);
    71327136
    71337137        /*Use the dof list to index into the solution vector: */
     
    71367140                /*Check solution*/
    71377141                if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
     7142                /*Enforce D < max_damage and D > 0 */
     7143                if(values[i]>max_damage) values[i]=max_damage;
     7144                else if(values[i]<0) values[i]=0;
    71387145        }
    71397146
  • issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp

    r16206 r16214  
    738738        parameters->FindParam(&max_damage,DamageMaxDamageEnum);
    739739       
    740         //Figure out if damage is over max_damage, in which case, this penalty needs to be activated.
     740        //Figure out if damage>max_damage, in which case, this penalty needs to be activated.
     741        //Would need to do the same for damage<0 if penalties are used.  For now, ConstraintStatex
     742        //is not called in solutionsequence_damage_nonlinear, so no penalties are applied.
    741743
    742744        if (damage>max_damage){
Note: See TracChangeset for help on using the changeset viewer.