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.

femmesh<br />

Purpose<br />

femmesh<br />

Create a mesh object.<br />

Syntax<br />

Description<br />

fem.mesh = femmesh(p, el)<br />

fem.mesh = femmesh(p, el) creates a mesh object from the mesh data stored in<br />

p and el.<br />

p is an sdim-by-np matrix containing the coordinates of the mesh vertices. The x-,<br />

y-, and z-coordinates are stored in the first, second, and third row, respectively. np<br />

is the number of mesh vertices.<br />

el is a cell array of structures with mesh element information. Each structure stores<br />

information on elements of a specific type.<br />

STRUCTURE<br />

FIELD<br />

type<br />

elem<br />

dom<br />

param<br />

ud<br />

VALUE<br />

one of the strings<br />

vtx | edg | tri |<br />

quad | tet | prism<br />

| hex<br />

matrix of size<br />

nNodes-by-nElem<br />

matrix of size<br />

1-by-nElem<br />

matrix of size<br />

nParam-by-nElem<br />

matrix of size<br />

2-by-nElem<br />

DESCRIPTION<br />

Element type. The valid element types are:<br />

vertex element (vtx), edge element (edg),<br />

triangular element (tri), quadrilateral<br />

element (quad), tetrahedral element (tet),<br />

prism element (prism), and hexahedral<br />

element (hex).<br />

Mesh vertex indices for the element points.<br />

nElem is the number of elements and<br />

nNodes is the number of element points.<br />

Geometry domain numbers.<br />

Geometry parameter values.<br />

Up- and down-side subdomain numbers.<br />

The first row contains the up-side<br />

subdomain numbers and the second row the<br />

down-side subdomain numbers.<br />

The field param is only valid for elements of dimension 1, that is, edge elements, in<br />

2D and 3D, and for elements of dimension 2, that is, triangular or quadrilateral<br />

elements, in 3D. For each edge element, the first and second row contain the<br />

starting and ending parameter value, respectively, in 2D, and starting and ending arc<br />

length value, respectively, in 3D. For each triangular and quadrilateral element, the<br />

rows contain the first and second parameter values for each element corner.<br />

The field ud is only valid for elements of dimension sdim−1, also referred to as<br />

boundary elements. The direction of the normal vector of a boundary element<br />

129

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

Saved successfully!

Ooh no, something went wrong!