20 #ifndef __mast__stress_output_base__ 21 #define __mast__stress_output_base__ 34 #include "libmesh/elem.h" 77 const libMesh::Point& qp,
78 const libMesh::Point& xyz,
278 const libMesh::Elem& ref_elem,
328 libmesh_assert(
false);
438 const unsigned int qp,
439 const libMesh::Point& quadrature_pt,
440 const libMesh::Point& physical_pt,
452 const unsigned int s,
453 const unsigned int qp,
454 const libMesh::Point& quadrature_pt,
455 const libMesh::Point& physical_pt,
465 virtual const std::map<
const libMesh::dof_id_type,
466 std::vector<MAST::StressStrainOutputBase::Data*> >&
478 virtual const std::vector<MAST::StressStrainOutputBase::Data*>&
488 const unsigned int qp);
514 Real& dsigma_vm_val_df)
const;
531 Real& dsigma_vm_val_df)
const;
540 const libMesh::dof_id_type e_id,
541 Real& dsigma_vm_val_df)
const;
550 const libMesh::dof_id_type e_id,
551 Real& dsigma_vm_val_df)
const;
567 (
const libMesh::dof_id_type e_id,
609 std::map<const libMesh::dof_id_type, std::vector<MAST::StressStrainOutputBase::Data*>>
616 std::map<const libMesh::dof_id_type, std::vector<MAST::StressStrainOutputBase::Data*>>
621 #endif // __mast__stress_output_base__
RealVectorX _strain
strain data
virtual Real output_sensitivity_for_elem(const MAST::FunctionBase &p)
Data(const RealVectorX &stress, const RealVectorX &strain, const libMesh::Point &qp, const libMesh::Point &xyz, Real JxW)
virtual Real output_for_elem()
should not get called for this output.
virtual void evaluate_sensitivity(const MAST::FunctionBase &f)
this evaluates all relevant stress sensitivity components on the element to evaluate the p-averaged q...
bool primal_data_initialized() const
std::map< const MAST::FunctionBase *, RealVectorX > _stress_sensitivity
map of sensitivity of the stress with respect to a parameter
bool stress_plot_mode() const
libMesh::Point _qp
quadrature point location in element coordinates
Data structure provides the mechanism to store stress and strain output from a structural analysis...
RealMatrixX _dstress_dX
derivative of stress wrt state vector
virtual void functional_for_all_elems()
calculates and returns the von Mises p-norm functional for all the elements that this object currentl...
const RealVectorX & stress() const
unsigned int n_boundary_stress_strain_data_for_elem(const GeomElem &e) const
void clear()
clears the data structure of any stored values so that it can be used for another element...
virtual void functional_sensitivity_for_all_elems(const MAST::FunctionBase &f, Real &dsigma_vm_val_df) const
calculates and returns the sensitivity of von Mises p-norm functional for all the elements that this ...
std::map< const libMesh::dof_id_type, std::vector< MAST::StressStrainOutputBase::Data * > > _boundary_stress_data
vector of stress with the associated location details
Real von_Mises_stress() const
const RealMatrixX & get_dstrain_dX() const
This provides the base class for definitin of element level contribution of output quantity in an ana...
void clear_sensitivity_data()
Real _sigma0
reference stress value used in scaling volume.
void set_stress_plot_mode(bool f)
tells the object that the calculation is for stress to be output for plotting.
RealVectorX _stress
stress data
virtual void zero_for_sensitivity()
zeroes the output quantity values stored inside this object so that assembly process can begin...
virtual ~StressStrainOutputBase()
Real _rho
exponent used in scaling volume based on stress value.
const RealVectorX & get_strain_sensitivity(const MAST::FunctionBase &f) const
@ returns the sensitivity of the data with respect to a function
libMesh::Point _xyz
quadrature point location in physical coordinates
virtual const std::vector< MAST::StressStrainOutputBase::Data * > & get_stress_strain_data_for_elem(const MAST::GeomElem &e) const
bool _primal_data_initialized
primal data, needed for sensitivity and adjoints
virtual void evaluate_topology_sensitivity(const MAST::FunctionBase &f, const MAST::FieldFunction< RealVectorX > &vel)
This evaluates the contribution to the topology sensitivity on the boundary.
Real _p_norm_stress
norm to be used for calculation of output stress function.
void set_aggregation_coefficients(Real p1, Real p2, Real rho, Real sigma0)
sets the norm for calculation of stress functional
const libMesh::Point & point_location_in_element_coordinate() const
virtual void evaluate_shape_sensitivity(const MAST::FunctionBase &f)
this evaluates all relevant shape sensitivity components on the element.
virtual Real output_sensitivity_total(const MAST::FunctionBase &p)
Real dvon_Mises_stress_dp(const MAST::FunctionBase &f) const
unsigned int n_stress_strain_data_for_elem(const MAST::GeomElem &e) const
std::map< const libMesh::dof_id_type, std::vector< MAST::StressStrainOutputBase::Data * > > _stress_data
vector of stress with the associated location details
RealMatrixX _dstrain_dX
derivative of strain data wrt state vector
virtual const std::map< const libMesh::dof_id_type, std::vector< MAST::StressStrainOutputBase::Data * > > & get_stress_strain_data() const
Matrix< Real, Dynamic, Dynamic > RealMatrixX
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()...
Real get_maximum_von_mises_stress() const
MAST::BoundaryConditionBase * get_thermal_load_for_elem(const MAST::GeomElem &elem)
virtual void functional_boundary_sensitivity_for_all_elems(const MAST::FunctionBase &f, Real &dsigma_vm_val_df) const
calculates and returns the sensitivity of von Mises p-norm functional for all the elements that this ...
virtual void init(const MAST::GeomElem &elem)
initialize for the element.
virtual void set_elem_data(unsigned int dim, const libMesh::Elem &ref_elem, MAST::GeomElem &elem) const
sets the structural element y-vector if 1D element is used.
Matrix< Real, Dynamic, 1 > RealVectorX
Real quadrature_point_JxW() const
virtual void zero_for_analysis()
zeroes the output quantity values stored inside this object so that assembly process can begin...
virtual void functional_state_derivartive_for_elem(const libMesh::dof_id_type e_id, RealVectorX &dq_dX) const
calculates and returns the derivative of von Mises p-norm functional wrt state vector for the specifi...
This class provides a mechanism to store stress/strain values, their derivatives and sensitivity valu...
const RealVectorX & strain() const
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
virtual void functional_boundary_sensitivity_for_elem(const MAST::FunctionBase &f, const libMesh::dof_id_type e_id, Real &dsigma_vm_val_df) const
calculates and returns the boundary sensitivity of von Mises p-norm functional for the element e...
StressStrainOutputBase()
default constructor
Real _JxW
quadrature point JxW (product of transformation Jacobian and quadrature weight) for use in definition...
void set_derivatives(const RealMatrixX &dstress_dX, const RealMatrixX &dstrain_dX)
adds the derivative data
const RealVectorX & get_stress_sensitivity(const MAST::FunctionBase &f) const
@ returns the sensitivity of the data with respect to a function
virtual void evaluate()
this evaluates all relevant stress components on the element to evaluate the p-averaged quantity...
std::map< const MAST::FunctionBase *, RealVectorX > _strain_sensitivity
map of sensitivity of the strain with respect to a parameter
virtual MAST::StressStrainOutputBase::Data & get_stress_strain_data_for_elem_at_qp(const MAST::GeomElem &e, const unsigned int qp)
virtual void functional_sensitivity_for_elem(const MAST::FunctionBase &f, const libMesh::dof_id_type e_id, Real &dsigma_vm_val_df) const
calculates and returns the sensitivity of von Mises p-norm functional for the element e...
bool has_stress_sensitivity(const MAST::FunctionBase &f) const
@ returns true if sensitivity data is available for function f .
bool _if_stress_plot_mode
identifies the mode in which evaluation is peformed.
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.
RealVectorX dvon_Mises_stress_dX() const
const RealMatrixX & get_dstress_dX() const
virtual Real output_total()
void set_sensitivity(const MAST::FunctionBase &f, const RealVectorX &dstress_df, const RealVectorX &dstrain_df)
sets the sensitivity of the data with respect to a function
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.