Changeset 8121


Ignore:
Timestamp:
05/03/11 10:15:28 (14 years ago)
Author:
Mathieu Morlighem
Message:

Check elements_type only if diagnostichoriz

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk/src/m/model/ismodelselfconsistent.m

    r8032 r8121  
    4646end
    4747%}}}
    48 %ELEMENTSTYPE{{{1
    49 %Check the size of elements_type
    50 fields={'elements_type'};
    51 checksize(md,fields,[md.numberofelements 1]);
    52 %Check the values of elements_type
    53 checkvalues(md,{'elements_type'},[MacAyealApproximationEnum() HutterApproximationEnum() PattynApproximationEnum() MacAyealPattynApproximationEnum() MacAyealStokesApproximationEnum() PattynStokesApproximationEnum() StokesApproximationEnum() NoneApproximationEnum()]);
    54 if (md.dim==2),
    55         checkvalues(md,{'elements_type'},[MacAyealApproximationEnum() HutterApproximationEnum()]);
    56 end
    57 if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
    58         error(['model not consistent: no elements type set for this model. at least one of ismacayealpattyn, ishutter and isstokes need to be =1']);
    59 end
    60 %}}}
    61 %VERTICESTYPE{{{1
    62 %Check the size of verticess_type
    63 fields={'vertices_type'};
    64 checksize(md,fields,[md.numberofgrids 1]);
    65 %Check the values of vertices_type
    66 checkvalues(md,{'vertices_type'},[MacAyealApproximationEnum() HutterApproximationEnum() PattynApproximationEnum() MacAyealPattynApproximationEnum() StokesApproximationEnum() MacAyealStokesApproximationEnum() PattynStokesApproximationEnum() NoneApproximationEnum()]);
    67 if (md.dim==2),
    68         checkvalues(md,{'vertices_type'},[MacAyealApproximationEnum() HutterApproximationEnum()]);
    69 end
    70 if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
    71         error(['model not consistent: no elements type set for this model. at least one of ismacayealpattyn, ishutter and isstokes need to be =1']);
    72 end
    73 %}}}
     48
    7449%DG {{{1
    7550if md.prognostic_DG==1;
     
    385360                                checksize(md,fields,[md.numberofgrids 1]);
    386361                        end
     362
     363                        %ELEMENTSTYPE
     364                        %Check the size of elements_type
     365                        fields={'elements_type'};
     366                        checksize(md,fields,[md.numberofelements 1]);
     367                        %Check the values of elements_type
     368                        checkvalues(md,{'elements_type'},[MacAyealApproximationEnum() HutterApproximationEnum() PattynApproximationEnum()...
     369                                MacAyealPattynApproximationEnum() MacAyealStokesApproximationEnum() PattynStokesApproximationEnum() StokesApproximationEnum() NoneApproximationEnum()]);
     370                        if (md.dim==2),
     371                                checkvalues(md,{'elements_type'},[MacAyealApproximationEnum() HutterApproximationEnum()]);
     372                        end
     373                        if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
     374                                error(['model not consistent: no elements type set for this model. at least one of ismacayealpattyn, ishutter and isstokes need to be =1']);
     375                        end
     376                       
     377                        %VERTICESTYPE
     378                        %Check the size of verticess_type
     379                        fields={'vertices_type'};
     380                        checksize(md,fields,[md.numberofgrids 1]);
     381                        %Check the values of vertices_type
     382                        checkvalues(md,{'vertices_type'},[MacAyealApproximationEnum() HutterApproximationEnum() PattynApproximationEnum()...
     383                                MacAyealPattynApproximationEnum() StokesApproximationEnum() MacAyealStokesApproximationEnum() PattynStokesApproximationEnum() NoneApproximationEnum()]);
     384                        if (md.dim==2),
     385                                checkvalues(md,{'vertices_type'},[MacAyealApproximationEnum() HutterApproximationEnum()]);
     386                        end
     387                        if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
     388                                error(['model not consistent: no elements type set for this model. at least one of ismacayealpattyn, ishutter and isstokes need to be =1']);
     389                        end
    387390                        %}}}
    388391                case DiagnosticVertAnalysisEnum,
Note: See TracChangeset for help on using the changeset viewer.