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 ![]() | |
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... | |
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.
|
virtual |
Definition at line 53 of file filter_base.cpp.
|
protected |
initializes the algebraic data structures
Definition at line 378 of file filter_base.cpp.
|
protected |
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.
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.
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.
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.
|
virtual |
prints the filter data.
Definition at line 455 of file filter_base.cpp.
|
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.
|
protected |
Algebraic relation between filtered level set values and the design variables .
Definition at line 124 of file filter_base.h.
|
protected |
largest element size in the level set mesh
Definition at line 112 of file filter_base.h.
|
protected |
system on which the level set discrete function is defined
Definition at line 101 of file filter_base.h.
|
protected |
radius of the filter.
Definition at line 106 of file filter_base.h.