MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
element_property_card_base.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2020 Manav Bhatia and MAST authors
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__element_property_card_base__
21 #define __mast__element_property_card_base__
22 
23 
24 // MAST includes
25 #include "base/function_set_base.h"
27 
28 
29 namespace MAST
30 {
31  // Forward decleration
32  class MaterialPropertyCardBase;
33  class ElementBase;
34  class GeomElem;
35  template <typename ValType> class FieldFunction;
36 
37 
38  enum StrainType {
41  };
42 
43 
44 
46  public MAST::FunctionSetBase {
47 
48  public:
52  _diagonal_mass(false)
53  { }
54 
59 
65  bending_model(const MAST::GeomElem& elem) const = 0;
66 
72  virtual int extra_quadrature_order(const MAST::GeomElem& elem) const = 0;
73 
74 
75  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
76  stiffness_A_matrix(const MAST::ElementBase& e) const = 0;
77 
78  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
79  stiffness_B_matrix(const MAST::ElementBase& e) const = 0;
80 
81  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
82  stiffness_D_matrix(const MAST::ElementBase& e) const = 0;
83 
84  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
85  damping_matrix(const MAST::ElementBase& e) const = 0;
86 
87  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
88  inertia_matrix(const MAST::ElementBase& e) const = 0;
89 
90  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
92 
93  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
95 
96  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
98 
99  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
100  prestress_A_matrix( MAST::ElementBase& e) const = 0;
101 
102  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
103  prestress_B_matrix( MAST::ElementBase& e) const = 0;
104 
105  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
106  thermal_conductance_matrix(const MAST::ElementBase& e) const = 0;
107 
108  virtual std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
110 
111  virtual const MAST::FieldFunction<Real>*
112  section(const MAST::ElementBase& e) const = 0;
113 
114 
118  virtual bool if_isotropic() const = 0;
119 
120 
127  libmesh_error();
128  }
129 
130 
139  libmesh_error_msg("Not Implemented, this needs to be reimplemented for individual card type; In " << __PRETTY_FUNCTION__ << " in " << __FILE__ << " at line " << __LINE__);
140  }
141 
142 
149  virtual RealVectorX& y_vector() {
150  libmesh_error_msg("Not Implemented, this needs to be reimplemented for individual card type; In " << __PRETTY_FUNCTION__ << " in " << __FILE__ << " at line " << __LINE__);
151  }
152 
153 
160  virtual const RealVectorX& y_vector() const {
161  libmesh_error_msg("Not Implemented, this needs to be reimplemented for individual card type; In " << __PRETTY_FUNCTION__ << " in " << __FILE__ << " at line " << __LINE__);
162  }
163 
169  virtual void init() {
170  libmesh_error_msg("Not Implemented, this needs to be reimplemented for individual card type; In " << __PRETTY_FUNCTION__ << " in " << __FILE__ << " at line " << __LINE__);
171  }
172 
173 
177  virtual unsigned int dim() const = 0;
178 
179 
185  _strain_type = strain;
186  }
187 
188 
193  return _strain_type;
194  }
195 
196 
202  libmesh_error_msg("Not implemented, this needs to be reimplemented for individual card type; In " << __PRETTY_FUNCTION__ << " in " << __FILE__ << " at line " << __LINE__);
203  }
204 
205 
210  _diagonal_mass = m;
211  }
212 
213 
217  bool if_diagonal_mass_matrix() const {
218  return _diagonal_mass;
219  }
220 
221 
226  virtual bool if_prestressed() const {
227  return this->contains("prestress");
228  }
229 
230 
231  virtual bool get_warping_only() const
232  {
233  return _warping_only;
234  }
235 
236  protected:
237 
242 
247 
248  bool _warping_only = false;
249  };
250 
251 }
252 
253 
254 
255 #endif // __mast__element_property_card_base__
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > prestress_A_matrix(MAST::ElementBase &e) const =0
virtual MAST::BendingOperatorType bending_model(const MAST::GeomElem &elem) const =0
returns the bending model to be used for the element.
MAST::StrainType _strain_type
type of nonlinear strain to be used for analysis
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_expansion_B_matrix(const MAST::ElementBase &e) const =0
virtual const RealVectorX & y_vector() const
constant reference to vector in the x-y plane of the element.
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_capacitance_matrix(const MAST::ElementBase &e) const =0
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > prestress_B_matrix(MAST::ElementBase &e) const =0
virtual void init()
Only used by 1D sections.
virtual const MAST::MaterialPropertyCardBase & get_material() const
return the material property.
void set_diagonal_mass_matrix(bool m)
sets the mass matrix to be diagonal or consistent
virtual const MAST::FieldFunction< Real > * section(const MAST::ElementBase &e) const =0
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > damping_matrix(const MAST::ElementBase &e) const =0
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_B_matrix(const MAST::ElementBase &e) const =0
virtual void set_bending_model(MAST::BendingOperatorType b)
sets the bending model to be used for the 1D element Added by DJN to increase section polymorphism ...
void set_strain(MAST::StrainType strain)
sets the type of strain to be used, which is LINEAR_STRAIN by default
virtual bool if_isotropic() const =0
return true if the property is isotropic
virtual ~ElementPropertyCardBase()
virtual destructor
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > inertia_matrix(const MAST::ElementBase &e) const =0
bool _diagonal_mass
flag to use a diagonal mass matrix.
bool contains(const std::string &nm) const
checks if the card contains the specified property value
virtual RealVectorX & y_vector()
vector in the x-y plane of the element.
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > transverse_shear_stiffness_matrix(const MAST::ElementBase &e) const =0
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_conductance_matrix(const MAST::ElementBase &e) const =0
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_A_matrix(const MAST::ElementBase &e) const =0
Matrix< Real, Dynamic, 1 > RealVectorX
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_D_matrix(const MAST::ElementBase &e) const =0
provides a methods to store property values
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::StrainType strain_type() const
returns the type of strain to be used for this element
virtual const MAST::MaterialPropertyCardBase & set_material(MAST::MaterialPropertyCardBase &mat) const
return the material property.
bool if_diagonal_mass_matrix() const
returns the type of strain to be used for this element
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_expansion_A_matrix(const MAST::ElementBase &e) const =0
BendingOperatorType
virtual unsigned int dim() const =0
dimension of the element for which this property is defined
virtual int extra_quadrature_order(const MAST::GeomElem &elem) const =0
returns the extra quadrature order (on top of the system) that this element should use...
This is the base class for elements that implement calculation of finite element quantities over the ...
Definition: elem_base.h:72