36 _shear_quadrature_reduction(2)
46 const unsigned int qp,
61 const unsigned int qp,
67 const std::vector<std::vector<libMesh::RealVectorValue> >& dphi = fe.
get_dphi();
68 const std::vector<std::vector<Real> >& phi = fe.
get_phi();
70 const unsigned int n_phi = (
unsigned int)phi.size();
74 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
75 phi_vec(i_nd) = dphi[i_nd][qp](0);
79 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
80 phi_vec(i_nd) = dphi[i_nd][qp](0);
98 std::unique_ptr<MAST::FEBase>
102 const std::vector<std::vector<libMesh::RealVectorValue> >& dphi = fe->get_dphi();
103 const std::vector<std::vector<Real> >& phi = fe->get_phi();
104 const std::vector<Real>& JxW = fe->get_JxW();
105 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
107 const unsigned int n_phi = (
unsigned int)phi.size(), n2 = 6*n_phi;
111 vec_n2 = RealVectorX::Zero(n2),
112 vec_2 = RealVectorX::Zero(2);
114 material_trans_shear_mat,
115 mat_n2n2 = RealMatrixX::Zero(n2,n2),
116 mat_2n2 = RealMatrixX::Zero(2,n2);
122 Bmat_trans_v.
reinit(2, 6, n_phi);
123 Bmat_trans_w.
reinit(2, 6, n_phi);
125 std::unique_ptr<MAST::FieldFunction<RealMatrixX>>
128 for (
unsigned int qp=0; qp<JxW.size(); qp++) {
130 (*mat_stiff)(xyz[qp],
132 material_trans_shear_mat);
138 material_trans_shear_mat,
157 bool request_jacobian,
166 std::unique_ptr<MAST::FEBase>
170 const std::vector<std::vector<libMesh::RealVectorValue> >& dphi = fe->get_dphi();
171 const std::vector<std::vector<Real> >& phi = fe->get_phi();
172 const std::vector<Real>& JxW = fe->get_JxW();
173 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
175 const unsigned int n_phi = (
unsigned int)phi.size(), n2 = 6*n_phi;
179 vec_n2 = RealVectorX::Zero(n2),
180 vec_2 = RealVectorX::Zero(2);
182 material_trans_shear_mat,
183 mat_n2n2 = RealMatrixX::Zero(n2,n2),
184 mat_2n2 = RealMatrixX::Zero(2,n2);
190 Bmat_trans_v.
reinit(2, 6, n_phi);
191 Bmat_trans_w.
reinit(2, 6, n_phi);
193 std::unique_ptr<MAST::FieldFunction<RealMatrixX > >
196 for (
unsigned int qp=0; qp<JxW.size(); qp++) {
198 mat_stiff->derivative(p,
201 material_trans_shear_mat);
207 material_trans_shear_mat,
227 const std::vector<std::vector<libMesh::RealVectorValue> >& dphi,
228 const std::vector<Real>& JxW,
229 const unsigned int qp,
238 bool request_jacobian,
243 for (
unsigned int i_nd=0; i_nd<phi.size(); i_nd++ )
244 phi_vec(i_nd) = dphi[i_nd][qp](0);
248 for (
unsigned int i_nd=0; i_nd<phi.size(); i_nd++ )
249 phi_vec(i_nd) = phi[i_nd][qp];
257 vec_2 = material * vec_2;
259 local_f += JxW[qp] * vec_n2;
262 vec_2 = material * vec_2;
264 local_f += JxW[qp] * vec_n2;
266 if (request_jacobian) {
271 local_jac += JxW[qp] * mat_n2n2;
275 local_jac += JxW[qp] * mat_n2n2;
void vector_mult_transpose(T &res, const T &v) const
res = v^T * [this]
TimoshenkoBendingOperator(MAST::StructuralElementBase &elem)
MAST::NonlinearSystem & system()
void reinit(unsigned int n_interpolated_vars, unsigned int n_discrete_vars, unsigned int n_discrete_dofs_per_var)
this initializes the operator for number of rows and variables, assuming that all variables has the s...
virtual ~TimoshenkoBendingOperator()
const RealVectorX & local_solution(bool if_sens=false) const
void set_shape_function(unsigned int interpolated_var, unsigned int discrete_var, const RealVectorX &shape_func)
sets the shape function values for the block corresponding to interpolated_var and discrete_var...
MAST::StructuralElementBase & _structural_elem
structural element associated with this
unsigned int _shear_quadrature_reduction
reduction in quadrature for shear energy
void _transverse_shear_operations(const std::vector< std::vector< Real > > &phi, const std::vector< std::vector< libMesh::RealVectorValue > > &dphi, const std::vector< Real > &JxW, const unsigned int qp, const RealMatrixX &material, FEMOperatorMatrix &Bmat_v, FEMOperatorMatrix &Bmat_w, RealVectorX &phi_vec, RealVectorX &vec_n2, RealVectorX &vec_2, RealMatrixX &mat_n2n2, RealMatrixX &mat_2n2, bool request_jacobian, RealVectorX &local_f, RealMatrixX &local_jac)
const MAST::ElementPropertyCardBase & elem_property()
returns a constant reference to the finite element object
Matrix< Real, Dynamic, Dynamic > RealMatrixX
void vector_mult(T &res, const T &v) const
res = [this] * v
virtual void calculate_transverse_shear_residual(bool request_jacobian, RealVectorX &local_f, RealMatrixX &local_jac)
calculate the transverse shear component for the element
Bending strain operator for 1D element.
Matrix< Real, Dynamic, 1 > RealVectorX
virtual void calculate_transverse_shear_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &local_f, RealMatrixX &local_jac)
calculate the transverse shear component for the element
virtual const std::vector< std::vector< libMesh::RealVectorValue > > & get_dphi() const
void right_multiply_transpose(T &r, const T &m) const
[R] = [this]^T * [M]
virtual void initialize_bending_strain_operator(const MAST::FEBase &fe, const unsigned int qp, MAST::FEMOperatorMatrix &Bmat_v, MAST::FEMOperatorMatrix &Bmat_w)
initialze the bending strain operator for Timoshenko beam element, withouth the y,z-location.
void left_multiply(T &r, const T &m) const
[R] = [M] * [this]
virtual const std::vector< std::vector< Real > > & get_phi() const
const MAST::GeomElem & _elem
element for which bending operator is created
virtual std::unique_ptr< MAST::FEBase > init_fe(bool init_grads, bool init_second_order_derivative, int extra_quadrature_order=0) const
initializes the finite element shape function and quadrature object with the order of quadrature rule...
virtual void initialize_bending_strain_operator_for_yz(const MAST::FEBase &fe, const unsigned int qp, const Real y, const Real z, MAST::FEMOperatorMatrix &Bmat_bend_v, MAST::FEMOperatorMatrix &Bmat_bend_w)
initializes the bending strain operator for the specified quadrature point and y,z-location.