Changeset 16163


Ignore:
Timestamp:
09/17/13 21:32:19 (12 years ago)
Author:
cborstad
Message:

BUG: only marshall and checkconsistency for damage fields if isdamage=1

File:
1 edited

Legend:

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

    r16162 r16163  
    6262        # }}}
    6363        def checkconsistency(self,md,solution,analyses):    # {{{
    64        
    65                 md = checkfield(md,'damage.D','>=',0,'size',[md.mesh.numberofvertices])
    66                 md = checkfield(md,'damage.law','values',['undamaged','pralong'])
     64
     65                if self.isdamage:
     66                        md = checkfield(md,'damage.D','>=',0,'size',[md.mesh.numberofvertices])
     67                        md = checkfield(md,'damage.law','values',['undamaged','pralong'])
    6768                if self.law == 'pralong':
    6869                        md = checkfield(md,'damage.c1','>=',0)
     
    7677        def marshall(self,md,fid):    # {{{
    7778
    78                 WriteData(fid,'object',self,'class','damage','fieldname','D','format','DoubleMat','mattype',1)
    79                 WriteData(fid,'object',self,'class','damage','fieldname','law','format','String')
    80                 if self.damage_law=='pralong':
     79                WriteData(fid,'object',self,'class','damage','fieldname','isdamage','format','DoubleMat','mattype',1)
     80                if self.isdamage:
     81                        WriteData(fid,'object',self,'class','damage','fieldname','D','format','DoubleMat','mattype',1)
     82                        WriteData(fid,'object',self,'class','damage','fieldname','law','format','String')
     83                if self.law=='pralong':
    8184                        WriteData(fid,'object',self,'class','damage','fieldname','c1','format','Double')
    8285                        WriteData(fid,'object',self,'class','damage','fieldname','c2','format','Double')
Note: See TracChangeset for help on using the changeset viewer.