SuperDex Physics C++ API
Loading...
Searching...
No Matches
linear_elastic_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.
22
23namespace superdex {
24
25/**
26 * @brief Parameters for the Linear Elastic (Hookean) material model.
27 *
28 * @details Simplest material model with linear stress-strain relationship. Computationally fast
29 * but only accurate for small deformations.
30 *
31 * @note Not suitable for large deformations.
32 * @note No PSD enforcement is needed. The Hessian matrix is positive definite regardless of the
33 * PSD strategy.
34 *
35 * @see SoftMaterialType::LinearElastic
36 */
38 /** @brief Young's modulus [Pa]. Must be positive. */
40
41 /**
42 * @brief Poisson's ratio (dimensionless).
43 *
44 * @note Must be in (-1, 0.5). Near 0.5 = nearly incompressible.
45 */
47
48#if MOCHI_LANGUAGE_CPP20
49 bool operator==(LinearElasticMaterialParams const&) const = default;
50#endif
51
56};
57
58namespace materials {
59// Linear elastic has an isotropic reference tangent by construction.
60template <>
62} // namespace materials
63
64} // namespace superdex
constexpr bool kIsotropicReferenceStiffness
Opt-in trait: a material params type declares this true iff its reference (F=I) tangent is isotropic ...
constexpr real kDefaultYoungsModulus
Default Young's modulus [Pa].
constexpr real kDefaultPoissonRatio
Default Poisson's ratio (dimensionless).
#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 Linear Elastic (Hookean) material model.
real poissonRatio
Poisson's ratio (dimensionless).
bool operator==(LinearElasticMaterialParams const &) const =default