28 namespace Multilayer2DSectionProperty {
34 unsigned int layer_num,
40 for (
unsigned int i=0; i <
_layer_h.size(); i++)
47 for (
unsigned int i=0; i<
_layer_h.size(); i++)
65 for (
unsigned int i=0; i<
_layer_h.size(); i++) {
67 m -= 0.5*(1.+
_base)*val;
73 const libMesh::Point& p,
79 _layer_h[i]->derivative( f, p, t, val);
87 for (
unsigned int i=0; i<
_layer_h.size(); i++) {
88 _layer_h[i]->derivative( f, p, t, val);
89 m -= 0.5*(1.+
_base)*val;
97 const std::vector<const MAST::FieldFunction<Real>*>
_layer_h;
105 _layer_mats(layer_mats) {
106 for (
unsigned int i=0; i < _layer_mats.size(); i++) {
114 for (
unsigned int i=0; i<_layer_mats.size(); i++)
115 delete _layer_mats[i];
123 for (
unsigned int i=0; i<_layer_mats.size(); i++) {
124 (*_layer_mats[i])(p, t, mi);
128 m = RealMatrixX::Zero(mi.rows(), mi.cols());
136 const libMesh::Point& p,
141 m = RealMatrixX::Zero(2,2);
142 for (
unsigned int i=0; i<_layer_mats.size(); i++) {
143 _layer_mats[i]->derivative( f, p, t, mi);
147 m = RealMatrixX::Zero(mi.rows(), mi.cols());
169 for (
unsigned int i=0; i<_layer_offsets.size(); i++)
170 delete _layer_offsets[i];
186 std::vector<MAST::Solid2DSectionElementPropertyCard*>& layers) {
189 libmesh_assert(_layers.size() == 0);
192 const unsigned n_layers = (
unsigned int)layers.size();
194 _layer_offsets.resize(n_layers);
197 for (
unsigned int i=0; i<n_layers; i++) {
200 std::vector<const MAST::FieldFunction<Real>*> layer_h(n_layers);
201 for (
unsigned int j=0; j<n_layers; j++)
209 _layers[i]->add(*_layer_offsets[i]);
215 const std::vector<MAST::Solid2DSectionElementPropertyCard*>&
218 libmesh_assert(_layers.size() > 0);
236 for (
unsigned int i=0; i<_layers.size(); i++)
241 for (
unsigned int i=0; i<_layer_offsets.size(); i++)
251 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
256 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
257 for (
unsigned int i=0; i<_layers.size(); i++)
258 layer_mats[i] = _layers[i]->stiffness_A_matrix(e).release();
261 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
269 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
274 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
275 for (
unsigned int i=0; i<_layers.size(); i++)
276 layer_mats[i] = _layers[i]->stiffness_B_matrix(e).release();
279 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
288 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
293 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
294 for (
unsigned int i=0; i<_layers.size(); i++)
295 layer_mats[i] = _layers[i]->stiffness_D_matrix(e).release();
298 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
306 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
311 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
312 for (
unsigned int i=0; i<_layers.size(); i++)
313 layer_mats[i] = _layers[i]->damping_matrix(e).release();
316 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
324 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
329 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
330 for (
unsigned int i=0; i<_layers.size(); i++)
331 layer_mats[i] = _layers[i]->inertia_matrix(e).release();
334 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
342 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
347 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
348 for (
unsigned int i=0; i<_layers.size(); i++)
349 layer_mats[i] = _layers[i]->thermal_expansion_A_matrix(e).release();
352 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
360 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
365 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
366 for (
unsigned int i=0; i<_layers.size(); i++)
367 layer_mats[i] = _layers[i]->thermal_expansion_B_matrix(e).release();
370 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
378 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
383 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
384 for (
unsigned int i=0; i<_layers.size(); i++)
385 layer_mats[i] = _layers[i]->transverse_shear_stiffness_matrix(e).release();
388 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
397 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
402 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
403 for (
unsigned int i=0; i<_layers.size(); i++)
404 layer_mats[i] = _layers[i]->prestress_A_matrix(e).release();
407 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
415 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
420 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
421 for (
unsigned int i=0; i<_layers.size(); i++)
422 layer_mats[i] = _layers[i]->prestress_B_matrix(e).release();
425 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
LayerOffset(const Real base, unsigned int layer_num, const std::vector< const MAST::FieldFunction< Real > * > &layer_h)
virtual bool if_isotropic() const
return true if the property is isotropic
const std::vector< MAST::Solid2DSectionElementPropertyCard * > & get_layers() const
returns the layers of this section
std::vector< MAST::FieldFunction< RealMatrixX > * > _layer_mats
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > damping_matrix(const MAST::ElementBase &e)
virtual void operator()(const libMesh::Point &p, const Real t, Real &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, Real &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
std::set< const MAST::FunctionBase * > _functions
set of functions that this function depends on
Matrix(std::vector< MAST::FieldFunction< RealMatrixX > * > &layer_mats)
virtual unsigned int dim() const
dimension of the element for which this property is defined
void set_layers(const Real base, std::vector< MAST::Solid2DSectionElementPropertyCard * > &layers)
sets the layers of this section.
virtual ~Multilayer2DSectionElementPropertyCard()
virtual destructor
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > prestress_A_matrix(MAST::ElementBase &e)
const unsigned int _layer_num
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_expansion_A_matrix(const MAST::ElementBase &e)
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > prestress_B_matrix(MAST::ElementBase &e)
Matrix< Real, Dynamic, Dynamic > RealMatrixX
virtual bool depends_on(const MAST::FunctionBase &f) const
returns true if the function depends on the provided value
This creates the base class for functions that have a saptial and temporal dependence, and provide sensitivity operations with respect to the functions and parameters.
const std::vector< const MAST::FieldFunction< Real > * > _layer_h
virtual bool depends_on(const MAST::FunctionBase &f) const
returns true if the property card depends on the function f
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_expansion_B_matrix(const MAST::ElementBase &e)
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_D_matrix(const MAST::ElementBase &e)
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > inertia_matrix(const MAST::ElementBase &e)
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > transverse_shear_stiffness_matrix(const MAST::ElementBase &e)
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_A_matrix(const MAST::ElementBase &e)
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_B_matrix(const MAST::ElementBase &e)
This is the base class for elements that implement calculation of finite element quantities over the ...