Permalink
Browse files

preprocess: implement FEM/DGM coupling on triangles

  • Loading branch information...
1 parent 9718a4f commit 3e138dbb28b71c9b79a1d7b8e8020c5d1b9ea770 @Matael committed Feb 9, 2017
Showing with 18 additions and 8 deletions.
  1. +18 −8 src/Utils/PLANES_preprocess.m
@@ -54,6 +54,7 @@
end
temp=find(ismember(elem.model,[2 11]));
temp=reshape(temp,length(temp),1);
+
if length(temp)>0
segments=[segments;elem.nodes(temp,1) elem.nodes(temp,2) temp 0*temp elem.label(temp)];
@@ -132,8 +133,17 @@
clear temp_physical
-
-
+ % identify FEM/DGM coupling edges
+ temp = (ismember(elem.model(edges.internal(:,3)),[1 2]).*ismember(elem.model(edges.internal(:,4)), 10));
+ temp = temp+(ismember(elem.model(edges.internal(:,3)), 10).*ismember(elem.model(edges.internal(:,4)),[1 2]));
+ temp = find(temp);
+ edges.FEM_DGM_TR_coupling = edges.internal(temp,1:4);
+ edges.internal(temp,:) = [];
+
+ nb.internal = size(edges.internal,1);
+ nb.FEM_DGM_TR_coupling = size(edges.FEM_DGM_TR_coupling,1);
+
+
% Suppression of temporary values for boundaries
boundaries(:,4:6)=[];
% boundaries=[node1 node2 #element1]
@@ -194,21 +204,21 @@
edges.dirichlets=boundaries(temp,:);
boundaries(temp,:)=[];
-
-%
+
temp=find(ismember(boundaries(:,4),[25]));
edges.incompatible=boundaries(temp,:);
-
-
boundaries(temp,:)=[];
+%
identify_incompatible_mesh
-
- edges.flux=[edges.flux;edges.internal_DGM];
+
+ edges.flux=[edges.flux;edges.internal_DGM; edges.FEM_DGM_TR_coupling];
nb.flux=size(edges.flux,1);
nb.internal_DGM=0;
+ nb.FEM_DGM_TR_coupling=0;
edges=rmfield(edges,'internal_DGM');
+ edges=rmfield(edges,'FEM_DGM_TR_coupling');
temp=find(ismember(boundaries(:,4),[98 99]));

0 comments on commit 3e138db

Please sign in to comment.