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

Detailed Description

Creates a geometric filter for the level-set design variables.

Definition at line 39 of file filter_base.h.

#include <filter_base.h>

Public Member Functions

 FilterBase (libMesh::System &sys, const Real radius, const std::set< unsigned int > &dv_dof_ids)
 
virtual ~FilterBase ()
 
void compute_filtered_values (const libMesh::NumericVector< Real > &input, libMesh::NumericVector< Real > &output, bool close_vector=true) const
 computes the filtered output from the provided input. More...
 
void compute_filtered_values (std::map< unsigned int, Real > &nonzero_vals, libMesh::NumericVector< Real > &output, bool close_vector) const
 for large problems it is more efficient to specify only the non-zero entries in the input vector in nonzero_vals. More...
 
void compute_filtered_values (const std::vector< Real > &input, std::vector< Real > &output) const
 
bool if_elem_in_domain_of_influence (const libMesh::Elem &elem, const libMesh::Node &level_set_node) const
 function identifies if the given element is within the domain of influence of this specified level set design variable. More...
 
virtual void print (std::ostream &o) const
 prints the filter data. More...
 

Protected Member Functions

void _init ()
 initializes the algebraic data structures More...
 
void _init2 ()
 

Protected Attributes

const std::set< unsigned int > & _dv_dof_ids
 dof ids that are design variables. More...
 
std::map< unsigned int, std::vector< std::pair< unsigned int, Real > > > _filter_map
 Algebraic relation between filtered level set values and the design variables $ \tilde{\phi}_i = B_{ij} \phi_j $. More...
 
Real _level_set_fe_size
 largest element size in the level set mesh More...
 
libMesh::System & _level_set_system
 system on which the level set discrete function is defined More...
 
Real _radius
 radius of the filter. More...
 

Constructor & Destructor Documentation

◆ FilterBase()

MAST::FilterBase::FilterBase ( libMesh::System &  sys,
const Real  radius,
const std::set< unsigned int > &  dv_dof_ids 
)

Definition at line 35 of file filter_base.cpp.

◆ ~FilterBase()

MAST::FilterBase::~FilterBase ( )
virtual

Definition at line 53 of file filter_base.cpp.

Member Function Documentation

◆ _init()

void MAST::FilterBase::_init ( )
protected

initializes the algebraic data structures

Definition at line 378 of file filter_base.cpp.

◆ _init2()

void MAST::FilterBase::_init2 ( )
protected

◆ compute_filtered_values() [1/3]

void MAST::FilterBase::compute_filtered_values ( const libMesh::NumericVector< Real > &  input,
libMesh::NumericVector< Real > &  output,
bool  close_vector = true 
) const

computes the filtered output from the provided input.

Definition at line 59 of file filter_base.cpp.

◆ compute_filtered_values() [2/3]

void MAST::FilterBase::compute_filtered_values ( std::map< unsigned int, Real > &  nonzero_vals,
libMesh::NumericVector< Real > &  output,
bool  close_vector 
) const

for large problems it is more efficient to specify only the non-zero entries in the input vector in nonzero_vals.

If output is of type SERIAL then all ranks in the communicator will perform the same operaitons and provide an identical output vector. If output is of type PARALLEL or GHOSTED then only the local contributions will be set. If close_vector is true then output.close() will be called in this routines, otherwise not.

Definition at line 100 of file filter_base.cpp.

◆ compute_filtered_values() [3/3]

void MAST::FilterBase::compute_filtered_values ( const std::vector< Real > &  input,
std::vector< Real > &  output 
) const

Definition at line 142 of file filter_base.cpp.

◆ if_elem_in_domain_of_influence()

bool MAST::FilterBase::if_elem_in_domain_of_influence ( const libMesh::Elem &  elem,
const libMesh::Node &  level_set_node 
) const

function identifies if the given element is within the domain of influence of this specified level set design variable.

Currently, this is identified based on the filter radius, the distance of element nodes from the specified level set design variable location and the element sizes.

Definition at line 172 of file filter_base.cpp.

◆ print()

void MAST::FilterBase::print ( std::ostream &  o) const
virtual

prints the filter data.

Definition at line 455 of file filter_base.cpp.

Member Data Documentation

◆ _dv_dof_ids

const std::set<unsigned int>& MAST::FilterBase::_dv_dof_ids
protected

dof ids that are design variables.

If a id is not in this set, then the dof value assumes its value from the input

Definition at line 118 of file filter_base.h.

◆ _filter_map

std::map<unsigned int, std::vector<std::pair<unsigned int, Real> > > MAST::FilterBase::_filter_map
protected

Algebraic relation between filtered level set values and the design variables $ \tilde{\phi}_i = B_{ij} \phi_j $.

Definition at line 124 of file filter_base.h.

◆ _level_set_fe_size

Real MAST::FilterBase::_level_set_fe_size
protected

largest element size in the level set mesh

Definition at line 112 of file filter_base.h.

◆ _level_set_system

libMesh::System& MAST::FilterBase::_level_set_system
protected

system on which the level set discrete function is defined

Definition at line 101 of file filter_base.h.

◆ _radius

Real MAST::FilterBase::_radius
protected

radius of the filter.

Definition at line 106 of file filter_base.h.


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