@@ -70,6 +70,8 @@ struct HyperElasticPotential
70
70
* @param GNeg Shape function gradients at quadrature points. See ShapeFunctionGradients().
71
71
* @param Y Young's modulus
72
72
* @param nu Poisson's ratio
73
+ * @pre `eg.size() == wg.size()` and `GNeg.rows() == mesh.E.rows()`
74
+ * @pre `Y.size() == wg.size()` and `nu.size() == wg.size()`
73
75
*/
74
76
HyperElasticPotential (
75
77
MeshType const & mesh,
@@ -89,6 +91,8 @@ struct HyperElasticPotential
89
91
* @param GNeg Shape function gradients at quadrature points. See ShapeFunctionGradients().
90
92
* @param Y \f$ |Q| \f$ Young's moduli
91
93
* @param nu \f$ |Q| \f$ Poisson's ratios
94
+ * @pre `eg.size() == wg.size()` and `GNeg.rows() == mesh.E.rows()`
95
+ * @pre `Y.size() == wg.size()` and `nu.size() == wg.size()`
92
96
*/
93
97
template <class TDerivedY , class TDerivednu >
94
98
HyperElasticPotential (
@@ -111,6 +115,9 @@ struct HyperElasticPotential
111
115
* @param x \f$ d \times n \f$ matrix of deformed nodal positions
112
116
* @param Y Young's modulus
113
117
* @param nu Poisson's ratio
118
+ * @pre `eg.size() == wg.size()` and `GNeg.rows() == mesh.E.rows()`
119
+ * @pre `x.rows() == mesh.X.rows() * mesh.kDims`
120
+ * @pre `Y.size() == wg.size()` and `nu.size() == wg.size()`
114
121
*/
115
122
template <class TDerived >
116
123
HyperElasticPotential (
@@ -136,6 +143,9 @@ struct HyperElasticPotential
136
143
* @param x \f$ d \times n \f$ matrix of deformed nodal positions
137
144
* @param Y \f$ |Q| \f$ Young's moduli
138
145
* @param nu \f$ |Q| \f$ Poisson's ratios
146
+ * @pre `eg.size() == wg.size()` and `GNeg.rows() == mesh.E.rows()`
147
+ * @pre `x.rows() == mesh.X.rows() * mesh.kDims`
148
+ * @pre `Y.size() == wg.size()` and `nu.size() == wg.size()`
139
149
*/
140
150
template <class TDerivedx , class TDerivedY , class TDerivednu >
141
151
HyperElasticPotential (
@@ -161,6 +171,7 @@ struct HyperElasticPotential
161
171
* @param bWithHessian Compute hessian
162
172
* @param bUseSpdProjection Project per quadrature point hessians to nearest symmetric positive
163
173
* definite (SPD) matrix
174
+ * @pre `x.rows() == mesh.X.rows() * mesh.kDims`
164
175
*/
165
176
template <class TDerived >
166
177
void ComputeElementElasticity (
@@ -177,6 +188,7 @@ struct HyperElasticPotential
177
188
* @tparam TDerivedOut Output matrix type
178
189
* @param x Input matrix
179
190
* @param y Output matrix
191
+ * @pre x.rows() == InputDimensions() and y.rows() == InputDimensions() and y.cols() == x.cols()
180
192
*/
181
193
template <class TDerivedIn , class TDerivedOut >
182
194
void Apply (Eigen::MatrixBase<TDerivedIn> const & x, Eigen::DenseBase<TDerivedOut>& y) const ;
0 commit comments