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

Detailed Description

The surface integrated pressure calculation in the fluid element will provide a force vector for the integrated load.

This data structure will provide the mechanism to either select one component of the force vector as the output quantity of interest, or the magnitude of the force vector. The user must provide the

Definition at line 46 of file surface_integrated_pressure_output.h.

#include <surface_integrated_pressure_output.h>

Inheritance diagram for MAST::SurfaceIntegratedPressureOutput:
Collaboration diagram for MAST::SurfaceIntegratedPressureOutput:

Public Types

enum  OutputMode { L2_NORM, UNIT_VEC }
 

Public Member Functions

 SurfaceIntegratedPressureOutput (MAST::SurfaceIntegratedPressureOutput::OutputMode o, const RealVectorX &n_vec=RealVectorX::Zero(3, 1))
 default constructor More...
 
virtual ~SurfaceIntegratedPressureOutput ()
 
void clear ()
 clears the stored data More...
 
RealVectorX derivative () const
 
Real sensitivity (const MAST::FunctionBase &f) const
 
void set_load (const RealVectorX &v)
 sets the value of the load More...
 
void set_load_derivative (const RealMatrixX &m)
 sets the value of the load sensitivity wrt function f. More...
 
void set_load_sensitivity (const MAST::FunctionBase &f, const RealVectorX &v)
 sets the value of the load sensitivity wrt function f. More...
 
void set_output_mode (MAST::SurfaceIntegratedPressureOutput::OutputMode o, const RealVectorX *n_vec=nullptr)
 sets the mode that will be used for calculation of the output functional from the load vector. More...
 
Real value () const
 
- Public Member Functions inherited from MAST::OutputAssemblyElemOperations
 OutputAssemblyElemOperations ()
 
virtual ~OutputAssemblyElemOperations ()
 virtual destructor More...
 
virtual void evaluate ()=0
 this is the abstract interface to be implemented by derived classes. More...
 
virtual void evaluate_sensitivity (const MAST::FunctionBase &f)=0
 this evaluates all relevant sensitivity components on the element. More...
 
virtual void evaluate_shape_sensitivity (const MAST::FunctionBase &f)=0
 this evaluates all relevant shape sensitivity components on the element. More...
 
virtual void evaluate_topology_sensitivity (const MAST::FunctionBase &f)=0
 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)=0
 this evaluates all relevant topological sensitivity components on the element. 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...
 
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)=0
 returns the output quantity derivative with respect to state vector in dq_dX. More...
 
virtual Real output_for_elem ()=0
 
virtual Real output_sensitivity_for_elem (const MAST::FunctionBase &p)=0
 
virtual Real output_sensitivity_total (const MAST::FunctionBase &p)=0
 
virtual Real output_total ()=0
 
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...
 
virtual void zero_for_analysis ()=0
 zeroes the output quantity values stored inside this object so that assembly process can begin. More...
 
virtual void zero_for_sensitivity ()=0
 zeroes the output quantity values stored inside this object so that assembly process can begin. 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 init (const MAST::GeomElem &elem)=0
 initializes the object for calculation of element quantities for the specified elem. More...
 
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_data (unsigned int dim, const libMesh::Elem &ref_elem, MAST::GeomElem &elem) const =0
 some analyses may want to set additional element data before initialization of the GeomElem. 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 (const RealVectorX &sol)
 sets the element solution 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

RealMatrixX _dload_dX
 derivative of load wrt state vector. More...
 
RealVectorX _load
 This is the 3x1 vector of the integrated load. More...
 
std::map< const MAST::FunctionBase *, RealVectorX_load_sensitivity
 map of sensitivity of the stress with respect to a parameter More...
 
MAST::SurfaceIntegratedPressureOutput::OutputMode _mode
 output calculation mode More...
 
RealVectorX _n_vec
 unit vector used for output, if _mode = UNIT_VEC 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
 

Member Enumeration Documentation

◆ OutputMode

Enumerator
L2_NORM 
UNIT_VEC 

Definition at line 51 of file surface_integrated_pressure_output.h.

Constructor & Destructor Documentation

◆ SurfaceIntegratedPressureOutput()

MAST::SurfaceIntegratedPressureOutput::SurfaceIntegratedPressureOutput ( MAST::SurfaceIntegratedPressureOutput::OutputMode  o,
const RealVectorX n_vec = RealVectorX::Zero(3,1) 
)

default constructor

Definition at line 27 of file surface_integrated_pressure_output.cpp.

◆ ~SurfaceIntegratedPressureOutput()

MAST::SurfaceIntegratedPressureOutput::~SurfaceIntegratedPressureOutput ( )
virtual

Definition at line 41 of file surface_integrated_pressure_output.cpp.

Member Function Documentation

◆ clear()

void MAST::SurfaceIntegratedPressureOutput::clear ( )

clears the stored data

Definition at line 47 of file surface_integrated_pressure_output.cpp.

◆ derivative()

RealVectorX MAST::SurfaceIntegratedPressureOutput::derivative ( ) const
Returns
the derivative of the output functional with respect to the state vector

Definition at line 131 of file surface_integrated_pressure_output.cpp.

◆ sensitivity()

Real MAST::SurfaceIntegratedPressureOutput::sensitivity ( const MAST::FunctionBase f) const
Returns
the sensitivity of the output functional with respect to the provided parameter

Definition at line 101 of file surface_integrated_pressure_output.cpp.

◆ set_load()

void MAST::SurfaceIntegratedPressureOutput::set_load ( const RealVectorX v)
inline

sets the value of the load

Definition at line 84 of file surface_integrated_pressure_output.h.

◆ set_load_derivative()

void MAST::SurfaceIntegratedPressureOutput::set_load_derivative ( const RealMatrixX m)
inline

sets the value of the load sensitivity wrt function f.

Definition at line 120 of file surface_integrated_pressure_output.h.

◆ set_load_sensitivity()

void MAST::SurfaceIntegratedPressureOutput::set_load_sensitivity ( const MAST::FunctionBase f,
const RealVectorX v 
)
inline

sets the value of the load sensitivity wrt function f.

Definition at line 100 of file surface_integrated_pressure_output.h.

◆ set_output_mode()

void MAST::SurfaceIntegratedPressureOutput::set_output_mode ( MAST::SurfaceIntegratedPressureOutput::OutputMode  o,
const RealVectorX n_vec = nullptr 
)

sets the mode that will be used for calculation of the output functional from the load vector.

If o is type UNIT_VEC, then the user must provide the second argument n_vec as a 3x1 vector. The vector will be scaled to unit length.

Definition at line 58 of file surface_integrated_pressure_output.cpp.

◆ value()

Real MAST::SurfaceIntegratedPressureOutput::value ( ) const
Returns
the output functional

Definition at line 76 of file surface_integrated_pressure_output.cpp.

Member Data Documentation

◆ _dload_dX

RealMatrixX MAST::SurfaceIntegratedPressureOutput::_dload_dX
protected

derivative of load wrt state vector.

The matrix has dimension Nx3 for an element.

Definition at line 163 of file surface_integrated_pressure_output.h.

◆ _load

RealVectorX MAST::SurfaceIntegratedPressureOutput::_load
protected

This is the 3x1 vector of the integrated load.

Definition at line 151 of file surface_integrated_pressure_output.h.

◆ _load_sensitivity

std::map<const MAST::FunctionBase*, RealVectorX> MAST::SurfaceIntegratedPressureOutput::_load_sensitivity
protected

map of sensitivity of the stress with respect to a parameter

Definition at line 156 of file surface_integrated_pressure_output.h.

◆ _mode

MAST::SurfaceIntegratedPressureOutput::OutputMode MAST::SurfaceIntegratedPressureOutput::_mode
protected

output calculation mode

Definition at line 139 of file surface_integrated_pressure_output.h.

◆ _n_vec

RealVectorX MAST::SurfaceIntegratedPressureOutput::_n_vec
protected

unit vector used for output, if _mode = UNIT_VEC

Definition at line 145 of file surface_integrated_pressure_output.h.


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