Changeset 24988 for issm/trunk-jpl/src/m/classes/qmu.m
- Timestamp:
- 06/08/20 22:58:53 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/qmu.m
r24820 r24988 18 18 numberofresponses = 0; 19 19 variabledescriptors = {}; 20 variablepartitions = {}; 20 21 responsedescriptors = {}; 21 22 mass_flux_profile_directory = NaN; … … 57 58 methods 58 59 function self = extrude(self,md) % {{{ 59 self.vpartition=project3d(md,'vector',self.vpartition','type','node');60 self.epartition=project3d(md,'vector',self.epartition','type','element');61 60 end % }}} 62 61 function self = qmu(varargin) % {{{ … … 97 96 end 98 97 end 99 if ~isempty(md.qmu.vpartition) & ~any(isnan(md.qmu.vpartition)),100 if size(md.qmu.vpartition,1)~=md.mesh.numberofvertices101 md = checkmessage(md,['user supplied vertex partition for qmu analysis should have size md.mesh.numberofvertices x 1']);102 end103 if min(md.qmu.vpartition)~=0,104 md = checkmessage(md,['vertex partition vector not indexed from 0 on']);105 end106 if max(md.qmu.vpartition)>=md.qmu.numberofpartitions,107 md = checkmessage(md,['for qmu analysis, vertex partitioning vector cannot go over npart, number of partition areas']);108 end109 end110 if ~isempty(md.qmu.epartition) & ~any(isnan(md.qmu.epartition)),111 if size(md.qmu.epartition,1)~=md.mesh.numberofelements,112 md = checkmessage(md,['user supplied element partition for qmu analysis should have size md.mesh.numberofelements x 1']);113 end114 if min(md.qmu.epartition)~=0,115 md = checkmessage(md,['element partition vector not indexed from 0 on']);116 end117 if max(md.qmu.epartition)>=md.qmu.numberofpartitions,118 md = checkmessage(md,['for qmu analysis, element partitioning vector cannot go over npart, number of partition areas']);119 end120 end121 if isempty(md.qmu.vpartition) | any(isnan(md.qmu.vpartition)) | isempty(md.qmu.epartition) | any(isnan(md.qmu.epartition)),122 md = checkmessage(md,['for qmu analysis, both an element and partitioning vectors need to be supplied with no nan values! One can be defaulted to all zeros.']);123 end124 98 125 99 %go through variables and check for consistency: … … 198 172 end 199 173 end 200 fielddisplay(self,'vpartition','user provided mesh partitioning (vertex based)'); 201 fielddisplay(self,'epartition','user provided mesh partitioning (element based)'); 202 fielddisplay(self,'numberofpartitions','number of partitions for semi-discrete qmu') 174 fielddisplay(self,'variablepartitions',''); 203 175 fielddisplay(self,'variabledescriptors',''); 204 176 fielddisplay(self,'responsedescriptors',''); … … 223 195 WriteData(fid,prefix,'object',self,'fieldname','numberofresponses','format','Integer'); 224 196 WriteData(fid,prefix,'object',self,'fieldname','variabledescriptors','format','StringArray'); 197 WriteData(fid,prefix,'object',self,'fieldname','variablepartitions','format','MatArray'); 225 198 WriteData(fid,prefix,'object',self,'fieldname','responsedescriptors','format','StringArray'); 226 199 if ~isempty(self.mass_flux_segments),
Note:
See TracChangeset
for help on using the changeset viewer.