Move variable outside loop where it does not vary.

This change should have no effect on execution.
Merge two loops for clarity and consistency with similar code.

This change should have no effect on execution.
Add wake parent surface ID to Surf.

This variable will be unused (-1) for non-wake surfaces.

For wake surfaces, this variable will be set to the surface ID of the
wake generating parent surface.  This will be used later to accelerate
matching wake attach chains to the wing trailing edge chain.
Add wake attach chain pointer to ISegChain

For most chains, this pointer will be NULL.

For the originating chain (where the wake attaches to its parent component)
this will point to the matching trailing edge chain connecting the top and
bottom surface of the wing.
Add ISegChain::Match to test for matching chains.

Match checks if two chains are coincident.  To be coincident, the chains
must use the same A surface.

In addition, the first and last points in the chain must match within a
small tolerance.  Not all points in the chain are checked -- only the
first and last.  Flipped chains are checked as well.

The CompPnt() routine averages the coordinates of the point based on the
various surfaces which underly it.  This may cause robustness problems and
should perhaps be changed to use only the A surfaces which have already
been matched.  At that point, comparison may be made on u,w coordinates
instead of x,y,z.
Set the wake parent surface ID as the wake surfaces are constructed.
Add routines to CfdMeshMgr to attach wake chains to parent chains.

These routines match the wake generating chain to the wing trailing edge
chain.
Transfer matching tessellation to wake chain.

Rather than tessellate wake attach chains, make an exact copy from the
matched trailing edge chain.  This eliminates any possibility of the
points not matching -- leading to topology problems.
Size distance table to hit underlying Bezier curve points.

Choosing the distance table size to match N*num_sections+1 ensures that
a distance table point lands on top of each Bezier curve point.  This
improves the behavior of the tessellation integration algorithm.
Add distance table interpolation helper routine.

This takes idouble as a floating point input and performs linear
interpolation on the distance table.
Re-write curve tessellation integration.

The old integrator assumed that the background distance table was finer
than the target mesh spacing.  This integrator has no such limitation.

This integrator uses Newton's method to solve for the step that gives the
desired edge length.  Each edge is built from five substeps.

Forward and reverse integration are supported.
Change BorderCurveOnSurface tolerance to better match wakes on fuse splits.
Limit distance table to 10000 points.

The 10*N+1 approach for sizing the distance table worked well for
boundary curves -- they typically have a small N at particular key points.
This approach ensures those key points are hit and there are 10
intermediate points.

However, intersection curves usually have many more points which are more
uniformly distributed.  Consequently, 10*N+1 can lead to a very large
number of points with very little gain.

So, when that results in greater than 10000 points, nref is calculated to
target about 10000 points, but still hit key points.
Make sure distance table has points for very fine curves

For cases where the number of sections was more than twice nseglim,
integer division would cause nref=0.  This makes sure that nref is
always >= 1.
Add standalone Newton's method and bisection solvers for curve tesselation.
Try Newton's method, but fall back to bisection when it fails.
Introduce split sources to help mesh quality near intersections.

The finite surface background mesh sometimes is insufficient near
intersections.  This is not a significant problem for the surface field
mesh because the growth ratio is enforced through connectivity.  However,
the curves are tesselated based entirely on the distance table.

Split sources are created at the ISegChain splits -- points where a
chain was split.  These correspond to intersection curve endpoints that
do not correspond to surface boundaries.

Split sources are initialized by one of the local surfaces and are updated
by the distance table endpoints -- or they can update the distance table
endpoints.
Bump version to 2.2.4

Version 2.2.4 contains a collection of bug fixes that improve the CFD
mesher.  Various users have run into these problems, so if you use
CFDMesh, you should certainly upgrade.

Bug fixes in this release:
 - Guarantee attachment of wakes to constructing edge
 - Relax tolerance to better match wakes down body splits
 - Rewrite curve tessellation integration for quality in extreme cases
 - Introduce curve split sources for mesh quality near intersections
 - Size curve distance table to match underlying topology

The wake changes should help guarantee mesh topology when wakes are turned
on.  There were certain cases that could arise where a wake would not
properly attach to the generating trailing edge, or the edge of a body
that aligned with the wake.  Both of these situations should be improved.

The rest of the changes affect the quality of the tessellation along
intersection and border curves.  The VSP mesher first lays out the curves,
and then the surface mesh is generated without changing the curve points.
Consequently, poor quality curve tessellation means a poor quality surface
mesh.  If you have experienced strange unexplained mesh quality problems,
these fixes should help.