Changeset 8659 for issm/trunk


Ignore:
Timestamp:
06/17/11 16:18:24 (14 years ago)
Author:
Mathieu Morlighem
Message:

better PatchToVec for P0

File:
1 edited

Legend:

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

    r7088 r8659  
    77%if the patch is P0, we need to transform the vector a little bit first
    88if size(Patch.value,2)==1,
    9         Patch.value=[Patch.value Patch.value Patch.value];
     9        vec=Patch.value(Patch.element);
     10else
     11        connectivity=sparse(Patch.index(:),1,1);
     12        value       =sparse(Patch.index(:),1,Patch.value(:));
     13        vec=full(value./connectivity);
    1014end
    11 connectivity=sparse(Patch.index(:),1,1);
    12 value       =sparse(Patch.index(:),1,Patch.value(:));
    13 vec=full(value./connectivity);
Note: See TracChangeset for help on using the changeset viewer.