Skip to content

Commit 76d4cb7

Browse files
committed
Consistent formatting of Lp-norm
1 parent c4bd589 commit 76d4cb7

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎_docs_v7/Adaptive-Metric.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ driver.Output(0)
120120
driver.Finalize()
121121
```
122122

123-
Each function takes the driver and returns a list with one value per domain node (or per node, including halo nodes). The [custom sensor tutorial](/tutorials/Adaptive_Metric_Custom_Sensor/) shows a complete example.
123+
Each function takes the driver and returns the sensor values at the owned nodes of the current MPI rank. The [custom sensor tutorial](/tutorials/Adaptive_Metric_Custom_Sensor/) shows a complete example.
124124

125125
## Choosing the Norm
126126

@@ -141,14 +141,14 @@ ADAPTIVE_METRIC_HMIN= ( 1e-4, 1e-3 )
141141
ADAPTIVE_METRIC_HMAX= 10.0
142142
```
143143

144-
The limits keep the metric well defined: `ADAPTIVE_METRIC_HMAX` and `ADAPTIVE_METRIC_ARMAX` bound the sizes where the Hessian is singular, for example in regions of nearly constant flow, and `ADAPTIVE_METRIC_HMIN` prevents null volume sizes, for example at discontinuities. They affect the complexity when they are active.
144+
The limits keep the metric well defined: `ADAPTIVE_METRIC_HMAX` and `ADAPTIVE_METRIC_ARMAX` bound the sizes where the Hessian is singular, for example in regions of nearly constant flow, and `ADAPTIVE_METRIC_HMIN` prevents null sizes, for example at discontinuities. They affect the complexity whenever they are active.
145145

146146
## Steady and Unsteady Flows
147147

148148
- **Steady flows.** SU2 computes the metric once, from the final solution.
149149
- **Unsteady flows.** SU2 integrates the absolute value of the Hessians in time with the trapezoidal rule, using the time step that the solver actually takes (which may vary, for example with `UNST_CFL_NUMBER`). The first sample is the solution after the first time step, or the restart solution of an unsteady restart. SU2 normalizes the metric when the run stops (at `TIME_ITER`, `MAX_TIME` or time convergence), so only the last volume output holds the final metric; earlier outputs hold the running time integral. With the Python wrapper, call `driver.FinalizeAdaptiveMetric()` before the last `driver.Output()`.
150150

151-
For each sensor, SU2 prints the global integral used by the normalization:
151+
SU2 prints the global integral used by the $$L^p$$-norm normalization for each sensor (even when normalization is disabled):
152152

153153
```
154154
Global adaptive metric normalization integral for sensor PRESSURE: 18523.8

‎_docs_v7/Metric-Based-Mesh-Adaptation.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ $$e_\mathbf{M}(\mathbf{x}) = c_d \, \mathrm{tr}\!\left( \mathcal{M}^{-1/2}(\math
5151

5252
with $$c_2 = 1/8$$ and $$c_3 = 1/10$$. Here, $$\lvert \mathcal{H} \rvert$$ is the matrix absolute value of the Hessian, which has the eigenvectors of $$\mathcal{H}$$ and the absolute values of its eigenvalues (see [Hessian Recovery](#hessian-recovery)). Using $$\lvert \mathcal{H} \rvert$$ instead of $$\mathcal{H}$$ overestimates the error where the Hessian is indefinite.
5353

54-
The optimal metric minimizes the $$L^p$$ norm of this error for a target complexity $$\mathcal{N}$$:
54+
The optimal metric minimizes the $$L^p$$-norm of this error for a target complexity $$\mathcal{N}$$:
5555

5656
$$\mathbf{M}_{L^p} = \underset{\mathbf{M}}{\mathrm{argmin}} \; E_{L^p}(\mathbf{M}) = \left( \int_\Omega e_\mathbf{M}(\mathbf{x})^p \, d\mathbf{x} \right)^{1/p} \qquad \text{subject to} \qquad \mathcal{C}(\mathbf{M}) = \mathcal{N} .$$
5757

5858
The complexity constraint prevents the trivial solution of vanishing element sizes, and prescribes the target number of vertices of the adapted mesh. The problem is solved by a calculus of variations, and its unique solution is given by (Loseille and Alauzet, 2011b)
5959

6060
$$\mathcal{M}_{L^p}(\mathbf{x}) = \left( \frac{\mathcal{N}}{G} \right)^{2/d} D(\mathbf{x}) \, \lvert \mathcal{H}(\mathbf{x}) \rvert, \qquad D(\mathbf{x}) = \left( \det \lvert \mathcal{H}(\mathbf{x}) \rvert \right)^{-\frac{1}{2p+d}}, \qquad G = \int_\Omega \left( \det \lvert \mathcal{H}(\mathbf{x}) \rvert \right)^{\frac{p}{2p+d}} d\mathbf{x} .$$
6161

62-
The optimal metric is aligned with the eigenvectors of $$\lvert \mathcal{H} \rvert$$ and has the same anisotropy. The local term $$D$$ accounts for the sensitivity of the $$L^p$$ norm, and the global term $$G$$ enforces the complexity constraint. The corresponding error converges at second order with respect to the complexity, $$E_{L^p}(\mathbf{M}_{L^p}) \leq C \mathcal{N}^{-2/d}$$. As $$p \to \infty$$, the metric tends to the one that controls the error in the $$L^\infty$$ norm, which equidistributes the error and focuses on the largest scales of the solution; smaller values of $$p$$ also capture its weaker features.
62+
The optimal metric is aligned with the eigenvectors of $$\lvert \mathcal{H} \rvert$$ and has the same anisotropy. The local term $$D$$ accounts for the sensitivity of the $$L^p$$-norm, and the global term $$G$$ enforces the complexity constraint. The corresponding error converges at second order with respect to the complexity, $$E_{L^p}(\mathbf{M}_{L^p}) \leq C \mathcal{N}^{-2/d}$$. As $$p \to \infty$$, the metric tends to the one that controls the error in the $$L^\infty$$ norm, which equidistributes the error and focuses on the largest scales of the solution; smaller values of $$p$$ also capture its weaker features.
6363

6464
## Hessian Recovery
6565

‎_tutorials/mesh_adaptation/Adaptive_Metric_Builtin_Sensors/Adaptive_Metric_Builtin_Sensors.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The following sections explain the configuration, run the case and visualize the
3434

3535
### Background
3636

37-
A metric field is a symmetric positive definite tensor $$\mathcal{M}$$ at every point. It prescribes the mesh that a remesher should build, a mesh that is unit in the metric: its eigenvectors are the directions of the cells, and its eigenvalues $$\lambda_i$$ give the requested cell sizes $$h_i = \lambda_i^{-1/2}$$ along them. SU2 computes, for each *sensor* field $$u$$, the metric that minimizes the $$L^p$$ norm of the interpolation error of $$u$$ for a target complexity $$\mathcal{N}$$ (approximately the number of vertices):
37+
A metric field is a symmetric positive definite tensor $$\mathcal{M}$$ at every point. It prescribes the mesh that a remesher should build, a mesh that is unit in the metric: its eigenvectors are the directions of the cells, and its eigenvalues $$\lambda_i$$ give the requested cell sizes $$h_i = \lambda_i^{-1/2}$$ along them. SU2 computes, for each *sensor* field $$u$$, the metric that minimizes the $$L^p$$-norm of the interpolation error of $$u$$ for a target complexity $$\mathcal{N}$$ (approximately the number of vertices):
3838

3939
$$\mathcal{M}(\mathbf{x}) = \left( \frac{\mathcal{N}}{G} \right)^{2/d} \left( \det \lvert \mathcal{H}(\mathbf{x}) \rvert \right)^{-\frac{1}{2p+d}} \lvert \mathcal{H}(\mathbf{x}) \rvert, \qquad G = \int_\Omega \left( \det \lvert \mathcal{H}(\mathbf{x}) \rvert \right)^{\frac{p}{2p+d}} d\mathbf{x},$$
4040

@@ -73,7 +73,7 @@ ADAP_TIME_SUBINTERVAL= 1
7373
```
7474

7575
- `ADAPTIVE_METRIC_SENSOR` lists two sensors: the pressure, a primitive variable, and the Mach number, which SU2 computes. Each sensor gets its own metric.
76-
- `ADAPTIVE_METRIC_NORM= 2` and `ADAPTIVE_METRIC_COMPLEXITY= 10000` select the $$L^2$$ norm of the interpolation error and a target of about 10000 vertices, about twice the current mesh.
76+
- `ADAPTIVE_METRIC_NORM= 2` and `ADAPTIVE_METRIC_COMPLEXITY= 10000` select the $$L^2$$-norm of the interpolation error and a target of about 10000 vertices, about twice the current mesh.
7777
- `ADAPTIVE_METRIC_HMIN` and `ADAPTIVE_METRIC_HMAX` bound the requested cell sizes, in mesh units (the chord is 1). The far field is about 20 chords away, so `ADAPTIVE_METRIC_HMAX= 10.0` lets the metric coarsen there. The maximum aspect ratio is left at its default, 10<sup>6</sup>.
7878

7979
The metric and the fields it is computed from are written with the volume output groups `SENSOR_VALUE`, `SENSOR_GRADIENT`, `SENSOR_HESSIAN` and `ADAPTIVE_METRIC`:

‎_tutorials/mesh_adaptation/Adaptive_Metric_Custom_Sensor/Adaptive_Metric_Custom_Sensor.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ ADAP_TIME_SUBINTERVAL= 1
6969

7070
- `ADAPTIVE_METRIC_SENSOR` lists all sensors: the custom `TOTAL_PRESSURE` and the built-in `MACH`.
7171
- `ADAPTIVE_METRIC_CUSTOM_SENSOR` marks `TOTAL_PRESSURE` as filled through the Python wrapper. Without it, SU2 would stop with an error, since `TOTAL_PRESSURE` is not a built-in sensor.
72-
- `ADAPTIVE_METRIC_NORM= 4` concentrates the vertices more at the strongest features (the shock, the wake and the boundary layers) than the $$L^2$$ norm of the built-in sensor tutorial.
72+
- `ADAPTIVE_METRIC_NORM= 4` concentrates the vertices more at the strongest features (the shock, the wake and the boundary layers) than the $$L^2$$-norm of the built-in sensor tutorial.
7373

7474
### The Python Script
7575

0 commit comments

Comments
 (0)