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

Detailed Description

Computes the perimeter of a level set boundary as a volume integral

\[ P(\phi) \approx \int_\Omega \delta_d(phi) ~d\Omega \]

, where $ \phi $ is the level set function, $ \delta_d(\phi) $ is the approximation to the Dirac delta function implemented in LevelSetElementBase.

Definition at line 40 of file level_set_perimeter_output.h.

#include <level_set_perimeter_output.h>

Inheritance diagram for MAST::LevelSetPerimeter:
Collaboration diagram for MAST::LevelSetPerimeter:

Public Member Functions

 LevelSetPerimeter ()
 
virtual ~LevelSetPerimeter ()
 
virtual void evaluate ()
 this is the abstract interface to be implemented by derived classes. More...
 
virtual void evaluate_sensitivity (const MAST::FunctionBase &f)
 this evaluates all relevant sensitivity components on the element. 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 $ \int_\Gamma V_n~d\Gamma $. More...
 
virtual void init (const MAST::GeomElem &elem)
 initializes the object for calculation of element quantities for the specified elem. More...
 
virtual void output_derivative_for_elem (RealVectorX &dq_dX)
 returns the output quantity derivative with respect to state vector in dq_dX. More...
 
virtual Real output_for_elem ()
 
virtual Real output_sensitivity_for_elem (const MAST::FunctionBase &p)
 
virtual Real output_sensitivity_total (const MAST::FunctionBase &p)
 
virtual Real output_total ()
 
virtual void set_elem_data (unsigned int dim, const libMesh::Elem &ref_elem, MAST::GeomElem &elem) const
 virtual function, nothing to be done for level set More...
 
void set_heaviside_smoothing_delta (Real d=0.1)
 Sets the value of the heaviside smooth delta, which is the width +/- d of the level set function about which the approximate Heaviside function is smoothed. More...
 
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...
 
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...
 
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 (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

Real _dper_dp
 
Real _heaviside_smooth_delta
 
Real _per
 
- 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

◆ LevelSetPerimeter()

MAST::LevelSetPerimeter::LevelSetPerimeter ( )

Definition at line 32 of file level_set_perimeter_output.cpp.

◆ ~LevelSetPerimeter()

MAST::LevelSetPerimeter::~LevelSetPerimeter ( )
virtual

Definition at line 42 of file level_set_perimeter_output.cpp.

Member Function Documentation

◆ evaluate()

void MAST::LevelSetPerimeter::evaluate ( )
virtual

this is the abstract interface to be implemented by derived classes.

This method calculates the quantity $ q(X, p) $. This is provided as an interface since some quantities requires evaluation of all inputs before the final quantity can be calculated. So, the user can call this routine on each element before requesting the output values using either output_for_elem() or output_total().

Implements MAST::OutputAssemblyElemOperations.

Definition at line 153 of file level_set_perimeter_output.cpp.

◆ evaluate_sensitivity()

void MAST::LevelSetPerimeter::evaluate_sensitivity ( const MAST::FunctionBase f)
virtual

this evaluates all relevant sensitivity components on the element.

This is only done on the current element for which this object has been initialized.

Implements MAST::OutputAssemblyElemOperations.

Definition at line 168 of file level_set_perimeter_output.cpp.

◆ evaluate_shape_sensitivity()

virtual void MAST::LevelSetPerimeter::evaluate_shape_sensitivity ( const MAST::FunctionBase f)
inlinevirtual

this evaluates all relevant shape sensitivity components on the element.

This is only done on the current element for which this object has been initialized.

Implements MAST::OutputAssemblyElemOperations.

Definition at line 160 of file level_set_perimeter_output.h.

◆ evaluate_topology_sensitivity() [1/2]

void MAST::LevelSetPerimeter::evaluate_topology_sensitivity ( const MAST::FunctionBase f)
virtual

this evaluates all relevant topological sensitivity components on the element.

This is only done on the current element for which this object has been initialized.

Implements MAST::OutputAssemblyElemOperations.

Definition at line 177 of file level_set_perimeter_output.cpp.

◆ evaluate_topology_sensitivity() [2/2]

void MAST::LevelSetPerimeter::evaluate_topology_sensitivity ( const MAST::FunctionBase f,
const MAST::FieldFunction< RealVectorX > &  vel 
)
virtual

This evaluates the contribution to the topology sensitivity on the boundary $ \int_\Gamma V_n~d\Gamma $.

Implements MAST::OutputAssemblyElemOperations.

Definition at line 184 of file level_set_perimeter_output.cpp.

◆ init()

void MAST::LevelSetPerimeter::init ( const MAST::GeomElem elem)
virtual

initializes the object for calculation of element quantities for the specified elem.

Implements MAST::AssemblyElemOperations.

Definition at line 50 of file level_set_perimeter_output.cpp.

◆ output_derivative_for_elem()

virtual void MAST::LevelSetPerimeter::output_derivative_for_elem ( RealVectorX dq_dX)
inlinevirtual

returns the output quantity derivative with respect to state vector in dq_dX.

This method calculates the quantity

\[ \frac{\partial q(X, p)}{\partial X} \]

for this output function. This is returned for the element for which this

Implements MAST::OutputAssemblyElemOperations.

Definition at line 129 of file level_set_perimeter_output.h.

◆ output_for_elem()

Real MAST::LevelSetPerimeter::output_for_elem ( )
virtual
Returns
the output quantity value contribution for the present element for which this object has been initialized. This does not make sense for some output quantities that are defined as averaged over a domain, example the p-norm of the stress (see MAST::StressStrainOutputBase). For such cases, the output_total must be called.

Implements MAST::OutputAssemblyElemOperations.

Definition at line 83 of file level_set_perimeter_output.cpp.

◆ output_sensitivity_for_elem()

Real MAST::LevelSetPerimeter::output_sensitivity_for_elem ( const MAST::FunctionBase p)
virtual
Returns
the output quantity sensitivity for parameter. This method calculates the partial derivative of quantity

\[ \frac{\partial q(X, p)}{\partial p} \]

with respect to parameter $ p $. This returns the quantity evaluated for on element for which this object is initialized.

Implements MAST::OutputAssemblyElemOperations.

Definition at line 116 of file level_set_perimeter_output.cpp.

◆ output_sensitivity_total()

Real MAST::LevelSetPerimeter::output_sensitivity_total ( const MAST::FunctionBase p)
virtual
Returns
the output quantity sensitivity for parameter. This method calculates the partial derivative of quantity

\[ \frac{\partial q(X, p)}{\partial p} \]

with respect to parameter $ p $. This returns the quantity accumulated over all elements.

Implements MAST::OutputAssemblyElemOperations.

Definition at line 139 of file level_set_perimeter_output.cpp.

◆ output_total()

Real MAST::LevelSetPerimeter::output_total ( )
virtual
Returns
the output quantity value accumulated over all elements

Implements MAST::OutputAssemblyElemOperations.

Definition at line 101 of file level_set_perimeter_output.cpp.

◆ set_elem_data()

virtual void MAST::LevelSetPerimeter::set_elem_data ( unsigned int  dim,
const libMesh::Elem &  ref_elem,
MAST::GeomElem elem 
) const
inlinevirtual

virtual function, nothing to be done for level set

Implements MAST::AssemblyElemOperations.

Definition at line 59 of file level_set_perimeter_output.h.

◆ set_heaviside_smoothing_delta()

void MAST::LevelSetPerimeter::set_heaviside_smoothing_delta ( Real  d = 0.1)
inline

Sets the value of the heaviside smooth delta, which is the width +/- d of the level set function about which the approximate Heaviside function is smoothed.

The default value is 0.1

Definition at line 53 of file level_set_perimeter_output.h.

◆ zero_for_analysis()

void MAST::LevelSetPerimeter::zero_for_analysis ( )
virtual

zeroes the output quantity values stored inside this object so that assembly process can begin.

This will zero out data so that it is ready for a new evaluation. Before sensitivity analysis, call the other method, since some nonlinear functionals need the forward quantities for sensitivity analysis, eg., stress output.

Implements MAST::OutputAssemblyElemOperations.

Definition at line 64 of file level_set_perimeter_output.cpp.

◆ zero_for_sensitivity()

void MAST::LevelSetPerimeter::zero_for_sensitivity ( )
virtual

zeroes the output quantity values stored inside this object so that assembly process can begin.

This will only zero the data to compute new sensitivity analysis.

Implements MAST::OutputAssemblyElemOperations.

Definition at line 73 of file level_set_perimeter_output.cpp.

Member Data Documentation

◆ _dper_dp

Real MAST::LevelSetPerimeter::_dper_dp
protected

Definition at line 184 of file level_set_perimeter_output.h.

◆ _heaviside_smooth_delta

Real MAST::LevelSetPerimeter::_heaviside_smooth_delta
protected

Definition at line 185 of file level_set_perimeter_output.h.

◆ _per

Real MAST::LevelSetPerimeter::_per
protected

Definition at line 183 of file level_set_perimeter_output.h.


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