Skip to content

Use hybrid variational / gradient ascent node movement vectors - #61

Open
dengwirda wants to merge 3 commits into
devfrom
optim-hybrid-update
Open

dengwirda wants to merge 3 commits into
devfrom
optim-hybrid-update

Conversation

@dengwirda

Copy link
Copy Markdown
Owner

This PR changes the way the optimisation of node positions is done --- replacing the 2-stage variational + gradient ascent fallback with a single hybrid update based on a nonlinear combination of both terms

$$ d_{\mathrm{opt}} = (1 - \gamma) d_{\mathrm{cvt}} + \gamma d_{\delta Q}\ , $$

$$ \gamma = \frac{Q_{\mathrm{gap}}^{2}}{Q_{\mathrm{gap}}^{2} + Q_{\mathrm{reg}}}\ , \qquad Q_{\mathrm{gap}} = \max \Bigg(0,\ \frac{Q_{\mathrm{lim}} - Q_{\mathrm{min}}}{Q_{\mathrm{reg}}}\Bigg)\ , \qquad Q_{\mathrm{reg}} = \frac{1}{8}\ . $$

This leads to the following behaviour

$$ d_{\mathrm{opt}} \rightarrow d_{\mathrm{\delta Q}} \text{ as } Q \rightarrow 0\ , $$

$$ d_{\mathrm{opt}} \rightarrow d_{\mathrm{cvt}} \text{ as } Q \rightarrow Q_{\mathrm{lim}}\ , $$

$$ d_{\mathrm{opt}} = d_{\mathrm{cvt}}\ \text{ if }\ Q \geq Q_{\mathrm{lim}}\ . $$

Here, $Q_{\mathrm{lim}} =$opts.optm_qlim and $Q_{\mathrm{min}}$ is the minimum quality value of the cells incident to a given node.


This PR also changes the way that gradient ascent vectors are computed, incorporating a Tikhonov-like regularisation that bounds displacement vectors near shallow gradients

$$ d_{\delta Q} = \Bigg(\frac{\Delta Q}{|g|^{2} + \mu}\Bigg) g\ , \qquad g \approx \frac{\partial Q}{\partial X}\ , \qquad \Delta Q = \frac{1}{2}\Bigg(\overline{Q}_{\mathrm{hi}} - \overline{Q}_{\mathrm{lo}}\Bigg), \qquad \mu = \Bigg(\frac{1}{2}\ \frac{\Delta Q}{d_{\mathrm{max}}}\Bigg)^{2} + \Bigg(\frac{\epsilon}{d_{\mathrm{max}}}\Bigg)^{2}\ . $$


Together, these changes remove discontinuities in the evaluation of displacement vectors, improving overall convergence in certain cases. In practice, the hybrid update appears to lead to slightly smoother, more size-regular meshes, at the cost of a small reduction in worst-case cell quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant