Changeset 23770


Ignore:
Timestamp:
03/07/19 08:52:17 (6 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added check that damage evolution is only allowed if md.materials is matdamageice

Location:
issm/trunk-jpl/src/m/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/transient.m

    r21802 r23770  
    104104                                md = checkmessage(md,['Coupling with ocean model can only be performed for transient simulations!']);
    105105                        end
     106                        if (md.transient.isdamageevolution & ~isa(md.materials,'matdamageice')),
     107                                md = checkmessage(md,['requesting damage evolution but md.materials is not of class matdamageice']);
     108                        end
    106109                end % }}}
    107110                function disp(self) % {{{
  • issm/trunk-jpl/src/m/classes/transient.py

    r22267 r23770  
    146146
    147147                if (solution!='TransientSolution') and (md.transient.iscoupling):
    148                                 md.checkmessage("Coupling with ocean can only be done in transient simulations!")
     148                    md.checkmessage("Coupling with ocean can only be done in transient simulations!")
     149                if (md.transient.isdamageevolution and not hasattr(md.materials,'matdamageice')):
     150                    md.checkmessage("requesting damage evolution but md.materials is not of class matdamageice")
    149151
    150152                return md
Note: See TracChangeset for help on using the changeset viewer.