28 namespace Multilayer1DSectionProperty {
33 unsigned int layer_num,
39 for (
unsigned int i=0; i <
_layer_hz.size(); i++)
45 for (
unsigned int i=0; i<
_layer_hz.size(); i++)
63 for (
unsigned int i=0; i<
_layer_hz.size(); i++) {
65 m -= 0.5*(1.+
_base)*val;
71 const libMesh::Point& p,
85 for (
unsigned int i=0; i<
_layer_hz.size(); i++) {
87 m -= 0.5*(1.+
_base)*val;
95 const std::vector<const MAST::FieldFunction<Real>*>
_layer_hz;
106 _layer_mats(layer_mats) {
107 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 for (
unsigned int i=0; i<_layer_mats.size(); i++) {
142 _layer_mats[i]->derivative( f, p, t, mi);
146 m = RealMatrixX::Zero(mi.rows(), mi.cols());
166 for (
unsigned int i=0; i<_layer_offsets.size(); i++)
167 delete _layer_offsets[i];
175 std::vector<MAST::Solid1DSectionElementPropertyCard*>& layers) {
178 libmesh_assert(_layers.size() == 0);
181 const unsigned n_layers = (
unsigned int)layers.size();
183 _layer_offsets.resize(n_layers);
186 for (
unsigned int i=0; i<n_layers; i++) {
189 std::vector<const MAST::FieldFunction<Real>*> layer_hz(n_layers);
190 for (
unsigned int j=0; j<n_layers; j++)
199 _layers[i]->add(*_layer_offsets[i]);
206 const std::vector<MAST::Solid1DSectionElementPropertyCard*>&
209 libmesh_assert(_layers.size() > 0);
229 for (
unsigned int i=0; i<_layers.size(); i++)
234 for (
unsigned int i=0; i<_layer_offsets.size(); i++)
244 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
249 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
250 for (
unsigned int i=0; i<_layers.size(); i++)
251 layer_mats[i] = _layers[i]->stiffness_A_matrix(e).release();
254 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
263 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
268 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
269 for (
unsigned int i=0; i<_layers.size(); i++)
270 layer_mats[i] = _layers[i]->stiffness_B_matrix(e).release();
273 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
282 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
287 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
288 for (
unsigned int i=0; i<_layers.size(); i++)
289 layer_mats[i] = _layers[i]->stiffness_D_matrix(e).release();
292 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
301 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
306 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
307 for (
unsigned int i=0; i<_layers.size(); i++)
308 layer_mats[i] = _layers[i]->damping_matrix(e).release();
311 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
320 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
325 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
326 for (
unsigned int i=0; i<_layers.size(); i++)
327 layer_mats[i] = _layers[i]->inertia_matrix(e).release();
330 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
339 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
344 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
345 for (
unsigned int i=0; i<_layers.size(); i++)
346 layer_mats[i] = _layers[i]->thermal_expansion_A_matrix(e).release();
349 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
358 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
363 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
364 for (
unsigned int i=0; i<_layers.size(); i++)
365 layer_mats[i] = _layers[i]->thermal_expansion_B_matrix(e).release();
368 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
377 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
382 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
383 for (
unsigned int i=0; i<_layers.size(); i++)
384 layer_mats[i] = _layers[i]->transverse_shear_stiffness_matrix(e).release();
387 std::unique_ptr<MAST::FieldFunction<RealMatrixX> > rval
396 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
401 std::vector<MAST::FieldFunction<RealMatrixX>*> layer_mats(_layers.size());
402 for (
unsigned int i=0; i<_layers.size(); i++)
403 layer_mats[i] = _layers[i]->prestress_A_matrix(e).release();
406 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
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 > > damping_matrix(const MAST::ElementBase &e)
virtual bool if_isotropic() const
return true if the property is isotropic
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_D_matrix(const MAST::ElementBase &e)
LayerOffset(const Real base, unsigned int layer_num, const std::vector< const MAST::FieldFunction< Real > * > &layer_hz)
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 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 std::unique_ptr< MAST::FieldFunction< RealMatrixX > > inertia_matrix(const MAST::ElementBase &e)
std::set< const MAST::FunctionBase * > _functions
set of functions that this function depends on
const std::vector< const MAST::FieldFunction< Real > * > _layer_hz
Matrix(std::vector< MAST::FieldFunction< RealMatrixX > * > &layer_mats)
Matrix< Real, Dynamic, Dynamic > RealMatrixX
std::vector< MAST::FieldFunction< RealMatrixX > * > _layer_mats
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.
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > prestress_A_matrix(MAST::ElementBase &e)
const unsigned int _layer_num
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...
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_expansion_A_matrix(const MAST::ElementBase &e)
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_B_matrix(const MAST::ElementBase &e)
virtual ~Multilayer1DSectionElementPropertyCard()
virtual destructor
const std::vector< MAST::Solid1DSectionElementPropertyCard * > & get_layers() const
returns the layers of this section
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > prestress_B_matrix(MAST::ElementBase &e)
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > transverse_shear_stiffness_matrix(const MAST::ElementBase &e)
void set_layers(const Real base, std::vector< MAST::Solid1DSectionElementPropertyCard * > &layers)
sets the layers of this section.
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_A_matrix(const MAST::ElementBase &e)
This is the base class for elements that implement calculation of finite element quantities over the ...