Ignore:
Timestamp:
07/19/12 15:32:17 (13 years ago)
Author:
Mathieu Morlighem
Message:

ismodelselfconsistant now uses a model field instead of a persistent variable

File:
1 edited

Legend:

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

    r12423 r12663  
    4040                        obj.isenthalpy=0;
    4141                end % }}}
    42                 function checkconsistency(obj,md,solution,analyses) % {{{
     42                function md = checkconsistency(obj,md,solution,analyses) % {{{
    4343
    4444                        %Early return
    4545                        if (~ismember(ThermalAnalysisEnum,analyses) & ~ismember(EnthalpyAnalysisEnum,analyses)) | (solution==TransientSolutionEnum & md.transient.isthermal==0), return; end
    4646
    47                         checkfield(md,'thermal.stabilization','numel',1,'values',[0 1 2]);
    48                         checkfield(md,'thermal.spctemperature','forcing',1);
     47                        md = checkfield(md,'thermal.stabilization','numel',1,'values',[0 1 2]);
     48                        md = checkfield(md,'thermal.spctemperature','forcing',1);
    4949                        if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy & md.mesh.dimension==3),
    50                         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');
    51                         checkfield(md,'thermal.isenthalpy','numel',1,'values',[0 1]);
     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');
     51                        md = checkfield(md,'thermal.isenthalpy','numel',1,'values',[0 1]);
    5252                        end
    5353                end % }}}
Note: See TracChangeset for help on using the changeset viewer.