SuperDex Physics C++ API
Loading...
Searching...
No Matches
active_aniso_arap_params.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19// PLEASE DO NOT ADD OTHER INCLUDES HERE. This header is included in the mochi_physics public API.
23
24namespace superdex {
25
26/**
27 * @brief Parameters for the Active Anisotropic ARAP material model.
28 *
29 * @details Anisotropic energy term that models directional fiber contraction. The fiber direction
30 * is specified in spherical coordinates (θ, φ) and internally stored as a unit direction vector.
31 *
32 * @see [Anisotropic Elasticity for Inversion-Safety and Element Rehabilitation (Kim et al.,
33 * 2019)](http://tkim.graphics/ANISOTROPY/AnisotropyAndRehab.pdf)
34 */
36 /**
37 * @brief Anisotropic stiffness (α) along fiber direction [Pa].
38 *
39 * @note Must not be negative.
40 */
42
43 /**
44 * @brief Anisotropic reference length (dimensionless).
45 *
46 * @note Must not be negative.
47 */
49
50 /**
51 * @brief Fiber direction as a unit vector: (cos(φ)cos(θ), sin(φ), cos(φ)sin(θ)).
52 *
53 * @see ComputeFiberDirection, GetTheta, GetPhi
54 */
55 Real3 anisoDir = {1_r, 0_r, 0_r};
56
57 /**
58 * @brief Strategy for ensuring positive semi-definite Hessian matrices.
59 *
60 * @see MaterialPsdStrategy
61 */
63
64 /**
65 * @brief Returns the azimuthal angle (θ) [rad] from the stored fiber direction.
66 *
67 * @see ComputeFiberDirection, GetPhi
68 */
69 [[nodiscard]] real GetTheta() const;
70
71 /**
72 * @brief Returns the elevation angle (φ) [rad] from the stored fiber direction.
73 *
74 * @see ComputeFiberDirection, GetTheta
75 */
76 [[nodiscard]] real GetPhi() const;
77
78 /**
79 * @brief Computes the fiber direction unit vector from spherical angles.
80 *
81 * @param[in] theta Azimuthal angle (θ) [rad].
82 * @param[in] phi Elevation angle (φ) [rad].
83 * @return Unit vector: (cos(φ)cos(θ), sin(φ), cos(φ)sin(θ)).
84 */
85 [[nodiscard]] static constexpr Real3 ComputeFiberDirection(real theta, real phi);
86
87#if MOCHI_LANGUAGE_CPP20
88 bool operator==(ActiveAnisoArapMaterialParams const&) const = default;
89#endif
90
92 MOCHI_FIELD(alpha) MOCHI_ATTRIBUTE(Units("Pa"));
97};
98
99} // namespace superdex
100
constexpr real kDefaultAnisoLength
Default anisotropic reference length (dimensionless).
MaterialPsdStrategy
Strategy for ensuring positive semi-definite (PSD) Hessian matrices in material models.
@ Projection
Eigenvalue clamping: U * Max(Λ, ε) * U^T.
constexpr real kDefaultAnisoAlpha
Default anisotropic stiffness (α) [Pa].
NdArray< real, 3 > Real3
Definition nd_array.h:106
#define MOCHI_STRUCT_END()
Definition reflection.h:279
#define MOCHI_FIELD(name)
Definition reflection.h:293
#define MOCHI_STRUCT_BEGIN(name)
Definition reflection.h:278
#define MOCHI_ATTRIBUTE(...)
Definition reflection.h:298
Parameters for the Active Anisotropic ARAP material model.
real GetPhi() const
Returns the elevation angle (φ) [rad] from the stored fiber direction.
static constexpr Real3 ComputeFiberDirection(real theta, real phi)
Computes the fiber direction unit vector from spherical angles.
MaterialPsdStrategy psdStrategy
Strategy for ensuring positive semi-definite Hessian matrices.
real alpha
Anisotropic stiffness (α) along fiber direction [Pa].
real GetTheta() const
Returns the azimuthal angle (θ) [rad] from the stored fiber direction.
Real3 anisoDir
Fiber direction as a unit vector: (cos(φ)cos(θ), sin(φ), cos(φ)sin(θ)).
real length
Anisotropic reference length (dimensionless).
bool operator==(ActiveAnisoArapMaterialParams const &) const =default