2 %
function [RefTh,MatProj]=RefineThOptV1(varargin)
3 % refines the mesh Th by a factor of 4
7 % sort :
set to
true if sort boundaries
10 % - Original mesh (Th)
11 % \image html images/RefineMesh1.png "figure : Mesh before refinement"
12 % \image latex images/RefineMesh1.eps "My application" width=10cm
13 % - Refine mesh (Thr1)
15 % Thr1=RefineMesh(Th);
@endverbatim
16 % \image html images/RefineMesh2.png
"figure : Mesh after refinement : sort=false"
17 % - Refine mesh with sort boundaries (Thr2)
19 % Thr2=
RefineMesh(Th,'sort',true);
@endverbatim
20 % \image html images/RefineMesh3.png
"figure : Mesh after refinement : sort=true"
23 p.addRequired(
'Th', @isstruct);
25 p.addParamValue(
'sort',
false, @islogical );
33 [beref,belref]=
BuildBE(e2q,e2be,Th.nq);
36 Tr=[mef([1 2 4],:),mef([2 3 5],:),mef([2 5 4],:),mef([4 5 6],:)];
37 mel=[Th.mel,Th.mel,Th.mel,Th.mel];
38 qfl=zeros(1,size(qf,2));
39 qfl=zeros(1,size(qf,2));
41 titi=zeros(1,size(e2q,1));
42 titi(e2be(:,1))=e2be(:,3);
43 qfl(Th.nq+1:end)=titi;
51 RefTh=
struct(
'q',qf,
'me',Tr,
'ql',qfl,
'mel',mel,
'be',beref,
'bel',belref, ...
54 'nbe',size(beref,2), ...