Changeset 9673


Ignore:
Timestamp:
09/07/11 16:21:42 (14 years ago)
Author:
Mathieu Morlighem
Message:

Simpler PatchToVec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/utils/Interp/PatchToVec.m

    r9424 r9673  
    66
    77%if the patch is P0: we have element values, return an element vector
    8 switch(Patch.interpolation(1)),
    9         case P0Enum,
     8switch(size(Patch.value,2)),
     9        case 1,
    1010                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,
    1516                connectivity=sparse(Patch.index(:),1,1);
    1617                value       =sparse(Patch.index(:),1,Patch.value(:));
Note: See TracChangeset for help on using the changeset viewer.