0001 function [x y z elements is2d]=processmesh(md,options_structure);
0002
0003
0004
0005
0006
0007
0008
0009
0010 if md.numberofgrids==md.numberofelements
0011 error('plot error message: the number of elements is the same as the number of grids! cannot plot anything with model/plot, use matlab/plot instead')
0012 end
0013
0014
0015 x=md.x;
0016 x2d=md.x2d;
0017 y=md.y;
0018 y2d=md.y2d;
0019 z=md.z;
0020 z2d=md.z2d;
0021 elements2d=md.elements2d;
0022 elements=md.elements;
0023 elements_type2d=md.elements_type2d;
0024
0025
0026 if strcmpi(md.type,'2d');
0027 is2d=1;
0028 else
0029 if ~isnan(options_structure.layer) & options_structure.layer>=1,
0030 is2d=1;
0031 else
0032 is2d=0;
0033 end
0034 end
0035
0036
0037 if ~isnan(options_structure.layer) & options_structure.layer>=1,
0038
0039 x=x2d;
0040 y=y2d;
0041 z=z2d;
0042 elements=elements2d;
0043 elements_type=elements_type2d;
0044 end
0045
0046
0047 if ~isnan(options_structure.unitmultiplier),
0048 x=x*options_structure.unitmultiplier;
0049 y=y*options_structure.unitmultiplier;
0050 z=z*options_structure.unitmultiplier;
0051 end