0001 function [VOL_cmpts,SA_cmpts,SAu_cmpts,VOL_allcmpts,VF_cmpts,SoV_cmpts] ...
0002 = GET_VOL_SA(mymesh,gdir)
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 UG = gdir';
0029 UG = UG/norm(UG);
0030
0031 for icmpt = 1:mymesh.Ncmpt
0032 Fac = [];
0033 for iboundary = 1:mymesh.Nboundary
0034 Fac = [Fac,mymesh.Fac_boundary_reorder{icmpt}{iboundary}];
0035 end
0036 [VOL_cmpts(icmpt)] ...
0037 = get_volume_mesh(mymesh.Pts_cmpt_reorder{icmpt},mymesh.Ele_cmpt_reorder{icmpt});
0038 [SA_cmpts(icmpt),SAu_cmpts(icmpt,:)] ...
0039 = get_surface_mesh(mymesh.Pts_cmpt_reorder{icmpt},Fac,UG);
0040 end
0041
0042 VOL_allcmpts = 0;
0043
0044 for icmpt = 1:mymesh.Ncmpt
0045 VOL_allcmpts = VOL_allcmpts + VOL_cmpts(icmpt);
0046 end
0047
0048 for icmpt = 1:mymesh.Ncmpt
0049 VF_cmpts(icmpt) = VOL_cmpts(icmpt)/VOL_allcmpts;
0050 end
0051
0052 for icmpt = 1:mymesh.Ncmpt
0053 SoV_cmpts(icmpt,:) = SAu_cmpts(icmpt,:)/VOL_cmpts(icmpt);
0054 end