MAST
stress_temperature_adjoint.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__stress_temperature_adjoint_h__
21 #define __mast__stress_temperature_adjoint_h__
22 
23 
24 // MAST includes
26 
27 
28 // libMesh includes
29 #include "libmesh/elem.h"
30 
31 namespace MAST {
32 
33 
42 
43  public:
44 
49 
50  virtual ~StressTemperatureAdjoint();
51 
52  void
53  set_thermal_assembly(MAST::AssemblyBase& thermal_assembly);
54 
55  void
56  set_structural_solutions(const libMesh::NumericVector<Real>& sol,
57  const libMesh::NumericVector<Real>& adj_sol);
58 
63  virtual bool if_evaluate_for_element(const MAST::GeomElem& elem) const {
64  return _stress.if_evaluate_for_element(elem);
65  }
66 
67 
68 
72  virtual void
73  set_elem_solution(const RealVectorX& sol);
74 
75  virtual void output_derivative_for_elem(RealVectorX& dq_dX);
76 
77 
80  const unsigned int qp,
81  const libMesh::Point& quadrature_pt,
82  const libMesh::Point& physical_pt,
83  const RealVectorX& stress,
84  const RealVectorX& strain,
85  Real JxW) {
86  libmesh_error(); // shoudl not get called
87  }
88 
89 
96  const unsigned int s,
97  const unsigned int qp,
98  const libMesh::Point& quadrature_pt,
99  const libMesh::Point& physical_pt,
100  const RealVectorX& stress,
101  const RealVectorX& strain,
102  Real JxW_Vn) {
103  libmesh_error(); // should not get called
104  }
105 
112  const unsigned int qp) {
113  libmesh_error(); // should not get called
114  }
115 
119  virtual const std::map<const libMesh::dof_id_type,
120  std::vector<MAST::StressStrainOutputBase::Data*> >&
122  libmesh_error(); // should not get called
123  }
124 
125 
129  virtual const std::vector<MAST::StressStrainOutputBase::Data*>&
131  libmesh_error(); // should not get called
132  }
133 
134  protected:
135 
138  std::unique_ptr<libMesh::NumericVector<Real>> _structural_sol;
139  std::unique_ptr<libMesh::NumericVector<Real>> _structural_adjoint;
140  };
141 }
142 
143 #endif // __mast__stress_temperature_adjoint_h__
144 
The stress and thermoelastic analysis are dependent on temperature.
Data structure provides the mechanism to store stress and strain output from a structural analysis...
virtual bool if_evaluate_for_element(const MAST::GeomElem &elem) const
checks to see if the object has been told about the subset of elements and if the specified element i...
virtual const std::vector< MAST::StressStrainOutputBase::Data * > & get_stress_strain_data_for_elem(const MAST::GeomElem &e) const
virtual MAST::StressStrainOutputBase::Data & get_stress_strain_data_for_elem_at_qp(const MAST::GeomElem &e, const unsigned int qp)
virtual void output_derivative_for_elem(RealVectorX &dq_dX)
calculates the derivative of p-norm von Mises stress for the norm identified using set_p_val()...
libMesh::Real Real
MAST::StressStrainOutputBase & _stress
virtual MAST::StressStrainOutputBase::Data & add_stress_strain_at_qp_location(const MAST::GeomElem &e, const unsigned int qp, const libMesh::Point &quadrature_pt, const libMesh::Point &physical_pt, const RealVectorX &stress, const RealVectorX &strain, Real JxW)
add the stress tensor associated with the qp.
virtual MAST::StressStrainOutputBase::Data & add_stress_strain_at_boundary_qp_location(const MAST::GeomElem &e, const unsigned int s, const unsigned int qp, const libMesh::Point &quadrature_pt, const libMesh::Point &physical_pt, const RealVectorX &stress, const RealVectorX &strain, Real JxW_Vn)
add the stress tensor associated with the qp on side s of element e.
StressTemperatureAdjoint(MAST::StressStrainOutputBase &stress)
default constructor
Matrix< Real, Dynamic, 1 > RealVectorX
This class provides a mechanism to store stress/strain values, their derivatives and sensitivity valu...
virtual bool if_evaluate_for_element(const MAST::GeomElem &elem) const
checks to see if the object has been told about the subset of elements and if the specified element i...
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
Definition: geom_elem.h:59
void set_thermal_assembly(MAST::AssemblyBase &thermal_assembly)
void set_structural_solutions(const libMesh::NumericVector< Real > &sol, const libMesh::NumericVector< Real > &adj_sol)
virtual void set_elem_solution(const RealVectorX &sol)
sets the element solution
std::unique_ptr< libMesh::NumericVector< Real > > _structural_sol
virtual const std::map< const libMesh::dof_id_type, std::vector< MAST::StressStrainOutputBase::Data * > > & get_stress_strain_data() const
std::unique_ptr< libMesh::NumericVector< Real > > _structural_adjoint