[12325] | 1 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/nodeconnectivity.m
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/nodeconnectivity.m (revision 12027)
|
---|
| 4 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/nodeconnectivity.m (revision 12028)
|
---|
| 5 | @@ -1,58 +0,0 @@
|
---|
| 6 | -%
|
---|
| 7 | -% create a node connectivity table for the elements in the model.
|
---|
| 8 | -%
|
---|
| 9 | -% [nodecon]=edgeadjacency(elem,nnodes,mxepg)
|
---|
| 10 | -%
|
---|
| 11 | -% where the required input is:
|
---|
| 12 | -% elem (numeric, element connectivity array (elems x nodes))
|
---|
| 13 | -%
|
---|
| 14 | -% and the required output is:
|
---|
| 15 | -% nodecon (numeric, node connectivity array (nnodes x mxepg+1))
|
---|
| 16 | -%
|
---|
| 17 | -% the optional input is:
|
---|
| 18 | -% nnodes (numeric, number of nodes)
|
---|
| 19 | -% mxepg (numeric, max elements per node)
|
---|
| 20 | -%
|
---|
| 21 | -function [nodecon]=nodeconnectivity(elem,nnodes,mxepg)
|
---|
| 22 | -
|
---|
| 23 | -if ~nargin
|
---|
| 24 | - help nodeconnectivity
|
---|
| 25 | - return
|
---|
| 26 | -end
|
---|
| 27 | -
|
---|
| 28 | -if ~exist('nnodes','var') || isempty(nnodes)
|
---|
| 29 | - nnodes=max(max(elem));
|
---|
| 30 | -end
|
---|
| 31 | -if ~exist('mxepg','var') || isempty(mxepg)
|
---|
| 32 | - mxepg=25;
|
---|
| 33 | -end
|
---|
| 34 | -
|
---|
| 35 | -%% create the node connectivity array
|
---|
| 36 | -
|
---|
| 37 | -nodecon=zeros(nnodes,mxepg+1);
|
---|
| 38 | -
|
---|
| 39 | -% loop over the elements
|
---|
| 40 | -
|
---|
| 41 | -for i=1:size(elem,1)
|
---|
| 42 | -
|
---|
| 43 | -% loop over the nodes for each element
|
---|
| 44 | -
|
---|
| 45 | - for j=1:size(elem,2)
|
---|
| 46 | - if elem(i,j)
|
---|
| 47 | - nodecon(elem(i,j),nodecon(elem(i,j),end)+1)=i;
|
---|
| 48 | - nodecon(elem(i,j),end)=nodecon(elem(i,j),end)+1;
|
---|
| 49 | - end
|
---|
| 50 | - end
|
---|
| 51 | -end
|
---|
| 52 | -
|
---|
| 53 | -%% sort the node connectivity array
|
---|
| 54 | -
|
---|
| 55 | -% loop over the nodes
|
---|
| 56 | -
|
---|
| 57 | -for i=1:size(nodecon,1)
|
---|
| 58 | - if (nodecon(i,end) > 1)
|
---|
| 59 | - nodecon(i,1:nodecon(i,end))=sort(nodecon(i,1:nodecon(i,end)));
|
---|
| 60 | - end
|
---|
| 61 | -end
|
---|
| 62 | -
|
---|
| 63 | -end
|
---|
| 64 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_unsh_edges.m
|
---|
| 65 | ===================================================================
|
---|
| 66 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_unsh_edges.m (revision 12027)
|
---|
| 67 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_unsh_edges.m (revision 12028)
|
---|
| 68 | @@ -73,7 +73,7 @@
|
---|
| 69 |
|
---|
| 70 | if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ...
|
---|
| 71 | md.qmu.numberofpartitions
|
---|
| 72 | - [edgeadj]=edgeadjacency(md.mesh.elements,md.nodeconnectivity);
|
---|
| 73 | + [edgeadj]=edgeadjacency(md.mesh.elements,md.kmlnodeconnectivity);
|
---|
| 74 | [icol,irow]=find(edgeadj'==0);
|
---|
| 75 | edgeuns=zeros(length(irow),2);
|
---|
| 76 | for i=1:length(irow)
|
---|
| 77 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kmlnodeconnectivity.m
|
---|
| 78 | ===================================================================
|
---|
| 79 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kmlnodeconnectivity.m (revision 0)
|
---|
| 80 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kmlnodeconnectivity.m (revision 12028)
|
---|
| 81 | @@ -0,0 +1,58 @@
|
---|
| 82 | +%
|
---|
| 83 | +% create a node connectivity table for the elements in the model.
|
---|
| 84 | +%
|
---|
| 85 | +% [nodecon]=edgeadjacency(elem,nnodes,mxepg)
|
---|
| 86 | +%
|
---|
| 87 | +% where the required input is:
|
---|
| 88 | +% elem (numeric, element connectivity array (elems x nodes))
|
---|
| 89 | +%
|
---|
| 90 | +% and the required output is:
|
---|
| 91 | +% nodecon (numeric, node connectivity array (nnodes x mxepg+1))
|
---|
| 92 | +%
|
---|
| 93 | +% the optional input is:
|
---|
| 94 | +% nnodes (numeric, number of nodes)
|
---|
| 95 | +% mxepg (numeric, max elements per node)
|
---|
| 96 | +%
|
---|
| 97 | +function [nodecon]=kmlnodeconnectivity(elem,nnodes,mxepg)
|
---|
| 98 | +
|
---|
| 99 | +if ~nargin
|
---|
| 100 | + help kmlnodeconnectivity
|
---|
| 101 | + return
|
---|
| 102 | +end
|
---|
| 103 | +
|
---|
| 104 | +if ~exist('nnodes','var') || isempty(nnodes)
|
---|
| 105 | + nnodes=max(max(elem));
|
---|
| 106 | +end
|
---|
| 107 | +if ~exist('mxepg','var') || isempty(mxepg)
|
---|
| 108 | + mxepg=25;
|
---|
| 109 | +end
|
---|
| 110 | +
|
---|
| 111 | +%% create the node connectivity array
|
---|
| 112 | +
|
---|
| 113 | +nodecon=zeros(nnodes,mxepg+1);
|
---|
| 114 | +
|
---|
| 115 | +% loop over the elements
|
---|
| 116 | +
|
---|
| 117 | +for i=1:size(elem,1)
|
---|
| 118 | +
|
---|
| 119 | +% loop over the nodes for each element
|
---|
| 120 | +
|
---|
| 121 | + for j=1:size(elem,2)
|
---|
| 122 | + if elem(i,j)
|
---|
| 123 | + nodecon(elem(i,j),nodecon(elem(i,j),end)+1)=i;
|
---|
| 124 | + nodecon(elem(i,j),end)=nodecon(elem(i,j),end)+1;
|
---|
| 125 | + end
|
---|
| 126 | + end
|
---|
| 127 | +end
|
---|
| 128 | +
|
---|
| 129 | +%% sort the node connectivity array
|
---|
| 130 | +
|
---|
| 131 | +% loop over the nodes
|
---|
| 132 | +
|
---|
| 133 | +for i=1:size(nodecon,1)
|
---|
| 134 | + if (nodecon(i,end) > 1)
|
---|
| 135 | + nodecon(i,1:nodecon(i,end))=sort(nodecon(i,1:nodecon(i,end)));
|
---|
| 136 | + end
|
---|
| 137 | +end
|
---|
| 138 | +
|
---|
| 139 | +end
|
---|
| 140 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_partitions.m
|
---|
| 141 | ===================================================================
|
---|
| 142 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_partitions.m (revision 12027)
|
---|
| 143 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_partitions.m (revision 12028)
|
---|
| 144 | @@ -150,7 +150,7 @@
|
---|
| 145 | irow=unique(irow);
|
---|
| 146 | elemp=md.mesh.elements(irow,:);
|
---|
| 147 | epartp=epart(irow,:);
|
---|
| 148 | - nodeconp=nodeconnectivity(elemp,md.mesh.numberofvertices);
|
---|
| 149 | + nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices);
|
---|
| 150 | [edgeadjp]=edgeadjacency(elemp,nodeconp);
|
---|
| 151 | [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp);
|
---|
| 152 | iloop(end+1)=size(edgeper,1)+1;
|
---|
| 153 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/README.txt
|
---|
| 154 | ===================================================================
|
---|
| 155 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/README.txt (revision 12027)
|
---|
| 156 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/README.txt (revision 12028)
|
---|
| 157 | @@ -60,7 +60,7 @@
|
---|
| 158 |
|
---|
| 159 | There are some other utilities that are used in the construction of topological tables for the kml writing.
|
---|
| 160 |
|
---|
| 161 | -nodeconnectivity.m - create a node connectivity table (nnodes x mxepg+1)
|
---|
| 162 | +kmlnodeconnectivity.m - create a node connectivity table (nnodes x mxepg+1)
|
---|
| 163 | edgeadjacency.m - create an edge adjacency array (elems x edges)
|
---|
| 164 | edgeperimeter.m - create an edge perimeter (edgeper x 2) and element perimeter (edgeper x 1) list
|
---|
| 165 |
|
---|
| 166 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_part_edges.m
|
---|
| 167 | ===================================================================
|
---|
| 168 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_part_edges.m (revision 12027)
|
---|
| 169 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_part_edges.m (revision 12028)
|
---|
| 170 | @@ -149,7 +149,7 @@
|
---|
| 171 | irow=unique(irow);
|
---|
| 172 | elemp=md.mesh.elements(irow,:);
|
---|
| 173 | epartp=epart(irow,:);
|
---|
| 174 | - nodeconp=nodeconnectivity(elemp,md.mesh.numberofvertices);
|
---|
| 175 | + nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices);
|
---|
| 176 | [edgeadjp]=edgeadjacency(elemp,nodeconp);
|
---|
| 177 | [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp);
|
---|
| 178 | iloop(end+1)=size(edgeper,1)+1;
|
---|