30 #include "libmesh/elem.h" 73 libMesh::MeshBase::const_element_iterator
77 for ( ; e_it != e_end; e_it++) {
79 const libMesh::Elem* e = *e_it;
81 n_nodes = e->n_nodes();
85 for (
unsigned int i=0; i<n_nodes; i++) {
86 (*_level_set)(*e->node_ptr(i), 0., v);
135 libMesh::MeshBase::const_element_iterator
139 for ( ; e_it != e_end; e_it++) {
141 const libMesh::Elem* e = *e_it;
145 n_nodes = e->n_nodes();
146 phi.setZero(n_nodes);
147 phi_sens.setZero(n_nodes);
150 for (
unsigned int i=0; i<n_nodes; i++) {
152 (*_level_set)(*e->node_ptr(i), 0., v);
MAST::FilterBase * _filter
MAST::NonlinearSystem & system()
This defines a parameter that is a level set function and stores a pointer to the node in the level-s...
HeavisideElemHomogenizedDensityFunction(const std::string &nm)
virtual void derivative(const MAST::FunctionBase &f, ValType &v) const
calculates the value of the function derivative and returns it in v.
virtual bool is_topology_parameter() const
virtual void initialize_element_volume_fractions()
virtual void initialize_element_volume_fraction_sensitivity(const MAST::FunctionBase &f)
Matrix< Real, Dynamic, 1 > RealVectorX
MAST::SystemInitialization * _level_set_sys
std::map< const MAST::FunctionBase *, std::map< const libMesh::Elem *, Real > > _elem_volume_fraction_sensitivity
std::map< const libMesh::Elem *, Real > _elem_volume_fraction
virtual ~HeavisideElemHomogenizedDensityFunction()
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
Real homogenized_volume_fraction(Real delta=0.1)
Approximates the volume fraction of the element based on integration of approximated Heaviside functi...
virtual void set_solution(const RealVectorX &vec, bool if_sens=false)
stores vec as solution for element level calculations, or its sensitivity if if_sens is true...
virtual void init(const libMesh::Elem &elem, const MAST::SystemInitialization &sys_init)
initialize the object for the specified reference elem.
Real homogenized_volume_fraction_sensitivity(Real delta=0.1)
Sensitivity of the homogenized volume fraction for the specified level set value and its sensitivity...
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 se...
libMesh::MeshBase * _analysis_mesh
MAST::FieldFunction< Real > * _level_set
const libMesh::Node * level_set_node() const