Meshing, Geometric Modeling and Numerical Simulation, Volume 2: Metrics, Meshes and Mesh Adaptation (Geometric Modeling and Applications) [1 ed.] 1786301172, 9781786301178

Triangulations, and more precisely meshes, are at the heart of many problems relating to a wide variety of scientific di

170 66 5MB

English Pages 416 [413] Year 2019

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Meshing, Geometric Modeling and Numerical Simulation, Volume 2: Metrics, Meshes and Mesh Adaptation (Geometric Modeling and Applications) [1 ed.]
 1786301172, 9781786301178

Table of contents :
Cover
Half-Title Page
Title Page
Copyright Page
Contents
Foreword
Introduction
Chapter 1. Metrics, Definitions and Properties
1.1. Definitions and properties
1.2. Metric interpolation and intersection
1.2.1. Metric interpolation
1.2.2. Metric intersection
1.3. Geometric metrics
1.3.1. Geometric metric for a curve
1.3.2. Geometric metric for a surface
1.3.3. Turning any metric into a geometric metric
1.4. Meshing metrics
1.5. Metric gradation
1.6. Element metric
1.6.1. Metric of a simplicial element
1.6.2. Metric of a non-simplicial element
1.6.3. Metric of an element of arbitrary degree
1.7. Element shape and metric quality
1.8. Practical computations in the presence of a metric
1.8.1. Calculation of the length
1.8.2. The calculation of an angle, area or volume
Chapter 2. Interpolation Errors and Metrics
2.1. Some properties
2.2. Interpolation error of a quadratic function
2.3. Bézier formulation and interpolation error
2.3.1. For a quadratic function
2.3.2. For a cubic function
2.3.3. For a polynomial function of arbitrary degree
2.3.4. Error threshold or mesh density
2.4. Computations of discrete derivatives
2.4.1. The L2 double projection method
2.4.2. Green formula
2.4.3. Least square and Taylor
Chapter 3. Curve Meshing
3.1. Parametric curve meshing
3.1.1. Curve in R3
3.1.2. About metrics used and computations of lengths
3.1.3. Curve plotted on a patch
3.2. Discrete curve meshing
3.3. Remeshing a meshed curve
Chapter 4. Simplicial Meshing
4.1. Definitions
4.2. Variety (surface) meshing
4.2.1. Patch-based meshing
4.2.2. Discrete surface remeshing
4.2.3. Meshing using a volume mesher
4.3. The meshing of a plane or of a volume domain
4.3.1. Tree-based method
4.3.2. Front-based method
4.3.3. Delaunay-based method
4.3.4. Remeshing of a meshed domain
4.4. Other generation methods?
Chapter 5. Non-simplicial Meshing
5.1. Definitions
5.2. Variety meshing
5.3. Construction methods for meshing a planar or volume domain
5.3.1. Cylindrical geometry and extrusion method
5.3.2. Algebraic methods and block-based methods
5.3.3. Tree-based method
5.3.4. Pairing method
5.3.5. Polygonal or polyhedral cell meshing
5.3.6. Construction of boundary layers
5.4. Other generation methods
5.4.1. “Q-morphism” or “H-morphism” meshing
5.4.2. Meshing using a reference frame field
5.5. Topological invariants (quadrilaterals and hexahedra)
Chapter 6. High-order Mesh Construction
6.1. Straight meshes
6.1.1. Local node numbering
6.1.2. Overall node numeration
6.1.3. Node positions
6.1.4. On filling up matrices according to element degrees
6.2. Construction of curved meshes
6.2.1. First-degree mesh
6.2.2. Node creation
6.2.3. Deformation and validation
6.2.4. General scheme
6.3. Curved meshes on a variety, curve or surface
Chapter 7. Mesh Optimization
7.1. Toward a definition of quality
7.2. Optimization process
7.2.1. Global methods
7.2.2. Local operators and local methods
7.3. Planar mesh
7.4. Surface mesh
7.5. Volume meshing
7.6. High-degree meshing
Chapter 8. Mesh Adaptation
8.1. Generic framework for adaptive computation, the continuous mesh
8.1.1. Duality between discrete and continuous geometric entities
8.1.2. Duality between discrete and continuous interpolation error
8.1.3. Discrete–continuous duality in one diagram
8.2. Optimal control of the interpolation error in Lp-norm
8.3. Generic scheme of stationary adaptation
8.3.1. Error estimators
8.3.2. Interpolation of solution fields
8.4. Unsteady adaptation
8.4.1. Space–time error estimators based on the characteristics of the solution
8.4.2. Extension of the error analysis for the fixed-point algorithm for unsteady mesh adaptation
8.4.3. Mesh adaptation for unsteady problems
8.4.4. Unsteady mesh adaptation targeted at a function of interest
8.4.5. Conservative interpolation of solution fields
8.5. Mobile geometry with or without deformation
8.5.1. General context of the adaptation for mobile and/or deformable geometries
8.5.2. ALE continuous optimal mesh minimizing the interpolation error in Lp-norm
8.5.3. Space–time error estimator for moving geometry problems
Chapter 9. Meshing and Parallelism
9.1. Renumbering via a filling curve
9.2. Parallelism: two memory paradigms and different strategies
9.3. Algorithm parallelization for mesh construction
9.4. Parallelization of a mesh construction process, partition then meshing
9.5. Mesh parallelization, meshing then partition
Chapter 10. Applications
10.1. Surface meshing
10.2. In computational fluid dynamics
10.3. Computational solid mechanics
10.4. Computational electromagnetism
10.5. Renumbering and parallelism
10.6. Other more exotic applications
Chapter 11. Some Algorithms and Formulas
11.1. Local numbering of nodes of high-order elements
11.2. Length computations etc., in the presence of a metric field
11.3. Quality
Conclusions and Perspectives
Bibliography
Index
Other titles from iSTE in Numerical Methods in Engineering
EULA

Citation preview

Meshing, Geometric Modeling and Numerical Simulation 2

Geometric Modeling and Applications Set coordinated by Marc Daniel

Volume 2

Meshing, Geometric Modeling and Numerical Simulation 2 Metrics, Meshes and Mesh Adaptation Paul Louis George Houman Borouchaki Frédéric Alauzet Patrick Laug Adrien Loseille Loïc Maréchal

First published 2019 in Great Britain and the United States by ISTE Ltd and John Wiley & Sons, Inc.

Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers, or in the case of reprographic reproduction in accordance with the terms and licenses issued by the CLA. Enquiries concerning reproduction outside these terms should be sent to the publishers at the undermentioned address: ISTE Ltd 27-37 St George’s Road London SW19 4EU UK

John Wiley & Sons, Inc. 111 River Street Hoboken, NJ 07030 USA

www.iste.co.uk

www.wiley.com

© ISTE Ltd 2019 The rights of Paul Louis George, Houman Borouchaki, Frédéric Alauzet, Patrick Laug, Adrien Loseille and Loïc Maréchal to be identified as the authors of this work have been asserted by them in accordance with the Copyright, Designs and Patents Act 1988. Library of Congress Control Number: 2018962437 British Library Cataloguing-in-Publication Data A CIP record for this book is available from the British Library ISBN 978-1-78630-117-8

Contents

Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ix

Introduction

xi

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 1. Metrics, Definitions and Properties

. . . . . . . . . . . . . . . . . . . . . .

1.1. Definitions and properties . . . . . . . . . . . . . . 1.2. Metric interpolation and intersection . . . . . . . . 1.2.1. Metric interpolation . . . . . . . . . . . . . . 1.2.2. Metric intersection . . . . . . . . . . . . . . . 1.3. Geometric metrics . . . . . . . . . . . . . . . . . . 1.3.1. Geometric metric for a curve . . . . . . . . . 1.3.2. Geometric metric for a surface . . . . . . . . 1.3.3. Turning any metric into a geometric metric . 1.4. Meshing metrics . . . . . . . . . . . . . . . . . . . 1.5. Metrics gradation . . . . . . . . . . . . . . . . . . . 1.6. Element metric . . . . . . . . . . . . . . . . . . . . 1.6.1. Metric of a simplicial element . . . . . . . . 1.6.2. Metric of a non-simplicial element . . . . . . 1.6.3. Metric of an element of arbitrary degree . . . 1.7. Element shape and metric quality . . . . . . . . . . 1.8. Practical computations in the presence of a metric 1.8.1. Calculation of the length . . . . . . . . . . . . 1.8.2. The calculation of an angle, area or volume . Chapter 2. Interpolation Errors and Metrics

2 6 7 13 14 16 17 23 23 24 31 31 37 38 38 46 46 49

. . . . . . . . . . . . . . . . . . . . . . .

53

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . . . . . . . . . . . . . .

1

. . . . . . . . . . . . . . . . . .

2.1. Some properties . . . . . . . . . . . . . . . . . . . . 2.2. Interpolation error of a quadratic function . . . . . 2.3. Bézier formulation and interpolation error . . . . . 2.3.1. For a quadratic function . . . . . . . . . . . . 2.3.2. For a cubic function . . . . . . . . . . . . . . 2.3.3. For a polynomial function of arbitrary degree

. . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . .

54 55 62 63 66 80

vi Meshing, Geometric Modeling and Numerical Simulation 2 2.3.4. Error threshold or mesh density . . 2.4. Computations of discrete derivatives . . 2.4.1. The L2 double projection method 2.4.2. Green formula . . . . . . . . . . . 2.4.3. Least square and Taylor . . . . . . Chapter 3. Curve Meshing

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

85 86 86 88 89

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

3.1. Parametric curve meshing . . . . . . . . . . . . . . . . 3.1.1. Curve in R3 . . . . . . . . . . . . . . . . . . . . . 3.1.2. About metrics used and computations of lengths 3.1.3. Curve plotted on a patch . . . . . . . . . . . . . . 3.2. Discrete curve meshing . . . . . . . . . . . . . . . . . 3.3. Remeshing a meshed curve . . . . . . . . . . . . . . . Chapter 4. Simplicial Meshing

. . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . .

107

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . .

. . . . .

95 95 99 103 104 104

. . . . . . . . . . .

. . . . . .

. . . . .

. . . . . .

4.1. Definitions . . . . . . . . . . . . . . . . . . . . . 4.2. Variety (surface) meshing . . . . . . . . . . . . 4.2.1. Patch-based meshing . . . . . . . . . . . . 4.2.2. Discrete surface remeshing . . . . . . . . 4.2.3. Meshing using a volume mesher . . . . . 4.3. The meshing of a plane or of a volume domain 4.3.1. Tree-based method . . . . . . . . . . . . . 4.3.2. Front-based method . . . . . . . . . . . . 4.3.3. Delaunay-based method . . . . . . . . . . 4.3.4. Remeshing of a meshed domain . . . . . 4.4. Other generation methods? . . . . . . . . . . .

. . . . . .

. . . . .

. . . . . . . . . . .

. . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

Chapter 5. Non-simplicial Meshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2. Variety meshing . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3. Construction methods for meshing a planar or volume domain 5.3.1. Cylindrical geometry and extrusion method . . . . . . . . 5.3.2. Algebraic methods and block-based methods . . . . . . . 5.3.3. Tree-based method . . . . . . . . . . . . . . . . . . . . . . 5.3.4. Pairing method . . . . . . . . . . . . . . . . . . . . . . . . 5.3.5. Polygonal or polyhedral cell meshing . . . . . . . . . . . 5.3.6. Construction of boundary layers . . . . . . . . . . . . . . 5.4. Other generation methods . . . . . . . . . . . . . . . . . . . . . 5.4.1. “Q-morphism” or “H-morphism” meshing . . . . . . . . 5.4.2. Meshing using a reference frame field . . . . . . . . . . . 5.5. Topological invariants (quadrilaterals and hexahedra) . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

108 109 110 119 120 122 123 126 129 134 136 141

. . . . . . . . . . . . .

142 143 145 147 148 172 174 176 177 182 182 183 185

Chapter 6. High-order Mesh Construction . . . . . . . . . . . . . . . . . . . . . . . . .

195

6.1. Straight meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

196

Contents vii

6.1.1. Local node numbering . . . . . . . . . . . . . . . . . 6.1.2. Overall node numeration . . . . . . . . . . . . . . . 6.1.3. Node positions . . . . . . . . . . . . . . . . . . . . . 6.1.4. On filling up matrices according to element degrees 6.2. Construction of curved meshes . . . . . . . . . . . . . . . 6.2.1. First-degree mesh . . . . . . . . . . . . . . . . . . . 6.2.2. Node creation . . . . . . . . . . . . . . . . . . . . . . 6.2.3. Deformation and validation . . . . . . . . . . . . . . 6.2.4. General scheme . . . . . . . . . . . . . . . . . . . . . 6.3. Curved meshes on a variety, curve or surface . . . . . . .

. . . . . . . . . .

196 201 204 207 208 209 209 210 211 215

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

225

7.1. Toward a definition of quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2. Optimization process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.1. Global methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.1.1. Optimization of a cost function . . . . . . . . . . . . . . . . . . . . . . . 7.2.1.2. Iterative relaxation of the position of vertices by duality (simplices) . . 7.2.1.3. Global optimization of the position of vertices (quadrilaterals and hexahedra) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2. Local operators and local methods . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2.1. Vertex moves by barycentering . . . . . . . . . . . . . . . . . . . . . . . 7.2.2.2. Vertex moves and Laplacian operator . . . . . . . . . . . . . . . . . . . 7.2.2.3. Moving or removing vertices and flips by insertion or reinsertion . . . 7.2.2.4. Edge flips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2.5. Cluster of edge flips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2.6. Edge or face flip by reinsertion . . . . . . . . . . . . . . . . . . . . . . . 7.2.2.7. Edge slicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2.8. Removal of an edge by merging . . . . . . . . . . . . . . . . . . . . . . 7.2.2.9. Metric field update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2.10. Topological and metric criteria . . . . . . . . . . . . . . . . . . . . . . 7.2.2.11. Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3. Planar mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4. Surface mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5. Volume meshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6. High-degree meshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

226 233 233 233 234

Chapter 8. Mesh Adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

265

Chapter 7. Mesh Optimization

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

8.1. Generic framework for adaptive computation, the continuous mesh 8.1.1. Duality between discrete and continuous geometric entities . . 8.1.2. Duality between discrete and continuous interpolation error . 8.1.3. Discrete–continuous duality in one diagram . . . . . . . . . . . 8.2. Optimal control of the interpolation error in Lp -norm . . . . . . . . 8.3. Generic scheme of stationary adaptation . . . . . . . . . . . . . . . . 8.3.1. Error estimators . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.2. Interpolation of solution fields . . . . . . . . . . . . . . . . . .

. . . . . . . . . .

. . . . . . . .

. . . . . . . . . .

. . . . . . . .

. . . . . . . . . .

. . . . . . . .

. . . . . . . . . .

. . . . . . . .

. . . . . . . . . .

. . . . . . . .

. . . . . . . . . .

. . . . . . . .

. . . . . . . . . .

. . . . . . . .

. . . . . . . .

235 236 236 237 241 241 243 244 244 245 246 246 246 248 250 251 254

266 267 269 272 272 279 282 287

viii Meshing, Geometric Modeling and Numerical Simulation 2

8.4. Unsteady adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.1. Space–time error estimators based on the characteristics of the solution . . . 8.4.2. Extension of the error analysis for the fixed-point algorithm for unsteady mesh adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.3. Mesh adaptation for unsteady problems . . . . . . . . . . . . . . . . . . . . . 8.4.4. Unsteady mesh adaptation targeted at a function of interest . . . . . . . . . . 8.4.5. Conservative interpolation of solution fields . . . . . . . . . . . . . . . . . . . 8.5. Mobile geometry with or without deformation . . . . . . . . . . . . . . . . . . . . 8.5.1. General context of the adaptation for mobile and/or deformable geometries . 8.5.2. ALE continuous optimal mesh minimizing the interpolation error in Lp -norm 8.5.3. Space–time error estimator for moving geometry problems . . . . . . . . . . Chapter 9. Meshing and Parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1. Renumbering via a filling curve . . . . . . . . . . . . . . . . . . . . . . 9.2. Parallelism: two memory paradigms and different strategies . . . . . 9.3. Algorithm parallelization for mesh construction . . . . . . . . . . . . 9.4. Parallelization of a mesh construction process, partition then meshing 9.5. Mesh parallelization, meshing then partition . . . . . . . . . . . . . .

Chapter 10. Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

331

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . .

. . . . . .

. . . . .

. . . . . .

. . . . .

. . . . . .

. . . . .

303 304 307 312 324 326

. . . . . .

. . . . .

291 292 294 295 297 297 298 300

. . . . .

10.1. Surface meshing . . . . . . . . . . 10.2. In computational fluid dynamics . 10.3. Computational solid mechanics . 10.4. Computational electromagnetism 10.5. Renumbering and parallelism . . 10.6. Other more exotic applications .

. . . . .

289 290

. . . . . .

. . . . . .

332 334 341 345 346 349

Chapter 11. Some Algorithms and Formulas . . . . . . . . . . . . . . . . . . . . . . . .

353

11.1. Local numbering of nodes of high-order elements . . . . . . . . . . . . . . . . . . 11.2. Length computations etc., in the presence of a metric field . . . . . . . . . . . . . 11.3. Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

354 364 369

Conclusions and Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

373

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

375

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

387

Foreword

The “Geometric Modeling and Applications” series is made up of five volumes of research on geometric modeling. The act of geometric modeling is an age-old one. To look at a few key points in its history: geometrists in antiquity devoted themselves to it, though, of course, it had a different form from that which we know today; Descartes, in the mid-17th Century, worked on partitioning of planes; and Voronoi established concepts relating to this toward the end of the 19th Century. But geometric modeling, as we understand it now, can be considered to be linked to the use of computers, especially since this tool has become ubiquitous. We are tempted to fix the scientific recognition of this activity to the date of the “First Conference on Computer Aided Geometric Design”, which took place in March 1974 at the University of Utah. This was organized by R. Barhnill and R. Riesenfeld, whose presentations may be found in the book “Computer Aided Geometric Design, Academic Press, 1974”, which clearly associates geometric modeling with the computer. Since then, many detailed and high-quality books have been published in this field. One of the pioneering works was, undoubtedly, that authored by D. Faux and M. Pratt, “Computational Geometry for Design and Manufacture, Ellis Horwood Publishers, 1979”. Some books went through several editions, taking note of the advances made in research in the field. In this context, bringing out a new general book on the subject would mark no significant scientific progress. Moreover, for any object or entity that is to be modeled, there is no single geometric model. Instead, there are several geometric models, each being adapted to the processes to be carried out. For example, the model to finely analyze the shape of an object is necessarily different from models that are used for mechanical computations on this same object. We have, therefore, chosen to focus on specific points of research in fields that we find particularly important. Thus, the five references given here, written by specialists, bring you up to date on advances in research in five domains: • “Constraints and geometric modeling”, by Dominique Michelucci, Pascal Schreck and Pascal Mathis, looks at geometric problems that can be approached by describing the constraints, geometric or more complex, that a solution must verify, rather than directly giving the geometric definition of such a solution.

x Meshing, Geometric Modeling and Numerical Simulation 2 • “Geometric modeling of fractal forms CAD”, by Christian Gentil, Dmitry Sokolov and Gilles Gouaty, discusses the definition of fractal forms: this formalism makes it possible to reuse smooth forms of geometric models that are classic today to define forms that have not yet been explored till present. • “Meshing, geometric modeling and numerical simulation”, in two volumes, by Houman Borouchaki and Paul Louis George, details methodologies advanced for the construction of meshes and geometric modeling for numerial simulation with applications, especially in mechanics. • “Geometric and Topological Mesh Feature Extraction for 3D Shape Analysis”, by Jean-Luc Mari, Franck Hétroy-Wheeler and Gérard Subsol, studies the analysis of threedimensional-meshed shapes via the extraction of characteristics, both geometric and topological. The fields of application are also detailed to illustrate the transdisciplinary nature of this work. • “Relevant Triangulations and Samplings for 3D Shapes”, by Raphaëlle Chaine and Julie Digne, discusses sampling, meshing and compression of free forms from a large quantity of real data from a virtual, interactive deformation process. These are books that present recent research. The reader can find, in the general books on geometric modeling that were mentioned before, elements to fill any gaps they may have and to enable them to read the books in this series. Happy reading. Marc DANIEL

Introduction

Triangulations and, more precisely, meshes, with the subtle difference that separates these two entities, lie at the heart of any number of problems that arise from varied scientific disciplines. A triangulation or a mesh is a discrete representation, using simple geometric elements (triangle, quadrilateral, tetrahedron, etc., any arbitrary polygon or polyhedron), of a domain that may be an object or a region of which we want a discrete, spatial description. There are, thus, many applications, including numerical simulations of any kind of physical problem, though not restricted to these. In particular, a discrete representation of a (volume) object or a surface may simply be seen as a geometric modeling problem as is. This book adopts a double point of view, as indicated by its title, and we will look both at the use of meshes in numerical simulations (the finite element method, especially) with, of course, the underlying constraints, as well as the use of these meshes for the (discrete) modeling of geometry. The literature on triangulations and meshes may be classified in two chief categories: one more purely mathematical and geometric, the other more oriented toward industrial applications (numerical simulations) with, of course, though not always, relations between these categories. The first point of view is covered by the computation geometry community, which studies (among others) Delaunay triangulations in all cuts, definitions, properties, construction algorithms and the complexity of these algorithms. They also study some applications of these triangulations. Nonetheless, relatively recently, mesh generation problems are also being studied, but under a more theoretical angle, generally relating to situations that allow for the use of Delaunay triangulations for which robust construction methods as well as interesting geometric properties have been known for a long time. This (somewhat monotheistic) philosophy necessarily imposes limits on the nature of the problems worked (workable). The first reference book on these subjects is that of Preparata and Shamos [Preparata, Shamos-1985] published in 1985. This was followed by several others, among which we cite two by Edelsbrunner [Edelsbrunner-1987] and [Edelsbrunner-2001], that of Yvinnec and Boissonnat [Boissonnat, Yvinec-1997], by Dey [Dey-2007] and winding up the list with the book by Cheng et al. [Cheng et al. 2012], which was published in 2012. With a few exceptions, the orientation chosen by these references is not always guided by the preoccupations of mathematicians, engineers and the world of numerical simulation in general.

xii Meshing, Geometric Modeling and Numerical Simulation 2

It is this very need for numerical simulations, in particular (and historically) in solid or fluid mechanics, that has led to the emergence of a “meshing” community among mathematicians and engineers. Without fear of contradiction, we can state that the very first book on meshes that was seen from this point of view is that of Thompson et al. [Thompson et al. 1985], which was also published in 1985. This book essentially discusses structured meshes or grids1 while the first truly generalist book, discussing all types of meshes, structured or not, is that by George [George-1991], which dates back to 1991. Over the years and with the evolution of computers and methods as well as the increasingly complex nature of the meshes to consider, other books have been published. Let us mention books by George and Borouchaki [George, Borouchaki-1998], published in 1997, which revisits meshing methods based on Delaunay algorithms; by Carey [Carey-1997], also in 1997, which gives a very pedagogic presentation of methods; by Topping and co-authors [Topping et al. 2004], in 2004, cited in order to be exhaustive; by Frey and George [Frey, George-2008], in 2000, with a second edition in 2008, which returns to the general view and incorporates newly appeared techniques; by Löhner [Löhner-2008], in 2002, with a second edition that came out in 2008, which abounds in innovative details; up to the recent book by Lo [Lo-2015], published in 2015, which, among others, sheds new light on some problems. In this context, we may wonder what motivated the writing of this book. We will attempt to answer this question (and also try, by doing so, to arouse the reader’s curiosity). The first observation is that the few books on this subject are already either a little old or rather classic in the way they discuss the approaches and the methods concerning the many questions linked to meshes. The second remark is that, evidently, new questions have appeared relatively recently, e.g. everything related to (finite) elements or patches of higher degrees, metrics and their links to interpolation errors, geometric modeling by meshes, numerical simulation via advanced methods (adaptation of meshes) and so on. This remark immediately calls forth another: we will resolutely adopt a double point of view by considering finite elements (or the constitutive elements of a mesh) as geometric patches and vice versa, thus establishing a link between the Lagrange world of finite elements and the Bézier world of CAD. This choice, as we will see, noticeably changes the manner in which we perceive the problems and, consequently, the manner in which we try to find solutions. In this spirit, this book in two volumes, beyond a set of subjects that we may qualify as classic (and, thus, essential), approaches many subjects that are very recent or even completely novel. Moreover, and this may be more surprising (and certainly rare), some methods (which we find in the literature) have been deliberately left out as they were deemed to not be of great interest and, a contrario, some methods are described in a manner that is, at the very least, nuanced and even critical. Indeed, it seemed pertinent to share our perception, even though this is subjective, up to a point, of these methods, perhaps to prevent the reader from going down paths that we think are dead ends. Having specified this, this book provides the necessary basis for a course on meshes and related problems at the masters level and it may serve as a technical reference for engineering students in science and, more generally, engineers using numerical simulations. We will give a brief description of the content of the chapters in both volumes.

1. The grid-type meshes are generated by solving partial derivative equations, for example elliptical equations. It must be noted that other, more recent books on this theme, followed this pioneering work, but have not been mentioned here.

Introduction xiii  Volume 1: We first give a chapter-wise overview of the first volume of this book. In the first three chapters, this volume introduces the basic concepts related to finite elements seen through their shape functions either as finite elements or as patches. In addition to the classic expression via Lagrange polynomials (complete, reduced or rational) (Chapter 1), we give the equivalent formulation based on Bézier forms (Chapter 2), which makes it possible to easily find the conditions for the geometric validity of these finite elements (or patches) whether they are straight or curved and whatever their degree (Chapter 3). Triangulation problems are the subject of the next three chapters, where we specify vocabulary and the basic concepts that make it possible to describe the different construction methods for any triangulation (Chapter 4), Delaunay triangulation (Chapter 5) as well as the triangulation (of a domain) with constraints (Chapter 6). In the next two chapters, we use the concepts introduced earlier to discuss the vast problem of geometric modeling of a domain in its various aspects. Geometric modeling, from our point of views (meshes and numerical simulations), consists of construction of a discrete representation from a continuous representation and vice versa. Different methods are described in Chapters 7, while Chapter 8 gives several significant examples for the application of these methods. Chapter 9 brings together some basic algorithms and formulas related to finite elements (patches) and triangulations, to persuade the reader to go beyond a theoretical viewpoint, to a practical viewpoint, which we believe is essential.  Volume 2: We share the contents of Volume 2 of this book, for which four new authors have joined us. This volume (finally) approaches mesh problems and begins with a detailed description of the concept of metric, a concept which will be seen to be fundamental in all that follows. The first two chapters, Chapters 1 and 2, thus focus on metrics. We introduce the concept of metric, we demonstrate their properties and their relations with the geometry of elements of a mesh and how to control interpolation errors during the resolution of a problem (by finite elements). The construction methods of meshes and their optimization are the focus of the following five chapters: Chapter 3 (mesh for a curve), Chapter 4 (simplicial meshes), Chapter 5 (non-simplicial meshes), Chapter 6 (meshes of higher degree) and Chapter 7 (optimizing meshes). We will then discuss the large subject of the adaptation of meshes, controlling the solutions via error estimates and corresponding interpolation metrics in Chapter 8. The use of a dose or a certain dose of parallelism (based on its multiple forms) is seen through Chapter 9. Chapter 10 illustrates, using concrete examples, a series of applications of the methods and methodologies introduced and described through the different chapters of both volumes of this book. As in Volume 1, the final chapter, Chapter 11, gives practical observations on some of the algorithms from Volume 2, especially how to use and manipulate metrics.  Finally, at the end of this second volume, we sketch out future prospects.

xiv Meshing, Geometric Modeling and Numerical Simulation 2

∗ ∗ ∗ Acknowledgments. We are especially grateful to two then-doctoral students who willingly helped in developing this book. Nicolas Barral helped us through his expertise with Maple to resolve systems that we encountered during the construction of Serendipity elements. Loïc Frazza, Rémi Feuillet and Julien Vanharen have helped us regarding high-order elements and finite volume methods. Victorien Menier is the author of most of the figures that illustrate this book. We also wish to thank Peha for his magnificent free-hand images, illustrating the impossibility of triangulating certain polyhedra without adding internal vertices. And, of course, we would also like to thank everyone in the common Inria2 and UTT3, Gamma3 team: researchers, engineers and doctoral students, whose work contributed to the development and consolidation of various subjects discussed in this book.

2. Institut National de Recherche en Informatique et en Automatique. 3. Université de Technologie de Troyes.

Chapter 1

Metrics, Definitions and Properties

The concept of metric has been outlined in Chapter 5 of Volume 1 concerning anisotropic triangulations in which directions are specified as well as lengths according to these directions. It is now essential to clarify what a metric is (a metric field) because metrics are going to be everpresent in the following areas: curve and surface meshing – construction is governed by means of control on curvature(s), meshing in general – construction is governed through the control (at best) of the shape and size of elements and finally, adapted meshing – construction is governed through the control, for example, of interpolation errors resulting in directives concerning shape, directionality and element size. In effect, one will explicitly rely on adequate metrics to orientate the creation or the modification of the meshing involved. It should be noted that we are now referring to meshes, whereas so far we were talking about discretizations in the generic sense of the term or simply about triangulations. A mesh created ex nihilo or obtained by modification of an existing mesh (remeshing) is characterized by the nature of its elements. The nature of an element, taken individually, is obviously linked to its size and orientation that themselves are completely dependent on the length and orientation of its edges. The nature of a mesh, thereby of a set of elements, depends on its elements; their directions give the directional properties of the mesh seen as a whole and their sizes specifically reflect the density of its points. The most important thing is thus to observe that if edges are controlled, elements are controlled, one by one, and thereby the whole mesh is controlled. The length of a segment is calculated using the usual dot product, and if u designates the vector corresponding to this segment, we have: ||u||2 = u, u, where ., . denotes the dot product. Let O be a given point, the locus of points P such that ||OP ||2 = OP, OP  = 1 is the circle (the sphere) of radius r = 1 centered in O, namely the unit ball (classic). In other words, the distance between O and any one of these points P is the

Meshing, Geometric Modelingand Numerical Simulation 2: Metrics, Meshes and Mesh Adaptation, First Edition. Paul Louis George, Houman Borouchaki, Frédéric Alauzet, Patrick Laug, Adrien Loseille and Loïc Maréchal. © ISTE Ltd 2019. Published by ISTE Ltd and John Wiley & Sons, Inc.

2 Meshing, Geometric Modeling and Numerical Simulation 2

same. The idea of metrics is to change the way lengths are calculated by modifying the definition of the dot product. If M is a positive definite symmetric matrix, it can be defined that: ||u||2M = u, uM = u, Mu = t uMu, then, O being fixed, the locus of points P such that ||OP ||2M = 1 is the ellipse (ellipsoid) centered at O whose axes have the same directions as those of the eigenvectors of the matrix M and whose radii, denoted by ri , are such that ri = λ12 , where λi is the ith eigenvalue (normalized i via eigenvector normalization) of M. Here again, we have the unit ball relative to the underlying metric. The result is that O being fixed, the Euclidean distance from a point P such that ||OP ||2M = 1 at O is different from that of another point satisfying the same relation. This simple observation indicates that the notion of length in a metric contains both length information (Euclidean), but also directional information. This property is the basis itself of all the techniques for the construction of anisotropic meshes (or remeshing) necessary to properly address the problems where direction has a strong impact (curvature direction, directionality of the physical phenomenon under study, etc.). Intuitively, it can be seen that from the matrix M (written, 1 see below, as RΛt R), associated with the underlying metric1, RΛ− 2 is extracted, which is the transformation that allows shifting from a circle (a sphere) to an ellipse (an ellipsoid). This transformation is interpreted as a change of scale coupled with a rotation (see Figure 1.1). This naive introduction being made, we will introduce and discuss the concept of metric in a formal manner. First, the definition of a metric is introduced and its properties are indicated. The next step is then to look into ways to combine two or more metrics, either by interpolation or by intersection. The origin of the metrics being diverse, we look into what metrics of geometric origin are (useful for (re)meshing curves and surfaces) and then we show how to find the intrinsic metric of a given element, and, finally, we indicate what calculus metrics are, in the process of solving systems of equations with partial derivatives, obtained via estimators of errors, a topic that will be the subject of Chapter 2. In the end, it is quickly shown how to calculate the length of a segment in the presence of a discrete metric field (that is known only at the vertices of a mesh), and the way to calculate the length of an edge and, finally, we also describe how angles, areas and volumes are to be computed in the presence of a metric field, and all this will be revisited in detail in the last chapter. 1.1. Definitions and properties A metric represents the unit measure in every direction. It is, therefore, linked to the notion of distance or length. Distances and lengths are defined based on the result of a dot product. We will recall what such a product is before giving a general definition allowing the introduction of the concept of metric. Let u and v be two vectors (in Rd with, in our case, d = 2 or 3), the dot product of u and v designated by u, v is a bilinear form, verifying the following three properties: 1. In the following, it will often be the case that no distinction is made between the matrix representing a given metric and this metric, and conversely, the metric associated with a given matrix and this matrix.

Metrics, Definitions and Properties 3 – [-Pr1] symmetry: u, v = v, u; – [-Pr2] positivity: u, u ≥ 0, for all u =0; – [-Pr3] definite: u, u = 0 if and only if u = 0. The second property allows the definition  of the norm or vector length u (or still the distance between its two ends) as being ||u|| = u, u. We can then define the unit ball (representing −−→ the unit measure in every direction) by ||u|| = 1 with u = OP , O fixed and P varying, describing this ball centered in O. The usual dot product in canonical coordinates is written as:  ui v i , u, v = t uv = i

with ui (respectively, vi ) the coordinates of u (respectively, v) within this frame of reference. It is easy to verify that this form satisfies the three properties above (the origin of this dot product dates back to Pythagoras!). It should be noted that the above sum only involves products of coordinates having the same index, and bearing this in mind, the cross-products of the coordinates are not taken into account and, as a result, coordinates of different indices are decorrelated. In this case, a vector has the same norm as any vector corresponding to one of its rotations. This is, of course, natural for the usual canonical space within which distances and lengths are isotropic and the unit ball is a circle (respectively, a sphere) in R2 (respectively, R3 ). In order to generalize the usual dot product (by taking now the cross-products of the coordinates into account), the general bilinear form is introduced and defined by:  u, vgeneralized = mij ui vj , ij

where mij are weighting reals of the coordinate products. By considering the matrix M = {mij }, this generalized dot product is written as: u, vM = t uMv = u, Mv. The matrix M must verify the three properties of a dot product, which corresponds to the fact that this matrix has to be symmetric positive definite. The length of a vector u (or its norm) is √ −−→ expressed as ||u||M = t uMu. The unit ball ||u||M = 1 with u = OP , O fixed and P varying, is an ellipse (respectively, an ellipsoid) in R2 (respectively, in R3 ), centered in O. As a matter of fact, since the matrix M is real symmetric, it is diagonalizable and its eigenvectors are orthogonal two by two. Let R be the orthogonal matrix whose columns are composed of these vectors; once normalized, it follows that: MR = RΛ, with Λ the diagonal matrix composed of the eigenvalues of M. Therefore, matrix M is written as: M = RΛt R,

4 Meshing, Geometric Modeling and Numerical Simulation 2 because t R = R−1 . We have: t

uMu = t uRΛt Ru = t vΛv,

with v = t Ru. As a result, the unit ball ||u||M = 1 can be written in the new basis defined by the columns of R as ||v||Λ = 1. Since the coefficients λi of the matrix Λ are strictly positive (because M is positive definite), this equation is that of an ellipse (of an ellipsoid) whose main axes are of length √1λ . Therefrom, the unit of measure in the direction of the ith eigenvector i of M (also called ith principal direction of M) is equal to a measure of √1λ in the common i Euclidean space. The unit of measure in other directions is defined via the elliptical equation ||v||Λ = 1. In the case where λi are identical, the metric M is said to be isotropic. In this case, the unit of measure in all directions is equal to the size h = √1λ in the usual metric and the matrix M can be written as M = h12 I (I denoting the identity). This relation yields the link with a size in the usual metric and an isotropic metric defined by this size. If λi are different, the metric M is said to be anisotropic and, in general, the link between the coefficients of M and underlying sizes is not directly visible. A space equipped with a constant metric M (therefore a generalized dot product) is called Euclidean space. The usual Euclidean space is a special case of Euclidian spaces in which the metric M is I, the identity. The quadratic form associated with M, thus t uMu, makes it possible to define the unit ball within this space. We have: √ √ t uMu = t uRΛt Ru = t uR Λ Λt Ru = t w w, √ with w = Λt Ru. Thereby, the quadratic form associated with M, after a change in variables, can be reduced to the usual quadratic form (that of the usual metric, the identity; Figure 1.1). It can be derived thereof that a Euclidean space endowed with a metric M is equivalent to a Euclidean space endowed with the usual identity metric deformed by the linear application: √ φM = Λt R, [1.1] verifying t φM φM = M. This mapping makes it possible, among others, to undo the mett ric M to obtain √ an identity metric. It is composed of the change in basis R followed by the homothety λ. This process of deformation of spaces in order to undo a metric is a means to extend the concepts defined in the usual Euclidean space to the Euclidean space equipped with any metric. In particular, in mesh problems, the interest is more specifically in the angle formed by two vectors, in the determinant of a matrix (representing an area or a volume) and in the length of a curved segment. Let u and v be two vectors of the Euclidean space R2 (or R3 ) equipped with the metric M, the angle denoted by θM (for M) formed by these two vectors is defined as the angle formed by the vectors φM u and φM v, which for their part are defined in the usual space. This angle is thus defined by: cos θM =

t t t u φM φM v uMv φM u, φM v √  , =√ = t t t t t ||φM u|| ||φM v|| uMu t vMv u φ M φM u v φ M φ M v

Metrics, Definitions and Properties 5

h1 h2

1

Λ 2 tR

1

v1

e2

v2

1 e1

1

R Λ− 2 Figure 1.1. The ellipse of the usual Euclidean space (on the left) and the unit ball of the space associated with the metric M = RΛt R, on the right. The transformation allowing shifting 1 1 from one space to another is Λ 2 t R or RΛ− 2 , according to the direction

or still: cos θM =

u, vM . ||u||M ||v||M

[1.2]

Let two vectors u and v be of the Euclidean space R2 (or three vectors u, v and w of R3 ) equipped with the metric M, one considers the second-order matrix (or third-order) whose columns are these vectors. The determinant of this matrix in this space is defined as being the determinant of the matrix formed by the two column vectors φM u and φM v of the space R2 (or by the three columns vectors φM u, φM v and φM w of the space R3 ) equipped with the usual metric. Let: |u v|M = |φM u φM v| = |φM | |u v|. However2,:

  √ √ |φM | = | Λ||t R| = | Λ| = |Λ| = |M|,

since |t R| = 1, thereby, in R2 :

Similarly, in R3 :

|u

v|M =

 |M| |u

v|.

|u v

w|M =

 |M| |u

v

[1.3] w|.

[1.4]

In R2 (respectively, R3 ) equipped with the metric M, the quantity |u v|M (respectively, |u v w|M ) is the area (respectively, the volume) of the parallelogram (respectively, of the parallelepiped) based on u and v (respectively, on u, v and w). Finally, let Γ be a curved segment defined by the continuous mapping γ of an interval I = [a, b] ⊂ R onto the space R2 or R3 equipped with the metric M: γ : I = [a, b] → Γ : t → γ(t).

2. In the following, we will indifferently use the notations |M| and det(M) to denote the determinant of a matrix.

6 Meshing, Geometric Modeling and Numerical Simulation 2

The length of Γ is calculated by considering the deformed space associated with the usual metric:  b  b  b  t  t  t γ  (t)Mγ  (t) dt, LM (Γ) = ||φM γ (t)|| dt = γ (t) φM φM γ (t) dt = a

a

a

or still:



b

LM (Γ) =

||γ  (t)||M dt.

[1.5]

a

−−→ In the particular case where Γ is a straight segment, γ(t) = A + tAB defined in the interval I = [0, 1], we have:  1 −−→ −−→ LM (Γ) = ||AB||M dt = ||AB||M , 0

−−→ which represents the length of the vector AB in the metric M. The metric M was supposed to be constant and has allowed us to define a Euclidean space. A Riemannian space is a space equipped with a variable metric denoted3 by M(.), thus dependent on the position. In this case, the scalar product defined by the bilinear form associated with M(.) changes from one point to another, implying that every vector must be considered with the metric at its origin. As a result, the dot product of two vectors only makes sense if both vectors have the same origin and is expressed based on the metric at this origin. Under this assumption, the calculations of angles and determinants seen above can be applied. As stated in the Euclidean case, the length of a curved segment Γ depends on the norm in the metric of the vector γ  (t). Since the metric varies from one point to another, this norm also varies from one point to another. It therefore yields:  b LM(.) (Γ) = ||γ  (t)||M(γ(t)) dt. [1.6] a

In the particular case where Γ is a straight segment defined in the interval I = [0, 1] by γ(t) = −−→ A + tAB, one gets:  1 −−→ − → dt, ||AB||M(A+t− LM(.) (Γ) = AB) 0

−−→ which does obviously not represent the length of the vector AB in the metric M(A). The length of a curved segment, even in the case where this segment is a straight segment, involves an elliptic integral that generally has no analytical resolution. The computation of such an integral is therefore based on integral calculus approximation methods as it will be seen at the end of this chapter. 1.2. Metric interpolation and intersection In this section, the focus is on interpolation problems of a discrete metric field through the meshing of a domain, this being seen as a simplicial covering of the domain. More specifically,

3. The (.) shows the dependency at the position.

Metrics, Definitions and Properties 7

the metrics are known at the nodes (which amount to the vertices in the case of a first-degree meshing) of the mesh and the problem consists of defining the metric at any point of the domain. As it will be seen later, this problem occurs both in mesh construction methods as in mesh adaptation methods. In addition, we take a look at metric intersection problems where several discrete metric fields are given, the goal being to define a unique field that best reflects initial fields. 1.2.1. Metric interpolation A discrete metric field is given over a domain, which is namely known at the nodes of the elements of a mesh of this domain, and different interpolation methods are discussed to find the value of this metric field at any point of the domain. The interpolation on the domain is carried out through its meshing, element by element. Initially, one considers the case of a mesh with simplicial elements of the first degree. Let K be such an element (a segment, a triangle or a tetrahedron) and Pi its vertices, then any point P  αi Pi , where the αi are the barycentric coordinates4 of P . of this element is written as P = i

The interpolation problem involves defining the metric M(P ) at P from the metrics M(Pi ) at vertices Pi of K and from αi . The interpolation that we seek, beyond its character of pure interpolation, must verify two paramount properties: – it must be monotonic from the point of view of the variation in size; – it must verify a maximum principle from the point of view of the unit balls associated with the metrics. The monotonicity indicates that the variation in size in each direction is an increasing or decreasing monotonic function. The maximum principle states that, at any P of K, the volume of the unit ball associated with the metric of P is comprised between the minimum and maximum volumes of the balls associated with the vertices of K. It should be noted that the volume of the 1 unit ball associated with the metric M(P ) is proportional to  . Furthermore, from det(M(P )) thepoint of view of each element, if the metric is constant on K, the volume of  this element is det(M) |K|, where |K| is the usual Euclidean volume of K and the term det(M) can be seen as a correction factor for the calculation of a volume in a metric. Therefore, the second property gives control over the change in volume of the elements. In the isotropic case, the metric at a point P is represented by the matrix M(P ) = h2 1(P ) I, where I is the matrix identity and h(P ) is the size at P . It is, thus, easy to find the metric at any P of K according to the metrics at its vertices, since it suffices to build a proper interpolation αi h(Pi ). Another function of sizes. The simplest is a size linear interpolation, that is h(P ) = i

4. And also, in fact, the element form functions evaluated at point P .

8 Meshing, Geometric Modeling and Numerical Simulation 2

choice is based on geometric interpolation of size, that is h(P ) =



hαi (Pi ), and the metric

i

in P can be expressed as M(P ) = h2 1(P ) I with either one of these choices for h(P ). It should be noted that geometric interpolation gives preference to small sizes, and thereby, meshes that have to satisfy such a metric will be finer than those defined by linear interpolation where, at any point, sizes are larger. Obviously, geometric and linear interpolations verify both monotonicity and maximum properties. Finally, let us mention the existence of other interpolation functions,  −1  αi for example harmonic interpolation defined by h(P ) = . h(Pi ) i The anisotropic case is not so straightforward and many approaches of more or less complexity (simplicity) have been proposed and their properties verified. Since we want to see the two aforementioned properties satisfied, we will examine different solutions in light of this double criterion.  Coefficient interpolation The most simplistic idea is to interpolate term by term the coefficients of the matrices representing the metrics. In general, we designate by mkl the coefficients  of metric M. For linear αi mkl (Pi ) or even M(P ) = αi M(Pi ). For geometinterpolation, we have mkl (P ) = i i  i ric interpolation, one would have mkl (P ) = mα kl (Pi ) but since the coefficients mkl can be i

negative, this interpolation is not valid. Coefficient linear interpolation is generally not satisfactory because the coefficients mkl do not directly reflect the size of the element. However, the first property of monotonicity is verified in every direction and despite the second property not being satisfied, this approach remains a simple possible solution. Moreover, any metric is written as M = RΛt R, with R a matrix of change in basis and Λ a diagonal matrix whose coefficients are the reciprocals of the squared size, that is to say λi = h12 in the ith direction defined by the i change in basis matrix (whose vectors are the columns5 of the matrix); termwise interpolation t t of two metrics M1 = R1 Λ1 R1 and M2 = R2 Λ2 R2 only makes sense if R1 = R2 = I; therefore, one finds the fact that this approach is legitimate in the isotropic case only.  Simultaneous reduction interpolation The idea is to find a common basis (eventually non-orthogonal) in which two given matrices can be written in a diagonal form and, thus, to be able to combine them in this basis using any particular interpolation formula. Before moving on, it should be noted that this approach makes it possible to interpolate in a unique manner the metric on a segment but not in an element as it will be seen further on. Let two matrix metrics be M1 and M2 , since M1 is invertible, the matrix N = M−1 1 M2 is well-defined. It is M1 that is symmetric and therefore diagonalizable. Let P = (ei )i=1,...,d

5. In some references, the matrix M is broken down into t RΛR with the vectors of the change of basis as rows in the matrix R. Both notations are thus strictly equivalent.

Metrics, Definitions and Properties 9 be the matrix whose columns are the eigenvectors ei (forming a basis of Rd ) of N and λi the eigenvalues associated, one thus has N ei = λi ei . It should be noted that, if there are no multiple eigenvalues, the basis P is unique up to a homothety. Otherwise, there are an infinite number of non-homothetic bases for each eigensubspace associated with a multiple eigenvalue. Let X be a vector of Rd ; the coordinates X  this vector in the basis P verify PX  = X. We have: t

XM1 X = t X t PM1 PX  .

Therefore, the matrix of the quadratic form M1 in the basis P is t PM1 P. The coefficient ij of this matrix is, therefore, t ei M1 ej . Similarly, the coefficient ij of the matrix of the quadratic form M2 in the basis P is t ei M2 ej . We are going to show that for i = j, a basis P can be chosen (even in the case of multiple eigenvalues) in which coefficients ij are zero for i = j. This means that M1 and M2 are diagonal in the database P. Let us consider the expression t ei M2 ej for i = j; it follows that: t e i M 2 e j = λj t e i M 1 e j , because M2 ej = λj M1 ej , we also have: t

e j M 2 e i = λi t e j M 1 e i = λ i t e i M 1 e j ,

because M1 is symmetric and t ej M1 ei is a scalar equal to its transposed. Similarly, since ei M2 ej = t ej M2 ei , it follows that:

t

(λi − λj )t ei M1 ej = 0. If λi = λj , one gets t ei M1 ej = 0, and subsequently, t ei M2 ej = 0. Otherwise, λi or λj is a multiple eigenvalue and one can choose, in its own subspace (by means of the Schmidt orthogonalization process), a basis M1 -orthogonal, which thus guarantees that t ei M1 ej = 0, and subsequently, also t ei M2 ej = 0. Note that the basis P in which M1 and M2 are diagonal must be composed of M1 -orthogonal eigenvectors for the eigensubspaces associated with the multiple eigenvalues. By designating μ1,i (respectively, μ2,i ) the quantities t ei M1 ei (respectively, t ei M2 ei ), the quadratic form M1 (respectively, M2 ) is written in the diagonal form as Λ1 (respectively, Λ2 ), a diagonal matrix having μ1,i (respectively, μ2,i ) as coefficients. Coefficients 1 1 μ1,i (respectively, μ2,i ) can also be written as 2 (respectively, 2 ), where h1,i (respectively, h1,i h2,i h2,i ) represents the size according to the direction ei . Therefore, one considers a segment [P1 , P2 ], the metrics at these points, M1 and M2 , and one seeks to define the metric Mt at a point P (t) = (1 − t)P1 + tP2 , where the parameter t varies in the range [0, 1], with P (0) = P1 and P (1) = P2 . Metrics M1 and M2 , in the basis P, 1 1 are defined by the diagonal matrices Λ1 and Λ2 of coefficients 2 and 2 . The interpolated h1,i h2,i 1 Mt , in the basis P, is defined by a diagonal matrix Λt of coefficients 2 , where ht,i is an ht,i interpolation function of h1,i and h2,i . In other words, the interpolated Mt interpolates the sizes following the directions ei .

10 Meshing, Geometric Modeling and Numerical Simulation 2

As already seen, there are several possible choices for the interpolation function. The simplest ones are the following: linear interpolation: ht,i = (1 − t)h1,i + th2,i ,  h2,i t t = h1−t geometric interpolation: ht,i = h1,i 1,i h2,i . h1,i

[1.7] [1.8]

Given that the metric Mt is defined in the basis P, by the diagonal matrix Λt , its expression in the usual basis is written as:

Mt =

−t

PΛt P −1 ,

where −t P is an abbreviated notation for t P −1 , the inverse of the transposed. In both interpolation cases, since sizes are interpolated only according to d preferred directions (the ei ), the monotonicity property cannot be globally verified. The determinant of the 1 matrix det(Mt ) is that of the diagonal matrix found above and is therefore equal to 2 2 . ht,1 ht,2 Using a simple counterexample, it is easy to see that the maximum principle is violated in the linear interpolation case (set h1,1 = 1, h2,1 = 3, h1,2 = 3, h2,2 = 1 and evaluate the determinant at t = 12 ). On the other hand, in the geometric case, one successively gets: det(Mt ) =

=

1 h21,1 h21,2

1 1 1 1 = 2−2t 2t 2−2t 2t = 2 2 −2t 2t 2t h2t,1 h2t,2 h1,1 h1,2 h−2t h1,1 h2,1 h1,2 h2,2 1,1 h2,1 h1,2 h2,2 −2t h−2t 2,1 h2,2

h−2t 1,1

h−2t 1,2

 = det(M1 )

det(M2 ) det(M1 )

t

= det(M1 )1−t det(M2 )t ,

therefore the determinant itself follows a geometric interpolation and, consequently, the maximum principle is verified. In conclusion, for this method based on simultaneous reduction (with generally non-proportional metrics), linear interpolation, being least expensive, does not verify the maximum principle, whereas geometric interpolation, which is more expensive, has the right properties. In the presence of more than two metrics, it is impossible to build a common basis in which all of these metrics are diagonal. However, since associativity is not guaranteed, by imposing an order of consideration of these metrics, one can gradually build a process of interpolation by taking into account the barycentric coordinates of the point in the element containing it.  Interpolation using matrix functions One should bear in mind that interpolation of metric coefficients M is not satisfactory but that 1 interpolation on M− 2 (somehow representing sizes), which is also a metric, leads to considering 1 the mapping of a scalar function f to a matrix, here f (x) = x− 2 . Let M be a metric represented t by its matrix. It can be written as M = RΛ R where Λ is the diagonal matrix of the eigenvalues and R the basis of the eigenvectors of M, each eigenvalue being inversely proportional to the square of a size. The matrix f (M) is defined as f (M) = Rf (Λ)t R.

Metrics, Definitions and Properties 11

Let P be a point of the domain.  There is an element K of the mesh of vertices Pi in which αi Pi with, for all i, 0 ≤ αi ≤ 1. If one considers a linear it is contained such that P = 1

i

interpolation on M− 2 , it then follows that:  M(P ) =



−2 1

αi M− 2 (Pi )

.

i

On the other hand, considering a geometric interpolation yields the expression: M(P ) =

 

−2 (M

− 12

(Pi ))

αi

,

i

however, the product of metrics is usually not a metric. It should be preferable to rewrite 1 M− 2 (Pi ) as: 1 1 1 M− 2 (Pi ) = exp(log(M− 2 (Pi ))) = exp(− log(M(Pi ))). 2

As a result:

 M(P ) =



1 exp − αi log(M(Pi )) 2 i

or still: M(P ) = exp



−2 ,

αi log(M(Pi )) .

i

By making use of the exponential and the logarithm [Arsigny et al. 2006], the product of matrices has been transformed into a sum of matrices in which each one is a metric, thereby properly yielding a metric. As in the case of interpolation based on simultaneous reduction, the monotonicity property is not verified for any of these interpolations; and obviously, linear interpolation does not verify the maximum principle. On the other hand, the latter is properly verified via geometric interpolation. In effect:







  det(M(P )) = det exp αi log(M(Pi )) = exp tr αi log(M(Pi )) i

= exp

 i

i

αi tr (log(M(Pi )))

=

 i

(exp (tr (log(M(Pi )))))

αi

=



α

(det (M(Pi ))) i ,

i

where tr(.) refers to the trace of a matrix. Therefore, det(M(P )) is a geometric interpolation of det(M(Pi )).

12 Meshing, Geometric Modeling and Numerical Simulation 2  Interpolation using natural bases The previous methods require matrix diagonalizations, and the last one requires costly evaluations of transcendent functions (log and exp). The main idea is to define a common basic form for every metric  inwhich it is diagonal or even identity. In the isotropic case, a metric M can be 1 1 written as I I , h being the size prescribed by the metric. In the case of an anisotropic h h metric, this decomposition represents the Cholesky decomposition, namely M = L t L, where L is a lower triangular matrix with strictly positive diagonal coefficients [Laug, Borouchaki-2013], 1 [Laug, Borouchaki-2017]. The fact that matrix L acts as suggests that interpolation with reh spect to L−1 should be considered. It therefore yields: M(P ) = L(P ) L(P ) t

with L(P ) =



−1 αi L

−1

(Pi )

.

i

In this case, only the linear interpolation of the coefficients of L−1 is possible because they may be negative. Another possible interpolation can be built based on a factorization of L and written as L = L D, where L is also a lower triangular matrix but with 1 as diagonal coefficients and the coefficients of matrix D are inversely proportional to the sizes. Specifically, every metric M(Pi ) is written as: M(Pi ) = L (Pi ) D2 (Pi ) t L (Pi ). Then, for a linear interpolation, we have:

D(P ) =



−1 αi D

−1

(Pi )

,

i

L (P ) =



αi L (Pi ),

i

and:

M(P ) = L (P ) D2 (P ) t L (P ) .

For geometric interpolation, only the matrix D(P ) is interpolated assuming a geometric interpolation of the coefficients of D−1 (P ) (this makes sense because D−1 is diagonal and its coefficients are positive). In this case, given that det(M) = det(D2 ) and that D is diagonal, this interpolation is a geometric interpolation of the determinants and the maximum principle is verified.

Metrics, Definitions and Properties 13

It should be noted that the Cholesky decomposition is by construction dependent in the system 1 of coordinates, whereas the previous method (interpolation of M− 2 ) is not. Clearly, this means that this method is not really suitable in cases where there is strong anisotropy or fast variation of the metric. On the other hand, this method is less costly than the others. To go back to the initial point, the construction of a continuous metric field from the metric data at the vertices of a mesh is achieved piece by piece, by applying in each of these the appropriate interpolation formula based on its vertices only. Note that this is also the method that makes it possible to find the metric at a point when it is inserted in a mesh, either for its actual insertion (to find its position) or for later use (to evaluate a metric in a built element of which it is part as a vertex). To close this discussion on interpolation metric methods, it seemed that providing a few examples involving numbers for comparison would help clarify ideas. To this end, we take two metrics (for a two-dimensional case) and we calculate the metric interpolated in the middle of the corresponding segment. We use the same numbers as indicated in [Michal, Krakos-2012] and the conclusions related thereto. Only the anisotropic case presents a real interest and that, a fortiori, in the case where anisotropy rates are high6. The various methods are compared based on this criterion: is there loss or conservation of anisotropy in the interpolation? In Table 1.1, methodrs , methodp and methodlog successively refer to simultaneous reduction-based methods, power-based methods with α = − 12 and logarithm-based methods. Two metrics initially given have a stretching rate of 1, 000 and form between each other an angle of 10° then of 45°, and the results are outlined in Table 1.1. methodrs methodp methodlog 10o 45o

11.4 2.41

115.0 5.80

900.0 132.0

Table 1.1. Stretching rate after interpolation, according to the method being used

Unsurprisingly, the result deteriorates when the deviation between the two initial metrics increases but the logarithm-based method remains the one that best preserves stretching. In other words, one of the difficulties during interpolations of strongly anisotropic metrics is the loss7 (the dilution) of this anisotropy. 1.2.2. Metric intersection This is the case where several metrics (of various sources) are given at a point and where only a single metric is searched for, which is capable of representing all or part of the properties of the initial metrics.

6. If stretching rates remain low, all methods are roughly acceptable. 7. For example, a mesh built based on these metrics becomes isotropic, whereas an anisotropic mesh was expected.

14 Meshing, Geometric Modeling and Numerical Simulation 2

Figure 1.2. Two examples of metric intersection. The initial metrics are drawn in blue and green, and the metric intersection is shown in red

• Case of two metrics, M1 and M2 : the simultaneous reduction process seen above is applied to the two metrics involved. In the corresponding basis, these two metrics are written in the diagonal form with Λ1 and Λ2 as diagonal matrices whose coefficients are denoted by μ1,i and 1 1 μ2,i (also expressed by way of sizes such as 2 and 2 ). The intersection metric expressed h1,i h2,i in the common basis has the matrix Λ1 ∩ Λ2 as diagonal matrix whose coefficients are equal 1 . Geometrically, the intersection to max(μ1,i , μ2,i ) or still, according to sizes, min(h21,i , h22,i ) metric M1 ∩ M2 has the larger ellipse (ellipsoid) included in the intersection of the two initial ellipses (ellipsoids) as associated ellipse (ellipsoid) (Figure 1.2). • Example with two metrics, M1 and M2 : if the previous process is applied to two metrics, then gradually, to the result intersected with another metric, a solution is obtained that depends on the order in which metrics are treated. Therefore, intersection is not an associative operation. A solution that should be discussed would involve searching for the larger ellipse (ellipsoid), known as John’s ellipse, included in the intersection of all the given ellipses (ellipsoids). 1.3. Geometric metrics In general, the information of a metric field (continuous or discrete) makes it possible to calculate lengths using the dot product induced. A metric is called geometric if it is explicitly built8 based on the geometry of the variety under consideration. Geometric metrics are thus used to specify the lengths of segments (curve discretization) or of the edges of the elements (surface mesh) that make it possible to ensure, for a given tolerance, the geometry of a variety (curve or surface). Thereafter, these metrics depend on geometric properties, more specifically on geometric curvatures. Furthermore, the local behavior of the

8. In that sense, a uniform (isotropic) metric is not geometric in nature.

Metrics, Definitions and Properties 15

variety is described by a quadric depending on geometrical curvatures. Compliance to the geometry of the curve is thus determined by the precision of the geometric approximation of this quadric (which, it should be remembered, achieves a second-order approximation of the variety). Geometric metrics, characterizing the building components (segments and triangles) of this approximation by means of the lengths in question, are isotropic or anisotropic depending on whether they contain or do not contain directional information (in the case where the concept of directionality is relevant). Varieties can be defined essentially in two different ways, explicitly or implicitly. In the first case, a mapping (parametric) supposed to be regular enough that can be used from a space of parameter(s) onto the variety and geometric curvatures can be evaluated in analytical manner according to the derivatives of the map. In the second case, the variety is defined by a line or level surface of an implicit function given in the space. Similarly, geometric curvatures can be evaluated based on the derivatives of this function.  Explicit or parametric case In the case of a curve, the geometry is locally characterized by a curvature or its reciprocal, a radius of curvature. This curvature represents the modulus of the second derivative of the parametric map if the parameter is the curvilinear abscissa, as it will be discussed in the following section. The geometric metric is a metric whose size is locally proportional to the radius of curvature; this thus designates an isotropic metric if considering a pendent curve (not composed of a surface). For a surface, the geometry is locally characterized by the two principal curvatures (or principal radii of curvature) and also the principal directions of curvature. These entities represent the eigenvalues and the eigenvectors of the Weingarten matrix of the surface. This matrix depends on the two fundamental forms of the surface as it will also be addressed in the following section. In this case, the geometric metric is a metric whose principal sizes are locally proportional to the two principal radii of curvature with a particular relation between the two coefficients of proportionality.  Implicit case The situation is the same as above, the geometry of a curve or of a surface is locally characterized by the (principal) radi(i) of curvature and, for a surface, by the principal directions of its Weingarten matrix. The difficulty here is to be able to evaluate these quantities. In the neighborhood of a regular point, the implicit function theorem states that there is a parametric representation of the curve or surface. One is thus reduced to the previous case. Therefore, based on these metrics and computations of length deriving thereof, it will be possible to build a discretization (a mesh) of a curve (of a surface) by controlling the precision of the approximation thus achieved, as it will be subsequently discussed in corresponding chapters. The purpose of this section is to show how metrics introduced above can be built by resorting to curves (for the relevant concepts, in this case) before examining the case of surfaces. Finally, it will be shown how any volume metric (namely of physical origin) can be modified to make it geometric at the surface level of the solid area under consideration.

16 Meshing, Geometric Modeling and Numerical Simulation 2

1.3.1. Geometric metric for a curve The case of a pendent curve (not drawn on a surface) is considered here, the other possible case (curve drawn on a surface) will be addressed below. A curve defined in a parametric manner is observed through a function γ and a parameter t. The curve is supposed to be sufficiently regular (at least twice differentiable but also noiseless or free from “small” oscillations9, which are situations that, nonetheless, will have to be taken into account during the practical construction of a discretization). Chapter 3 will outline the method for building a geometrical mesh of such a curve in order to control the precision of the approximation thus achieved. We refer to this chapter and we only indicate that, in advance, the metric to be defined for this control requires the size in a single direction, that of the tangent, and requires that this size be locally proportional to the radius of curvature. It will be shown that this enables controlling, for a given threshold, the quality of the discretization in terms of distance with the curve or of angular deviation with respect to the tangent. For α, a coefficient depending on the given precision threshold, the size h(t) in the direction of the tangent is written as: h(t) = α ρ(t), with the radius of curvature ρ(t) =

1 , where κ(t) is the curvature that is defined as κ(t) = κ(t)

||γ  (t) ∧ γ  (t)|| . This is tantamount to stating that a metric M is geometric if and only if: ||γ  (t)||3 α2 ρ2 (t)t τ (t)Mτ (t) = 1,

where τ (t) is the unit vector tangent to the curve at t. It should be noted that the isotropic metric 1 M(t) = I is the geometric isotropic metric and that there exists an infinite number of h(t)2 anisotropic geometrical metrics. Through the radius of curvature, which is the radius of the osculating circle to the curve, this control originates from a truncated third-order Taylor expansion, which makes it possible to locally study the behavior of the curve (supposed to be sufficiently regular). This expansion can be expressed on the function γ by the parameter t, namely: γ(t + Δt) = γ(t) + Δt γ  (t) +

Δt2  Δt3  γ (t) + γ (t) + o(Δt3 ). 2 6

Since curves in R3 are usually awkward, the expansion is pushed to the third order. Nevertheless, since the triplet (γ  (t), γ  (t), γ  (t)) does not constitute, in general, an orthogonal frame of reference, we are led to consider the canonical representation, denoted by γ˜ , which is to say a parameterization in the curvilinear abscissa s. Therefore, in the neighborhood of the point of parameter s, the expansion is written as: γ˜ (s + Δs) = γ˜ (s) + Δs γ˜˙ (s) +

Δs2 ¨ Δs3 ... γ˜ (s) + γ˜ (s) + o(Δs3 ). 2 6

9. Or even such that, locally, the radius of curvature and the tolerance threshold are not of the same order.

Metrics, Definitions and Properties 17 This notation10 allows for expressing the Taylor expansion (the local representation of the curve) in the Frenet–Serret frame. In effect, we have γ(s) ˙ = τ (s), where τ is the unit vector tangent to the curve at γ(s), γ¨ (s) = κ(s)ν(s), where κ(s) and ν(s) are the curvature and the principal unit normal vector at γ(s). Complementing the pair (τ (s), ν(s)) by the binormal b(s) = τ (s) ∧ ν(s), one gets an orthonormal frame, the Frenet–Serret frame of reference. This frame verifies the relations: ⎧ ⎨ τ˙ (s) = κ(s)ν(s) ν(s) ˙ = −κ(s)τ (s) + β(s)b(s) , ⎩ ˙ b(s) = −β(s)ν(s) where β(s) designates the torsion of the curve at the point of abscissa s (this torsion being zero for planar curves). These relations can be easily established using the fact that the Frenet–Serret frame is orthonormal. In particular, the torsion β can be calculated with the parameter t by the formula: det(γ  (t) γ  (t) γ  (t)) β= . ||γ  (t) ∧ γ  (t)||2 These relations make it possible to rewrite the Taylor expansion as: γ˜ (s + Δs) = γ˜ (s) + (Δs − +(

κ(s) 2 κ(s) ˙ κ2 (s) 3 Δs ) τ (s) + ( Δs + Δs3 ) ν(s) 6 2 6

κ(s)β(s) 3 Δs ) b(s) + o(Δs3 ). 6

[1.9]

From this expansion, it can be shown that the sphere of center γ˜ (s), and whose radius is R =  2 , where σ(s) = 1 is the radius of torsion at s, is an osculating sphere ρ2 (s) + (ρ(s)σ(s)) ˙ β(s) (the curve is locally drawn on this sphere). As a result, the size is written as h = αR, as previously seen. Provided that the radius R of the osculating sphere is larger than the radius ρ(s) of the osculating circle, the size h can be reconsidered as h = αρ in the direction of τ and thereby the definition of the geometric metric is obtained. It should be noted that if the curve is plane, torsion is zero, therefore R is directly equal to ρ. 1.3.2. Geometric metric for a surface We now look into the case of a surface, then we will go back to curves, which now are traced on a surface. Metrics will be used to evaluate the lengths of an entity (a segment (an edge), a curve, etc.) so that such entities enable performing adequate geometric approximations of variety, namely to verify the required properties of proximity. The local behavior of a surface is linked to its

10. Just like γ  , (t) refers to the derivative in t, γ˜˙ (s) denotes the derivative in s.

18 Meshing, Geometric Modeling and Numerical Simulation 2

two fundamental forms. The first fundamental form will make it possible to connect the lengths of curves traced on the surface. On the other hand, the second fundamental form will make it possible to control, per element, the distance gap between this element and the surface and the angle gap with the tangent plane to the surface at its vertices. The first form is related to the first derivatives of the function describing the surface; as a result, it is the metric itself of the tangent plane that is used for computing lengths. The second form relates to the second derivatives of the function and it is the so-called metric of the radii of curvature that, for example, contains information about these radii, thus providing a means to control whether these latter are satisfied. • Surface geometric metric Surfaces can be defined in several ways, in particular, there are parameterized surfaces that can be regarded as the image in R3 of a parametric space of R2 . Among meshing methods of such surfaces, indirect methods can be found that consist of meshing the parameter space (therefore in R2 ) before projecting this mesh into R3 to obtain an approximation of the real surface. The mesh of R2 must be built according to a metric, so-called induced metric, which must be defined in accordance with those corresponding to basic forms, which, in turn, are in R3 . Methods to find this induced metric will be detailed in Chapter 4. Here, we will simply try to define the metric (in R3 ) related to the radii of curvature that enable us to control, for a given threshold, the distance gap between the surface and its approximation, as well as the gap to the tangent plane (thereby zeroth-order and first-order distances). The parametric case is again considered, a mapping σ of parameters, the pair (u, v) defining the points on the surface by M (u, v) = σ(u, v) for any pair varying in the parameter space. By studying the local behavior of the surface in the neighborhood of a point by the means of a Taylor expansion, it will be shown that the geometric metric (which will actually be used in Chapter 4) is of the form: ⎛ ⎜ ⎜ M(u, v) = t D(u, v) ⎜ ⎝

1 α2 ρ21 (u, v) 0 0

⎞ 0 1 β 2 ρ22 (u, v) 0

0

⎟ ⎟ D(u, v), 0 ⎟ ⎠ λ

where the columns of D(u, v) are the principal unit directions and the unit normal at the point of parameter (u, v), ρ1 = 1/κ1 and ρ2 = 1/κ2 are the principal curvature radii (κ1 and κ2 denoting the principal curvatures) in (u, v), λ is an arbitrary scalar, and α and β are coefficients defined according to a tolerance ε given by:    ρ1 ρ1 α = 2 ε(2 − ε) and β = 2 ε 2 −ε . ρ2 ρ2 As for curves, it is assumed that the surface is sufficiently regular and, in the vicinity of the point of parameter (u, v) for increments Δu and Δv, the truncated second-order Taylor expansion can be written as, namely: σ(u + Δu, v + Δv) = σ(u, v) + Δu σu (u, v) + Δv σv (u, v)

Metrics, Definitions and Properties 19  1  2    (u, v) + Δv 2 σvv (u, v) + o(Δu2 + Δv 2 ), Δu σuu (u, v) + 2ΔuΔv σuv 2 and it is this approximation that corresponds to a quadric that we are going to try to control. By Δσ, one designates the quantity σ(u + Δu, v + Δv) − σ(u, v) and one denotes τ1 = σu (u, v) τ1 ∧ τ2 . Furthermore, and τ2 = σv (u, v). The unit normal vector at (u, v) is defined as ν = ||τ1 ∧ τ2 || any unit vector τ of the tangent plane at (u, v) (generated by τ1 and τ2 ) is written as τ = Δu τ1 + Δv τ2 . We consider the plane generated by the vectors τ and ν (which are, by ||Δu τ1 + Δv τ2 || construction, unity and orthogonal) and the intersection of the surface with this plan, in other words a normal section of the surface. The analysis of this curve is achieved as seen above and, by varying the parameters Δu and Δv, the local behavior of the surface can be analyzed in every direction in order to deduce thereof the correct geometric metric sought after. +

For a given vector τ , the trace of this normal section is a curve that is written in the frame (τ, ν) as: X(Δu, Δv)τ +Y (Δu, Δv)ν, with X(Δu, Δv) = Δσ, τ and Y (Δu, Δv) = Δσ, ν , simply denoted by X and Y in the following. Its first component is thus expressed as: X = ||Δu τ1 + Δv τ2 || + O(||Δu2 + Δv 2 ||). Thereafter, X 2 is a quadratic form in Δu and Δv, which is written as: X 2 = t ΔxMσ Δx + o(||Δx||2 ), with Δx the vector of components Δu and Δv and:  τ1 , τ1 τ1 , τ2 Mσ = , τ1 , τ2 τ2 , τ2 represents the matric of the first fundamental form of the surface. Similarly, the second component of the curve is a quadratic form in Δx that is expressed as: Y =

1t ΔxNσ Δx, 2

where Nσ represents the matrix of the second fundamental form of the surface, that is:    (u, v), ν σuu (u, v), ν σuv Nσ = .   σuv (u, v), ν σvv (u, v), ν Since we have: X2 t ΔxM

σ Δx

= 1 + o(1)

it follows that: Y =

and

o(Y ) = o(||Δx||2 ) = o(X 2 ),

1 κ(Δx)X 2 + o(X 2 ), 2

20 Meshing, Geometric Modeling and Numerical Simulation 2

where the curvature κ appears that is equal to: t

κ(Δx) =

ΔxMσ Δx . σ Δx

t ΔxN

This equation shows that the curvature of the curve Xτ + Y ν in the point of parameters (u, v) is κ(Δx) and that its principal normally coincides with ν. As already seen in the case of curves, this implies that the ideal size in the direction τ must be proportional to |ρ(Δx)|, where ρ(Δx) = 1 is the radius of curvature in the direction τ . To find the ideal size in all directions, one κ(Δx) must determine the extrema of |ρ(Δx)|. To this end, a simultaneous reduction of matrices Mσ and Nσ is applied that provides an orthonormal basis (w1 (u, v), w2 (u, v)) of the tangent plane in (u, v) in which the two matrices are diagonal. In fact, this basis comprises unit eigenvectors of the so-called Weingarten matrix M−1 σ Nσ (by denoting that Mσ is invertible because it represents a metric). Within this new basis, the curvature κ(Δx) is written as: κ(Δx) =

κ1 (u, v)Δu2 + κ2 (u, v)Δv 2 , Δu2 + Δv 2

where κ1 (u, v) and κ2 (u, v) are the eigenvalues of the Weingarten matrix according to w1 and w2 , respectively. This equation shows that the extrema of the curvature at (u, v) are κ1 (u, v) and 1 and κ2 (u, v), or even that the extrema of the radii of curvature are the principal radii ρ1 = κ1 1 . The latter are used to define surface geometric metrics. ρ2 = κ2 These results enable us to build the geometric metric sought after in the isotropic case and in the more interesting case, the anisotropic case11.  Isotropic metric For this choice, the greater curvature is considered, therefore the smallest radius of curvature ρ(u, v) = min(ρ1 (u, v), ρ2 (u, v)) and it can be observed that in every direction of the tangent plane at (u, v), the radius of curvature is greater than or equal to ρ. In this case, the geometric size is, as seen above for a curve, proportional to ρ, which is written in terms of metric as: ⎛ ⎞ 1 0 0 ⎜ α2 ρ2 (u, v) ⎟ ⎜ ⎟ 1 ⎟ ⎜ 0 0 M(u, v) = ⎜ ⎟, α2 ρ2 (u, v) ⎜ ⎟ ⎠ ⎝ 1 0 0 2 2 α ρ (u, v)  with α = 2 ε(2 − ε) or α = 2 sin θ, ε and θ, respectively, representing the relative gap and angular deviation as in the case of curves.

11. Specificity of surfaces with respect to curves.

Metrics, Definitions and Properties 21  Anisotropic metric In this case, the size will vary according to directions. It will be shown that a metric can be defined based on ρ1 and ρ2 such that size according to each direction is increased by an amount proportional to the radius of curvature in this direction. It is assumed that ρ1 ≤ ρ2 . Any unit vector v of the tangent plane is written as v = cos φ w1 + sin φ w2 and the radius of curvature in the direction v, ρv , satisfies Euler’s formula: 1 cos2 φ sin2 φ = + . ρv ρ1 ρ2 When the angle φ varies, ρv spans a non-elliptical curve centered at the point of parameter (u, v). Consider the largest ellipse contained in the region whose boundary is the previous curve. In the basis (w1 , w2 ), this ellipsis is written as: x21 x2 + 22 = 1. 2 ρ1 ρ2 As a matter of fact, if ρv is the radius of this ellipse in direction v, we have: 1 cos2 φ sin2 φ = + . ρ21 ρ22 ρ2v It can be derived that: 1 1 − 2 = sin2 φ cos2 φ ρv ρ2v



1 1 − ρ1 ρ2

2 ,

and thereafter ρv ≤ ρv , therefore the ellipse of principal axes ρ1 and ρ2 is contained in the region in question. Since following w1 and w2 , radii coinciding, this ellipse is indeed the largest. Therefore, the geometric metric defined in the tangent plane is written as: ⎛ ⎜ ⎝



1 α2

ρ21 (u, v) 0

0

⎟ ⎠, 1 2 2 α ρ2 (u, v)

with α as defined above. However, with such a definition, the relative gap between the surface and its approximation, which is ερv , varies when direction v varies from direction w1 toward direction w2 . This would result in very strongly tilting the elements generated around the point under consideration during the construction of a mesh respecting these sizes, when the two radii of curvature, ρ1 and ρ2 , are significantly different. To avoid this pitfall, the same gap is imposed in all directions. For this purpose, the gap δ = ε1 ρ1 is specified in the direction w1 of the smallest radius of curvature by imposing the size in the same direction as αρ1 . To get the same gap δ in direction w2 , a relative gap of ε2 ρ2 is necessary with: ε2 = ε1

ρ1 . ρ2

22 Meshing, Geometric Modeling and Numerical Simulation 2

Figure 1.3. A curve traced on a cylinder, and the impact of the geometry of this surface on the metric to be defined for the curve

A size βρ2 can be deduced in this direction with:   ρ1 ρ1 2 −ε . β=2 ε ρ2 ρ2 Therefore, the geometric metric in the frame (w1 , w2 ) is rather of the form: ⎛ ⎜ Mα,β (u, v) = ⎝

1 α2 ρ21 (u, v) 0

⎞ 0

⎟ ⎠, 1 β 2 ρ22 (u, v)

which is a metric from which is built the metric of R3 indicated at the beginning. It should be noted that for this metric, the basis (w1 , w2 ) is completed by the unit normal and that the size in this last direction (which would be √1λ ) has no effect. In most cases, there is an infinite number of geometric metrics. These metrics are defined from the pairs (α, β  ) with β  verifying α ≤ β  ≤ β. For β  = α, the isotropic case is found again and β  = β is the extreme anisotropic case. This family of metrics will give us some flexibility to build geometric metrics constrained by other geometric or physical metrics. • Geometric metric for a curve traced on a surface To highlight the dependency between surface and curve metrics, a deliberately very simple example will be used (Figure 1.3). The surface is a cylinder and the curve traced on this cylinder presents regions with a large radius of curvature and regions with a small radius of curvature. For the cylinder, the same property can be seen with an infinite radius of curvature in one direction and one radius of curvature equal to the radius of a circle (the cylinder section) in the other direction (principal). According to the way in which the curve is placed (on the left and on the right side of the figure), the radii of curvatures of the curve and those of the surface are relatively of the same nature or actually in contradiction. This thus induces the need to find a geometric metric that best reflects these eventually antagonist characteristics. Bearing in mind that the geometric metric of a curve imposes the size according to a single direction, that of the tangent, it is generally enough to define a metric homothetic to the surface geometric metric, verifying the geometric size imposed following the tangent to the curve (see Chapter 3).

Metrics, Definitions and Properties 23

1.3.3. Turning any metric into a geometric metric Given an arbitrary metric M defined in a domain of R3 and a curve or surface of this domain (for example its boundary), the goal is to modify the metric M on this curve or this surface in order to be geometric with respect to this latter. In the case of a curve, the process is similar to that of the previous section. As seen above, in the case of a surface, surface geometric metrics are parameterized by pairs (α, β  ) with α ≤ β  ≤ β, α and (therefore) β fixed. Therefore, one must find the pair such that the corresponding geometric metric is represented by the ellipsoid of maximal volume contained in that of the metric M. For this purpose, α (precision threshold of geometric faithfulness) is first determined by the metric M by examining the direction w1 (the first principal direction, the one linked to the smallest radius of curvature) associated with the surface geometric metric. Then one varies β  in order to satisfy the above condition of inclusion, which leads to a nonlinear problem. 1.4. Meshing metrics Besides metrics of geometric origin outlined above, there are, more generally, so-called meshing metrics (geometric metrics being obviously an example thereof). A meshing metric is simply information that explains how a domain can be meshed by specifying sizes and directions that have to be followed. Two types of such metrics can be found. There are those that result in a calculation, from a posteriori analysis of the computed solution (these are computational metrics) but there are also those that have to be created, more or less ex nihilo, only from the information of the (known) discretization of the boundaries of the domain to be meshed, such that to guide the meshing algorithm. The metrics that have to be created can be identified during the meshing process of a domain, without specific information originating from a computation. This is the case, for example, when considering a mesh adaptation loop, during the construction, at best, of the first meshing taking place in this loop, therefore before any computation. In the chapters presenting meshing methods, it will be indicated, on the fly, how to define these metrics from the only known information (mainly the domain boundaries, as already indicated). For their part, computational metrics are the subject of Chapter 2. We merely indicate here that they will be used to control the quality of the solutions obtained via a finite-element calculation on a given mesh. More precisely, the solution (or, at the very least, a sensor of it) obtained using a mesh is analyzed by considering the interpolation error achieved. This information is then used to define the metric capable of minimizing this error in a way that will be specified (depending of the chosen norm). Based on the set of specifications (in terms of sizes and directions) contained in this metric, a new mesh is built and the process is now typically one of mesh adaptation (Chapter 8). It should be noted that geometric metrics and meshing metrics can (must) be combined.

24 Meshing, Geometric Modeling and Numerical Simulation 2

1.5. Metric gradation Domain metric gradation represents the rate of change in terms of size in the vicinity of any point of the domain. A significant rate of change has a negative influence on the quality of the corresponding unit mesh (to the metric) of the domain. In effect, for example in the case of an isotropic metric, an important rate of change implies the creation of edges of admittedly unit lengths (in theory) for this metric, but significantly different in the usual metric in the neighborhood of a vertex, thus preventing the formation of regular elements in the usual metric. In addition, in the case of a significant local change in the metric, it is difficult (in practice) to generate the corresponding unit mesh. Moreover, the variation of a field is better represented (sensed) if the corresponding metric gradation remains reasonable (vis-à-vis the application treated). Given a metric field defined on a domain, in order to obtain a unit mesh (respecting the metric) and of quality (essential constraint for any finite element-based computation), gradation should be controlled by a priori modifying the field rather than optimizing a posteriori the unit mesh corresponding to the original field. This approach makes it possible to a priori control quality in an intrinsic manner using the definition of the metric12. Historically, size or metric iterative smoothing methods have been proposed to decrease metric gradation by replacing the metric at each point by an average of the metrics in the neighborhood of that point. It should be noted that this type of method does not allow explicitly controlling metrics gradation. Furthermore, a number of smoothing iterations are applied without explicitly controlling the underlying gradation (a given rate cannot be prescribed). It is assumed that the metric field is defined discretely on a domain mesh. In other words, the field is known at the vertices of a domain mesh and is overall (continuously) defined by interpolation (through the mesh). This is a usual situation in the context of mesh adaptation where the metric field is obtained via an adequate error estimator. In the case of a continuous field (analytic13), it is still possible to consider a mesh of the domain and return to the discrete case. It is obvious that by decreasing sizes in all directions, and eventually by preserving the anisotropy of each metric (metric locally proportional to the original metric), gradation decreases. Consequently, gradation can be controlled by analyzing each edge of the mesh and by modifying, if necessary, size specifications at their ends and by iterating this process as long as modifications of metrics are applied. In the isotropic case where the metric is defined by a function of size h, the problem of controlling gradation is tantamount to placing a bound: – on the gradient norm of the function h; – on the ratio between the lengths of two adjacent edges. In the anisotropic case, as it will be seen hereafter, this size function h is defined following the direction of the edges and the same control can be applied. To quantify gradation, [Borouchaki et al. 1997c], two measures are defined in the first place, H-variation and H-shock, and then two methods are proposed for the correction of the metrics

12. And the possible optimization of the mesh will necessarily be diminished, while being more efficient. 13. Which generally, except for geometric metrics, is only an academic exercise not related to real situations.

Metrics, Definitions and Properties 25

involved that enable the control of each of these quantities. H-variation quantifies the gradient norm of the sizes, while H-shock characterizes the ratio between the lengths of adjacent edges. As already indicated, this is based on the edges of the mesh, thereby let [AB] be such an −−→ edge. If M(.) designates the metric, the length of the edge [AB], defined as [AB] = A + tAB with 0 ≤ t ≤ 1, is given by the expression:  lM(.) (AB) =

1



−−→

t ABM(A

−−→ −−→ + tAB)ABdt



1

0



−−→

−−→

t ABM(t)ABdt.

simply denoted by 0

1 I, where h(t) designates the h2 (t) value of the size function14 at the point of parameter t (thus with, h(0) = h(A) and h(1) = h(B)) and I is the identity matrix. Thereafter, we have: In the isotropic case, the metric is simply written as M(t) =

−−→ lM(.) (AB) = ||AB||



1 0

1 dt, h(t)

and it is the behavior of the function (once chosen) h(t) that is relevant. To simplify notations, it is assumed that h(A) ≤ h(B). We then consider a linear interpola−−→ tion function of h on the edge [AB], h(A + tAB) = h(A) + t(h(B) − h(A)), the H-variation v(AB) on the edge [AB] is defined as the discrete gradient of this interpolation function, that is: v(AB) =

h(B) − h(A) . −−→ ||AB||

[1.10]

−−→ Also consider a geometric interpolation function of h on the edge [AB], h(A + tAB) =  t h(B) h(A) . In this case, through a simple calculation, one gets: h(A) −−→ L = lM(.) (AB) = ||AB||

h(B) − h(A) h(A)h(B) log

h(B) h(A)

if h(A) = h(B)

−−→ ||AB|| otherwise. H-shock c(AB) on the edge [AB] is defined as being the distortion h(A) of the interpolation function of function h, namely:

and L =

 c(AB) =

h(B) h(A)

L1 .

[1.11]

−→ 14. Strictly speaking, it would be necessary to write h(t) as h(A + tAB); however, depending on the case, either of these expressions will be used.

26 Meshing, Geometric Modeling and Numerical Simulation 2 Note that by definition v(AB) ≥ 0 and c(AB) ≥ 1. These measures related to the edges of the mesh can be defined at its vertices by considering the maximum of the measures of the incident edges: v(A) = max v(AB) and c(A) = max c(AB), B

B

where B is the opposite end of A of all incident edges in A. As a result, a map of gradation measures at the vertices of the mesh is obtained and, by interpolation, a continuous measure of gradation over the whole domain. By definition, the H-variation (respectively, H-shock) of a metric is the maximum of H-variations (respectively, of H-shocks) at the vertices. In the general case (anisotropic case), to obtain an estimate of the variation of size along the edge [AB], one considers the size specification according to a single direction with that of the edge. This again allows us to find the isotropic case by way of an approximation, nonetheless. Therefore, size specifications in A and B, along the edge [AB], are taken into account and above definitions (isotropic case) do apply. Let M(A) designate the unit ball in metric M(A) centered in A, then this approximation consists of considering the size hAB (A) in A as being the one along [AB]: −−→ hAB (A) = ||AA1 || with A1 = [AB] ∩ M(A), and size hAB (B) is defined in the same way. Subsequently, we propose two approaches using each of the measures mentioned above for (a threshold having been given) the gradation of a metric field. For each approach, the isotropic and anisotropic cases are successively examined.  Hv-correction The first approach involves the H-variation (hence the notation Hv for this correction) and consists of replacing, if necessary, a specification of initial size by a specification of smaller size. In the isotropic case, the geometric form of unit balls is preserved. In other words, the isotropy of the metric field is preserved and only ball sizes change. In the anisotropic case, the geometric form of unit balls is preserved up to a given threshold; in other words, the principal directions and the anisotropy ratio of the metric field are preserved up to this threshold, then the form can degenerate along its major axis, except the smallest sized one, into that of an isotropic ball of this small size. In the isotropic case, the problem consists of bounding the H-variation v(AB) on the edge [AB] by a given threshold α, namely: v(AB) =

h(B) − h(A) ≤ α, −−→ ||AB||

by changing the size specifications h(A) and h(B). In fact, since it has been assumed that h(B) ≥ h(A), h(B) should be changed into: −−→ h(B) = min(h(B), h(A) + α||AB||). −−→ In this formula, if the minimum of h(B) and h(A) + α||AB|| is h(B), then the gradation is already bounded by the imposed threshold α and no correction is made. Otherwise, the size

Metrics, Definitions and Properties 27 −−→ h(A) + α||AB|| ≤ h(B) is the largest possible with an H-variation v(AB) = α. Therefore, this correction involves the smallest number of necessary modifications of size and consists of −−→ h(A) + α||AB|| reducing h(B) by the factor η = min(1, ). h(B) In the isotropic case, the problem thus consists of bounding the H-variation v(AB) on the edge [AB] by a threshold α by amending, if necessary, the values of h at the edge ends. The following iterative algorithm is proposed: H-variation correction algorithm, isotropic case

[1.12]

(1) Loop over the edges, [AB], of the mesh: −−→ - computation of ||AB||, the edge length and that of v(AB); - if v(AB) > α: −−→ . if h(A) ≥ h(B), h(A) = min(h(A), h(B) + α||AB||); −−→ . otherwise, h(B) = min(h(B), h(A) + α||AB||). – Loop end. – If one of the sizes has been amended, go to (1). Upon termination of this algorithm, it is possible to associate a map of reduction factors of size η ∗ at the vertices (calculated by combining the values of η at these vertices) with the size map defined by the original metric. In theory, this map of factors is the best possible (with a minimal reduction of the original metric). It should be noted that every factor is smaller or equal to 1. The new size map at the vertices, after correction, is defined by h∗iso = η ∗ h. In the anisotropic case, the problem consists of imposing a bound through a threshold α, the H-variation v(AB) in a coarse manner according to the direction of edge [AB] only by modifying, if necessary, the metrics at the edge ends. Let M(A) and M(B) be metrics in A and B. Considering the above notation, let hAB (A) and hAB (B) be sizes at vertices A and B in the direction of the edge [AB]. Assuming that hAB (A) ≤ hAB (B), we have v(AB) = hAB (B) − hAB (A) and, if necessary, the algorithm of the isotropic case can be applied to bound −−→ ||AB|| the gradation on the edge [AB]. If necessary, hAB (B) is amended and this change should be projected on the metric M. If η is the reduction factor on hAB (B), then the reduction factor on M(B) is η −2 . This means that the sizes in B are subjected to the same reduction factor in every direction, with the same directions and the same anisotropy ratio. However, it is known that the size map h∗iso represents a lower size bound in all directions to bound the gradation. Consequently, the factor η obtained for hAB (B) is applied according to the principal directions of M(B) within the limits of the isotropic size h∗iso (B). Let hi (B) be the sizes at B in the principal directions of M(B). The metric correction at B consists of replacing M(B) by a metric having the same principal directions but of size max(ηhi (B), h∗iso (B)). The first step of the correction algorithm involves the computation of the isotropic map h∗iso (.) at the mesh vertices based on the original metric. It should be recalled that this metric correction

28 Meshing, Geometric Modeling and Numerical Simulation 2 is not allowed to exceed, in terms of size, this isotropic map h∗iso (.). For this purpose, a map of minimal sizes at the mesh vertices has to be defined from the initial metric and the correction algorithm of the H-variation of the isotropic case has to be applied to this minimal size map. In order to define this latter map, for each metric, the minimum size among sizes associated with the principle directions of the metric is retained. The rest of the algorithm is similar, in principle, to the isotropic case. This is synthesized by the following iterative algorithm: H-variation correction algorithm, anisotropic case

[1.13]

h∗iso (.)

– Computation of the isotropic map at the vertices of the mesh. (1) Loop over the edges, [AB], of the mesh: −−→ - computation of hAB (A), hAB (B), of the length ||AB|| and of v(AB); - if v(AB) > α: −−→ hAB (B) + α||AB|| if hAB (A) ≥ hAB (B), η(A) = min(1, )): hAB (A) . calculation of principal sizes hi (A) = max(η(A)hi (A), h∗iso (A)); . formation of the new metric M(A) with these hi (A) and initial principal directions; −−→ hAB (A) + α||AB|| otherwise, η(B) = min(1, )): hAB (B) . computation of principal sizes hi (B) = max(η(B)hi (A), h∗iso (B)); . formation of the new metric M(B) with these hi (B) and initial principal directions. – Loop end. – If one of the sizes has been amended, go to (1). The threshold α is specified by the user according to the intended application. In practice, it should be noted that a very small value (close to 0) leading to an almost identical metric in all of the domain is not, in general, the desired goal.  Hc-correction The second approach is based on the measure H-shock (hence the notation Hc for this correction) and also consists of reducing if necessary an initial size specification. Similarly, in the isotropic case, the geometric form of unit balls is preserved, and in the anisotropic case, the geometric form of unit balls is preserved up to a certain threshold, and then the form can degenerate along its major axis, except the smallest sized one, into that of an isotropic ball of small size. In the isotropic case, it is again assumed that h(B) ≥ h(A) and for a geometric distribution, 1  −−→ h(B) − h(A) h(B) L with L = ||AB|| , we want c(AB) = ≤ β. The problem is h(A) h(A)h(B) log h(B) h(A)

therefore tantamount to reducing h(B) such that c (AB) = β, where c is the new value of c obtained with the new value of h(B) denoted by h (B). We designate by r the coefficient such

Metrics, Definitions and Properties 29 that h (B) = r h(A). From the relation c (AB) = β, one derives for r the equation: h(A) r log 2 r = logβ. −−→ ||AB|| r − 1 The resolution of this equation being non-trivial, an approximate solution thereof is proposed. −−→ h (B) − h(A)  Since h (B) ≤ h(B), the value L = ||AB||  (B) is such that L ≤ L , the h(A)h (B) log hh(A) 1 1     h (B) L h (B) L 1 , and c (AB) ≤ = η L c(AB) new H-shock is equal to c (AB) = h(A) h(A) h (B) 1 with η = . To get c (AB) ≤ β, it suffices that η L c(AB) ≤ β, which implies that h(B) L  L  β β η≤ . By reducing h(B) by the factor η = c(AB) , one obtains the desired c(AB) result and the corresponding algorithm can be written as: H-shock correction algorithm, isotropic case (1) Loop over the edges, [AB], of the mesh: −−→ - if h(B) ≥ h(A), compute L = ||AB||

h(B) − h(A)

[1.14] 

and c(AB) =

h(A)h(B) log h(B) h(A) L  β . if c(AB) > β, compute η = and set h(B) = η h(B); c(AB) 1  −−→ h(A) − h(B) h(A) L - otherwise, L = ||AB|| and c(AB) = : h(A) h(B) h(A)h(B) log h(B) L  β . if c(AB) > β, compute η = and set h(A) = η h(A). c(AB) – Loop end. – If one of the sizes has been amended, go to (1).

h(B) h(A)

L1 :

The correction of H-shock in the anisotropic case follows the same principle as that of Hvariation. We now consider hAB (A) and hAB (B); it is assumed that hAB (B) ≥ hAB (A) and −−→ hAB (B) − hAB (A) , and H-shock, along the edge [AB], is we introduce L = ||AB|| (B) hAB (A)hAB (B) log hhAB AB (A) 1  hAB (B) L and, if necessary, the algorithm of the isotropic case can written as c(AB) = hAB (A) be applied to bound the gradation on the edge [AB]. If hAB (B) is modified, this modification should be projected on the metric M(B) in the same way as for H-variation. Similarly, the first step of the correction algorithm comprises the computation of the isotropic map h∗iso (.) at the mesh vertices based on the initial metric. For this purpose, a map of minimal sizes at mesh vertices has to be defined from the initial metric and the H-shock correction algorithm of the isotropic case should be applied to this minimal size map. In order to define this latter map,

30 Meshing, Geometric Modeling and Numerical Simulation 2

for each metric, the minimal size among sizes associated with the principle directions of the metric is retained. The rest of the algorithm is similar, in principle, to the isotropic case. This is synthesized by the following iterative algorithm: H-shock correction algorithm, anisotropic case

[1.15]

h∗iso (.)

– Computation of the isotropic map at the vertices of the mesh. (1) Loop over the edges, [AB], of the mesh: −−→ - computation of hAB (A), hAB (B) and of ||AB||; - if hAB (A) ≥ hAB (B): 1  −−→ hAB (A) − hAB (B) hAB (A) L compute L = ||AB|| and c(AB) = ; AB (A) hAB (B) hAB (A)hAB (B) log hhAB (B) . if c(AB) > β: L  β - computation of η(A) = ; c(AB) - computation of principal sizes, hi (A) = max(η(A)hi (A), h∗iso (A)); - formation of the new metric M(A) with these hi (A) and initial principal directions; - else: 1  −−→ hAB (B) − hAB (A) hAB (B) L L = ||AB|| and c(AB) = ; hAB (A) hAB (A)hAB (B) log hAB (B) hAB (A)

. if c(AB) > β:

L β ; c(AB) - computation of principal sizes, hi (B) = max(η(B)hi (B), h∗iso (B)); - formation of the new metric M(B) with these hi (B) and initial principal directions; – Loop end. – If one of the sizes has been amended, go to (1). 

- computation of η(B) =

In practice, we choose β ≥ 1 with, in general, a value rather close to 1. In effect, it is necessary to interpret the meshing (independently of its quality and its connections [its edges]) equipped with its discrete metric field as a control space that will enable us, thereafter, to govern meshing construction or optimization. In fact, we will further examine the link between this space and background meshes used in mesh adaptation loops. One should mention again that these algorithms are well suited to cases where anisotropy remains reasonable [Alauzet-2010].  Hv and Hc-corrections in the case of a surface geometric metric H-variation and H-shock are perfectly defined in the case of a geometric metric of a variety (curve and surface are those of interest to us). On the other hand, correction algorithms do not

Metrics, Definitions and Properties 31

apply as such because the underlying geometry represents a constraint that, when necessary, prevents any correction or limits correction factors, even in the isotropic case. In order to control the gradation, a similar strategy to the one observed is applied to turn any metric into a geometric one. In other words, the gradation applied to a geometric metric of parameters (α, β) must produce a geometric metric of parameters (α, β  ) with α ≤ β  ≤ β. 1.6. Element metric The metric of an element is a metric in which the element is regular. This concept is related to the interpolation error problem of a given field. In this section, the underlying formalism will first be developed in the context of a simplicial element (triangle or tetrahedron) and some related properties will be described. These will be revisited in Chapter 2 for the evaluation of the interpolation error. Next, the concept of element metric will be generalized to non-simplicial elements, especially tensorial ones (quadrilaterals and hexahedra) and, also, to elements of arbitrary degree. The discussion about these elemental metrics will allow highlighting the fact that an element (therefore a discrete entity) is just one of the possible instantiations of a metric (continuous entity), an issue that will be formally addressed in Chapter 8. 1.6.1. Metric of a simplicial element Given a simplicial element of dimension d and any shape, it will be shown that there exists a single metric in which it is equilateral (or regular) and of unit size (that is to say, having edges of length 1). If M is such a metric, it has to verify the linear system reflecting the fact that the edges of the corresponding element are of length 1. We will designate by vij the vector joining d(d + 1) vertex i to vertex j of the element. The th order (number of edges) linear system at the 2 coefficients of the targeted metric is defined as: 

t

vij Mvij

=

1

with i < j.

This system can explicitly be solved and the matrix can be obtained. Some properties linked to the edges of an element should rather first be established, then an explicit expression of M deduced thereof. By definition, ||vij ||M = 1. Then, one shows that vij , vik M = 12 , in effect: vjk , vjk M = vji + vik , vji + vik M = vji , vji M + 2vji , vik M + vik , vik M therefore, 2vji , vik M = −1, that is vij , vik M = 12 , which is a result thus established for every pair of incident edges. Finally, if d > 2, we also have vij , vkl , M = 0 for every pair of

32 Meshing, Geometric Modeling and Numerical Simulation 2

indices of this type (those of opposite edges). The demonstration is carried out as above; one starts from ||vkl ||M = 1 and opens vkl as vkl = vki + vij + vjl , therefore, we get: vkl , vkl M = vki , vki M + vij , vij M + vjl , vjl M +2vki , vij M + 2vki , vjl M + 2vij , vjl M , namely 1 = 3 + 2(− 12 ) + 2vki , vjl M + 2(− 12 ), thus 2vki , vjl M = 0, which is the result for every pair of opposite edges. We introduce, a priori, the following matrix:  N = vij t vij , i