21.01.2015 Views

COMSOL Multiphysics™

COMSOL Multiphysics™

COMSOL Multiphysics™

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

elgpspec<br />

elgpspec can be added in the fem.elem field unless meshextend is called with<br />

property 'standard' set to 'off'.<br />

Note that the sum of weights in an explicit pattern specification are supposed to be<br />

equal to the element’s volume in the element local coordinate system, that is, to 1/<br />

2 for triangles and 1/6 for tetrahedra.<br />

Examples<br />

Given a fem structure with an xmesh field, extract elements and add an additional<br />

pattern which uses fourth order integration on curved simplices and explicit zeroth<br />

order integration on other simplices. Finally, the xmesh is updated.<br />

elstr = fem.xmesh.getElements;<br />

clear elem;<br />

for i=1:length(elstr)<br />

elem{i} = eval(elstr(i));<br />

if strcmp(elem{i}.elem,'elgpspec')<br />

igpspec = i;<br />

end<br />

end<br />

elstr = fem.xmesh.getInitElements;<br />

clear eleminit;<br />

for i=1:length(elstr)<br />

eleminit{i} = eval(elstr(i));<br />

end<br />

newptrn = length(elem{igpspec}.geom{1}.ep)+1;<br />

elem{igpspec}.geom{1}.ep{newptrn} = {'s(2)', '4', ...<br />

'ls(2)', {{'0.333333333','0.333333333','0.5'}}};<br />

fem.elem = elem;<br />

fem.eleminit = eleminit;<br />

Here, additional elements using the integration point pattern with index newptrn<br />

can be added to the fem.elem field.<br />

fem.xmesh = meshextend(fem,'standard','off');<br />

See Also<br />

elempty, elepspec, elshape, eleqc, eleqw<br />

81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!