Code covered by the BSD License  

Highlights from
Double porosity model

image thumbnail
from Double porosity model by Jan Valdman
Finite element solution of the double porosity model and its a posteriori error estimate

orientation=edges_orientation(element2edges,edge2elements)
function orientation=edges_orientation(element2edges,edge2elements)
orientation=zeros(size(element2edges));
for j = 1:size(element2edges,1)
    %signum according to Carstensen and Bahriawati
    I=element2edges(j,:); 
    signum=ones(1,3);
    signum(find(j==edge2elements(I,2)))=-1;  
    orientation(j,:)=signum;     
end

Contact us at files@mathworks.com