Changeset 17774
- Timestamp:
- 04/18/14 13:22:29 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/model.m
r17757 r17774 1210 1210 error('Case not supported'); %not supposed to happen! 1211 1211 end 1212 %Reorder elements to make sure they are direct 1213 for j=1:3 1214 element = elements(3*(i-1)+j,:); 1215 matrix = [md.mesh.x(element), md.mesh.y(element), md.mesh.z(element), ones(4,1)]; 1216 if det(matrix)>0, 1217 elements(3*(i-1)+j,1)=element(2); 1218 elements(3*(i-1)+j,2)=element(1); 1219 end 1220 end 1212 1221 end 1213 1222 %%Split in 3 tetras … … 1216 1225 %subelement3 = [5 6 3 1]; 1217 1226 %elements=[md.mesh.elements(:,subelement1);md.mesh.elements(:,subelement2);md.mesh.elements(:,subelement3)]; 1218 disp([num2str(steiner) ' Steiner points had to be included']) 1227 if steiner==0, 1228 disp('No Steiner point required to split prismatic mesh into tets'); 1229 else 1230 disp([num2str(steiner) ' Steiner points had to be included']) 1231 error('Steiner point not supported yet'); 1232 end 1219 1233 1220 1234 pos_elements = repmat([1:md.mesh.numberofelements]',3,1); … … 1224 1238 1225 1239 %p and q (same deal, except for element that are on the bedrock: ) 1226 md.friction.p=md.friction.p(pos_elements); 1227 md.friction.q=md.friction.q(pos_elements); 1240 if ~isnan(md.friction.p), 1241 md.friction.p=md.friction.p(pos_elements); 1242 md.friction.q=md.friction.q(pos_elements); 1243 end 1228 1244 1229 1245 %elementstype … … 1237 1253 1238 1254 %materials 1239 md.materials.rheology_n=md.materials.rheology_n(pos_elements); 1255 if ~isnan(md.materials.rheology_n), 1256 md.materials.rheology_n=md.materials.rheology_n(pos_elements); 1257 end 1240 1258 1241 1259 %increase connectivity if less than 25:
Note:
See TracChangeset
for help on using the changeset viewer.