Changeset 24515
- Timestamp:
- 01/14/20 12:43:54 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/contrib/tsantos/remesh.m
r22241 r24515 1 function mdOut = remesh(md,parfile )1 function mdOut = remesh(md,parfile,time_step) 2 2 %Set the new mesh (refined) into the model md 3 if nargin<3, 4 time_step=length(md.results.TransientSolution); 5 end 3 6 4 7 NewModel = model; … … 6 9 % geometry 7 10 NewModel.mesh = mesh2d(); 8 NewModel.mesh.x = md.results.TransientSolution( end).MeshX;9 NewModel.mesh.y = md.results.TransientSolution( end).MeshY;10 NewModel.mesh.elements = md.results.TransientSolution( end).MeshElements;11 NewModel.mesh.x = md.results.TransientSolution(time_step).MeshX; 12 NewModel.mesh.y = md.results.TransientSolution(time_step).MeshY; 13 NewModel.mesh.elements = md.results.TransientSolution(time_step).MeshElements; 11 14 12 15 % build segments. CONVEX HULL: IT JUST WORKS FOR REGULAR MESHES, WITHOUT "BAYS" … … 28 31 29 32 if segments(s,3)==0, 30 error('Element not found!');33 %error('Element not found!'); 31 34 end 32 35 end … … 51 54 52 55 % Setting initialization 53 NewModel.initialization.vx = md.results.TransientSolution( end).Vx;54 NewModel.initialization.vy = md.results.TransientSolution( end).Vy;56 NewModel.initialization.vx = md.results.TransientSolution(time_step).Vx; 57 NewModel.initialization.vy = md.results.TransientSolution(time_step).Vy; 55 58 NewModel.initialization.vz = zeros(md.mesh.numberofvertices,1); 56 NewModel.initialization.vel = md.results.TransientSolution( end).Vel;57 NewModel.initialization.pressure = md.results.TransientSolution( end).Pressure;58 NewModel.geometry.surface = md.results.TransientSolution( end).Surface;59 NewModel.geometry.base = md.results.TransientSolution( end).Base;60 NewModel.geometry.bed = md.results.TransientSolution( end).Bed;%md.geometry.bed; %use from parameterize61 NewModel.geometry.thickness = md.results.TransientSolution( end).Thickness;62 NewModel.mask.groundedice_levelset = md.results.TransientSolution( end).MaskGroundediceLevelset;59 NewModel.initialization.vel = md.results.TransientSolution(time_step).Vel; 60 NewModel.initialization.pressure = md.results.TransientSolution(time_step).Pressure; 61 NewModel.geometry.surface = md.results.TransientSolution(time_step).Surface; 62 NewModel.geometry.base = md.results.TransientSolution(time_step).Base; 63 NewModel.geometry.bed = md.results.TransientSolution(time_step).Bed;%md.geometry.bed; %use from parameterize 64 NewModel.geometry.thickness = md.results.TransientSolution(time_step).Thickness; 65 NewModel.mask.groundedice_levelset = md.results.TransientSolution(time_step).MaskGroundediceLevelset; 63 66 64 67 %copy other data
Note:
See TracChangeset
for help on using the changeset viewer.