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-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__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 
134  virtual unsigned int dim() const = 0;
135 
136 
142  _strain_type = strain;
143  }
144 
145 
150  return _strain_type;
151  }
152 
153 
158  _diagonal_mass = m;
159  }
160 
161 
165  bool if_diagonal_mass_matrix() const {
166  return _diagonal_mass;
167  }
168 
169 
174  virtual bool if_prestressed() const {
175  return this->contains("prestress");
176  }
177 
178 
179  protected:
180 
185 
190  };
191 
192 }
193 
194 
195 
196 #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.
virtual const MAST::FieldFunction< Real > & section(const MAST::ElementBase &e) const =0
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 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
void set_diagonal_mass_matrix(bool m)
sets the mass matrix to be diagonal or consistent
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
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
virtual const MAST::MaterialPropertyCardBase & get_material() const
return the material property.
bool _diagonal_mass
flag to use a diagonal mass matrix.
const MAST::StrainType strain_type() const
returns the type of strain to be used for this 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
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
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...
bool if_diagonal_mass_matrix() const
returns the type of strain to be used for this element
bool contains(const std::string &nm) const
checks if the card contains the specified property value
This is the base class for elements that implement calculation of finite element quantities over the ...
Definition: elem_base.h:72