20 #ifndef __mast_green_lagrange_strain_operator_h__ 21 #define __mast_green_lagrange_strain_operator_h__ 31 namespace Elasticity {
34 template <
typename NodalScalarType,
typename VarScalarType,
typename FEVarType, u
int_t Dim>
36 typename std::enable_if<Dim == 2, void>::type
39 typename Eigen::Matrix<VarScalarType, 2, 2>& E,
40 typename Eigen::Matrix<VarScalarType, 2, 2>& F,
41 typename Eigen::Matrix<VarScalarType, 3, 1>& epsilon,
42 typename Eigen::Matrix<VarScalarType, 3, 2>& mat_x,
43 typename Eigen::Matrix<VarScalarType, 3, 2>& mat_y,
55 const typename FEVarType::fe_shape_data_type
56 &fe = fe_var.get_fe_shape_object();
61 "Strain vector for 2D continuum strain should be 3.");
64 "Incompatible matrix size.");
67 "Incompatible matrix size.");
70 "Incompatible matrix size.");
73 "Incompatible matrix size.");
77 "Strain vector for 2D continuum strain should be 3");
78 Assert2(Bmat_lin.
n() == 2*fe.n_basis(),
79 Bmat_lin.
n(), 2*fe.n_basis(),
80 "Incompatible Operator size.");
83 "Incompatible matrix size.");
84 Assert2(Bmat_nl_x.
n() == 2*fe.n_basis(),
85 Bmat_nl_x.
n(), 2*fe.n_basis(),
86 "Incompatible matrix size.");
89 "Incompatible matrix size.");
90 Assert2(Bmat_nl_y.
n() == 2*fe.n_basis(),
91 Bmat_nl_y.
n(), 2*fe.n_basis(),
92 "Incompatible matrix size.");
95 "Incompatible matrix size.");
98 "Incompatible matrix size.");
101 "Incompatible matrix size.");
104 "Incompatible matrix size.");
132 F.row(0) = fe_var.du_dx(qp, 0);
133 F.row(1) = fe_var.du_dx(qp, 1);
136 E = 0.5*(F + F.transpose() + F.transpose() * F);
141 epsilon(2) = E(0,1) + E(1,0);
145 mat_x(0, 0) = fe_var.du_dx(qp, 0, 0);
146 mat_x(0, 1) = fe_var.du_dx(qp, 1, 0);
147 mat_x(2, 0) = fe_var.du_dx(qp, 0, 1);
148 mat_x(2, 1) = fe_var.du_dx(qp, 1, 1);
150 mat_y(1, 0) = fe_var.du_dx(qp, 0, 1);
151 mat_y(1, 1) = fe_var.du_dx(qp, 1, 1);
152 mat_y(2, 0) = fe_var.du_dx(qp, 0, 0);
153 mat_y(2, 1) = fe_var.du_dx(qp, 1, 0);
161 #endif // __mast_green_lagrange_strain_operator_h__
#define Assert1(cond, v1, msg)
std::enable_if< Dim==2, void >::type green_lagrange_strain_operator(const FEVarType &fe_var, const uint_t qp, typename Eigen::Matrix< VarScalarType, 2, 2 > &E, typename Eigen::Matrix< VarScalarType, 2, 2 > &F, typename Eigen::Matrix< VarScalarType, 3, 1 > &epsilon, typename Eigen::Matrix< VarScalarType, 3, 2 > &mat_x, typename Eigen::Matrix< VarScalarType, 3, 2 > &mat_y, MAST::Numerics::FEMOperatorMatrix< NodalScalarType > &Bmat_lin, MAST::Numerics::FEMOperatorMatrix< NodalScalarType > &Bmat_nl_x, MAST::Numerics::FEMOperatorMatrix< NodalScalarType > &Bmat_nl_y, MAST::Numerics::FEMOperatorMatrix< NodalScalarType > &Bmat_nl_u, MAST::Numerics::FEMOperatorMatrix< NodalScalarType > &Bmat_nl_v)
void set_shape_function(uint_t interpolated_var, uint_t discrete_var, const VecType &shape_func)
sets the shape function values for the block corresponding to interpolated_var and discrete_var...
#define Assert2(cond, v1, v2, msg)