Adapt
Set up an adaptive mesh refinement.
Syntax
model.component(<ctag>).mesh(<tag>).create(<ftag>,"Adapt");
model.component(<ctag>).mesh(<tag>).feature(<ftag>).selection();
model.component(<ctag>).mesh(<tag>).feature(<ftag>).importData();
model.component(<ctag>).mesh(<tag>).feature(<ftag>).set(property,<value>);
model.component(<ctag>).mesh(<tag>).feature(<ftag>).getType(property);
Description
Use model.component(<ctag>).mesh(<tag>).create(<ftag>,"Adapt") to set up a mesh adaptation based on some expressions and criteria. The adaptive mesh refinement feature is also available for imported meshing sequences.
Use model.component(<ctag>).mesh(<tag>).feature(<ftag>).selection() to specify geometric entities to perform adaptive mesh refinement in. If you do not specify the selection, the feature operates on the entire geometry.
To use an anisotropic metric for the type of expression to base the adaptive mesh refinement on, use the following code for a 2D anisotropic expression in the local mesh size h:
model.component(<ctag>).mesh(<tag>).feature(<ftag>).set("method", "modify");
model.component(<ctag>).mesh(<tag>).feature("ada1").set("exprtype", "metric");
model.component(<ctag>).mesh(<tag>).feature("ada1").
   set("metric", new String[][]{{"2/h", "0"}, {"0", "1/h"}});
You can use mesh.feature(<ftag>).importData() to rebuild the adapted mesh, taking an updated model into account.
The following properties are available.
on | off
Controls refinement if elselect = elements.
globalmin | worst | elements
size | error | metric
error, if added in a component and a solution exists; otherwise, size
curved | linear
Controls refinement if elselect = globalmin.
The maximum coarsening factor (if method is set to modify and allowcoarsening is on).
modify | regular | longest
first | last | all | manual
Controls refinement if elselect = worst.
The facerep property is only used for meshes that define their own geometric model. For example, when having an imported mesh. Use curved to place new or moved mesh vertices on a curved surface approximation of the input mesh. Use linear to place new or moved mesh vertices on the input mesh.
See Also
Refine, SizeExpression