MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
MAST::StressTemperatureAdjoint Class Reference

Detailed Description

The stress and thermoelastic analysis are dependent on temperature.

This class provides the contribution to the forcing function for calculation of adjoint vector for the thermal system, as a result of the stress and themroelstic analyses.

Definition at line 40 of file stress_temperature_adjoint.h.

#include <stress_temperature_adjoint.h>

Inheritance diagram for MAST::StressTemperatureAdjoint:
Collaboration diagram for MAST::StressTemperatureAdjoint:

Public Member Functions

 StressTemperatureAdjoint (MAST::StressStrainOutputBase &stress)
 default constructor More...
 
virtual ~StressTemperatureAdjoint ()
 
virtual MAST::StressStrainOutputBase::Dataadd_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. More...
 
virtual MAST::StressStrainOutputBase::Dataadd_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. More...
 
virtual const std::map< const libMesh::dof_id_type, std::vector< MAST::StressStrainOutputBase::Data * > > & get_stress_strain_data () const
 
virtual const std::vector< MAST::StressStrainOutputBase::Data * > & get_stress_strain_data_for_elem (const MAST::GeomElem &e) const
 
virtual MAST::StressStrainOutputBase::Dataget_stress_strain_data_for_elem_at_qp (const MAST::GeomElem &e, const unsigned int qp)
 
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 is in the subset. More...
 
virtual void output_derivative_for_elem (RealVectorX &dq_dX)
 calculates the derivative of p-norm von Mises stress for the $p-$norm identified using set_p_val(). More...
 
virtual void set_elem_solution (const RealVectorX &sol)
 sets the element solution More...
 
void set_structural_solutions (const libMesh::NumericVector< Real > &sol, const libMesh::NumericVector< Real > &adj_sol)
 
void set_thermal_assembly (MAST::AssemblyBase &thermal_assembly)
 
- Public Member Functions inherited from MAST::StressStrainOutputBase
 StressStrainOutputBase ()
 default constructor More...
 
virtual ~StressStrainOutputBase ()
 
void clear ()
 clears the data structure of any stored values so that it can be used for another element. More...
 
virtual void clear_sensitivity_data ()
 clears the data stored for sensitivity analysis. More...
 
virtual void evaluate ()
 this evaluates all relevant stress components on the element to evaluate the p-averaged quantity. More...
 
virtual void evaluate_sensitivity (const MAST::FunctionBase &f)
 this evaluates all relevant stress sensitivity components on the element to evaluate the p-averaged quantity sensitivity. More...
 
virtual void evaluate_shape_sensitivity (const MAST::FunctionBase &f)
 this evaluates all relevant shape sensitivity components on the element. More...
 
virtual void evaluate_topology_sensitivity (const MAST::FunctionBase &f)
 this evaluates all relevant topological sensitivity components on the element. More...
 
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. More...
 
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 object currently stores data for. More...
 
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. More...
 
virtual void functional_for_all_elems ()
 calculates and returns the von Mises p-norm functional for all the elements that this object currently stores data for. More...
 
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 object currently stores data for. More...
 
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. More...
 
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 specified element. More...
 
Real get_maximum_von_mises_stress () const
 
Real get_p_stress_val ()
 
MAST::BoundaryConditionBaseget_thermal_load_for_elem (const MAST::GeomElem &elem)
 
virtual void init (const MAST::GeomElem &elem)
 initialize for the element. More...
 
unsigned int n_boundary_stress_strain_data_for_elem (const GeomElem &e) const
 
unsigned int n_stress_strain_data_for_elem (const MAST::GeomElem &e) const
 
virtual Real output_for_elem ()
 should not get called for this output. More...
 
virtual Real output_sensitivity_for_elem (const MAST::FunctionBase &p)
 
virtual Real output_sensitivity_total (const MAST::FunctionBase &p)
 
virtual Real output_total ()
 
bool primal_data_initialized () const
 
void set_aggregation_coefficients (Real p1, Real p2, Real rho, Real sigma0)
 sets the $p-$norm for calculation of stress functional More...
 
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. More...
 
void set_stress_plot_mode (bool f)
 tells the object that the calculation is for stress to be output for plotting. More...
 
bool stress_plot_mode () const
 
virtual void zero_for_analysis ()
 zeroes the output quantity values stored inside this object so that assembly process can begin. More...
 
virtual void zero_for_sensitivity ()
 zeroes the output quantity values stored inside this object so that assembly process can begin. More...
 
- Public Member Functions inherited from MAST::OutputAssemblyElemOperations
 OutputAssemblyElemOperations ()
 
virtual ~OutputAssemblyElemOperations ()
 virtual destructor More...
 
const std::set< libMesh::boundary_id_type > & get_participating_boundaries ()
 
const std::set< const libMesh::Elem * > & get_participating_elements () const
 
const std::set< libMesh::subdomain_id_type > & get_participating_subdomains ()
 
virtual bool if_evaluate_for_boundary (const MAST::GeomElem &elem, const unsigned int s) const
 checks to see if the specified side of the element needs evaluation of the output contribution. More...
 
void set_participating_boundaries (const std::set< libMesh::boundary_id_type > &bids)
 The assembly will integration over boudnaries with ids specified in bids. More...
 
void set_participating_elements (const std::set< const libMesh::Elem *> &elems)
 sets the elements for which this object will evaluate and store the output data. More...
 
void set_participating_elements_to_all ()
 This will allow volume contribution from all elements. More...
 
void set_participating_subdomains (const std::set< libMesh::subdomain_id_type > &sids)
 The output function can be a boundary integrated quantity, volume integrated quantity or a combination of these two. More...
 
- Public Member Functions inherited from MAST::AssemblyElemOperations
 AssemblyElemOperations ()
 
virtual ~AssemblyElemOperations ()
 
virtual void clear_assembly ()
 clears the assembly object More...
 
virtual void clear_discipline_and_system ()
 clears association with a system to this discipline More...
 
virtual void clear_elem ()
 clears the element initialization More...
 
virtual MAST::AssemblyBaseget_assembly ()
 
MAST::PhysicsDisciplineBaseget_discipline ()
 
virtual std::pair< const MAST::FieldFunction< RealVectorX > *, unsigned int > get_elem_boundary_velocity_data ()
 searches through the side load data and populates the data with the boundary id and velocity function on the boundary. More...
 
MAST::ElementBaseget_physics_elem ()
 
MAST::SystemInitializationget_system_initialization ()
 
virtual void set_assembly (MAST::AssemblyBase &assembly)
 sets the assembly object More...
 
virtual void set_discipline_and_system (MAST::PhysicsDisciplineBase &discipline, MAST::SystemInitialization &system)
 attaches a system to this discipline More...
 
virtual void set_elem_acceleration (const RealVectorX &accel)
 sets the element acceleration More...
 
virtual void set_elem_acceleration_sensitivity (const RealVectorX &accel)
 sets the element acceleration More...
 
virtual void set_elem_perturbed_acceleration (const RealVectorX &accel)
 sets the element perturbed acceleration More...
 
virtual void set_elem_perturbed_solution (const RealVectorX &sol)
 sets the element perturbed solution More...
 
virtual void set_elem_perturbed_velocity (const RealVectorX &vel)
 sets the element perturbed velocity More...
 
virtual void set_elem_solution_sensitivity (const RealVectorX &sol)
 sets the element solution sensitivity More...
 
virtual void set_elem_velocity (const RealVectorX &vel)
 sets the element velocity More...
 
virtual void set_elem_velocity_sensitivity (const RealVectorX &vel)
 sets the element velocity sensitivity More...
 
void set_skip_comm_sum (bool skip)
 If an output has contrinutions only from local processor then the user can request that the global comm().sum() calls be skipped to avoid blocking MPI calls. More...
 

Protected Attributes

MAST::StressStrainOutputBase_stress
 
std::unique_ptr< libMesh::NumericVector< Real > > _structural_adjoint
 
std::unique_ptr< libMesh::NumericVector< Real > > _structural_sol
 
MAST::AssemblyBase_thermal_assembly
 
- Protected Attributes inherited from MAST::StressStrainOutputBase
std::map< const libMesh::dof_id_type, std::vector< MAST::StressStrainOutputBase::Data * > > _boundary_stress_data
 vector of stress with the associated location details More...
 
Real _exp_arg_lim
 
bool _if_stress_plot_mode
 identifies the mode in which evaluation is peformed. More...
 
Real _JxW_val
 
Real _p_norm_stress
 $ p-$norm to be used for calculation of output stress function. More...
 
Real _p_norm_weight
 
bool _primal_data_initialized
 primal data, needed for sensitivity and adjoints More...
 
Real _rho
 exponent used in scaling volume based on stress value. More...
 
Real _sigma0
 reference stress value used in scaling volume. More...
 
Real _sigma_vm_int
 
Real _sigma_vm_p_norm
 
std::map< const libMesh::dof_id_type, std::vector< MAST::StressStrainOutputBase::Data * > > _stress_data
 vector of stress with the associated location details More...
 
- Protected Attributes inherited from MAST::OutputAssemblyElemOperations
std::set< libMesh::boundary_id_type > _bids
 set of bids for which data will be processed More...
 
std::set< const libMesh::Elem * > _elem_subset
 set of elements for which the data will be stored. More...
 
bool _if_evaluate_on_all_elems
 if true, evaluates on all elements. More...
 
std::set< libMesh::subdomain_id_type > _sub_domain_ids
 set of subdomain ids for which data will be processed. More...
 
- Protected Attributes inherited from MAST::AssemblyElemOperations
MAST::AssemblyBase_assembly
 
MAST::PhysicsDisciplineBase_discipline
 
MAST::ElementBase_physics_elem
 
bool _skip_comm_sum
 If an output has contrinutions only from local processor then the user can request that the global comm().sum() calls be skipped to avoid blocking MPI calls. More...
 
MAST::SystemInitialization_system
 

Constructor & Destructor Documentation

◆ StressTemperatureAdjoint()

MAST::StressTemperatureAdjoint::StressTemperatureAdjoint ( MAST::StressStrainOutputBase stress)

default constructor

Definition at line 34 of file stress_temperature_adjoint.cpp.

◆ ~StressTemperatureAdjoint()

MAST::StressTemperatureAdjoint::~StressTemperatureAdjoint ( )
virtual

Definition at line 43 of file stress_temperature_adjoint.cpp.

Member Function Documentation

◆ add_stress_strain_at_boundary_qp_location()

virtual MAST::StressStrainOutputBase::Data& MAST::StressTemperatureAdjoint::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 
)
inlinevirtual

add the stress tensor associated with the qp on side s of element e.

Returns
a reference to Data.

Reimplemented from MAST::StressStrainOutputBase.

Definition at line 95 of file stress_temperature_adjoint.h.

◆ add_stress_strain_at_qp_location()

virtual MAST::StressStrainOutputBase::Data& MAST::StressTemperatureAdjoint::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 
)
inlinevirtual

add the stress tensor associated with the qp.

Returns
a reference to Data.

Reimplemented from MAST::StressStrainOutputBase.

Definition at line 79 of file stress_temperature_adjoint.h.

◆ get_stress_strain_data()

virtual const std::map<const libMesh::dof_id_type, std::vector<MAST::StressStrainOutputBase::Data*> >& MAST::StressTemperatureAdjoint::get_stress_strain_data ( ) const
inlinevirtual
Returns
the map of stress/strain data for all elems

Reimplemented from MAST::StressStrainOutputBase.

Definition at line 121 of file stress_temperature_adjoint.h.

◆ get_stress_strain_data_for_elem()

virtual const std::vector<MAST::StressStrainOutputBase::Data*>& MAST::StressTemperatureAdjoint::get_stress_strain_data_for_elem ( const MAST::GeomElem e) const
inlinevirtual
Returns
the vector of stress/strain data for specified elem.

Reimplemented from MAST::StressStrainOutputBase.

Definition at line 130 of file stress_temperature_adjoint.h.

◆ get_stress_strain_data_for_elem_at_qp()

virtual MAST::StressStrainOutputBase::Data& MAST::StressTemperatureAdjoint::get_stress_strain_data_for_elem_at_qp ( const MAST::GeomElem e,
const unsigned int  qp 
)
inlinevirtual
Returns
the vector of stress/strain data for specified elem at the specified quadrature point.

Reimplemented from MAST::StressStrainOutputBase.

Definition at line 111 of file stress_temperature_adjoint.h.

◆ if_evaluate_for_element()

virtual bool MAST::StressTemperatureAdjoint::if_evaluate_for_element ( const MAST::GeomElem elem) const
inlinevirtual

checks to see if the object has been told about the subset of elements and if the specified element is in the subset.

Reimplemented from MAST::OutputAssemblyElemOperations.

Definition at line 63 of file stress_temperature_adjoint.h.

◆ output_derivative_for_elem()

void MAST::StressTemperatureAdjoint::output_derivative_for_elem ( RealVectorX dq_dX)
virtual

calculates the derivative of p-norm von Mises stress for the $p-$norm identified using set_p_val().

The quantity is evaluated over the current element for which this object is initialized.

Reimplemented from MAST::StressStrainOutputBase.

Definition at line 103 of file stress_temperature_adjoint.cpp.

◆ set_elem_solution()

void MAST::StressTemperatureAdjoint::set_elem_solution ( const RealVectorX sol)
virtual

sets the element solution

Reimplemented from MAST::AssemblyElemOperations.

Definition at line 71 of file stress_temperature_adjoint.cpp.

◆ set_structural_solutions()

void MAST::StressTemperatureAdjoint::set_structural_solutions ( const libMesh::NumericVector< Real > &  sol,
const libMesh::NumericVector< Real > &  adj_sol 
)

Definition at line 60 of file stress_temperature_adjoint.cpp.

◆ set_thermal_assembly()

void MAST::StressTemperatureAdjoint::set_thermal_assembly ( MAST::AssemblyBase thermal_assembly)

Definition at line 50 of file stress_temperature_adjoint.cpp.

Member Data Documentation

◆ _stress

MAST::StressStrainOutputBase& MAST::StressTemperatureAdjoint::_stress
protected

Definition at line 136 of file stress_temperature_adjoint.h.

◆ _structural_adjoint

std::unique_ptr<libMesh::NumericVector<Real> > MAST::StressTemperatureAdjoint::_structural_adjoint
protected

Definition at line 139 of file stress_temperature_adjoint.h.

◆ _structural_sol

std::unique_ptr<libMesh::NumericVector<Real> > MAST::StressTemperatureAdjoint::_structural_sol
protected

Definition at line 138 of file stress_temperature_adjoint.h.

◆ _thermal_assembly

MAST::AssemblyBase* MAST::StressTemperatureAdjoint::_thermal_assembly
protected

Definition at line 137 of file stress_temperature_adjoint.h.


The documentation for this class was generated from the following files: