37 _shear_quadrature_reduction(2)
49 const unsigned int qp,
60 const unsigned int qp,
64 const std::vector<std::vector<libMesh::RealVectorValue> >& dphi = fe.
get_dphi();
65 const std::vector<std::vector<Real> >& phi = fe.
get_phi();
67 const unsigned int n_phi = (
unsigned int)phi.size();
70 for (
unsigned int i_nd=0; i_nd<n_phi; i_nd++ )
71 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](1);
103 std::unique_ptr<MAST::FEBase>
106 const std::vector<std::vector<libMesh::RealVectorValue> >& dphi = fe->get_dphi();
107 const std::vector<std::vector<Real> >& phi = fe->get_phi();
108 const std::vector<Real>& JxW = fe->get_JxW();
109 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
112 n_phi = (
unsigned int)phi.size(),
116 phi_vec = RealVectorX::Zero(n_phi),
117 vec_n2 = RealVectorX::Zero(n2),
118 vec_2 = RealVectorX::Zero(2);
120 material_trans_shear_mat,
121 mat_n2n2 = RealMatrixX::Zero(n2,n2),
122 mat_2n2 = RealMatrixX::Zero(2,n2);
126 Bmat_trans.
reinit(2, 6, n_phi);
128 std::unique_ptr<MAST::FieldFunction<RealMatrixX > >
131 for (
unsigned int qp=0; qp<JxW.size(); qp++) {
133 (*mat_stiff)(xyz[qp],
135 material_trans_shear_mat);
141 material_trans_shear_mat,
163 bool request_jacobian,
172 std::unique_ptr<MAST::FEBase>
175 const std::vector<std::vector<libMesh::RealVectorValue> >& dphi = fe->get_dphi();
176 const std::vector<std::vector<Real> >& phi = fe->get_phi();
177 const std::vector<Real>& JxW = fe->get_JxW();
178 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
181 n_phi = (
unsigned int)phi.size(),
185 phi_vec = RealVectorX::Zero(n_phi),
186 vec_n2 = RealVectorX::Zero(n2),
187 vec_2 = RealVectorX::Zero(2);
189 material_trans_shear_mat,
190 mat_n2n2 = RealMatrixX::Zero(n2,n2),
191 mat_2n2 = RealMatrixX::Zero(2,n2);
195 Bmat_trans.
reinit(2, 6, n_phi);
197 std::unique_ptr<MAST::FieldFunction<RealMatrixX > >
200 for (
unsigned int qp=0; qp<JxW.size(); qp++) {
202 mat_stiff->derivative(p,
205 material_trans_shear_mat);
211 material_trans_shear_mat,
230 const unsigned int s,
232 bool request_jacobian,
241 std::unique_ptr<MAST::FEBase>
244 const std::vector<std::vector<libMesh::RealVectorValue> >& dphi = fe->get_dphi();
245 const std::vector<std::vector<Real> >& phi = fe->get_phi();
246 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
247 const std::vector<libMesh::Point>& face_normals = fe->get_normals_for_local_coordinate();
248 std::vector<Real> JxW_Vn = fe->get_JxW();
251 n_phi = (
unsigned int)phi.size(),
256 phi_vec = RealVectorX::Zero(n_phi),
257 vec_n2 = RealVectorX::Zero(n2),
258 vec_2 = RealVectorX::Zero(2),
259 vel = RealVectorX::Zero(dim);
261 material_trans_shear_mat,
262 dmaterial_trans_shear_mat_dp,
263 mat_n2n2 = RealMatrixX::Zero(n2,n2),
264 mat_2n2 = RealMatrixX::Zero(2,n2);
268 Bmat_trans.
reinit(2, 6, n_phi);
270 std::unique_ptr<MAST::FieldFunction<RealMatrixX > >
278 for (
unsigned int qp=0; qp<JxW_Vn.size(); qp++) {
282 for (
unsigned int i=0; i<dim; i++)
283 vn += vel(i)*face_normals[qp](i);
287 for (
unsigned int qp=0; qp<JxW_Vn.size(); qp++) {
289 (*mat_stiff)(xyz[qp],
291 material_trans_shear_mat);
297 material_trans_shear_mat,
315 const std::vector<std::vector<libMesh::RealVectorValue> >& dphi,
316 const std::vector<Real>& JxW,
317 const unsigned int qp,
325 bool request_jacobian,
330 for (
unsigned int i_nd=0; i_nd<phi.size(); i_nd++ )
331 phi_vec(i_nd) = dphi[i_nd][qp](0);
335 for (
unsigned int i_nd=0; i_nd<phi.size(); i_nd++ )
336 phi_vec(i_nd) = dphi[i_nd][qp](1);
340 for (
unsigned int i_nd=0; i_nd<phi.size(); i_nd++ )
341 phi_vec(i_nd) = phi[i_nd][qp];
350 vec_2 = material * vec_2;
352 local_f += JxW[qp] * vec_n2;
354 if (request_jacobian) {
359 local_jac += JxW[qp] * mat_n2n2;
void vector_mult_transpose(T &res, const T &v) const
res = v^T * [this]
void initialize_bending_strain_operator_for_z(const MAST::FEBase &fe, const unsigned int qp, const Real z, MAST::FEMOperatorMatrix &Bmat_bend)
initializes the bending strain operator for the specified quadrature point and z-location.
virtual void initialize_bending_strain_operator(const MAST::FEBase &fe, const unsigned int qp, MAST::FEMOperatorMatrix &Bmat)
initialze the bending strain operator for Mindlin element, withouth the z-location.
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_trans, RealVectorX &phi_vec, RealVectorX &vec_n2, RealVectorX &vec_2, RealMatrixX &mat_n2n2, RealMatrixX &mat_2n2, bool request_jacobian, RealVectorX &local_f, RealMatrixX &local_jac)
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 void calculate_transverse_shear_residual(bool request_jacobian, RealVectorX &local_f, RealMatrixX &local_jac)
calculate the transverse shear component for the element
const RealVectorX & local_solution(bool if_sens=false) const
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
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
virtual ~MindlinBendingOperator()
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
Bending strain operator for 1D element.
Matrix< Real, Dynamic, 1 > RealVectorX
virtual std::unique_ptr< MAST::FEBase > init_side_fe(unsigned int s, bool init_grads, int extra_quadrature_order=0) const
initializes the finite element shape function and quadrature object for the side with the order of qu...
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]
void left_multiply(T &r, const T &m) const
[R] = [M] * [this]
MindlinBendingOperator(MAST::StructuralElementBase &elem)
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 calculate_transverse_shear_residual_boundary_velocity(const MAST::FunctionBase &p, const unsigned int s, const MAST::FieldFunction< RealVectorX > &vel_f, bool request_jacobian, RealVectorX &local_f, RealMatrixX &local_jac)
calculate the transverse shear component for the element