a c omp ar ison of tw o op ti mi za ti on me thods f or … · all the se cha ra cterist ics. 1 an...

15
A COMPARISON OF TWO OPTIMIZATION METHODS FOR MESH QUALITY IMPROVEMENT Lori Freitag Diachin 1 Patrick Knupp 2 Todd Munson 3 Suzanne Shontz 4 1 Lawrence Livermore National Laboratory, Livermore, CA U.S.A. [email protected] 2 Sandia National Laboratories, Albuquerque, NM U.S.A. [email protected] 3 Argonne National Laboratory, Argonne, IL U.S.A. [email protected] 4 University of Minnesota, Minneapolis, MN U.S.A. [email protected] ABSTRACT We compare inexact Newton and coordinate descent optimization methods for improving the quality of a mesh by repositioning the vertices, where the overall quality is measured by the harmonic mean of the mean-ratio metric. The effects of problem size, element size heterogeneity, and various vertex displacement schemes on the performance of these algorithms are assessed for a series of tetrahedral meshes. Keywords: mesh quality, mesh improvement, mesh smoothing 1. INTRODUCTION Mesh vertex repositioning algorithms have been used for many years to improve solution accuracy and ef- ficiency; see, for example, [1, 2, 3, 4]. Repositioning techniques vary widely in the time required to imple- ment and modify the algorithm and in the computa- tional cost and effectiveness when applying the algo- rithm, usually with a trade-off between these criteria. Laplacian smoothing, for example, is easy to imple- ment and inexpensive to apply but can produce tan- gled meshes. Moreover, this method is limited to the creation of smooth meshes, while vertex repositioning can address other meshing needs such as equidistribu- tion of volumes [5], shape improvement [6], or adaptive r-refinement [7]. These more complex tasks can usu- ally be posed as numerical optimization problems in which an objective function is defined measuring one or more mesh property. This objective function can then be optimized by repositioning the vertices, lead- ing to improvement in the mesh properties measured. When approaching the vertex repositioning problem from an optimization perspective, a natural idea is to formulate a single objective function measuring global mesh quality. This global objective function is typi- cally constructed by accumulating contributions from each local measure of quality into a scalar function of the positions of all free vertices in the mesh. 1 We consider two approaches for numerically optimizing the global objective function: an all-vertex approach where the positions of all free vertices are moved simul- taneously within a single iteration, and a single-vertex approach where the position of only one vertex is mod- ified at a time. We employ an inexact Newton method as our all-vertex optimization algorithm and a coor- dinate descent method as our single-vertex algorithm in which an exact Newton method is applied to solve each coordinate descent subproblem. The goal of this paper is to determine when one of these methods is preferable to the other, where preference can include the ease with which the method can be implemented and modified, the computational and memory require- ments for applying the method, and the accuracy and quality of the mesh produced, perhaps as a function of computation time. A complete answer should consider all these characteristics. 1 An important alternative to mesh optimization often used by the unstructured mesh community employs a series of local objective functions.

Upload: others

Post on 04-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

A COMPARISON OF TWO OPTIMIZATION METHODSFOR MESH QUALITY IMPROVEMENT

Lori Freitag Diachin1 Patrick Knupp2 Todd Munson3 Suzanne Shontz4

1Lawrence Livermore National Laboratory, Livermore, CA U.S.A. [email protected] National Laboratories, Albuquerque, NM U.S.A. [email protected]

3Argonne National Laboratory, Argonne, IL U.S.A. [email protected] of Minnesota, Minneapolis, MN U.S.A. [email protected]

ABSTRACT

We compare inexact Newton and coordinate descent optimization methods for improving the quality of a mesh byrepositioning the vertices, where the overall quality is measured by the harmonic mean of the mean-ratio metric. Thee!ects of problem size, element size heterogeneity, and various vertex displacement schemes on the performance ofthese algorithms are assessed for a series of tetrahedral meshes.

Keywords: mesh quality, mesh improvement, mesh smoothing

1. INTRODUCTION

Mesh vertex repositioning algorithms have been usedfor many years to improve solution accuracy and ef-ficiency; see, for example, [1, 2, 3, 4]. Repositioningtechniques vary widely in the time required to imple-ment and modify the algorithm and in the computa-tional cost and e!ectiveness when applying the algo-rithm, usually with a trade-o! between these criteria.Laplacian smoothing, for example, is easy to imple-ment and inexpensive to apply but can produce tan-gled meshes. Moreover, this method is limited to thecreation of smooth meshes, while vertex repositioningcan address other meshing needs such as equidistribu-tion of volumes [5], shape improvement [6], or adaptiver-refinement [7]. These more complex tasks can usu-ally be posed as numerical optimization problems inwhich an objective function is defined measuring oneor more mesh property. This objective function canthen be optimized by repositioning the vertices, lead-ing to improvement in the mesh properties measured.

When approaching the vertex repositioning problemfrom an optimization perspective, a natural idea is toformulate a single objective function measuring global

mesh quality. This global objective function is typi-cally constructed by accumulating contributions fromeach local measure of quality into a scalar function ofthe positions of all free vertices in the mesh.1 Weconsider two approaches for numerically optimizingthe global objective function: an all-vertex approachwhere the positions of all free vertices are moved simul-taneously within a single iteration, and a single-vertexapproach where the position of only one vertex is mod-ified at a time. We employ an inexact Newton methodas our all-vertex optimization algorithm and a coor-dinate descent method as our single-vertex algorithmin which an exact Newton method is applied to solveeach coordinate descent subproblem. The goal of thispaper is to determine when one of these methods ispreferable to the other, where preference can includethe ease with which the method can be implementedand modified, the computational and memory require-ments for applying the method, and the accuracy andquality of the mesh produced, perhaps as a function ofcomputation time. A complete answer should considerall these characteristics.

1An important alternative to mesh optimization oftenused by the unstructured mesh community employs a seriesof local objective functions.

Page 2: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

The preferred method may di!er depending on thecircumstances. For example, the coordinate descentmethod may be better suited to quickly finding an ap-proximate solution, while the inexact Newton methodmay be more suitable for calculating a highly accu-rate solution. Factors that may be significant in de-termining the preferred approach include the objec-tive function, quality metric, desired accuracy in theresulting mesh, mesh type (structured vs. unstruc-tured), dimension (planar vs. volume), element type(simplicial vs. nonsimplicial), problem size, mesh het-erogeneity and anisotropy, and the degree and man-ner in which the initial mesh di!ers from the optimalmesh. Algorithm implementations also have a signif-icant impact, since a simple implementation can bemuch slower than a more sophisticated version.

In this paper we report the results of an initial explo-ration of these factors to determine the circumstancesin which the inexact Newton method or the coordi-nate descent method may be preferred. To make thestudy manageable, we limit the number of free pa-rameters and consider a fixed mesh type, quality met-ric, and objective function template. In particular, weuse tetrahedral meshes, the mean-ratio quality met-ric for isotropic elements, and a template targetingaverage quality improvement. The free parameters in-vestigated are the problem size, element homogeneity,initial mesh configuration, and desired degree of accu-racy in the resulting mesh.

2. PROBLEM STATEMENT

2.1 Element and Mesh Quality

An unstructured mesh consists of a finite set of ver-tices V and elements E , where |V| denotes the numberof vertices and |E| the number of elements. The set ofvertices on the boundary of the mesh is denoted by VB,while the set of interior vertices, that is, those not onthe boundary, is denoted by VI . Let xv ! "d denotethe coordinates for vertex v ! V. For surface and vol-ume meshes d = 3, while for planar meshes d = 2 (inthis paper we only consider volume meshes). More-over, x ! "d×|V| refers to the collection of all vertexcoordinates. Each element e ! E consists of a smallsubset of the vertices and the edges between these ver-tices, where |e| is the number of vertices referenced byelement e, Ve refers to the vertices referenced by e,and xe ! "d×|e| the matrix of coordinates for e.

Associated with the mesh is a continuous functionq : "d×|e| # " measuring one or more geometricproperty of an element as a function of the vertex po-sitions.2 In particular, q(xe) measures the quality of

2For hybrid meshes, the exact definition of q can changedepending on the element type. However, we assume thatthe quality metric, shape, for example, is the same for every

element e, where we assume a larger value of q(xe) in-dicates a higher quality element. A specific functionq is referred to as an element quality metric. Manyfunctions can serve as quality metrics, so the qualityof an element is not uniquely defined. For example,there are di!erent metrics to measure the shape, size,and orientation of elements. In general, useful qualitymetrics possess other properties in addition to conti-nuity, but a discussion of this topic is beyond the scopeof the present study [8].

The overall quality of the mesh is measured by a func-tion Q : "|E| # " taking as input the vector of el-ement quality metrics,

∏e∈E q(xe), where

∏denotes

the Cartesian product. The mesh quality depends onboth the choice of the specific element quality met-ric q and the particular template function Q used tocombine them. Useful template functions can be con-structed from the arithmetic or other means.

2.2 The Mean-Ratio Metric

An important variable in this study is the choice ofquality metric. In general, we expect the study re-sults could vary significantly depending on whetheror not one were to chose shape metrics as opposedto size, smoothness, combined, or other metrics. Forthis initial solver comparison, we focus on the mean-ratio shape-quality metric. Other shape metrics suchas aspect ratio or condition number would likely givesimilar timing results; we plan to study these metricsand others not explicitly focused on shape in futurework.

Let Sd×d be a matrix with det(S) > 0. The mean ratioµ of S is the scalar

µ(S) =d det(S)2/d

$S$2F

,

where $S$F =√

tr(ST S) is the Frobenius norm. Onecan readily show that 0 < µ(S) % 1. To apply themean ratio to element quality, assume each vertex ofthe element is connected to d edges (and therefore dother vertices) belonging to the element.3 Let xi bethe coordinates of the ith vertex, and let xk be the co-ordinates of another vertex in the element connectedto vi by an edge. Construct the matrix A(i)

d×d whosecolumns are the vectors xk & xi for each adjacent ver-tex vk in the element. The columns are ordered topreserve element orientation so that the element haslocally nonpositive volume if det(A(i)) % 0 for any ver-tex; such elements are called “inverted.” Let Wd×d bea reference matrix for the ideal element shape (e.g.,

element.3This approach excludes elements such as pyramids but

includes triangles, tetrahedra, wedges, quadrilaterals, andhexahedra.

Page 3: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

an equilateral reference triangle is often used for tri-angular elements). This reference matrix is found byconstructing W from the ideal element in the sameway A is constructed for the mesh element. For eachelement vertex i let µi = µ(A(i)W−1) be the meanratio at the ith element vertex.

Finally, the mean ratios of the element vertices areaveraged to form an element quality metric symmetricin the element vertex indices.4 We use the arithmeticmean, although di!erent means could also be applied.The shape quality of element e is then

qe =1|e|

i∈Ve

µi.

As one would expect, this metric is scale, translation,and rotation invariant. Furthermore, 0 < qe % 1 withqe = 1 only when the element attains the ideal refer-ence shape. We do not define the mean ratio for ma-trices with nonpositive determinants. Therefore, theshape quality of “inverted” elements is not defined.For further details on shape metrics see [9].

2.3 Quality Improvement Problem

To improve the overall quality of the mesh we assemblethe local element qualities using an objective functiontemplate Q. We compute an x∗ ! "d×|V| such that x∗

is an optimal solution to

maxx

Q(

e∈E

q(xe)

)(1)

subject to the constraint that xVB = x̄VB , where x̄VBare the coordinates for the boundary vertices. Notethat additional constraints can be added if the loca-tions for some of the interior vertices also need to befixed. If the objective function for this optimizationproblem is uniformly concave as a function of xVI , thatis, the Hessian matrix, '2

xVI ,xVIQ(·), is uniformly

negative definite, then an x∗ solving this optimizationproblem exists and is unique. If the objective functionis not concave, then one can only hope to find a lo-cal maximizer for the optimization problem and mayinstead compute a critical point.

We use the harmonic mean template for all our nu-merical results. This template produces the objectivefunction

Qhm :=|E|∑

e∈E1

qe(xe)

.

This objective function is maximized precisely whenthe denominator is minimized. Therefore, the opti-mization problem we solve is

minx

Fhm(x) :=1|E|

e∈E

1qe(xe)

(2)

4We show in [6] that averaging is unnecessary in thecase of triangular or tetrahedral elements.

subject to the same boundary constraints as (1). Theobjective function in this case is continuous on the setof noninverted meshes and bounded below by 1 andminimizes the average inverse mean-ratio metric. Wefurther assume the initial set of coordinates is feasi-ble; that is, the corresponding mesh does not containinverted elements. We also require the improved meshto be noninverted, which translates to the implicit con-straint det(A(i)) > 0 for every element vertex. Thereis no need to implement these constraints explicitly,however, because the denominator in the inverse meanratio acts as a barrier to element inversion.

3. IMPROVEMENT ALGORITHMS

Many algorithms can be applied to compute a solu-tion to the quality improvement problem (2).5 In thispaper, we consider the block coordinate descent andinexact Newton methods [10, 11]. The block coordi-nate descent method optimizes the location of a singlevertex at a time by applying an optimization algorithmto a restricted problem in which only the coordinatesfor the given vertex are allowed to move. This opti-mization step is repeated for each of the other verticesin the mesh. This iterative repositioning stops whenthe norm of the gradient of the global objective func-tion is small. The inexact Newton method, on theother hand, constructs a quadratic approximation tothe global objective function at the current iterate andcomputes a solution to this quadratic program by solv-ing a large system of equations. A new iterate is thenfound for which the objective function has decreased.

The block coordinate descent algorithm solves a se-quence of small optimization problems to improve theglobal objective function but has a slow asymptoticconvergence rate, while the inexact Newton methodsolves a large quadratic optimization problem at everyiteration but has a fast asymptotic convergence rate. Ifthe global objective function in (2) is uniformly convexin the free variables, then both algorithms converge tothe same solution x∗ [10]. However, if the objectivefunction is not convex, as is often the case in meshoptimization, we can only say that if the block co-ordinate descent method converges to x∗, then x∗ isa critical point for the optimization problem (2) andx∗ may not be a local minimizer. Moreover, the opti-mization subproblems in the nonconvex case may haveeither no solution or many local minimizers.

However, for the inverse mean-ratio metric, eventhough the global objective function is not convex ev-erywhere, one can prove that the objective functionfor each subproblem of the block coordinate descent

5Recall that (2) minimizes the inverse mean-ratio ob-jective function, so the stated algorithms use minimizationterminology. However, the same algorithms can be used forthe maximization problem (1).

Page 4: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

method is strictly convex [12, 13] and the feasible re-gion is compact. Therefore, each of these subproblemshas a unique solution. Note that the inexact Newtonand block coordinate decent algorithms may not con-verge to the same critical point.

3.1 Block Coordinate Descent Method

The block coordinate descent method modifies a singlevertex at a time by applying one iteration of an exactNewton method to the subproblem obtained by fixingthe rest of the vertices at their current coordinates.That is, we computed a direction d where for vertexv ! VI , the vth component of d is obtained by solvingthe system of equations

'2v,vFhm(xk)dv = &'vFhm(xk).

The remaining components of d are set to zero. Notethat we need only the Hessian matrix with respect tovertex v, so the complete Hessian matrix for the globalobjective function does not need to be computed. Thedirection is obtained by computing the LDLT factor-ization of the d( d local Hessian matrix and applyingit to the right-hand side of the problem. An iterativemethod is not needed in this case because the systemof equations is very small. For the metric used, theHessian matrix is positive definite, so the factorizationcan always be computed.

Having obtained a search direction, we then use anArmijo linesearch [14] to obtain a new iterate with im-proved quality. In particular, we compute the smallestnonnegative integer m such that

Fhm(xk + !md) % Fhm(xk) + "!m'Fhm(xk)T d.

When searching along the direction, all points wherethe resulting mesh is degenerate or inverted are re-jected; the objective function value is treated as posi-tive infinity in these cases. To judge progress, we needconsider the quality of the elements only in which ver-tex v appears, since the quality of elements outsidethis set do not change when the location of vertex vis modified. Hence, the Armijo linesearch is computa-tionally inexpensive. To make both the Armijo line-search and Hessian matrix computations e"cient forthe block coordinate descent method, we precomputea mapping from each vertex to the elements referenc-ing the vertex.

We then update xk = xk +!md and choose a di!erentvertex to optimize. The order in which the verticesare traversed in each pass is determined by reversebreadth-first search starting from the vertex farthestfrom the origin.

An iteration of the block coordinate descent methodconsists of a single repositioning of each interior ver-tex. Once each of the interior vertices has been repo-sitioned, we proceed to the next iteration by setting

xk+1 = xk. The local improvement process is repeateduntil the gradient of the global objective function isless than some tolerance.

3.2 Inexact Newton Method

The inexact Newton method computes a direction dby solving the system of equations

'2xVI ,xVI

Fhm(xk)d = &'xVIFhm(xk)

by applying the conjugate gradient method with ablock Jacobi preconditioner [15], where xk is the cur-rent iterate. Having obtained a search direction, wethen use an Armijo linesearch [14] to obtain a newiterate with a su"ciently improved quality. This line-search is the same as the block coordinate descentlinesearch but must consider the improvement in theglobal objective function instead of the improvementto only the elements referenced by a single vertex.

The gradient and Hessian of the objective function arecalculated by assembling the gradients and Hessiansfor each of the element functions into a vector andsymmetric sparse matrix. Only the upper triangularpart of the Hessian matrix is stored in a block com-pressed sparse row format. Each block correspondsto a coordinate in the original problem. The gradientand Hessian elements corresponding to fixed verticeson the boundary of the domain are ignored.

The preconditioner consists of the Hessian with re-spect to the (i, i) coordinates, resulting in a block di-agonal preconditioner, where each block consists of ad ( d matrix. An LDLT factorization of each diag-onal matrix is performed when calculating the pre-conditioner. The preconditioner is applied by settingy = L−T (D−1(L−1x)). We store D−1 so that the mid-dle product consists of a few multiplications, insteadof a few divisions. Each diagonal block of the Hes-sian matrix is positive definite even though the overallHessian is indefinite in general [12, 13], so the precon-ditioner can always be computed.

3.3 Implementation Characteristics

Our implementations of the coordinate descentmethod and the inexact Newton method have beencoded with a bias toward achieving high performancewith minimal memory requirements. Both codes useanalytic gradient and Hessian evaluations, since finitedi!erence approximations for the inverse mean-ratiometric are ine"cient by comparison.

Instead of computing with W−1 in the mean ratiometric, we precompute a QR factorization of W inwhich QR = W , where Q is an orthogonal matrixwith determinant equal to one, R is an upper triangu-lar matrix, and W−1 = R−1QT . The QT matrix can

Page 5: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

then be ignored in the mean-ratio metric when usingthis form of W−1 due to properties of the Frobeniusnorm and determinant. Hence, µ(A(i)W−1) is equiva-lent to µ(A(i)R−1). The latter definition is computa-tionally advantageous, because the function, gradient,and Hessian matrices take fewer operations to computethan if W−1 were stored as a general dense matrix byexploiting the fact that R−1 is an upper triangularmatrix.

To further minimize the number of floating-point oper-ations performed per iteration, the coordinate descentalgorithm has separate evaluation routines for takingthe gradient and Hessian with respect to each vertexin the inverse mean-ratio metric. Each routine is ob-tained by applying an even permutation to the inputdata (coordinates for both the trial and reference ele-ments), computing the QR factorization for each of thepermuted reference elements, and then taking the gra-dient and Hessian with respect to the desired vertex ofthis equivalent function definition. All of these opera-tions are performed o#ine for the given weight matrix,and the resulting code is further refined to reduce op-eration counts. In particular, for the equilateral weightmatrix, R−1 is the same for each of the permuted ref-erence elements. For a di!erent weight matrix, how-ever, four di!erent versions of the weight matrix maybe required. The savings attributed to this approachare significant compared to a simple implementationusing a single Hessian evaluation routine for the en-tire element; for equilateral tetrahedral elements, thecost per iteration of the simple implementation is overthree times that of the e"cient implementation.

One of the main computational tasks associated withthe inexact Newton method is obtaining an e"cientevaluation for the Hessian of the global objective func-tion. This computation requires obtaining the Hes-sian for each of the individual element functions. Thecode for calculating the gradient of the element func-tion uses the reverse mode of di!erentiation [16] onthe element quality metric. The Hessian calculationuses the forward mode of di!erentiation on the gra-dient evaluation and matrix-matrix products for ef-ficiency. The other significant computational task isthe matrix-vector products required by the conjugategradient method to compute the search direction.

To obtain good locality of reference in the Hessianevaluation and matrix-vector products, the verticesand elements in the initial mesh are reordered by ap-plying a breadth-first search. The ordering starts byselecting the (boundary) vertex farthest from the ori-gin. A breadth-first search of the vertices in the meshis then performed, and the order they are visited istracked. We then reverse the order in which the ver-tices were visited to obtain the reordering for the prob-lem. Once the vertices are reordered, the elements

are then reordered according to when they are visitedby the Hessian evaluation. This reordering is usedby both the coordinate descent and inexact Newtonmethods.

Each iteration of the coordinate descent method con-sists of computing the gradient and Hessian for eachsubproblem, obtaining the direction, and computingeach improving point. The gradient and Hessian eval-uation is the most expensive operation and requires atotal of 508 floating-point operations per element inthe tetrahedral mesh. Each iteration of the inexactNewton method consists of computing the gradientand Hessian evaluation of the global objective func-tion, obtaining the direction by the conjugate gradi-ent method, and computing the improving point. Thegradient and Hessian evaluation in this case requires689 floating-point operations per element in the mesh.Just looking at the cost of obtaining the gradient andHessian information, we can see that the coordinatedescent method should be faster per iteration than theinexact Newton method.

In addition to the computational e!ort, we are alsointerested in evaluating the memory footprint of eachmethod as the problem size increases. Our imple-mentation of the coordinate descent method for tetra-hedral elements has a steady-state memory require-ment of approximately 23|V| + 12|E| integer values.The formula for memory usage of the inexact New-ton method is more complicated due to the storagerequirements for the Hessian matrix and is given by64|V| + 18|E| + 19N integer values, where N denotesthe number of o!-diagonal blocks in the Hessian ma-trix. On the tetrahedral meshes tested, the number ofo!-diagonal blocks is bounded above by the number ofelements in the mesh. Therefore, the memory usage isapproximately 64|V| + 37|E| integer values for the in-exact Newton method, about three times the storagerequired for the coordinate descent method.

Conclusion 1: The coordinate descent method isfaster per iteration and consumes less memory thanthe inexact Newton method but has a slow asymptoticconvergence rate. Furthermore, the inexact Newtonmethod requires a higher initial investment in codingroutines to assemble the global Hessian matrix fromthe element Hessian matrices, construct the precondi-tioner, and perform the preconditioned conjugate gra-dient method to compute the direction. Once this in-frastructure has been built, however, changing to anew metric requires only an e"cient computation ofthe element Hessian matrix. To change the metricfor the coordinate descent method, we need to imple-ment four di!erent gradient and Hessian evaluationroutines. Moreover, if the new metric is not rotation-ally invariant, then the rotation operations used withthe inverse mean-ratio metric cannot be performed,

Page 6: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

Z

Y

X

Figure 1: Sample meshes on the duct and clipped cubegeometries.

and a di!erent technique must be devised to obtainan e"cient coordinate descent method.

4. NUMERICAL EXPERIMENTS

In this section, we report the results of numerical testsdesigned to determine when the block coordinate de-scent and inexact Newton techniques are preferred us-ing a subset of the criteria given in Section 1. Wesolve the optimization problem (2) on a series of tetra-hedral meshes generated with the CUBIT [17] andGRUMMP [18] mesh generation packages. We con-sider two di!erent computational domains, duct andclipped cube, and show sample meshes on these ge-ometries in Figure 1. In this paper, we study the ef-fects of three di!erent problem parameters on the timetaken to reach x∗: problem size, element heterogene-ity, and initial mesh configuration. For each parameterstudied, we create a suite of test meshes in which weisolate the parameter of interest, allowing it to vary,while simultaneously holding the other parameters asconstant as possible.

In each of the following subsections, we give the prob-lem characteristics of the test suite in terms of thenumber of vertices and elements, initial mesh qual-ity as evaluated by the inverse mean-ratio metric, andspecific parameter values used such as the perturba-tion of the initial mesh. We then provide the resultsfor both the inexact Newton and coordinate descentmesh quality improvement techniques. For the inex-act Newton method, the maximum number of solveriterations is 500, and the maximum number of CGsubiterations is 100, while for the coordinate descentmethod, the maximum number of iterations, that is,passes through the free vertices, is 1000. In both cases,the solution is considered to be optimal when the normof the gradient of the global objective function is lessthan 1.0 ( 10−6.

4.1 Increasing Problem Size

To test the e!ect of increasing the problem size, weuse CUBIT to generate tetrahedral meshes with uni-form quality and element size but with an increasingnumber of vertices for the duct geometry shown inFigure 1. In Table 1, we give the number of verticesand elements, along with the average, median, andstandard deviation normalized by the average value,denoted "n, for the inverse mean-ratio metric and ele-ment volume. One can see that within each mesh, weachieve roughly uniform element size and shape qual-ity distributions while increasing the problem size from4,104 elements to 965,759 elements. In addition, theelement quality characteristics are similar across thissuite of initial meshes as the problem size increases.In particular, the initial mesh quality is quite good,with an average inverse mean-ratio value of 1.2 (theoptimal is 1) and a maximum value ranging from 2.2to 5.

In Table 2, we give the number of iterations, I, andtime, T100, required to achieve the optimal solution.In all cases, both I and T100 are significantly smallerfor the inexact Newton solver because of its superiorasymptotic convergence rate. As the problem sizeincreases, the disparity in time to solution increasesmonotonically from a factor of 6.4 to a factor of 40.

However, a highly accurate solution is often not re-quired in mesh smoothing applications. Therefore, thetime required to reach a partially improved mesh isalso of interest. As a particular example, we includethe time required to achieve 50% of the optimal solu-tion as defined by the global objective function value,T50, in Table 2. For every mesh in this test suite,the coordinate descent method takes less time thanthe inexact Newton method to reach this suboptimalsolution, typically by a factor of 1.5.

To examine this behavior more closely, we recordedthe objective function and gradient values at each it-eration. A typical time history is shown for the Duct15mesh in Figure 2. Because the inexact Newton methodconverges to the optimal solution much more quicklythan the coordinate descent method, we show the com-plete time history of the inexact Newton solver andonly the corresponding portion of the coordinate de-scent method. Because the initial mesh quality is verygood, both methods make significant progress towardthe optimal solution in their first few iterations. How-ever, significant setup overhead is associated with com-puting the sparsity pattern of the Hessian matrix forthe inexact Newton method because the edges in themesh need to be sorted. During this setup time, thecoordinate descent method is able to complete one it-eration through the mesh, which is su"cient to achieve46% of optimality. Clearly, there is a point in time atwhich the inexact Newton solution is closer to opti-

Page 7: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

Table 1: Initial mesh characteristics for increasing problem size on the duct geometry.Inverse Mean Ratio Element Volume

Mesh |V| |E| avg median "n max avg median "n

Duct20 1067 4104 1.208 1.176 .115 2.2 1167 1176 .285Duct15 2139 9000 1.210 1.179 .116 2.1 532 519 .304Duct12 4199 19222 1.209 1.182 .111 2.1 249 237 .327Duct10 7297 35045 1.120 1.170 .106 2.2 136 128 .310Duct8 13193 65574 1.19 1.162 .105 2.4 73 68 .320

DuctBig 177887 965759 1.18 1.160 .109 4.9 4.1 2.91 .587

Table 2: Number of iterations, total time, and time toachieve a 50% optimal solution as problem size increases.

Newton Coordinate Descent|V| I T100 T50 I T100 T50

1067 4 .05 .015 33 .32 .0052139 5 .13 .025 46 1.1 .0114199 5 .34 .056 74 4.2 .0377297 5 .69 .106 105 11.6 .08113193 5 1.4 .213 146 31.0 .152177887 8 44.3 4.52 548 1738 2.47

mal than the coordinate descent solution. We call thispoint the crossover point, and it is highlighted with anasterisk in Figure 2. In the Duct15 case, the mesh is96% optimized when the crossover point occurs.

Based on these results, it is natural to ask the ques-tions: “What is the percent improvement achieved atthe crossover point?” and “What is the time requiredby each method to achieve a certain level of optimal-ity?” as the problem size increases. To answer thesequestions, for each method we plot the percent im-provement obtained, the number of coordinate descentiterations, and the percentage of time spent in setupby each solver at the crossover point as a function ofan increasing problem size in the top graph in Fig-ure 3. In all cases, the mesh is nearly optimal at thecrossover point even though the number of coordinatedescent iterations completed is quite small, typicallyless than five. As the problem size increases, the setuptime for the inexact Newton solver is greater than 25%of the time to reach the crossover point and typicallyless than 10% for the coordinate descent method. Inthis case, the setup time is the primary factor in de-termining which solver reaches suboptimal solutionsfaster.

In the bottom graph in Figure 3, we show the ratioof the time required by the inexact Newton solver andcoordinate descent solver to achieve certain levels ofimprovement. Each line in the graph represents a dif-ferent problem size, and the flat line at 1 represents thepoint at which the preferred method changes. Data

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

0.17

0.18

0.19

0.2

0.21

time (s)

Obj

ectiv

e fu

nctio

n

Objective function vs. time

Newton Setup Complete at t = 0.01 s(CD Solution is 45.9434% improved)

Crossover at t = 0.039546 s(Both solutions are 96.1981% improved)

NewtonCD

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

10−5

100

time (s)

Gra

dien

t

Gradient vs. time

NewtonCD

Figure 2: Objective function value and gradient norm asa function of time for the Duct15 mesh.

above this line indicates that the coordinate descentmethod is faster; data below indicates the opposite.In this case, we see that the smaller problem sizes aremore a!ected by the setup time di!erences, but as theproblem size exceeds 20,000 elements, the methods be-have similarly. In particular, it takes roughly twice aslong to compute suboptimal meshes using the inexactNewton approach for a wide range of desired improve-ment percentages. As the improvement percentageincreases, the inexact Newton method becomes morecompetitive, but only when nearly optimal meshes aredesired does the inexact Newton method outperformthe coordinate descent method.

Conclusion 2: For good-quality, uniformly sizedtetrahedral meshes, the inexact Newton method out-performs the coordinate descent method if an optimalmesh is desired. If a partially improved mesh is suf-ficient, the coordinate descent method typically out-performs the inexact Newton method because of thehigh setup costs associated with computing the spar-sity pattern of the Hessian matrix, which cannot thenbe amortized over a large number of iterations becausewe start from a nearly optimal solution. This conclu-sion is true for a wide range of problem sizes, includingthe largest.

Page 8: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

0 2 4 6 8 10 12 14 16 18x 104

0

10

20

30

40

50

60

70

80

90

100

Number of nodes

Vario

us q

uant

ities

at c

ross

over

poi

nt

Various quantities at crossover point vs. number of nodes

% ImprovementCD iters% Time Newton spent on setup% Time CD spent on setup

0 10 20 30 40 50 60 70 80 90 1000

2

4

6

8

10

12

% Improvement

Newt

on ti

me/

CD ti

me

Newton time/CD time vs. % Improvement

1067 nodes2139 nodes4199 nodes7297 nodes13193 nodes177887 nodes

Figure 3: Various quantities of interest at the crossoverpoint as the problem size increases (top) and the ratio ofthe times required by the inexact Newton and coordinatedescent solvers to achieve certain levels of improvement(bottom).

We emphasize that the conclusion in this section hasbeen demonstrated only for the mean-ratio metric andharmonic mean template function on initial mesheswith (nearly) uniformly sized, well-shaped tetrahedralelements. Whether it extends to other situations re-mains to be seen. In the remainder of this section,we examine the behavior of the solvers under di!erentconditions.

4.2 Element Size Heterogeneity

Our second test suite was generated using GRUMMPwith the aim of testing the e!ect of element size (vol-ume) heterogeneity on the two solvers. A simple geom-etry consisting of the unit cube with a small tetrahe-dral volume clipped from one corner was used to creategraded meshes with grid points clustered around thatcorner. GRUMMP parameters that determined thesmallest element size and gradation of the mesh weremanipulated to create a series of meshes with roughlythe same number of vertices and element quality distri-bution but with di!erent ranges of element sizes. We

note that in generating the initial meshes for these testcases, we did not take advantage of GRUMMP’s meshquality improvement tools.

In Table 3, we give the statistics for these meshes interms of numbers of vertices, elements, shape qual-ity distribution, and element volume. The numbersof vertices, although not identical, are all within 6%of 10,470. The normalized standard deviation of theelement volumes and the ratio of the maximum-sizedelement to the minimum-sized element show that theelement size varies dramatically within a given mesh.The shape quality distributions across the meshes inthe test suite are similar; the average shape qualityis nearly the same as in the uniform element size testcases, but the normalized standard deviation is higher,indicating a wider range of individual element quali-ties. In particular, the maximum mean ratio of theheterogeneous element size meshes exceeds a value of15 in all cases, whereas it is approximately 2.5 in theuniform element size test suite.

In Table 4, we give the number of iterations and thetimes to reach the optimal and 50% improved solutionsas the element heterogeneity, measured by the ratio ofmaximum element volume to minimum element vol-ume, increases. As with the uniform element distri-bution test suite, the inexact Newton method is sig-nificantly faster than the coordinate descent methodwhen the optimal solution is desired. If a 50% im-proved solution is desired, however, the coordinate de-scent method outperforms the inexact Newton methodby a factor that ranges from 1.5 to 4, compared to thefactor of 1.5 for the uniform distribution case of theprevious subsection.

We examine the convergence history of one particularcase, Hetero4, to obtain insight into this result. Fig-ure 4 shows the value of the objective function andgradient as a function of time for both the inexactNewton and coordinate descent methods. The coordi-nate descent method maintains a steep initial decreasein the objective function value, while the inexact New-ton method has more di"culty. In particular, manyof the initial iterations of the inexact Newton methodencounter directions of negative curvature because theglobal objective function is not convex at those iter-ates. Typically, a small step is taken when such di-rections are found by the conjugate gradient method.Thus, the superior asymptotic convergence rates of theinexact Newton method are not evident until approx-imately two seconds have elapsed.

Because the inexact Newton method has di"cultywith these problems in the initial iterations, the co-ordinate descent method has the time to take severaliterations, and the mesh in nearly 100% improved atthe crossover point in all cases. As before, the inex-act Newton method uses twice as much time in setup

Page 9: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

Table 3: Initial mesh characteristics for heterogeneous element size distributions.

Inverse Mean Ratio Element VolumeMesh |V| |E| avg median "n max avg median "n max/min

Hetero1 10318 54132 1.271 1.171 .330 17.1 1.84·10−5 1.10·10−5 1.11 5.5·103

Hetero2 9883 56184 1.274 1.172 .371 30.2 1.77·10−5 6.04·10−6 1.46 2.3·105

Hetero3 10926 58610 1.275 1.173 .413 58.6 1.70·10−5 3.89·10−7 1.74 7.2·107

Hetero4 11057 59985 1.272 1.173 .322 16.1 1.66·10−5 1.59·10−6 2.08 4.2·106

Table 4: Number of iterations, total time, and time toachieve 50% optimal solution as the element heterogene-ity increases.

Newton Coordinate DescentMesh I T100 T50 I T100 T50

Hetero1 16 4.24 .386 674 122 .128Hetero2 13 3.53 .345 708 132 .192Hetero3 21 5.41 .432 505 93 .207Hetero4 15 4.22 .641 554 109 .168

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

0.22

0.23

0.24

0.25

0.26

0.27

time (s)

Obj

ectiv

e fu

nctio

n

Objective function vs. time

Newton Setup Complete at t = 0.07 s(CD Solution is 14.4992% improved)

Crossover at t = 2.343 s(Both solutions are 99.8963% improved)

NewtonCD

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

10−5

100

105

time (s)

Gra

dien

t

Gradient vs. time

NewtonCD

Figure 4: Objective function value and gradient norm asa function of time for the Hetero4 mesh.

as does the coordinate descent method. Unlike theuniform element size test suite, however, this is notthe dominant factor in determining the crossover timebecause both methods use less than 5% of their totaltime in setup.

For this test suite, in Figure 5 we show the ratio ofthe time required by the inexact Newton method andthe time required by the coordinate descent methodto reach a number of di!erent levels of improvement.For comparison, we also show the curves for the twouniform element size test cases, Duct10 and Duct8,which tightly bracket the number of elements in theclipped cube meshes. The normalized standard devia-tion values for the Duct 10 and Duct8 meshes are .310and .320, respectively. In almost all cases, the coordi-

0 10 20 30 40 50 60 70 80 90 1000

1

2

3

4

5

6

7

% ImprovementNe

wton

tim

e/CD

tim

e

Newton time/CD time vs. % Improvement

duct10: norm vol dev = .310duct8: norm vol dev = .320hetero1: norm vol dev = 1.11hetero2: norm vol dev = 1.46hetero4: norm vol dev = 1.74hetero3: norm vol dev = 2.08

Figure 5: Ratio of the inexact Newton and coordinatedescent times for various levels of improvement in theobjective function.

nate descent method is two to three times faster thanthe inexact Newton method to reach a desired level ofimprovement. In fact, in several cases, the ratio of thetimes required to achieve higher levels of improvementactually increases rather than decreases as a result ofthe steep initial convergence of the coordinate descentmethod. Furthermore, the coordinate descent methodis more competitive than the inexact Newton methodon the heterogeneous element size meshes than on theuniformly sized element problems.

Conclusion 3: As element size heterogeneity in-creases and mesh quality decreases for tetrahedralmeshes, the coordinate descent method is increasinglyattractive for suboptimal solutions. If the optimal so-lution is desired, the inexact Newton method is pre-ferred.

4.3 Initial Mesh Configuration

The final mesh test suite was designed to investigatethe e!ect of the degree and manner in which the initialmesh di!ers from the optimal mesh. To address thisissue, our approach was to apply systematic or randomperturbations of the optimal positions of the interiormesh vertices. We started with the optimized DuctBigmesh and applied three di!erent perturbation schemes

Page 10: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

that involved random, translational, and oscillatorymovement of the mesh vertices. In all three cases, weconsider perturbations applied to all of the verticesand to randomly chosen vertex subsets that contained1%, 10%, and 25% of the total number of vertices. Theformulas for the perturbations are as follows:

Random: xv = xv + ar, where r is a three-vector con-taining random numbers generated using the functionrand and a is a multiplicative factor controlling thedegree of perturbation. For this test suite, we chosea= .001, .005, .01, and .05.

Translational: xv = xv + as, where s is a directionvector giving the coordinates to be shifted and a isagain a multiplicative factor controlling the degree ofperturbation. In this case we considered a “right” shift(R) with s1 = [1 0 0]T and a “northeast” shift (NE)with s2 = [1 1 0]T and chose a = .1, .2, and .3. Inthe case of the NE shift, we also considered a series ofmeshes with large values of 2√

2a = 1, 2.5, 5, 7.5, 10,

12.5, and 15 which resulted in very large perturbationsof the initial mesh.

Oscillatory: xv = xv + bsin(axv), where the scalarsa and b control the frequency and amplitude of theperturbation, respectively. For this test suite, we con-sidered two di!erent amplitudes, b =.01 and .05, and,for each amplitude, three di!erent frequencies a = .01,.05, and .1. The wavelength of the perturbation canbe computed from the frequency by w = 2#/a, and wenote that for this test suite w ranges from 63 to 628,which exceeds the average edge length of the mesh ofapproximately 3.6.

We considered two series of tests. In the first, we per-turbed all or some of the vertices by a small amountto determine the e!ect of the type of perturbation onthe mesh. In the second test suite, we perturbed all ofthe vertices a large amount to change the scale of theperturbation.

4.3.1 Small perturbations

All vertices perturbed. For this test suite, weperturbed all of the vertices a small amount (the valuesof a given above that are less than .5). The resultingquality characteristics of the meshes as the perturba-tions increase do not vary significantly, and we do notinclude the details. In particular, the average inversemean ratio value is approximately 1.13, the ratio ofthe standard deviation to the average is approximately.093, and the maximum inverse mean ratio is approx-imately 2.21 in all cases.

In Table 5, we give the iterations and time to reachthe 100% and 50% improved solutions for the cases inwhich we perturb all of the vertices in the mesh ac-cording to the formulas and parameters given above.

Table 5: Number of iterations and total time to achieve100% and 50% of the optimal solution as the elementheterogeneity increases.

Newton Coordinate DescentPert. a I T100 T50 I T100 T50

.001 3 11.8 7.46 325 104 3.90Rand .005 4 23.6 7.53 387 324 3.84

.01 4 23.3 7.53 414 427 3.89

.05 4 22.6 7.42 476 664 3.84Trans .1 5 30.6 8.31 502 789 4.72(R) .2 7 36.7 8.35 528 904 4.79

.3 10 47.2 7.42 545 956 8.24Trans .1 5 31.1 8.32 496 800 4.64(NE) .2 7 38.1 8.66 522 905 4.66

.3 11 59.4 13.5 539 962 7.99Osc. .01 4 25.4 8.29 415 425 4.75

(b=.01) .05 4 24.1 7.95 374 353 4.77.1 4 22.7 7.56 279 244 5.59

Osc. .01 4 24.7 8.32 477 655 4.76(b=.05) .05 5 22.4 8.02 435 550 4.74

.1 4 21.2 7.50 338 368 5.63

As with the other test suites, if a highly accurate solu-tion to the optimization problem is sought, the inexactNewton method outperforms the coordinate descentmethod in every case. If the 50% improved solutionis sought, the coordinate descent method outperformsthe inexact Newton method for all the test cases.

In Figure 6, we examine the ratio of the time requiredby the inexact Newton method and the coordinate de-scent method as the desired degree of optimality in-creases. In all cases considered, as a more improvedsolution is sought, the inexact Newton method looksincreasingly attractive. For the random test suite,however (top left), the coordinate descent method al-ways outperforms it up to 90% improvement. For thetranslational and oscillatory test suites (top middleand top right), the performance of the coordinate de-scent method is not as good. In these cases, the lo-cal nature of the coordinate descent method can onlyslowly eliminate the long wavelength errors introducedby the perturbation scheme. In contrast, the inex-act Newton method has access to global informationand is able to overcome this di"culty. Thus the co-ordinate descent method still outperforms the inexactNewton method for approximate solutions, but at bestthe mesh is only 75% optimal at the crossover point.This degrades to approximately 63% for the oscillatorycase as the degree of perturbation increases. The setuptime is again a contributing factor in determining thecrossover point and requires about 30% of the inexactNewton solution time compared to approximately 10%for coordinate descent.

Page 11: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

New

ton

time/

CD

tim

e

Newton time/CD time vs. % Improvement

rand 0rand 0.001rand 0.005rand 0.01rand 0.05

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

New

ton

time/

CD

tim

e

Newton time/CD time vs. % Improvement

NE 0NE 0.1NE 0.2NE 0.3

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

Newt

on tim

e/CD

time

Newton time/CD time vs. % Improvement

osc optosc 01 01 osc 01 05osc 01 1

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

Newt

on tim

e/CD

time

Newton time/CD time vs. % Improvement

osc optosc 05 01osc 05 05osc 05 1

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

Newt

on tim

e/CD

time

Newton time/CD time vs. % Improvement

rand optrand 0.001 1779rand 0.001 17789rand 0.001 44472

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

Newt

on tim

e/CD

time

Newton time/CD time vs. % Improvement

rand optrand 0.05 1779rand 0.05 17789rand 0.05 44472

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

Newt

on tim

e/CD

time

Newton time/CD time vs. % Improvement

optNE 0.2 1779NE 0.2 17789NE 0.2 44472

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

Newt

on tim

e/CD

time

Newton time/CD time vs. % Improvement

optNE 0.3 1779NE 0.3 17789NE 0.3 44472

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

Newt

on tim

e/CD

time

Newton time/CD time vs. % Improvement

osc optosc [0.01 0.01] 1779osc [0.01 0.01] 17789osc [0.01 0.01] 44472

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

% Improvement

Newt

on tim

e/CD

time

Newton time/CD time vs. % Improvement

osc optosc [0.01 0.1] 1779osc [0.01 0.1] 17789osc [0.01 0.1] 44472

Figure 6: Ratio of the times required by the inexact Newton and coordinate descent solvers to achieve certain levels ofimprovement for the random (top left), NE translational (top middle), and oscillatory (top right) perturbations and for thecases where a subset of vertices are perturbed randomly (bottom left), NE translational (bottom middle), and oscillatory(bottom right).

Page 12: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

Table 6: Initial mesh characteristics for increasing NEshift perturbation of the duct geometry.

Inverse Mean Ratio Element Volume2√2a avg "n max max "n

Opt. 1.180 .109 3.00 42.2 .5871 1.155 .179 2.72 30.2 .546

2.5 1.423 2.25 283 30.2 .5935 2.062 8.95 1.59 · 104 50.1 .755

7.5 2.550 58.1 1.43 · 105 52.7 .84110 2.508 13.0 2.02 · 104 57.8 .865

12.5 2.636 69.9 1.80 · 105 65.5 .86915 2.468 7.75 9.47 · 103 59.8 .869

Some vertices perturbed. To determine whetherthe number of vertices that we perturb a!ects the rel-ative performance of the two solvers, we give the ratioof the inexact Newton method and coordinate descentmethod times to achieve various levels of improvement(see the bottom row of Figure 6) when a subset ofthe vertices is perturbed. The percentage of verticesthat were randomly selected to be perturbed is 1%,10%, and 25% or 1779, 17789, and 44472 vertices, re-spectively. We show results for only a subset of thecases analyzed; the results for the cases not shown arequalitatively the same. In all cases, the inexact New-ton method is unable to outperform the coordinatedescent method when a suboptimal solution (90% im-proved or less) is sought. This result is particularlyinteresting for the oscillatory and translational per-turbations (bottom middle and right, respectively). Inthese cases, because only a subset of the vertices wereperturbed, the long wavelength errors that a!ected theperformance of the coordinate descent method are nolonger evident, and the coordinate descent method isagain able to quickly approach the optimal solution.

Conclusion 4: For small random and translationalperturbations of uniform tetrahedral meshes, the coor-dinate descent method outperforms the inexact New-ton method if suboptimal solutions to improve shapeare sought. Large wavelength errors, such as thoseintroduced by the oscillatory perturbations of all thevertices, present di"culties for the coordinate descentmethod. As the perturbations increase in size, theybecome increasingly di"cult for each method to solve.

4.3.2 Large perturbations

For this test suite, we considered large perturbationsof the NE translational type. In Table 6, we give theinitial mesh quality characteristics for the DuctBigmeshes with translational perturbations correspond-ing to 2√

2a = 1, 2.5, 5, 7.5, 10, 12.5, and 15. For com-

parison, we note that the average edge length in the

mesh is 3.6. The value of a corresponds to the max-imum amount a node was moved in the mesh. Somenodes may move a smaller distance, determined by aniterative backtracking procedure, to prevent invertedelements in the initial mesh. As a increases, the qual-ity of the initial mesh clearly decreases although thatdegradation is not monotonic. The average mean ratiometric value goes from an average value of 1.18 to over2.63 with the worst quality element exceeding a meanratio metric value of 1.80 · 105. Element volumes varysimilarly.

Because the objective function used for these problemsis not convex, it is likely that di!erent local solutionsto the optimization problem exist. It is therefore pos-sible that the solutions for these large perturbationcases would not be the same for the coordinate de-scent and inexact Newton methods or the same as theoptimal mesh that we started with. The di!erences insolution time in Table 7 could thus be accounted for bythe fact that di!erent solutions are being obtained byeach solver. To study this, we computed the di!erencebetween corresponding vertex locations and if the dif-ference was less than 1 percent of the average elementedge length (in this case 0.036), we considered themto be in the same location. In all cases, the maximumdi!erence between the inexact Newton and coordinatedescent method solutions was approximately 6.27·10−7

indicating that they were converging to the same solu-tion. The maximum di!erence between the computedsolution and the initial optimal mesh was .0076 in allcases, which is well within our tolerance. Thus thelocal and global methods are finding the same opti-mal solution that was found in the unperturbed case,even when the perturbation is large. Because the samesolution is found in both the coordinate descent andinexact Newton methods, we conclude that the di!er-ences in solution times is mainly due to di!erences inthe algorithms and not due to lack of convexity.

The solution time required for each method was con-siderably more than what was needed for smaller per-turbations. In general, as the perturbation distance in-creased and the mesh quality degraded, the total timeto solution increased. It is interesting to note thatas the perturbation increased, the time and numberof iterations required by the inexact Newton methodto find an optimal solution also increased, but re-mained approximately constant for the coordinate de-scent method. Even so, the Newton method outper-formed the coordinate descent method for 100% im-proved solutions by a factor of 11 (for 2√

2a = 1) to 2.5

(for 2√2a = 15). In most cases, coordinate descent was

30% to 80% faster for approximate solutions that werefifty percent improved, but in the case of 2√

2a = 2.5

the inexact Newton method was faster for both thehighly improved solution and the approximate solu-tion.

Page 13: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

Table 7: Number of iterations and total time to achieve100% and 50% of the optimal solution as the perturba-tion increases.

Newton Coordinate Descent2√2a I T100 T50 I T100 T50

1 19 100 26.4 575 1106 19.32.5 61 355 28.4 616 1266 35.05 68 388 42.2 632 1313 36.5

7.5 83 452 52.7 635 1329 34.110 89 503 45.7 635 1347 30.2

12.5 115 644 59.4 635 1339 34.015 94 525 48.2 633 1328 26.8

The top image in Figure 7 shows the ratio of times re-quired by the inexact Newton method and coordinatedescent method to achieve certain levels of improve-ment. (Note that the numbers in the key correspondto the maximal actual perturbation scaled by the av-erage element length.) These results are considerablymore interesting than the corresponding plots for in-creasing problem size and element size heterogeneityshown in Figures 3 and 5. In particular, in a number ofcases there appear to be several crossover points andif a very approximate solution is sought (less than 40percent improved), the inexact Newton method is pre-ferred to the coordinate descent method. Interestinglyas the desired level of improvement increases between30-40% and 90%, the coordinate descent method ispreferred. This behavior is very unlike what was seenin the earlier test cases. To help explain this moreclearly, we include the time history of the objectivefunction value and gradient norm for the perturba-tion 2√

2a = 1 in the bottom two images of Figure

7. The coordinate descent method is unable to makeearly progress toward the optimal solution because itdoes not have access to global information. The in-exact Newton method is able to overtake it althoughits progress is sporadic. After approximately 20 iter-ations the coordinate descent method begins to makerapid progress and significantly improves the mesh in afew iterations, overtaking the inexact Newton method.As the mesh gets closer to the optimal solution, thequadratic convergence rates of the Newton method al-low it to reach the optimal solution more quickly thanthe coordinate descent method.

Conclusion 5: Large perturbations from the optimalmesh result is a significantly more challenging problemfor each of our optimization techniques. In generalthe time to solution was significantly larger than wasneeded for the other test cases considered in this paper.Furthermore, several test cases highlighted examplesfor which the inexact Newton method is preferred forsuboptimal solutions. If the optimal mesh is desired,the inexact Newton method is always preferred.

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

% Improvement

Newt

on ti

me/

CD ti

me

Newton time/CD time vs. % Improvement

NE 0NE 0.2801NE 0.7003NE 1.4006NE 2.1008NE 2.8011NE 3.5014NE 4.2017

0 20 40 60 80 100 120

0.135

0.14

0.145

0.15

0.155

time (s)

Obj

ectiv

e fu

nctio

n

Objective function vs. time

Newton Setup Complete at t = 3.2 s

(CD Solution is 0.35148% improved)

Crossover at t = 4.2482 s

(Both solutions are 0.55847% improved)

NewtonCD

0 20 40 60 80 100 120

10−6

10−4

10−2

100

102

104

time (s)

Gra

dien

t

Gradient vs. time

NewtonCD

Figure 7: The ratio of the times required by the inexactNewton and coordinate descent solvers to achieve certainlevels of improvement as the perturbation size increases.

5. FUTURE WORK

The numerical results show that the block coordinatedescent method is best for making fast improvementsin the shape quality of tetrahedral meshes. The in-exact Newton method is best when a very accuratesolution to the optimization problem is necessary. Wenote that a 50% optimization level may be somewhatmisleading in that it does not indicate the degree ofthe accuracy in the solution. For most of the ductmeshes, the iterate at a 50% optimization level hasfour or five digits of accuracy in the objective functionvalue. If the initial quality of the mesh is very poor,however, then the iterate at a 50% optimization levelmay not have any digits of accuracy in the objectivefunction value. This issue will be explored more fully

Page 14: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

in future work.

This study was limited to ideal shape improvement oftetrahedral meshes; triangular, quadrilateral, and hex-ahedral meshes were not included in the study. Pre-liminary experience with planar quadrilateral meshesshows that the crossover point for our two codes gen-erally occurs earlier, but further study is warranted.In particular, the e"ciency of the coordinate descentmethod is related to the structure of the reference el-ement. Some of the e"ciency in our implementationfor equilateral elements will likely be lost when usinga di!erent reference element. The storage requiredwhen applying a fast coordinate descent method toan anisotropic mesh in which the reference elementis di!erent for each element in the mesh can also besignificant.

Furthermore, because the global objective functionis not convex, a trust-region method for the inexactNewton code may perform better since it can han-dle directions of negative curvature more rigorously.A limited-memory quasi-Newton method may also bebetter than the coordinate descent method at obtain-ing an approximate solution in a small amount oftime. E"cient implementations of these methods canbe based on the infrastructure developed for the inex-act Newton and coordinate descent methods.

In conclusion, there are many factors which can af-fect whether or not one should use a coordinate de-scent solver or an inexact Newton method for meshoptimization. The present work identifies some of thepotentially important factors and develops a method-ology for further investigations on this topic. Futurework will consider remaining open questions includ-ing consideration of other mesh element types, qual-ity metrics, objective function templates, and di!erentapplications of mesh optimization such as r-adaptivityin which the reference element will not be constant asit was in this study.

ACKNOWLEDGMENTS

The initial version of the analytic gradient for the in-verse mean-ratio metric for tetrahedral elements wasprovided by Paul Hovland. The clipped cube meshimage was provided by Carl Ollivier-Gooch.

The work of the first, second, and third authors wassupported by the Mathematical, Information, andComputational Sciences Division subprogram of theO"ce of Advanced Scientific Computing Research, Of-fice of Science, U.S. Department of Energy, under Con-tracts W-7405-Eng-48 (UCRL-CONF-205150), DE-AC-94AL85000, and W-31-109-Eng-38, respectively.Part of the work of the fourth author was performedwhile a member of the Center for Applied Mathematicsat Cornell University, supported by Sandia National

Laboratories, Cornell University, the National Physi-cal Science Consortium, and NSF grant ACI-0085969.

References

[1] Bank R., Smith B. “Mesh Smoothing UsingA Posteriori Error Estimates.” SIAM J. Num.Anal., vol. 34, 979–997, 1997

[2] Canann S.A., Stephenson M.B., Blacker T. “Op-tismoothing: An Optimization-Driven Approachto Mesh Smoothing.” Finite Elements in Analysisand Design, vol. 13, 185–190, 1993

[3] Parthasarathy V.N., Kodiyalam S. “A Con-strained Optimization Approach to Finite Ele-ment Mesh Smoothing.” Finite Elements in Anal-ysis and Design, vol. 9, 309–320, 1991

[4] Zavattieri P., Dari E., Buscaglia G. “Optimiza-tion Strategies in Unstructured Mesh Genera-tion.” Intl. J. Num. Meth. Engr., vol. 39, 2055–2071, 1996

[5] Castillo J. “A Discrete Variational Grid Genera-tion Method.” SIAM J. Sci. Stat. Comp., vol. 12,454–468, 1991

[6] Freitag L., Knupp P. “Tetrahedral Mesh Improve-ment via Optimization of the Element ConditionNumber.” Intl. J. Num. Meth. Engr., vol. 53,1377–1391, 2002

[7] Anderson D. “Grid Cell Volume Control withan Adaptive Grid Generator.” Appl. Math. andComp., vol. 35, 209–217, 1990

[8] Knupp P. “Algebraic Mesh Quality Metrics.”SIAM J. Sci. Comp., vol. 23, 193–218, 2001

[9] Knupp P. “Matrix Norms and the ConditionNumber.” Proceedings of 8th International Mesh-ing Roundtable, pp. 13–22. 1999

[10] Bertsekas D.P. Nonlinear Programming. AthenaScientific, Belmont, Massachusetts, second edn.,1999

[11] Nocedal J., Wright S.J. Numerical Optimization.Springer, New York, 1999

[12] Munson T.S. “Mesh Shape-Quality OptimizationUsing the Inverse Mean-Ratio Metric.” PreprintANL/MCS-P1136-0304, Argonne National Labo-ratory, Argonne, Illinois, 2004

[13] Munson T.S. “Mesh Shape-Quality Opti-mization Using the Inverse Mean-Ratio Metric:Tetrahedral Proofs.” Technical MemorandumANL/MCS-TM-275, Argonne National Labora-tory, Argonne, Illinois, 2004

Page 15: A C OMP AR ISON OF TW O OP TI MI ZA TI ON ME THODS F OR … · all the se cha ra cterist ics. 1 An imp orta nt a lterna tiv e to mes h pti mi za ften us ed b y the uns tructured mes

[14] Armijo L. “Minimization of Functions HavingLipschitz-Continuous First Partial Derivatives.”Pacific J. Math., vol. 16, 1–3, 1966

[15] Saad Y. Iterative Methods for Sparse Linear Sys-tems. SIAM, Philadelphia, Pennsylvania, secondedn., 2003

[16] Griewank A. Evaluating Derivatives: Princi-ples and Techniques of Algorithmic Di!erentia-tion. SIAM, Philadelphia, Pennsylvania, 2000

[17] Sandia National Laboratories, Albuquerque, NewMexico. CUBIT 8.1 Mesh Generation Toolkit,2003

[18] Ollivier-Gooch C.F. “GRUMMP — Generationand Refinement of Unstructured Mixed-ElementMeshes in Parallel.” http://tetra.mech.ubc.ca/GRUMMP, 1998–2002

The submitted manuscript has been created bythe University of Chicago as Operator of Ar-gonne National Laboratory (“Argonne”) underContract No. W-31-109-ENG-38 with the U.S.Department of Energy. The U.S. Government re-tains for itself, and others acting on its behalf, apaid-up, nonexclusive, irrevocable worldwide li-cense in said article to reproduce, prepare deriva-tive works, distribute copies to the public, andperform publicly and display publicly, by or onbehalf of the Government.