(2018) 非线性Multigrid处理布料仿真

本文禁止转载
B站:Heskey0


(2018) Parallel Multigrid for Nonlinear Cloth Simulation

we believe the future of cloth simulation is in multi-resolution simulation.

Abstract

​ The foundation of this research is a novel nonlinear FMG(full multigrid) method for unstructured meshes. (Our nonlinear FMG method provides faster convergence and better performance for both Newton’s method and Projective Dynamics).

​ And the method has good potential to be combined with multi-resolution collision handling for real-time simulation in the future.

1. Introduction

multi-resolution的优势:

  • By using a simulation hierarchy, multi-resolution simulation can efficiently reduce low-frequency errors, which are expensive to handle in high resolution.

two types of multigrid:

  • geometric multigrid:build the simulation hierarchy geometrically from a mesh hierarchy.
  • algebraic multigrid(AMG):create the simulation hierarchy algebraically by collapsing the system matrix.

为什么不使用AMG

  • It is more convenient for geometric multigrid to accept nonlinearity.
  • AMG is not efficient when apply it to nonlinear cloth simulation because the computational cost of the aggregation phase is very high.

传统布料模拟

  • Researchers have been aware of the nonlinearity in cloth simulation for decades, but most simulators still choose to solve a linearized system in every time step. Mathematically equivalent to solving a nonlinear system by one iteration of Newton’s method, this practice suffers from error accumulation or divergence, when the time step is large. (无法很好地处理nonlinearity)

本文布料模拟

  • We consider multigrid from a nonlinear optimization perspective and to develop a novel nonlinear multigrid method.

Our technical contributions can be summarized as follows:

  • Full multigrid:We propose to formulate our method under a FMG framework
  • Nonlinearity:We develop a novel nonlinear FMG method for fast cloth simulation
    • A unique feature of this method is that it considers the smoothing process at each resolution level as calculating a search direction at different frequency rates.
    • Since it does not discretize the simulation problem at coarse levels as the full approximation scheme (FAS) does, its performance cannot be affected by the locking issue.
  • Adaptive smoothing:Our adaptive smoother is implemented on the GPU.

Adaptive refinement of unstructured meshes

  • In this work, we are specifically interested in adaptive refinement of unstructured meshes, since they are more suitable for representing irregular clothing shapes.
  • An alternative approach to adaptive mesh refinement is to precompute a mesh hierarchy and then determine active simulation regions locally at each resolution level. (it is closely related to multigrid)

linear multigrid for cloth simulation

  • (2008) A physically faithful multigrid method for fast cloth simulation.
  • (2013) Constrainable multigrid for cloth.

3. Linear Multigrid

why we apply the Galerkin condition\(A_{h+1}=(I^h_{h+1})^TA_hI^h_{h+1}\).

  • An important question of MG is how to formulate \(A_{h+1}\). One straightforward approach is to discretize the PDE problem on the coarse grid and derive the coarse linear system directly. However, doing this suffers from the inconsistency between the coarse linear system and the fine linear system, especially the locking issue in cloth simulation.

Interpolation and restriction\(I^h_{h+1}\).

  • For an unstructured triangle mesh \(\{X_0,T_0\}\):

    • \(X_0\) the set of vertices
    • \(T_0\) the set of triangles
  • first we construct a mesh hierarchy: \(X_0\supset X_1\supset...\supset X_H\).

  • then we use the barycentric coordinates to formulate a piecewise linear interpolation operator for every vertex \(i\in X_h\).

    • \[f(u_i)=\left\{ \begin{aligned} &f_i,&if \quad i\in X_{h+1}\\ &B_a(u_j)f_a+B_b(u_j)f_b+B_c(u_j)f_c,&otherwise, \end{aligned} \right. \]

    • in which:

      • \(u_i\): vertex \(i\)'s reference position
      • \(a,b,c\): the vertices of triangle in \(T_{h+1}\) containing or close to vertex \(i\) in the reference space
      • \(f_a,f_b,f_c\): their function values
      • \(B_a(u_i),B_b(u_i),B_c(u_i)\): their barycentric coordinates
    • We use this linear interpolation operator to formulate the full rank matrix \(I^h_{h+1}\) in the V-cycles for its simplicity and sparsity.

smoother and solver

  • smoother: symmetric GS
    • The symmetry of Gauss-Seidel is achieved by handling colored vertices twice per iteration: once in the forward color order and once in the backward color order. (就如red-black GS一样标颜色)
  • solver (at the coarsest level): LU factorization

4. Our System

4.1 Nonlinear Cloth Simulation

\[x_0=q_{t+1}=\arg\min\xi(q) \]

in which:

\[\xi(x)=\frac1{2h^2}(q-\bar q)^TM(q-\bar q)+E(q) \]

the linearized system:

\[A_0c_0=r_0 \]

  • \(r_0=-\nabla E\): the residual
  • \(A_0\): the Hessian of \(\xi(x_0)\).

\(A_0c_0=r_0\) 等价于 \(Ax=b\) 而不是 residual equation \(Ae=r\).

​ We propose a novel nonlinear FMG method which can be applied to both Newton’s method and projective dynamics to improve their performance.

4.2 Nonlinear FMG

two typical approaches to introduce nonlinearity into multigrid methods

  • Newton-multigrid: simply applies multigrid to solve the linearized systems produced by Newton’s method.
    • In Newton-FMG method, the system at each \(h\)th level \(A_hc_h = r_h\) keeps the same inside a linear FMG, which is used as a linear solver.
  • full approximation scheme(FAS): transfers the positional solution \(x\), not the correction(error) \(c\), between two resolution levels.
    • FAS is effective in FEM simulation of tetrahedral meshes.
    • Its performance in cloth simulation is inevitably affected by the locking issue in the coarse problem and incorporating the discretization error into the residual does not help much. (So, FAS cannot benefit as much as our method from multi-resolution cloth simulation)

4.2.0 Our method

Our method

  • our method can be fundamentally considered as a line search method for nonlinear optimization.
    • It updates the system matrix and the residual at the finest level only.
    • Since no coarse problem is involved, the method is naturally free of the locking issue.
      • low resolution下模拟会导致locking issue吗?
      • 想象一下你的窗帘,你在下面随意拉一下它都可以自由的deform,因为窗帘弯曲了之后形变能量其实非常接近0。但是如果你的窗帘特别低分辨率(就四个点),那你拽一下之后这个out of plane的形变就无法表示了。

由于使用了Galerkin condition,所以:

\[A_hc_h=I^h_0r_0,\quad for\,A_h=I^h_0 A_0I^0_h \]

in which \(I^h_0=I^h_{h-1}...I^2_1I^1_0\) is also a full rank matrix

所以算法流程为:

image

updates the system matrix and the residual at the finest level only!

4.2.1 The choices of system matrix

how often should we perform the update?

we do not update \(A_0\) every time a correction gets updated.

  • we should not update \(A_0\) at every resolution level, since that introduces a large computational cost per search and slows down the system performance
  • if we update \(A_0\) only once at the beginning of the time step, the method becomes a nonlinear solver accelerated by a constant preconditioner matrix, whose convergence rate is not optimal either
  • We can then conveniently update \(A_0\) at the beginning of every FMG cycle. (we only update Hessian matrices only when FMG back to the finest level.)

image

4.2.2 The choices of updating residual

whether we should incorporate nonlinearity into every level, or just a small number of fine levels.

问题

  • The interpolation and the restriction can cause a nonneglectable computational costs especially at coarse levels. If we restrict the recalculation of the residual to fine levels only, we can effectively reduce these costs. (Intuitively, this can be considered as using linear multigrid to smooth the problem at the bottom level)

问题的解决方案

  • the optimal choice is to recalculate the residual at an intermediate level in the last bigest V-cycle, so that the nonlinearity and the interpolation/restriction cost among resolution levels can be well balanced.
  • Another choice we have made is that we only use linear interpolation scheme in our nonlinear FMG

​ If the restriction matrices are from high-order interpolation matrices, the matrices \(A_h\) at coarse level would be very dense. (This reduces the performance of multigrid method.)

4.3 Adaptive Smoother

adaptive smoother

  • we can naturally develop an adaptive smoother to skip smoothing where the residual has dropped below a certain threshold.

Figure 8: The vertices visualized in their colors, without and with adaptive smoothing. The desaturated vertices in (a) are those with low residuals. Our adaptive smoother skips them from the smoothing process.

posted @ 2022-08-04 16:58  Heskey0  阅读(224)  评论(0编辑  收藏  举报

载入天数...载入时分秒...