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.

femsolver<br />

scalar Shapechg, and the number of multigrid levels (including the finest level) is<br />

given in the property Mglevels (default 2).<br />

• If Mgauto=explicit, then the multigrid hierarchy is automatically constructed<br />

starting from the mesh case given in the property Mcase. The properties<br />

Meshscale and Shapechg should be vectors of the same length (however if one<br />

is scalar, it is expanded to the same length as the other). A number of coarse levels<br />

are constructed, where level i has a mesh that is coarsened with the factor<br />

Meshscale(i), and shape functions orders incremented with Shapechg(i)<br />

relative to mesh case Mcase. Shapechg(i) should be negative or zero.<br />

• If Mgauto=meshrefine, then the multigrid hierarchy is automatically<br />

constructed by refining the mesh in mesh case Mcase repeatedly. The number of<br />

multigrid levels (including the original, coarsest level) is given in the property<br />

Mglevels (default 2). The refinement method can be specified using the<br />

property Rmethod, see meshrefine.<br />

• If Mgauto=off, then only existing mesh cases are used in the hierarchy. If the<br />

property Mcase is a scalar, then all mesh cases that have fewer degrees of freedom<br />

than the mesh case Mcase are used as coarse levels. If Mcase is a vector with more<br />

than one component, the mesh cases in that vector are used. However, if the<br />

property Mglevels is given, no more than Mglevels levels are used. The solver<br />

sorts the list of mesh cases according to decreasing number of DOFs, and the<br />

solution is delivered for the mesh case with the largest number of DOFs. This<br />

corresponds to the Manual option in the <strong>COMSOL</strong> Multiphysics user interface.<br />

The default for Mgauto is as follows: If the FEM structure has several mesh cases,<br />

then Mgauto=off, otherwise Mgauto is the same as the default in meshcaseadd.<br />

The construction of coarse level matrices is controlled by the property Mgassem. If<br />

Mgassem is a vector, Mgassem(i) should be a 0 or 1. Mgassem(i)=1 means that<br />

matrices should be assembled in mesh case Mcase(i), rather than being projected<br />

from the next finer level. The length of Mgassem should be (at least) the number of<br />

mesh cases used, including the finest level. The value of Mgassem(i) for the finest<br />

level i is ignored, because matrices are always assembled on the finest level. A scalar<br />

Mgassem applies to all coarse mesh cases.<br />

Four Examples How to Construct the Geometric Multigrid Hierarchy<br />

Assume that fem only contains the mesh case 0, and no xmesh.<br />

Alternative 1:<br />

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

fem.sol = femstatic(fem,'linsolver','gmg');<br />

159

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

Saved successfully!

Ooh no, something went wrong!