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.

elmapextr<br />

Cautionary<br />

Examples<br />

Parameter or time dependency in the source transformation is not properly detected<br />

by the solvers, which means that the source transformation will not be updated<br />

between parameter or time steps in that case. Solution dependencies in the<br />

transformation are properly detected, but do not give any Jacobian contributions<br />

from the transformation.<br />

Calculate the first ten eigenvalues of a 3-by-2 rectangle with periodic boundary<br />

conditions both left-right and top-bottom. Different map types are used. Note that<br />

this is the same example as used under elcplextr.<br />

fem.geom = rect2(3,2);<br />

fem.mesh = meshinit(fem,'hmax',0.05);<br />

fem.equ.c = 1;<br />

fem.equ.da = 1;<br />

fem.bnd.ind = [0 1 2 0];<br />

fem.bnd.constr = {'left2right(u)-u','lower2upper(u)-u'};<br />

fem.elem = {};<br />

el.elem = 'elmapextr';<br />

el.g = {'1'};<br />

el.opname = {'left2right','lower2upper'};<br />

clear map1;<br />

map1.type = 'unit';<br />

clear map2;<br />

map2.type = 'linear';<br />

map2.sg = '1';<br />

map2.sv = {'2','3'};<br />

map2.dg = '1';<br />

map2.dv = {'1','4'};<br />

clear map3;<br />

map3.type = 'local';<br />

map3.expr = {'x'};<br />

el.map = {map1 map2 map3};<br />

el.srcmap = {'1','3'};<br />

el.dstmap = {'2','3'};<br />

clear src;<br />

src.ind = {{'1'},{'4'}};<br />

src.src = {{'2'},{'1'}};<br />

el.geomdim{1} = {{},src,{}};<br />

fem.elem = [fem.elem {el}];<br />

fem.xmesh = meshextend(fem);<br />

94 | CHAPTER 1: COMMAND REFERENCE

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

Saved successfully!

Ooh no, something went wrong!