OOF2: The Manual
Anneal (Anneal) — Move nodes randomly and accept the ones that meet the acceptance criterion.
- Which nodes to move. Type: An object of the
- Acceptance criterion Type: An object of the
- Failed moves will be accepted if T>0 and exp(-diffE/T) > r, where diffE is the energy gained and r is a random number between 0 and 1. Type: A real number.
- Width of the distribution of attempted node motions, in units of the pixel size. Type: A real number.
- Iteration method. Type: An object of the
Anneal is a
Skeleton modifier that
Nodes to random positions, accepting or rejecting moves
according to the given
criterion. It is
similar to a simulated annealing simulation in statistical
mechanics, from which it gets its name. Instead of minimizing the
free energy of a system of particles, it minimizes the effective energy
The general procedure for a single iteration of
Anneal is as follows:
Collect target nodes according to the given
targetsparameter. The collected
Nodesare re-ordered randomly to remove any potential artifacts from the original ordering of
Nodes. This re-ordering is repeated at every iteration.
Nodea single chance to move to a randomly assigned new position. OOF2 computes the new position from
Figure 6.59(a) shows a node (the big red dot) that is about to move to a new position. Before making the move, OOF2 computes the total effective energy of all of the neighboring elements of the node.
After moving each
Node, the given acceptance
criteriondecides whether or not the move is acceptable.
If the move is unacceptable according to the acceptance
criterion, OOF2 may still accept the move if the annealing is being done at a non-zero temperature. The parameter
Tsets the effective temperature of the annealing process. Unacceptable moves are accepted with a probability
where is the difference between the effective energies of the new and old
Successful annealing usually requires a number of iterations. On
each iteration, OOF2 makes one attempt to move each node. The
number of iterations is controlled by the
iteration parameter, which can be set to
perform a fixed number of iterations or to stop after some
condition is satisfied. See IterationManager for the details.
Statistics for each step of the annealing process are printed in the OOF2 Message window. For example,
Iteration 1: E = 1.1916e+01, deltaE=-1.2495e-01 ( 1.049%), Acceptance Rate = 19.1% Iteration 2: E = 1.1391e+01, deltaE=-1.7564e-01 ( 1.542%), Acceptance Rate = 25.5% Iteration 3: E = 1.0638e+01, deltaE=-1.1883e-01 ( 1.117%), Acceptance Rate = 22.3% Iteration 4: E = 1.0095e+01, deltaE=-1.4345e-01 ( 1.421%), Acceptance Rate = 21.0% Iteration 5: E = 9.5440e+00, deltaE=-8.3725e-02 ( 0.877%), Acceptance Rate = 21.0%
The listing shows the iteration number, the total energy
E) of the
Skeleton, the absolute
change in energy (
the iteration, the percentage change in energy, and the move acceptance rate.
If the change in energy or the acceptance rate gets too small, the
annealing process is not being effective at improving the
Using ConditionalIteration as
iteration parameter can stop the process
when it becomes ineffective.
Figure 6.60 shows a
Skeleton that has been
refined once. Figure 6.61 shows the same skeleton after snapping nodes to the
material boundaries. Snapping was done with a large α (0.9)
so there are some badly misshapen elements. Notice that the
border of the arrow shape does not coincide well with the element
edges in many spots. Further iterations of SnapNodes does not improve matters.
Skeleton can be improved by Annealing. Annealing with
delta=1.0 for 20 iterations produced the
Skeleton shown in Figure 6.62. The
edges match the boundary of the arrow shape much more
exactly. Further annealing would improve it even more, although
SplitQuads and Rationalize should probably be used
Even though the example shown above concentrates on resolving
tricky material boundaries (meaning it puts more emphasis on
A good way to anneal efficiently is to apply it only to