Changeset 13439


Ignore:
Timestamp:
09/25/12 14:47:55 (12 years ago)
Author:
jschierm
Message:

FIX: Make thermal.py work for vector, but need to know about multiple columns.

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

Legend:

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

    r13169 r13439  
    88class matice(object):
    99        """
    10         MATERIALS class definition
     10        MATICE class definition
    1111
    1212           Usage:
  • issm/trunk-jpl/src/m/classes/thermal.py

    r13422 r13439  
    7171                md = checkfield(md,'thermal.spctemperature','forcing',1)
    7272                if EnthalpyAnalysisEnum() in analyses and (md.thermal.isenthalpy or solution==EnthalpySolutionEnum()) and md.mesh.dimension==3:
    73                         pos=numpy.nonzero(numpy.logical_not(numpy.isnan(md.thermal.spctemperature[0:md.mesh.numberofvertices,:])))
    74                         replicate=numpy.tile(md.geometry.surface-md.mesh.z,(1,numpy.size(md.thermal.spctemperature,axis=1)))
    75                         md = checkfield(md,'thermal.spctemperature(numpy.nonzero(numpy.logical_not(numpy.isnan(md.thermal.spctemperature[0:md.mesh.numberofvertices,:]))))','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*replicate[pos],'message',"spctemperature should be below the adjusted melting point")
     73                        pos=numpy.nonzero(numpy.logical_not(numpy.isnan(md.thermal.spctemperature[0:md.mesh.numberofvertices])))
     74#                       need to know if md.thermal.spctemperature can have multiple columns?
     75#                       replicate=numpy.tile(md.geometry.surface-md.mesh.z,(1,numpy.size(md.thermal.spctemperature,axis=1)))
     76#                       md = checkfield(md,'thermal.spctemperature[numpy.nonzero(numpy.logical_not(numpy.isnan(md.thermal.spctemperature[0:md.mesh.numberofvertices,:])))]','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*replicate[pos],'message',"spctemperature should be below the adjusted melting point")
     77                        replicate=numpy.tile(md.geometry.surface-md.mesh.z,(1))
     78                        md = checkfield(md,'thermal.spctemperature[numpy.nonzero(numpy.logical_not(numpy.isnan(md.thermal.spctemperature[0:md.mesh.numberofvertices])))]','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*replicate[pos],'message',"spctemperature should be below the adjusted melting point")
    7679                        md = checkfield(md,'thermal.isenthalpy','numel',[1],'values',[0,1])
    7780
Note: See TracChangeset for help on using the changeset viewer.