Program: MKLSGRIDMODIFYTRI
mklsgridmodifytri........modify triangular LOCSMITH search grid
call: [newgrid,modifycnt]=mklsgridmodifytri(lsopt,grid,idlist,'iterate',iterations);
[newgrid,modifycnt]=mklsgridmodifytri(lsopt,grid,idlist,mode);
lsopt: (struct)
LOCSMITH options structure as returned by MKLSOPT
grid: (struct)
LOCSMITH search grid as returned by MKGRIDNEW
idlist: (struct array)
A struture variable that defines the layers and
triangles to be modified. The following fields are
expected:
.layer: (numeric)
layer ID, only one per element of IDLIST.
.triangle: (numeric array)
list of triangle IDs
if this is the empty matrix [], all
triangles are modified.
idlist(i).layer defines a layer in which
modifications on triangles shall be made. Then
idlist(i).triangle is a list of triangle IDs that
defines which triangles of the speicifed layer are to
be modified.
If n layers are to be modified, IDLIST must consist
of n elements, each having its own .layer and
.triangle fields.
If idlist==NaN, nothing is modified.
mode: (string)
The MODE of operation defines what to do with the
speciifed layers and triangles. The following modes
are available:
'kill': removes triangles from the triangle list of a
layer. To remove means that treangles are
irreversibly deleted from the list!
KILL mode affects the specified triangle and
all its descendant triangles.
Nodes are not affected.
'deactivate': deactivates triangles by setting their
active-flag, but leaving it in the
list.
DEACTIVATE affects only the specified
triangles, and NOT its descendants!
Nodes are not affected.
'activate': re-activates deactivated triangles by
setting their active flag.
ACTIVATE affects onlt the specified
triangles and NOT it descendants.
Nodes are not affected.
'iterate': iterates the triangles (if they are
active). This means that new triangles and
nodes are generated. (if new triangles use
existing nodes, no new nodes are
generated!)
ITERATE mode affects the specified
triangle and all its descendant
triangles, and also generates new nodes.
triangles are not iterated any further if
their circumcircle radius is smaller than
lsopt.iter_circmin.
NOTE: deactivated triangles can not be iterated, but
can be killed!
iterations: (number)
the number of grid iterations to be applied to
the grid. This argument is relevant in 'iterate'
mode only (grid refinement), in all other modes
this parameter may be omitted (and defaults to
one)
result: newgrid: as GRID, but with the modifications applied as described
above.
modifycnt: number of modified triangles.
This number tells you how many triangles were killed,
deactivated, activated or iterated.
In iteration mode, it does NOT tell you how many new
triangles were created, but how many of the existing
triangles were iterated.
if MODIFYCNT is zero, NEWGRID is the same as GRID.
This routine applies standard operations on triangular grid: local and
global refinement, triangle removal, and activation and deactivation of
triangles.
It can be used to work on all triangles of all layers of a given grid but
also to work on single triangles of single layers.
Martin Knapmeyer, 21.09.2004, 24.09.2004, 25.10.2004, 29.10.2004,
28.10.2005, 03.03.2005
Read M-File Source Code
eof.