Changeset 9673
- Timestamp:
- 09/07/11 16:21:42 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/Interp/PatchToVec.m
r9424 r9673 6 6 7 7 %if the patch is P0: we have element values, return an element vector 8 switch( Patch.interpolation(1)),9 case P0Enum,8 switch(size(Patch.value,2)), 9 case 1, 10 10 vec(Patch.element)=Patch.value; 11 %connectivity=sparse(Patch.index(:),1,1); 12 %value =sparse(Patch.index(:),1,Patch.value(:)); 13 %vec=full(value./connectivity); 14 case P1Enum, 11 case 3, 12 connectivity=sparse(Patch.index(:),1,1); 13 value =sparse(Patch.index(:),1,Patch.value(:)); 14 vec=full(value./connectivity); 15 case 6, 15 16 connectivity=sparse(Patch.index(:),1,1); 16 17 value =sparse(Patch.index(:),1,Patch.value(:));
Note:
See TracChangeset
for help on using the changeset viewer.