Changeset 24162


Ignore:
Timestamp:
09/25/19 17:36:27 (6 years ago)
Author:
schlegel
Message:

CHG: add a check for column vector

Location:
issm/trunk-jpl/src/m/classes
Files:
2 edited

Legend:

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

    r22840 r24162  
    6565                        end
    6666                        if ~isempty(md.qmu.partition),
    67                                 if numel(md.qmu.partition)~=md.mesh.numberofvertices & numel(md.qmu.partition)~=md.mesh.numberofelements,
     67                                if (numel(md.qmu.partition)~=md.mesh.numberofvertices & numel(md.qmu.partition)~=md.mesh.numberofelements) | size(md.qmu.partition,2)~=1,
    6868                                        md = checkmessage(md,['user supplied partition for qmu analysis should have size md.mesh.numberofvertices x 1 or md.mesh.numberofelements x 1']);
    6969                                end
  • issm/trunk-jpl/src/m/classes/qmu.py

    r23716 r24162  
    153153               
    154154                if np.size(md.qmu.partition) > 0:
    155                         if np.size(md.qmu.partition)!=md.mesh.numberofvertices and np.size(md.qmu.partition) != md.mesh.numberofelements:
     155                        if (np.size(md.qmu.partition)!=md.mesh.numberofvertices and np.size(md.qmu.partition) != md.mesh.numberofelements) or np.size(md.qmu.partition,1) != 1:
    156156                                md.checkmessage("user supplied partition for qmu analysis should have size (md.mesh.numberofvertices x 1) or (md.mesh.numberofelements x 1)")
    157157                        if not min(md.qmu.partition.flatten())==0:
Note: See TracChangeset for help on using the changeset viewer.