CAPÍTULO 3. Compromiso e impacto de las ciencias sociales
3.1. Abandonando la torre de marfil
The basis functions of the FE solver are given in BB-form (see [Far02,LS07] for more details). The major advantages are:
• Polynomials are defined w.r.t. a tetrahedral element making them coordinate frame independent.
• There is no need to precompute polynomial coefficients. Stiffness and mass matrix entries are independent of the basis functions.
• All operations on polynomials in BB-form, including integral and differential operations, can be evaluated analytically and efficiently.
A piecewise polynomial representation of the field of unknowns is constructed on a given tetrahedral mesh 4 := (T , F, E, V) with a set of tetrahedra T , faces F, edges E and vertices V. This discretization is generated from surface meshes with the CGAL library [CGA]. The union of all elements forms a non-uniform partition of the simulation domain Ω= S
T∈TT. Two tetrahedra of the mesh are either disjoint or share a face, an edge or a vertex. The fields on the simulation domain Ω are defined by one polynomial per element. A degree-p polynomial
f|
T=
∑
i+ j+k+l=p
bi jklBi jkl(x), i, j, k, l ≥ 0, (2.99) is defined w.r.t. a tetrahedron T = [p0, p1, p2, p3].
ξ2000 ξ0020
Figure 2.16.: Domain points for a quadratic Bézier tetrahedron. Points at the vertices have exactly one non-zero index.
Here, the unknowns bi jkland basis functions Bi jkl are associated with the domain points or nodes
ξTi jkl=ip0+ jp1+ kp2+ lp3
p , i+ j + k + l = p. (2.100)
This is a representation of the parametric domain, where a coefficient bi jklmay be a scalar, a vector or a tensor.
In the case of quadratic elements, ten coefficients bi jkl are associated with the domain points (see Fig.2.16).
Then, similar to Bézier curves, the values associated with the vertices of T (b2000, b0200, b0020and b0002) are given by interpolation, the six remaining edge coefficients are defined implicitly by derivatives and positions at the vertices. The total number of degrees of freedom for the tetrahedral mesh is given by the union of all tetrahedral nodes D4= S and form a basis of the space of degree-p polynomials Pp[LS07]. Here, the barycentric coordinates λν∈ P1are the linear polynomials determined by λν(vµ) = δν,µ. They represent the volume fractions that arise from splitting an element at x into four tetrahedra: λi=VVi
T. The volume of an element T is VT=16detp0 p1 p2 p3
1 1 1 1
. Vi
can be computed by replacing the i-th vertex with x. In the case of a monomial representation, the basis function are
Ni jkl(x) =
∑
i+ j+k+l=p
αi jklxiyjzk, i, j, k, l ≥ 0, (2.102) where the coefficients αi jklmust be precomputed. They can be determined by solving a linear system of equations for each element [MS06,MTPS08]. This precomputation is not necessary when adopting the BB-form.
In the following, it is shown how the BB-form allows for analytic computation of integrals independent of the position and orientation of the underlying tetrahedron. Only the element’s volume and differential changes of the barycentric coordinates are incorporated in the computations.
Directional Derivatives The partial derivatives ∂B∂xi jkl
i can be expressed as a sum of Bernstein polynomials of degree q − 1 by applying the chain rule:
∂Bi jkl
where Bernstein polynomials with negative indices are set to 0. Note that for quadratic polynomials at least two of the terms in Eq. (2.103) are equal to zero. As the barycentric coordinates are linear polynomials, their partial derivatives are constant during the simulation and can be precomputed.
Multiplication The multiplication of two Bernstein polynomials of degree p on T is computed by Bi jklp · Bmnoqp = G(i, j, k, l, m, n, o, q)B2p(i+m)( j+n)(k+o)(l+q)
with i+ j + k + l = m + n + o + q = p. Using multi-indices (I, J) = ((i, j, k, l), (m, n, o, q)), the function G consists of binomials: G(I, J) = (i+mi )(j+nj )(k+ok )(l+ql )
(2pp) .
Integration The integral of a Bernstein polynomial w.r.t. T is solely dependent on the degree of the polynomial and the volume VT:
Therefore, the integral of a polynomial in BB-form can be easily evaluated by summation:
ˆ
In Section2.1.2.2, the general procedure to determine entries for the element matrices is described. Now, the computation of these entries when utilizing polynomials of degree two in BB-form is presented. The element matrices for a tetrahedron T can be divided into contributions for all control points with multi-indices (I, J).
Thus, a 3 × 3 entry is computed by respectively. The integrals of products of degree two Bernstein polynomials have to be evaluated for the mass matrix. As shown in Section2.3.2, this results in a polynomial of degree four. With Bpindicating a degree p polynomial and binomial coefficients G(I, J) arising from the multiplication, the integration results in
ˆ
The contributions for K in Eq. (2.107) consist of several linear combinations of terms such as´
T
∂Bi jkl
∂xa
∂Bmnoq
∂xb dV . The differentiation of a Bernstein polynomial w.r.t. the coordinate axis a is given in Eq. (2.103). Note that
polynomials with negative indices vanish, so at most two terms in the sum are non-zero. Rearranging leads to
∂λc = 2B1results in a linear polynomial, the integral is ˆ
Here, no numerical integration or evaluation of any basis function is needed. Only binomial coefficients, the element’s volume and directional derivatives of the barycentric coordinates affect the matrix entries.
2.3.3.2. Algorithm
The general algorithm for corotational elasticity with implicit time integration is described in detail in Section2.1.
In order to update the state of the system, the ODE
M ¨u+ Ku = fext (2.110)
is integrated by applying implicit time integration. This results in the linear system M+ ∆t2K
∆ ˙u= ∆t f(i)− ∆tK ˙u(i) , (2.111) which is solved for changes of the velocities.
The term Ku in Eq. (2.110) accounts for the internal elastic forces. With Cauchy strain, the relation between displacements and forces is linear in contrast to the use of the Green strain tensor. The artifacts arising from the linearization can be avoided by determining local rotations R of the deformed body and modifying the com-putation of the forces accordingly. Etzmuss et al. [EKS03] determined the local rotation per element for cloth simulation, whereas Hauth et al. [HS04] and Müller et al. [MG04] transfer that approach to deformable bodies.
A polar decomposition is used to extract the rotational part R of the deformation gradient F|T. The current state is then transformed to a non-rotated coordinate system by RT, the inverse of R. With u= ϕ − x the corotational force is
fcor= RKT(RTϕ − x) = K0Tϕ − f0, (2.112) where f0= RKTx. Therefore, the global stiffness matrix K0 has to be reconstructed in each time step. How-ever, simply using a polar decomposition for R can result in inverted elements. Induced by user interaction or heavy collisions, vertices are pushed into other tetrahedra. As this also represents an equilibrium configuration, elements remain in this state.
2.3.3.3. Inversion and corotation of quadratic elements
The most time consuming part in recent publications is the construction or reassembly of the stiffness ma-trix [MTPS08,PO09]. It consists of extracting the rotational part of the deformation gradient and updating the
affected entries in the stiffness matrix. In order to reduce the time for this crucial step, a specialized traversal (see Section2.3.4) is developed. Furthermore, an approximation for determining R with quadratic elements is proposed, which reduces the number of required rotation extractions. Standard FE approaches require computa-tion of integrals by evaluating the funccomputa-tions at predefined integracomputa-tion points. Therefore, Mezger et al. [MTPS08]
propose to evaluate and to decompose the deformation gradient at the four integration points that are required for quadratic polynomials. In contrast, the BB-form allows for an analytic computation of the integral and an ap-proximation of the rotation can be applied. Therefore, only the corner control points b2000, b0200, b0020and b0002 are considered to determine the deformation gradient and analyze the element’s deformation. This is equivalent to considering only the linear part of the field of displacements. Hence, an acceleration of factor four compared to [MTPS08] is achieved, as only one instead of four rotations per element are extracted. Using the aforemen-tioned approximation Eq. (2.52) reduces to
. In the case of an inverted element, a simple polar decomposition will lead to a rotation R with a negative determinant. This represents a reflection rather than a rotation and will result in implausible behavior. To recover from this undesired state the method proposed by Irving et al. [ITF04] is applied, where an SVD is used to compute R.