20 #ifndef __mast_linear_mindlin_plate_strain_energy_h__ 21 #define __mast_linear_mindlin_plate_strain_energy_h__ 28 namespace Elasticity {
29 namespace MindlinPlate {
32 template <
typename FEVarType,
33 typename SectionPropertyType,
41 using vector_t =
typename Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>;
42 using matrix_t =
typename Eigen::Matrix<scalar_t, Eigen::Dynamic, Eigen::Dynamic>;
62 const FEVarType& shear_fe_data) {
65 "FE data already initialized.");
66 Assert2(bending_fe_data.n_components() == shear_fe_data.n_components(),
67 bending_fe_data.n_components(), shear_fe_data.n_components(),
68 "Bending and shear FE data must have same number of components");
86 "FE data not initialized.");
91 const typename FEVarType::fe_shape_deriv_t
94 typename Eigen::Matrix<scalar_t, 3, 1>
98 vec = vector_t::Zero(3*fe.n_basis());
100 typename SectionPropertyType::inplane_value_t
104 mat1 = matrix_t::Zero(3, 3*fe.n_basis()),
105 mat2 = matrix_t::Zero(3*fe.n_basis(), 3*fe.n_basis());
109 Bxmat.
reinit(3, 3, fe.n_basis());
112 for (
uint_t i=0; i<fe.n_q_points(); i++) {
120 stress = mat * epsilon;
121 Bxmat.vector_mult_transpose(vec, stress);
122 res += fe.detJxW(i) * vec;
126 Bxmat.left_multiply(mat1, mat);
127 Bxmat.right_multiply_transpose(mat2, mat1);
128 (*jac) += fe.detJxW(i) * mat2;
135 const typename FEVarType::fe_shape_deriv_t
138 typename Eigen::Matrix<scalar_t, 2, 1>
142 vec = vector_t::Zero(3*fe.n_basis());
144 typename SectionPropertyType::shear_value_t
148 mat1 = matrix_t::Zero(2, 3*fe.n_basis()),
149 mat2 = matrix_t::Zero(3*fe.n_basis(), 3*fe.n_basis());
153 Bxmat.
reinit(2, 3, fe.n_basis());
156 for (
uint_t i=0; i<fe.n_q_points(); i++) {
164 stress = mat * epsilon;
165 Bxmat.vector_mult_transpose(vec, stress);
166 res += fe.detJxW(i) * vec;
170 Bxmat.left_multiply(mat1, mat);
171 Bxmat.right_multiply_transpose(mat2, mat1);
172 (*jac) += fe.detJxW(i) * mat2;
178 template <
typename ScalarFieldType>
180 const ScalarFieldType& f,
185 "FE data not initialized.");
190 const typename FEVarType::fe_shape_deriv_t
193 typename Eigen::Matrix<scalar_t, 3, 1>
197 vec = vector_t::Zero(3*fe.n_basis());
199 typename SectionPropertyType::inplane_value_t
203 mat1 = matrix_t::Zero(3, 3*fe.n_basis()),
204 mat2 = matrix_t::Zero(3*fe.n_basis(), 3*fe.n_basis());
208 Bxmat.
reinit(3, 3, fe.n_basis());
211 for (
uint_t i=0; i<fe.n_q_points(); i++) {
215 _property->inplane_derivative(c, f, mat);
219 stress = mat * epsilon;
220 Bxmat.vector_mult_transpose(vec, stress);
221 res += fe.detJxW(i) * vec;
225 Bxmat.left_multiply(mat1, mat);
226 Bxmat.right_multiply_transpose(mat2, mat1);
227 (*jac) += fe.detJxW(i) * mat2;
234 const typename FEVarType::fe_shape_deriv_t
237 typename Eigen::Matrix<scalar_t, 2, 1>
241 vec = vector_t::Zero(3*fe.n_basis());
243 typename SectionPropertyType::shear_value_t
247 mat1 = matrix_t::Zero(2, 3*fe.n_basis()),
248 mat2 = matrix_t::Zero(3*fe.n_basis(), 3*fe.n_basis());
252 Bxmat.
reinit(2, 3, fe.n_basis());
255 for (
uint_t i=0; i<fe.n_q_points(); i++) {
263 stress = mat * epsilon;
264 Bxmat.vector_mult_transpose(vec, stress);
265 res += fe.detJxW(i) * vec;
269 Bxmat.left_multiply(mat1, mat);
270 Bxmat.right_multiply_transpose(mat2, mat1);
271 (*jac) += fe.detJxW(i) * mat2;
292 #endif // __mast_linear_mindlin_plate_strain_energy_h__
const FEVarType * _shear_fe_var_data
typename FEVarType::fe_shape_deriv_t fe_shape_deriv_t
void compute(ContextType &c, vector_t &res, matrix_t *jac=nullptr) const
const FEVarType * _bending_fe_var_data
const SectionPropertyType * _property
typename FEVarType::fe_shape_deriv_t::scalar_t basis_scalar_t
void derivative(ContextType &c, const ScalarFieldType &f, vector_t &res, matrix_t *jac=nullptr) const
void set_fe_var_data(const FEVarType &bending_fe_data, const FEVarType &shear_fe_data)
void inplane_strain(const FEVarType &fe_var, const uint_t qp, const VarScalarType z, typename Eigen::Matrix< VarScalarType, 3, 1 > &epsilon, MAST::Numerics::FEMOperatorMatrix< NodalScalarType > &Bmat)
typename FEVarType::scalar_t scalar_t
#define Assert0(cond, msg)
typename Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > vector_t
#define Assert2(cond, v1, v2, msg)
void transverse_shear_strain(const FEVarType &fe_var, const uint_t qp, typename Eigen::Matrix< VarScalarType, 2, 1 > &epsilon, MAST::Numerics::FEMOperatorMatrix< NodalScalarType > &Bmat)
typename Eigen::Matrix< scalar_t, Eigen::Dynamic, Eigen::Dynamic > matrix_t
void set_section_property(const SectionPropertyType &p)
void reinit(uint_t n_interpolated_vars, uint_t n_discrete_vars, uint_t n_discrete_dofs_per_var)
this initializes the operator for number of rows and variables, assuming that all variables has the s...