Changeset 13401


Ignore:
Timestamp:
09/19/12 10:52:37 (13 years ago)
Author:
seroussi
Message:

CHG: improved check consistency for enthalpy solution

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

Legend:

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

    r13040 r13401  
    4747                        md = checkfield(md,'thermal.stabilization','numel',[1],'values',[0 1 2]);
    4848                        md = checkfield(md,'thermal.spctemperature','forcing',1);
    49                         if (ismember(EnthalpyAnalysisEnum(),analyses) & md.thermal.isenthalpy & md.mesh.dimension==3),
    50                                 md = checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message','spctemperature should be below the adjusted melting point');
     49                        if (ismember(EnthalpyAnalysisEnum(),analyses) & (md.thermal.isenthalpy | solution==EnthalpySolutionEnum()) & md.mesh.dimension==3),
     50                                pos=find(md.thermal.spctemperature(1:md.mesh.numberofvertices,:)~=NaN);
     51                                replicate=repmat(md.geometry.surface-md.mesh.z,1,size(md.thermal.spctemperature,2));
     52                                md = checkfield(md,'thermal.spctemperature(find(md.thermal.spctemperature(1:md.mesh.numberofvertices,:)~=NaN))','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*replicate(pos),'message','spctemperature should be below the adjusted melting point');
    5153                                md = checkfield(md,'thermal.isenthalpy','numel',[1],'values',[0 1]);
    5254                        end
  • issm/trunk-jpl/src/m/classes/thermal.py

    r13040 r13401  
    6969                md = checkfield(md,'thermal.stabilization','numel',[1],'values',[0,1,2])
    7070                md = checkfield(md,'thermal.spctemperature','forcing',1)
    71                 if EnthalpyAnalysisEnum() in analyses and md.thermal.isenthalpy and md.mesh.dimension==3:
     71                if EnthalpyAnalysisEnum() in analyses and (md.thermal.isenthalpy or solution==EnthalpySolutionEnum()) and md.mesh.dimension==3:
    7272                        md = checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message',"spctemperature should be below the adjusted melting point")
    7373                        md = checkfield(md,'thermal.isenthalpy','numel',[1],'values',[0,1])
Note: See TracChangeset for help on using the changeset viewer.