Changeset 9732


Ignore:
Timestamp:
09/09/11 14:45:55 (14 years ago)
Author:
Mathieu Morlighem
Message:

Fixed numberofedges

Location:
issm/trunk/src/m
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/flaim.m

    r9606 r9732  
    4141
    4242                end % }}}
     43                function checkconsistency(obj,md) % {{{
     44
     45                        if ~exist(obj.flaim.tracks,'file')
     46                                checkmessage(['flaim.tracks file ''' md.flaim.tracks ''' does not exist.']);
     47                        end
     48                        %   probably going to need some checks on flaim.flightreqs here
     49                        if (numel(obj.flaim.criterion)~=md.mesh.numberofvertices) & (numel(md.flaim.criterion)~=md.mesh.numberofelements),
     50                                checkmessage(['flaim.criterion vector must have number of nodes (' ...
     51                                        int2str(md.mesh.numberofvertices) ') or elements (' int2str(md.mesh.numberofelements)...
     52                                        ') values, not ' int2str(numel(md.flaim.criterion)) ' values.']);
     53                        end
     54
     55                end % }}}
    4356                function disp(obj) % {{{
    4457
  • issm/trunk/src/m/classes/miscellaneous.m

    r9625 r9732  
    2626                        end
    2727                end % }}}
     28                function checkconsistency(obj,md) % {{{
     29
     30                        fields={'name'};
     31                        checknonempty(md,'miscellaneous',fields);
     32
     33                end % }}}
    2834                function obj = setdefaultparameters(obj) % {{{
    2935
  • issm/trunk/src/m/classes/model/model.m

    r9731 r9732  
    118118                                         error('model constructor error message: 0 of 1 argument only in input.');
    119119                                 end
    120                  end
    121                  %}}}
    122                  function disp(md) % {{{1
    123                          disp(sprintf('\n%s = \n',inputname(1)));
    124 
    125                          %name
    126                          disp(sprintf('   Name:'));
    127                          if isempty(md.miscellaneous.name),
    128                                  disp(sprintf('      N/A'));
    129                          else
    130                                  disp(sprintf('      %s',md.miscellaneous.name));
    131                          end
    132 
    133                          %notes: md.miscellaneous.notes is a cell array of strings
    134                          disp(sprintf('   Notes:'));
    135                          if isempty(md.miscellaneous.notes),
    136                                  disp(sprintf('      N/A'));
    137                          else
    138                                  if iscell(md.miscellaneous.notes),
    139                                          strings=md.miscellaneous.notes;
    140                                          for i=1:length(strings),
    141                                                  string=char(strings(i));
    142                                                  if i==1,
    143                                                          disp(sprintf('      %s',string));
    144                                                  else
    145                                                          disp(sprintf('      %s',string));
    146                                                  end
    147                                          end
    148                                  elseif ischar(md.miscellaneous.notes),
    149                                          disp(sprintf('      %s',md.miscellaneous.notes));
    150                                  else
    151                                          disp('display error message: ''notes'' for model is neither a cell array of string, nor a string. Cannot display.');
    152                                  end
    153                          end
    154 
    155                          %diverse
    156                          disp(sprintf('   Mesh:'));
    157                          disp(sprintf('%s%s%s','      Mesh: type ''',inputname(1),'.mesh'' to display'));
    158                          disp(sprintf('   Parameters:'));
    159                          disp(sprintf('%s%s%s','      Boundary conditions: type ''',inputname(1),'.bc'' to display'));
    160                          disp(sprintf('%s%s%s','      Materials: type ''',inputname(1),'.mat'' to display'));
    161                          disp(sprintf('%s%s%s','      Parameters: type ''',inputname(1),'.par'' to display'));
    162                          disp(sprintf('   Solution parameters: %s'));
    163                          disp(sprintf('%s%s%s','      Diagnostic solution parameters: type ''',inputname(1),'.diagnostic'' to display'));
    164                          disp(sprintf('%s%s%s','      Thermal solution parameters: type ''',inputname(1),'.thermal'' to display'));
    165                          disp(sprintf('%s%s%s','      Prognostic solution parameters: type ''',inputname(1),'.prognostic'' to display'));
    166                          disp(sprintf('%s%s%s','      Transient solution parameters: type ''',inputname(1),'.transient'' to display'));
    167                          disp(sprintf('%s%s%s','      Control solution parameters: type ''',inputname(1),'.control'' to display'));
    168                          disp(sprintf('   Parallel:'));
    169                          disp(sprintf('%s%s%s','      Parallel options: type ''',inputname(1),'.parallel'' to display'));
    170                          disp(sprintf('   Results:'));
    171                          disp(sprintf('%s%s%s','      Results: type ''',inputname(1),'.res'' to display'));
    172120                 end
    173121                 %}}}
  • issm/trunk/src/m/model/bamg.m

    r9729 r9732  
    328328md.mesh.numberofelements=size(md.elements,1);
    329329md.mesh.numberofvertices=length(md.x);
     330md.mesh.numberofedges=size(md.edges,1);
    330331md.z=zeros(md.mesh.numberofvertices,1);
    331332md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
  • issm/trunk/src/m/model/ismodelselfconsistent.m

    r9730 r9732  
    88modelconsistency(true);
    99
    10 %Always check mesh
     10%General consistency checks
    1111md.mesh.checkconsistency(md);
     12
     13%Solution dependent checks
     14%FLAIM {{{1
     15switch(md.private.solution),
     16        case FlaimSolutionEnum, md.flaim.checkconsistency(md);
     17end
     18%}}}
    1219
    1320%error message if mode is not consistent
  • issm/trunk/src/m/model/mesh/meshconvert.m

    r9729 r9732  
    3939md.mesh.numberofelements=size(md.elements,1);
    4040md.mesh.numberofvertices=length(md.x);
     41md.mesh.numberofedges=size(md.edges,1);
    4142md.z=zeros(md.mesh.numberofvertices,1);
    4243md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
Note: See TracChangeset for help on using the changeset viewer.