Changeset 16379


Ignore:
Timestamp:
10/11/13 08:00:22 (11 years ago)
Author:
Mathieu Morlighem
Message:

NEW: added bamgflowband.m for flowband meshes

Location:
issm/trunk-jpl/src/m/mesh
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/mesh/bamg.m

    r16343 r16379  
    6464        %Check that file exists
    6565        domainfile=getfieldvalue(options,'domain');
    66         if ~exist(domainfile,'file') error(['bamg error message: file ' domainfile ' not found']); end
    67        
    68         %read domain according to its extension:
    69         [path,name,ext]=fileparts(domainfile);
    70         if strcmp(ext,'.exp'),
    71                 domain=expread(domainfile);
    72         elseif strcmp(ext,'.shp'),
    73                 domain=shpread(domainfile);
     66        if ischar(domainfile),
     67                if ~exist(domainfile,'file') error(['bamg error message: file ' domainfile ' not found']); end
     68
     69                %read domain according to its extension:
     70                [path,name,ext]=fileparts(domainfile);
     71                if strcmp(ext,'.exp'),
     72                        domain=expread(domainfile);
     73                elseif strcmp(ext,'.shp'),
     74                        domain=shpread(domainfile);
     75                else
     76                        error(['bamg error message: file ' domainfile ' format not supported (.shp or .exp)']);
     77                end
     78        elseif isstruct(domainfile),
     79                domain = domainfile;
    7480        else
    75                 error(['bamg error message: file ' domainfile ' format not supported (.shp or .exp)']);
     81                error('''domain'' type not supported yet');
    7682        end
    7783
Note: See TracChangeset for help on using the changeset viewer.