20 #ifndef __mast_linear_elastic_strain_operator_h__ 21 #define __mast_linear_elastic_strain_operator_h__ 31 namespace Elasticity {
32 namespace LinearContinuum {
40 template <
typename NodalScalarType,
typename VarScalarType,
typename FEVarType, u
int_t Dim>
42 typename std::enable_if<Dim == 2, void>::type
45 typename Eigen::Matrix<VarScalarType, 3, 1>& epsilon,
50 const typename FEVarType::fe_shape_deriv_t
51 &fe = fe_var.get_fe_shape_data();
56 "Strain vector for 2D continuum strain should be 3");
59 "Strain vector for 2D continuum strain should be 3");
61 Bmat.
n(), 2*fe.n_basis(),
62 "Incompatible Operator size.");
73 epsilon(0) = fe_var.du_dx(qp, 0, 0);
74 epsilon(1) = fe_var.du_dx(qp, 1, 1);
75 epsilon(2) = fe_var.du_dx(qp, 0, 1) + fe_var.du_dx(qp, 1, 0);
80 template <
typename NodalScalarType,
typename VarScalarType,
typename FEVarType, u
int_t Dim>
82 typename std::enable_if<Dim == 3, void>::type
85 typename Eigen::Matrix<VarScalarType, 6, 1>& epsilon,
90 const typename FEVarType::fe_shape_deriv_t
91 &fe = fe_var.get_fe_shape_data();
96 "Strain vector for 3D continuum strain should be 6");
99 "Strain vector for 3D continuum strain should be 6");
101 Bmat.
n(), 3*fe.n_basis(),
102 "Incompatible Operator size.");
119 epsilon(0) = fe_var.du_dx(qp, 0, 0);
120 epsilon(1) = fe_var.du_dx(qp, 1, 1);
121 epsilon(2) = fe_var.du_dx(qp, 2, 2);
122 epsilon(3) = fe_var.du_dx(qp, 0, 1) + fe_var.du_dx(qp, 1, 0);
123 epsilon(4) = fe_var.du_dx(qp, 1, 2) + fe_var.du_dx(qp, 2, 1);
124 epsilon(5) = fe_var.du_dx(qp, 0, 2) + fe_var.du_dx(qp, 2, 0);
133 #endif // __mast_linear_elastic_strain_operator_h__
#define Assert1(cond, v1, msg)
std::enable_if< Dim< 3, ScalarType >::typesource_load_multiplier(const SourceLoadFieldType *f, const SectionAreaType *s, ContextType &c) { Assert0(f, "Invalid pointer");Assert0(s, "Invalid pointer");return f-> value(c) *s -> value(c)
std::enable_if< Dim==2, void >::type strain(const FEVarType &fe_var, const uint_t qp, typename Eigen::Matrix< VarScalarType, 3, 1 > &epsilon, MAST::Numerics::FEMOperatorMatrix< NodalScalarType > &Bmat)
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)