MAST
bending_operator.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2019 Manav Bhatia
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __mast__bending_operator__
21 #define __mast__bending_operator__
22 
23 // C++ includes
24 #include <memory>
25 
26 // MAST includes
27 #include "base/mast_data_types.h"
28 
29 // libMesh includes
30 #include "libmesh/elem.h"
31 #include "libmesh/quadrature.h"
32 #include "libmesh/fe_base.h"
33 
34 
35 
36 namespace MAST {
37 
38  // Forward declerations
39  class StructuralElementBase;
40  class FunctionBase;
41  class SensitivityParameters;
42  class FEMOperatorMatrix;
43  class FEBase;
44  class GeomElem;
45  template <typename ValType> class FieldFunction;
46 
47 
49  BERNOULLI, // beam
50  TIMOSHENKO, // beam
51  DKT, // plate
52  MINDLIN, // plate
55  };
56 
57 
59  public:
60 
62 
63  virtual ~BendingOperator();
64 
68  virtual bool include_transverse_shear_energy() const = 0;
69 
73  virtual void
74  calculate_transverse_shear_residual(bool request_jacobian,
75  RealVectorX& local_f,
76  RealMatrixX& local_jac)
77  { libmesh_error(); }
78 
79 
83  virtual void
85  bool request_jacobian,
86  RealVectorX& local_f,
87  RealMatrixX& local_jac)
88  { libmesh_error(); }
89 
90 
94  virtual void
96  (const MAST::FunctionBase& p,
97  const unsigned int s,
99  bool request_jacobian,
100  RealVectorX& local_f,
101  RealMatrixX& local_jac)
102  { libmesh_error(); }
103 
104 
105  protected:
106 
111 
116  };
117 
118 
119 
124  public MAST::BendingOperator {
125 
126  public:
128  MAST::BendingOperator(elem)
129  { }
130 
134  virtual void
135  initialize_bending_strain_operator (const MAST::FEBase& fe,
136  const unsigned int qp,
137  MAST::FEMOperatorMatrix& Bmat_v,
138  MAST::FEMOperatorMatrix& Bmat_w) = 0;
139 
143  virtual void
144  initialize_bending_strain_operator_for_yz (const MAST::FEBase& fe,
145  const unsigned int qp,
146  const Real y,
147  const Real z,
148  MAST::FEMOperatorMatrix& Bmat_v,
149  MAST::FEMOperatorMatrix& Bmat_w) = 0;
150 
151  };
152 
153 
158  public:
160  MAST::BendingOperator(elem)
161  { }
162 
166  virtual void
167  initialize_bending_strain_operator (const MAST::FEBase& fe,
168  const unsigned int qp,
169  MAST::FEMOperatorMatrix& Bmat) = 0;
170 
174  virtual void
175  initialize_bending_strain_operator_for_z (const MAST::FEBase& fe,
176  const unsigned int qp,
177  const Real z,
178  MAST::FEMOperatorMatrix& Bmat) = 0;
179 
180  };
181 
182 
186  std::unique_ptr<MAST::BendingOperator1D>
189  const std::vector<libMesh::Point>& pts);
190 
191  std::unique_ptr<MAST::BendingOperator2D>
194  const std::vector<libMesh::Point>& pts);
195 
196 }
197 
198 #endif
199 
BendingOperator1D(MAST::StructuralElementBase &elem)
std::unique_ptr< MAST::BendingOperator1D > build_bending_operator_1D(MAST::BendingOperatorType type, MAST::StructuralElementBase &elem, const std::vector< libMesh::Point > &pts)
builds a bending operator and returns it in a smart-pointer
virtual bool include_transverse_shear_energy() const =0
returns true if this bending operator supports a transverse shear component
virtual void calculate_transverse_shear_residual(bool request_jacobian, RealVectorX &local_f, RealMatrixX &local_jac)
calculate the transverse shear component for the element
MAST::StructuralElementBase & _structural_elem
structural element associated with this
libMesh::Real Real
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
std::unique_ptr< MAST::BendingOperator2D > build_bending_operator_2D(MAST::BendingOperatorType type, MAST::StructuralElementBase &elem, const std::vector< libMesh::Point > &pts)
Matrix< Real, Dynamic, Dynamic > RealMatrixX
Bending strain operator for 1D element.
Bending strain operator for 1D element.
BendingOperator2D(MAST::StructuralElementBase &elem)
Matrix< Real, Dynamic, 1 > RealVectorX
BendingOperator(MAST::StructuralElementBase &elem)
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
Definition: geom_elem.h:59
const MAST::GeomElem & _elem
element for which bending operator is created
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
BendingOperatorType