#include <cell_inf.h>
Inherits Elem.
Inherited by InfHex, and InfPrism.
enum RefinementState { COARSEN = 0, DO_NOTHING, REFINE, JUST_REFINED, JUST_COARSENED, INACTIVE, COARSEN_INACTIVE }
typedef Predicates::multi_predicate Predicate
InfCell (const unsigned int nn, const unsigned int ns, Elem *p)
unsigned int dim () const
bool infinite () const
Point origin () const
virtual const Point & point (const unsigned int i) const
virtual Point & point (const unsigned int i)
virtual unsigned int node (const unsigned int i) const
virtual Node * get_node (const unsigned int i) const
virtual Node *& set_node (const unsigned int i)
subdomain_id_type subdomain_id () const
subdomain_id_type & subdomain_id ()
virtual unsigned int key (const unsigned int s) const =0
virtual bool operator== (const DofObject &rhs) const
Elem * neighbor (const unsigned int i) const
void set_neighbor (const unsigned int i, Elem *n)
bool has_neighbor (const Elem *elem) const
Elem * child_neighbor (Elem *elem) const
const Elem * child_neighbor (const Elem *elem) const
bool on_boundary () const
unsigned int which_neighbor_am_i (const Elem *e) const
bool contains_vertex_of (const Elem *e) const
void find_point_neighbors (std::set< const Elem * > &neighbor_set) const
void make_links_to_me_remote ()
virtual bool is_remote () const
virtual void connectivity (const unsigned int sc, const IOPackage iop, std::vector< unsigned int > &conn) const =0
void write_connectivity (std::ostream &out, const IOPackage iop) const
virtual ElemType type () const =0
virtual unsigned int n_nodes () const =0
virtual unsigned int n_sides () const =0
virtual unsigned int n_neighbors () const
virtual unsigned int n_vertices () const =0
virtual unsigned int n_edges () const =0
virtual unsigned int n_faces () const =0
virtual unsigned int n_children () const =0
virtual bool is_vertex (const unsigned int i) const =0
virtual bool is_edge (const unsigned int i) const =0
virtual bool is_face (const unsigned int i) const =0
virtual bool is_node_on_side (const unsigned int n, const unsigned int s) const =0
virtual bool is_node_on_edge (const unsigned int n, const unsigned int e) const =0
virtual unsigned int n_sub_elem () const =0
virtual AutoPtr< DofObject > side (const unsigned int i) const =0
virtual AutoPtr< Elem > build_side (const unsigned int i, bool proxy=true) const =0
virtual AutoPtr< Elem > build_edge (const unsigned int i) const =0
virtual Order default_order () const =0
virtual Point centroid () const
virtual Real hmin () const
virtual Real hmax () const
virtual Real volume () const
virtual Real quality (const ElemQuality q) const
virtual std::pair< Real, Real > qual_bounds (const ElemQuality) const
virtual bool contains_point (const Point &p) const
virtual bool has_affine_map () const
bool active () const
bool ancestor () const
bool subactive () const
bool has_children () const
bool has_ancestor_children () const
bool is_ancestor_of (const Elem *descendant) const
const Elem * parent () const
Elem * parent ()
void set_parent (Elem *p)
const Elem * top_parent () const
const Elem * interior_parent () const
Real length (const unsigned int n1, const unsigned int n2) const
virtual unsigned int n_second_order_adjacent_vertices (const unsigned int n) const
virtual unsigned short int second_order_adjacent_vertex (const unsigned int n, const unsigned int v) const
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex (const unsigned int n) const
unsigned int level () const
unsigned int p_level () const
Elem * child (const unsigned int i) const
unsigned int which_child_am_i (const Elem *e) const
virtual bool is_child_on_side (const unsigned int c, const unsigned int s) const =0
virtual bool is_child_on_edge (const unsigned int c, const unsigned int e) const
void add_child (Elem *elem)
void add_child (Elem *elem, unsigned int c)
void family_tree (std::vector< const Elem * > &family, const bool reset=true) const
void active_family_tree (std::vector< const Elem * > &active_family, const bool reset=true) const
void family_tree_by_side (std::vector< const Elem * > &family, const unsigned int side, const bool reset=true) const
void active_family_tree_by_side (std::vector< const Elem * > &family, const unsigned int side, const bool reset=true) const
void family_tree_by_neighbor (std::vector< const Elem * > &family, const Elem *neighbor, const bool reset=true) const
void family_tree_by_subneighbor (std::vector< const Elem * > &family, const Elem *neighbor, const Elem *subneighbor, const bool reset=true) const
void active_family_tree_by_neighbor (std::vector< const Elem * > &family, const Elem *neighbor, const bool reset=true) const
RefinementState refinement_flag () const
void set_refinement_flag (const RefinementState rflag)
RefinementState p_refinement_flag () const
void set_p_refinement_flag (const RefinementState pflag)
unsigned int max_descendant_p_level () const
unsigned int min_p_level_by_neighbor (const Elem *neighbor, unsigned int current_min) const
unsigned int min_new_p_level_by_neighbor (const Elem *neighbor, unsigned int current_min) const
void set_p_level (const unsigned int p)
void hack_p_level (const unsigned int p)
virtual void refine (MeshRefinement &mesh_refinement)
void coarsen ()
void contract ()
void libmesh_assert_valid_neighbors () const
void libmesh_assert_valid_node_pointers () const
side_iterator boundary_sides_begin ()
side_iterator boundary_sides_end ()
virtual float embedding_matrix (const unsigned int i, const unsigned int j, const unsigned int k) const =0
void clear_old_dof_object ()
void set_old_dof_object ()
void clear_dofs ()
void invalidate_dofs (const unsigned int sys_num=libMesh::invalid_uint)
void invalidate_id ()
void invalidate_processor_id ()
void invalidate ()
unsigned int n_dofs (const unsigned int s, const unsigned int var=libMesh::invalid_uint) const
unsigned int id () const
unsigned int & set_id ()
void set_id (const unsigned int id)
bool valid_id () const
unsigned short int processor_id () const
unsigned short int & processor_id ()
void processor_id (const unsigned int id)
bool valid_processor_id () const
unsigned int n_systems () const
void set_n_systems (const unsigned int s)
void add_system ()
unsigned int n_vars (const unsigned int s) const
void set_n_vars (const unsigned int s, const unsigned int nvars)
unsigned int n_comp (const unsigned int s, const unsigned int var) const
void set_n_comp (const unsigned int s, const unsigned int var, const unsigned int ncomp)
unsigned int dof_number (const unsigned int s, const unsigned int var, const unsigned int comp) const
void set_dof_number (const unsigned int s, const unsigned int var, const unsigned int comp, const unsigned int dn)
bool has_dofs (const unsigned int s=libMesh::invalid_uint) const
static ElemType second_order_equivalent_type (const ElemType et, const bool full_ordered=true)
static ElemType first_order_equivalent_type (const ElemType et)
static AutoPtr< Elem > build (const ElemType type, Elem *p=NULL)
static std::string get_info ()
static std::string get_info ()
static void print_info ()
static void print_info ()
static unsigned int n_objects ()
static unsigned int n_objects ()
static const unsigned int type_to_n_nodes_map [INVALID_ELEM]
static const unsigned int invalid_id = libMesh::invalid_uint
static const unsigned short int invalid_processor_id = static_cast<unsigned short int>(-1)
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
void nullify_neighbors ()
void increment_constructor_count (const std::string &name)
void increment_constructor_count (const std::string &name)
void increment_destructor_count (const std::string &name)
void increment_destructor_count (const std::string &name)
static unsigned int compute_key (unsigned int n0)
static unsigned int compute_key (unsigned int n0, unsigned int n1)
static unsigned int compute_key (unsigned int n0, unsigned int n1, unsigned int n2)
static unsigned int compute_key (unsigned int n0, unsigned int n1, unsigned int n2, unsigned int n3)
Node ** _nodes
Elem ** _neighbors
Elem * _parent
Elem ** _children
unsigned char _rflag
unsigned char _pflag
unsigned char _p_level
subdomain_id_type _sbd_id
static Counts _counts
static Counts _counts
static Threads::atomic< unsigned int > _n_objects
static Threads::atomic< unsigned int > _n_objects
static Threads::spin_mutex _mutex
static Threads::spin_mutex _mutex
The InfCell is an abstract element type that lives in three dimensions. An infinite cell could be an infinite hexahedron, or an infinite prism.
Definition at line 43 of file cell_inf.h.
Definition at line 105 of file reference_counter.h.
Definition at line 105 of file reference_counter.h.
Definition at line 844 of file elem.h.
Enumerator:
Definition at line 627 of file elem.h.
{ COARSEN = 0,
DO_NOTHING,
REFINE,
JUST_REFINED,
JUST_COARSENED,
INACTIVE,
COARSEN_INACTIVE };
Definition at line 50 of file cell_inf.h.
:
Elem (nn, ns, p)
{}
Definition at line 1303 of file elem.h.
References Elem::COARSEN_INACTIVE, Elem::INACTIVE, and Elem::refinement_flag().
Referenced by MeshRefinement::_coarsen_elements(), MetisPartitioner::_do_partition(), MeshRefinement::_refine_elements(), Elem::active_family_tree(), Elem::active_family_tree_by_neighbor(), Elem::active_family_tree_by_side(), DofMap::add_neighbors_to_send_list(), HPCoarsenTest::add_projection(), Elem::ancestor(), Patch::build_around_element(), ParmetisPartitioner::build_graph(), Elem::coarsen(), MeshRefinement::coarsen_elements(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), UnstructuredMesh::contract(), Elem::contract(), DofMap::dof_indices(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), Elem::family_tree(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_side(), Elem::family_tree_by_subneighbor(), Patch::find_face_neighbors(), UnstructuredMesh::find_neighbors(), Elem::find_point_neighbors(), MeshRefinement::flag_elements_by_nelem_target(), ErrorVector::is_active_elem(), Elem::is_ancestor_of(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), DofMap::old_dof_indices(), PointLocatorTree::operator()(), PointLocatorList::operator()(), Elem::refine(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), Elem::subactive(), Parallel::sync_element_data_by_parent_id(), MeshRefinement::test_level_one(), ExodusII_IO_Helper::write_elements(), and DivaIO::write_stream().
{
#ifdef LIBMESH_ENABLE_AMR
if ((this->refinement_flag() == INACTIVE) ||
(this->refinement_flag() == COARSEN_INACTIVE))
return false;
else
return true;
#else
return true;
#endif
}
Definition at line 903 of file elem.C.
References Elem::active(), Elem::active_family_tree(), Elem::child(), Elem::is_remote(), Elem::n_children(), and Elem::subactive().
Referenced by MetisPartitioner::_do_partition(), Elem::active_family_tree(), and ParmetisPartitioner::build_graph().
{
// The 'family tree' doesn't include subactive elements
libmesh_assert(!this->subactive());
// Clear the vector if the flag reset tells us to.
if (reset)
active_family.clear();
// Add this element to the family tree if it is active
if (this->active())
active_family.push_back(this);
// Otherwise recurse into the element's children.
// Do not clear the vector any more.
else
for (unsigned int c=0; c<this->n_children(); c++)
if (!this->child(c)->is_remote())
this->child(c)->active_family_tree (active_family, false);
}
Definition at line 1059 of file elem.C.
References Elem::active(), Elem::active_family_tree_by_neighbor(), Elem::child(), Elem::has_neighbor(), Elem::level(), Elem::n_children(), remote_elem, and Elem::subactive().
Referenced by Elem::active_family_tree_by_neighbor(), DofMap::add_neighbors_to_send_list(), Patch::find_face_neighbors(), Elem::find_point_neighbors(), and SparsityPattern::Build::operator()().
{
// The 'family tree' doesn't include subactive elements
libmesh_assert(!this->subactive());
// Clear the vector if the flag reset tells us to.
if (reset)
family.clear();
// This only makes sense if we're already a neighbor
if (this->level() >= neighbor->level())
libmesh_assert (this->has_neighbor(neighbor));
// Add an active element to the family tree.
if (this->active())
family.push_back(this);
// Or recurse into an ancestor element's children.
// Do not clear the vector any more.
else if (!this->active())
for (unsigned int c=0; c<this->n_children(); c++)
{
Elem *child = this->child(c);
if (child != remote_elem && child->has_neighbor(neighbor))
child->active_family_tree_by_neighbor (family, neighbor, false);
}
}
Definition at line 954 of file elem.C.
References Elem::active(), Elem::active_family_tree_by_side(), Elem::child(), Elem::is_child_on_side(), Elem::n_children(), Elem::n_sides(), and Elem::subactive().
Referenced by Elem::active_family_tree_by_side(), and BoundaryInfo::build_node_list_from_side_list().
{
// The 'family tree' doesn't include subactive elements
libmesh_assert(!this->subactive());
// Clear the vector if the flag reset tells us to.
if (reset)
family.clear();
libmesh_assert(s < this->n_sides());
// Add an active element to the family tree.
if (this->active())
family.push_back(this);
// Or recurse into an ancestor element's children.
// Do not clear the vector any more.
else
for (unsigned int c=0; c<this->n_children(); c++)
if (this->child(c)->is_child_on_side(c, s))
this->child(c)->active_family_tree_by_side (family, s, false);
}
Definition at line 819 of file elem.C.
References Elem::_children, Elem::n_children(), Elem::parent(), and remote_elem.
Referenced by UnstructuredMesh::all_first_order(), UnstructuredMesh::copy_nodes_and_elements(), LegacyXdrIO::read_mesh(), and XdrIO::read_serialized_connectivity().
{
if(_children == NULL)
{
_children = new Elem*[this->n_children()];
for (unsigned int c=0; c<this->n_children(); c++)
_children[c] = NULL;
}
for (unsigned int c=0; c<this->n_children(); c++)
{
if(_children[c] == NULL || _children[c] == remote_elem)
{
libmesh_assert (this == elem->parent());
_children[c] = elem;
return;
}
}
std::cerr << 'Error: Tried to add a child to an element with full children array'
<< std::endl;
libmesh_error();
}
Definition at line 846 of file elem.C.
References Elem::_children, Elem::n_children(), Elem::parent(), and remote_elem.
{
if(_children == NULL)
{
_children = new Elem*[this->n_children()];
for (unsigned int i=0; i<this->n_children(); i++)
_children[i] = NULL;
}
libmesh_assert (_children[c] == NULL || _children[c] == remote_elem);
libmesh_assert (this == elem->parent());
_children[c] = elem;
}
Definition at line 188 of file dof_object.C.
References DofObject::_dof_ids, DofObject::_n_systems, DofObject::_n_v_comp, and DofObject::n_systems().
{
if (this->n_systems() > 0)
{
// Copy the old systems to temporary storage
unsigned char **old_n_v_comp = new unsigned char* [this->n_systems()];
unsigned int **old_dof_ids = new unsigned int* [this->n_systems()];
for (unsigned int s=0; s<this->n_systems(); s++)
{
old_n_v_comp[s] = _n_v_comp[s];
old_dof_ids[s] = _dof_ids[s];
}
// Delete old storage
libmesh_assert (_n_v_comp != NULL); delete [] _n_v_comp; _n_v_comp = NULL;
libmesh_assert (_dof_ids != NULL); delete [] _dof_ids; _dof_ids = NULL;
// Allocate space for new system
_n_v_comp= new unsigned char* [this->n_systems()+1];
_dof_ids = new unsigned int* [this->n_systems()+1];
// Copy the other systems
for (unsigned int s=0; s<this->n_systems(); s++)
{
_n_v_comp[s] = old_n_v_comp[s];
_dof_ids[s] = old_dof_ids[s];
}
// Delete temporary storage
libmesh_assert (old_n_v_comp != NULL); delete [] old_n_v_comp; old_n_v_comp = NULL;
libmesh_assert (old_dof_ids != NULL); delete [] old_dof_ids; old_dof_ids = NULL;
}
else
{
libmesh_assert (_n_v_comp == NULL);
libmesh_assert (_dof_ids == NULL);
// Allocate space for new system
_n_v_comp = new unsigned char* [this->n_systems()+1];
_dof_ids = new unsigned int* [this->n_systems()+1];
}
// Initialize the new system
_n_v_comp[this->n_systems()] = NULL;
_dof_ids[this->n_systems()] = NULL;
// Done. Don't forget to increment the number of systems!
_n_systems++;
}
Definition at line 797 of file elem.C.
References Elem::active(), Elem::ancestor(), Elem::child(), and Elem::has_children().
Referenced by Elem::ancestor(), UnstructuredMesh::contract(), MeshRefinement::eliminate_unrefined_patches(), UnstructuredMesh::find_neighbors(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), and Elem::refine().
{
#ifdef LIBMESH_ENABLE_AMR
if (this->active())
return false;
if (!this->has_children())
return false;
if (this->child(0)->active())
return true;
return this->child(0)->ancestor();
#else
return false;
#endif
}
Definition at line 1394 of file elem.C.
References Elem::_first_side(), and Elem::_last_side().
{
Predicates::BoundarySide<SideIter> bsp;
return side_iterator(this->_first_side(), this->_last_side(), bsp);
}
Definition at line 1403 of file elem.C.
References Elem::_last_side().
{
Predicates::BoundarySide<SideIter> bsp;
return side_iterator(this->_last_side(), this->_last_side(), bsp);
}
Definition at line 108 of file elem.C.
References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::EDGE4, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INFEDGE2, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMeshEnums::PRISM15, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::PYRAMID5, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.
Referenced by GMVIO::_read_one_cell(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), UnstructuredMesh::copy_nodes_and_elements(), UnstructuredMesh::create_submesh(), MeshTools::Modification::flatten(), Nemesis_IO::read(), ExodusII_IO::read(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), Elem::refine(), and GMVIO::write_ascii_old_impl().
{
Elem* elem = NULL;
switch (type)
{
// 1D elements
case EDGE2:
{
elem = new Edge2(p);
break;
}
case EDGE3:
{
elem = new Edge3(p);
break;
}
case EDGE4:
{
elem = new Edge4(p);
break;
}
// 2D elements
case TRI3:
{
elem = new Tri3(p);
break;
}
case TRI6:
{
elem = new Tri6(p);
break;
}
case QUAD4:
{
elem = new Quad4(p);
break;
}
case QUAD8:
{
elem = new Quad8(p);
break;
}
case QUAD9:
{
elem = new Quad9(p);
break;
}
// 3D elements
case TET4:
{
elem = new Tet4(p);
break;
}
case TET10:
{
elem = new Tet10(p);
break;
}
case HEX8:
{
elem = new Hex8(p);
break;
}
case HEX20:
{
elem = new Hex20(p);
break;
}
case HEX27:
{
elem = new Hex27(p);
break;
}
case PRISM6:
{
elem = new Prism6(p);
break;
}
case PRISM15:
{
elem = new Prism15(p);
break;
}
case PRISM18:
{
elem = new Prism18(p);
break;
}
case PYRAMID5:
{
elem = new Pyramid5(p);
break;
}
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
// 1D infinite elements
case INFEDGE2:
{
elem = new InfEdge2(p);
break;
}
// 2D infinite elements
case INFQUAD4:
{
elem = new InfQuad4(p);
break;
}
case INFQUAD6:
{
elem = new InfQuad6(p);
break;
}
// 3D infinite elements
case INFHEX8:
{
elem = new InfHex8(p);
break;
}
case INFHEX16:
{
elem = new InfHex16(p);
break;
}
case INFHEX18:
{
elem = new InfHex18(p);
break;
}
case INFPRISM6:
{
elem = new InfPrism6(p);
break;
}
case INFPRISM12:
{
elem = new InfPrism12(p);
break;
}
#endif
default:
{
std::cerr << 'ERROR: Undefined element type!.' << std::endl;
libmesh_error();
}
}
AutoPtr<Elem> ap(elem);
return ap;
}
A AutoPtr<Elem> is returned to prevent a memory leak. This way the user need not remember to delete the object.
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge, Face, InfQuad, NodeElem, and RemoteElem.
Referenced by FE< Dim, T >::edge_reinit(), Elem::is_child_on_edge(), and MeshRefinement::limit_level_mismatch_at_edge().
A AutoPtr<Elem> is returned to prevent a memory leak. This way the user need not remember to delete the object.
The second argument, which is true by default, specifies that a 'proxy' element (of type Side) will be returned. This type of return value is useful because it does not allocate additional memory, and is usually sufficient for FE calculation purposes. If you really need a full-ordered, non-proxy side object, call this function with proxy=false.
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Referenced by MeshTools::Generation::build_cube(), MeshTools::Generation::build_delaunay_square(), InfQuad::build_edge(), Face::build_edge(), InfFE< Dim, T_radial, T_map >::Base::build_elem(), InfElemBuilder::build_inf_elem(), BoundaryInfo::build_node_list_from_side_list(), InfFE< Dim, T_radial, T_map >::compute_data(), LaplaceMeshSmoother::init(), Elem::is_ancestor_of(), PeriodicBoundaries::neighbor(), PostscriptIO::plot_quadratic_elem(), GmshIO::read_mesh(), InfFE< Dim, T_radial, T_map >::reinit(), FEXYZ< Dim >::reinit(), REINIT_ERROR(), InfFE< Dim, T_radial, T_map >::shape(), MeshTools::Modification::smooth(), BoundaryInfo::sync(), FroIO::write(), and DivaIO::write_stream().
Definition at line 277 of file elem.C.
References TypeVector< T >::add(), and Elem::n_vertices().
Referenced by SFCPartitioner::_do_partition(), MeshCommunication::assign_global_indices(), CentroidPartitioner::compute_centroids(), UnstructuredMesh::find_neighbors(), LocationMap< T >::point_of(), FE< Dim, T >::shape(), FE< Dim, T >::shape_deriv(), FE< Dim, T >::shape_second_deriv(), Prism6::volume(), and Hex8::volume().
{
Point cp;
for (unsigned int n=0; n<this->n_vertices(); n++)
cp.add (this->point(n));
return (cp /= static_cast<Real>(this->n_vertices()));
}
Referenced by Elem::active_family_tree(), Elem::active_family_tree_by_neighbor(), Elem::active_family_tree_by_side(), HPCoarsenTest::add_projection(), UnstructuredMesh::all_first_order(), Elem::ancestor(), Elem::coarsen(), FEBase::coarsened_dof_values(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), Elem::family_tree(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_side(), Elem::family_tree_by_subneighbor(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_nelem_target(), Elem::has_ancestor_children(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), MeshTools::libmesh_assert_valid_remote_elems(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), Elem::refine(), Tet4::reselect_diagonal(), Partitioner::set_parent_processor_ids(), MeshTools::Modification::smooth(), Elem::subactive(), Parallel::sync_element_data_by_parent_id(), and XdrIO::write_serialized_connectivity().
Definition at line 1258 of file elem.h.
References Elem::n_neighbors(), Elem::neighbor(), and Elem::parent().
{
for (unsigned int n=0; n<elem->n_neighbors(); n++)
if (elem->neighbor(n) &&
elem->neighbor(n)->parent() == this)
return elem->neighbor(n);
return NULL;
}
Definition at line 1245 of file elem.h.
References Elem::n_neighbors(), Elem::neighbor(), and Elem::parent().
{
for (unsigned int n=0; n<elem->n_neighbors(); n++)
if (elem->neighbor(n) &&
elem->neighbor(n)->parent() == this)
return elem->neighbor(n);
return NULL;
}
Definition at line 388 of file dof_object.h.
References DofObject::_dof_ids, DofObject::_n_systems, DofObject::_n_v_comp, and DofObject::n_systems().
Referenced by DofObject::set_n_systems(), and DofObject::~DofObject().
{
// Only clear if there is data
if (this->n_systems() != 0)
{
libmesh_assert (_n_v_comp != NULL);
libmesh_assert (_dof_ids != NULL);
for (unsigned int s=0; s<this->n_systems(); s++)
{
if (_dof_ids[s] != NULL) // This has only been allocated if
{ // variables were declared
delete [] _dof_ids[s]; _dof_ids[s] = NULL;
}
if (_n_v_comp[s] != NULL) // it is possible the number of variables is 0,
{ // but this was allocated (_n_v_comp[s][0] == 0)
delete [] _n_v_comp[s]; _n_v_comp[s] = NULL;
}
}
delete [] _n_v_comp; _n_v_comp = NULL;
delete [] _dof_ids; _dof_ids = NULL;
}
// Make sure we cleaned up
// (or there was nothing there)
libmesh_assert (_n_v_comp == NULL);
libmesh_assert (_dof_ids == NULL);
// No systems now.
_n_systems = 0;
}
Definition at line 120 of file dof_object.C.
References DofObject::old_dof_object.
Referenced by DofObject::set_old_dof_object(), and DofObject::~DofObject().
{
// If we have been called before...
// prevent a memory leak
if (old_dof_object != NULL)
{
delete this->old_dof_object;
this->old_dof_object = NULL;
}
}
Definition at line 184 of file elem_refinement.C.
References Elem::active(), TypeVector< T >::add_scaled(), Elem::child(), Elem::COARSEN, Elem::COARSEN_INACTIVE, Elem::embedding_matrix(), Elem::get_node(), Elem::INACTIVE, Elem::JUST_COARSENED, Elem::n_children(), Elem::n_nodes(), Elem::p_level(), Elem::point(), Elem::refinement_flag(), remote_elem, Elem::set_p_level(), and Elem::set_refinement_flag().
Referenced by MeshRefinement::_coarsen_elements().
{
libmesh_assert (this->refinement_flag() == Elem::COARSEN_INACTIVE);
libmesh_assert (!this->active());
// We no longer delete children until MeshRefinement::contract()
// delete [] _children;
// _children = NULL;
unsigned int parent_p_level = 0;
// re-compute hanging node nodal locations
for (unsigned int c=0; c<this->n_children(); c++)
{
Elem *mychild = this->child(c);
if (mychild == remote_elem)
continue;
for (unsigned int nc=0; nc<mychild->n_nodes(); nc++)
{
Point new_pos;
bool calculated_new_pos = false;
for (unsigned int n=0; n<this->n_nodes(); n++)
{
// The value from the embedding matrix
const float em_val = this->embedding_matrix(c,nc,n);
// The node location is somewhere between existing vertices
if ((em_val != 0.) && (em_val != 1.))
{
new_pos.add_scaled (this->point(n), em_val);
calculated_new_pos = true;
}
}
if(calculated_new_pos)
{
//Move the existing node back into it's original location
for(unsigned int i=0; i<LIBMESH_DIM; i++)
{
Point & child_node = *(mychild->get_node(nc));
child_node(i)=new_pos(i);
}
}
}
}
for (unsigned int c=0; c<this->n_children(); c++)
{
Elem *mychild = this->child(c);
if (mychild == remote_elem)
continue;
libmesh_assert (mychild->refinement_flag() == Elem::COARSEN);
mychild->set_refinement_flag(Elem::INACTIVE);
if (mychild->p_level() > parent_p_level)
parent_p_level = mychild->p_level();
}
this->set_refinement_flag(Elem::JUST_COARSENED);
this->set_p_level(parent_p_level);
libmesh_assert (this->active());
}
Referenced by Elem::is_ancestor_of(), Tri6::key(), Tri::key(), Quad9::key(), Quad8::key(), Quad::key(), InfQuad::key(), Edge::key(), Tet::key(), Pyramid::key(), Prism::key(), InfPrism::key(), InfHex18::key(), InfHex::key(), Hex27::key(), and Hex::key().
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Referenced by VTKIO::cells_to_vtk(), VTKIO::read(), Elem::write_connectivity(), and DivaIO::write_stream().
Reimplemented in InfHex8, InfPrism6, and InfQuad4.
Definition at line 1165 of file elem.C.
References Elem::default_order(), Elem::dim(), FEInterface::inverse_map(), FEInterface::on_reference_element(), and Elem::type().
Referenced by Elem::contains_vertex_of(), PointLocatorTree::operator()(), and HPSingularity::select_refinement().
{
// Declare a basic FEType. Will ue a Lagrange
// element by default.
FEType fe_type(this->default_order());
const Point mapped_point = FEInterface::inverse_map(this->dim(),
fe_type,
this,
p,
1.e-4,
false);
return FEInterface::on_reference_element(mapped_point, this->type());
}
Definition at line 432 of file elem.C.
References Elem::contains_point(), Elem::n_vertices(), and Elem::point().
Referenced by Elem::find_point_neighbors().
{
// Our vertices are the first numbered nodes
for (unsigned int n = 0; n != e->n_vertices(); ++n)
if (this->contains_point(e->point(n)))
return true;
return false;
}
Definition at line 250 of file elem_refinement.C.
References Elem::_children, Elem::active(), Elem::DO_NOTHING, Elem::JUST_COARSENED, Elem::refinement_flag(), and Elem::set_refinement_flag().
Referenced by UnstructuredMesh::contract().
{
// Subactive elements get deleted entirely, not contracted
libmesh_assert (this->active());
// Active contracted elements no longer can have children
if (_children)
{
delete [] _children;
_children = NULL;
}
if (this->refinement_flag() == Elem::JUST_COARSENED)
this->set_refinement_flag(Elem::DO_NOTHING);
}
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Referenced by UnstructuredMesh::all_second_order(), Elem::contains_point(), FEMContext::elem_position_get(), FE< Dim, T >::init_edge_shape_functions(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), FE< Dim, T >::init_face_shape_functions(), FEXYZ< Dim >::init_shape_functions(), FE< Dim, T >::init_shape_functions(), FE< Dim, T >::map(), FE< Dim, T >::map_eta(), FE< Dim, T >::map_xi(), FE< Dim, T >::map_zeta(), and Elem::volume().
Implements Elem.
Definition at line 59 of file cell_inf.h.
Referenced by InfPrism6::contains_point(), and InfHex8::contains_point().
{ return 3; }
Definition at line 564 of file dof_object.h.
References DofObject::_dof_ids, DofObject::invalid_id, DofObject::n_comp(), DofObject::n_systems(), and DofObject::n_vars().
Referenced by DofMap::constrain_p_dofs(), GMVIO::copy_nodal_solution(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), DofObject::DofObject(), DofMap::old_dof_indices(), DofMap::reinit(), HPCoarsenTest::select_refinement(), DofObject::set_dof_number(), DofMap::set_nonlocal_dof_objects(), VTKIO::solution_to_vtk(), and System::zero_variable().
{
libmesh_assert (s < this->n_systems());
libmesh_assert (var < this->n_vars(s));
libmesh_assert (_dof_ids != NULL);
libmesh_assert (_dof_ids[s] != NULL);
libmesh_assert (comp < this->n_comp(s,var));
if (_dof_ids[s][var] == invalid_id)
return invalid_id;
else
return (_dof_ids[s][var] + comp);
}
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Referenced by Elem::coarsen(), Elem::refine(), and MeshTools::Modification::smooth().
Definition at line 880 of file elem.C.
References Elem::active(), Elem::child(), Elem::family_tree(), Elem::is_remote(), Elem::n_children(), and Elem::subactive().
Referenced by Elem::family_tree().
{
// The 'family tree' doesn't include subactive elements
libmesh_assert(!this->subactive());
// Clear the vector if the flag reset tells us to.
if (reset)
family.clear();
// Add this element to the family tree.
family.push_back(this);
// Recurse into the elements children, if it has them.
// Do not clear the vector any more.
if (!this->active())
for (unsigned int c=0; c<this->n_children(); c++)
if (!this->child(c)->is_remote())
this->child(c)->family_tree (family, false);
}
Definition at line 981 of file elem.C.
References Elem::active(), Elem::child(), Elem::family_tree_by_neighbor(), Elem::has_neighbor(), Elem::n_children(), remote_elem, and Elem::subactive().
Referenced by Elem::family_tree_by_neighbor(), and Elem::make_links_to_me_remote().
{
// The 'family tree' doesn't include subactive elements
libmesh_assert(!this->subactive());
// Clear the vector if the flag reset tells us to.
if (reset)
family.clear();
// This only makes sense if we're already a neighbor
libmesh_assert (this->has_neighbor(neighbor));
// Add this element to the family tree.
family.push_back(this);
// Recurse into the elements children, if it's not active.
// Do not clear the vector any more.
if (!this->active())
for (unsigned int c=0; c<this->n_children(); c++)
{
Elem *child = this->child(c);
if (child != remote_elem && child->has_neighbor(neighbor))
child->family_tree_by_neighbor (family, neighbor, false);
}
}
Definition at line 927 of file elem.C.
References Elem::active(), Elem::child(), Elem::family_tree_by_side(), Elem::is_child_on_side(), Elem::n_children(), Elem::n_sides(), and Elem::subactive().
Referenced by Elem::family_tree_by_side().
{
// The 'family tree' doesn't include subactive elements
libmesh_assert(!this->subactive());
// Clear the vector if the flag reset tells us to.
if (reset)
family.clear();
libmesh_assert(s < this->n_sides());
// Add this element to the family tree.
family.push_back(this);
// Recurse into the elements children, if it has them.
// Do not clear the vector any more.
if (!this->active())
for (unsigned int c=0; c<this->n_children(); c++)
if (this->child(c)->is_child_on_side(c, s))
this->child(c)->family_tree_by_side (family, s, false);
}
Definition at line 1011 of file elem.C.
References Elem::active(), Elem::child(), Elem::family_tree_by_subneighbor(), Elem::has_neighbor(), Elem::is_ancestor_of(), Elem::n_children(), Elem::n_sides(), Elem::neighbor(), Elem::parent(), remote_elem, and Elem::subactive().
Referenced by Elem::family_tree_by_subneighbor(), and Elem::make_links_to_me_remote().
{
// The 'family tree' doesn't include subactive elements
libmesh_assert(!this->subactive());
// Clear the vector if the flag reset tells us to.
if (reset)
family.clear();
// To simplifly this function we need an existing neighbor
libmesh_assert (neighbor);
libmesh_assert (neighbor != remote_elem);
libmesh_assert (this->has_neighbor(neighbor));
// This only makes sense if subneighbor descends from neighbor
libmesh_assert (subneighbor);
libmesh_assert (subneighbor != remote_elem);
libmesh_assert (neighbor->is_ancestor_of(subneighbor));
// Add this element to the family tree if applicable.
if (neighbor == subneighbor)
family.push_back(this);
// Recurse into the elements children, if it's not active.
// Do not clear the vector any more.
if (!this->active())
for (unsigned int c=0; c != this->n_children(); ++c)
{
Elem *child = this->child(c);
if (child != remote_elem)
for (unsigned int s=0; s != child->n_sides(); ++s)
{
Elem *child_neigh = child->neighbor(s);
if (child_neigh &&
(child_neigh == neighbor ||
(child_neigh->parent() == neighbor &&
child_neigh->is_ancestor_of(subneighbor))))
child->family_tree_by_subneighbor (family, child_neigh,
subneighbor, false);
}
}
}
Definition at line 443 of file elem.C.
References Elem::active(), Elem::active_family_tree_by_neighbor(), Elem::contains_vertex_of(), Elem::n_sides(), Elem::neighbor(), and remote_elem.
Referenced by Patch::find_point_neighbors().
{
neighbor_set.clear();
neighbor_set.insert(this);
unsigned int old_size;
do
{
old_size = neighbor_set.size();
// Loop over all the elements in the patch
std::set<const Elem*>::const_iterator it = neighbor_set.begin();
const std::set<const Elem*>::const_iterator end = neighbor_set.end();
for (; it != end; ++it)
{
const Elem* elem = *it;
for (unsigned int s=0; s<elem->n_sides(); s++)
{
const Elem* neighbor = elem->neighbor(s);
if (neighbor &&
neighbor != remote_elem) // we have a real neighbor on this side
{
if (neighbor->active()) // ... if it is active
{
if (this->contains_vertex_of(neighbor) // ... and touches us
|| neighbor->contains_vertex_of(this))
neighbor_set.insert (neighbor); // ... then add it
}
#ifdef LIBMESH_ENABLE_AMR
else // ... the neighbor is *not* active,
{ // ... so add *all* neighboring
// active children
std::vector<const Elem*> active_neighbor_children;
neighbor->active_family_tree_by_neighbor
(active_neighbor_children, elem);
std::vector<const Elem*>::const_iterator
child_it = active_neighbor_children.begin();
const std::vector<const Elem*>::const_iterator
child_end = active_neighbor_children.end();
for (; child_it != child_end; ++child_it)
if (this->contains_vertex_of(*child_it) ||
(*child_it)->contains_vertex_of(this))
neighbor_set.insert (*child_it);
}
#endif // #ifdef LIBMESH_ENABLE_AMR
}
}
}
}
while (old_size != neighbor_set.size());
}
Definition at line 1235 of file elem.C.
References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::EDGE4, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMeshEnums::INVALID_ELEM, libMeshEnums::PRISM15, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.
Referenced by UnstructuredMesh::all_first_order(), and GMVIO::write_ascii_old_impl().
{
switch (et)
{
case EDGE2:
case EDGE3:
case EDGE4:
return EDGE2;
case TRI3:
case TRI6:
return TRI3;
case QUAD4:
case QUAD8:
case QUAD9:
return QUAD4;
case TET4:
case TET10:
return TET4;
case HEX8:
case HEX27:
case HEX20:
return HEX8;
case PRISM6:
case PRISM15:
case PRISM18:
return PRISM6;
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
case INFQUAD4:
case INFQUAD6:
return INFQUAD4;
case INFHEX8:
case INFHEX16:
case INFHEX18:
return INFHEX8;
case INFPRISM6:
case INFPRISM12:
return INFPRISM6;
#endif
default:
// unknown element
return INVALID_ELEM;
}
}
Definition at line 45 of file reference_counter.C.
References ReferenceCounter::_counts, and Quality::name().
Referenced by ReferenceCounter::print_info().
{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
std::ostringstream out;
out << '
<< ' ----------------------------------------------------------------------------
<< '| Reference count information |
<< ' ---------------------------------------------------------------------------- ;
for (Counts::iterator it = _counts.begin();
it != _counts.end(); ++it)
{
const std::string name(it->first);
const unsigned int creations = it->second.first;
const unsigned int destructions = it->second.second;
out << '| ' << name << ' reference count information:
<< '| Creations: ' << creations << '
<< '| Destructions: ' << destructions << ';
}
out << ' ---------------------------------------------------------------------------- ;
return out.str();
#else
return '';
#endif
}
Definition at line 45 of file reference_counter.C.
References ReferenceCounter::_counts, and Quality::name().
Referenced by ReferenceCounter::print_info().
{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
std::ostringstream out;
out << '
<< ' ----------------------------------------------------------------------------
<< '| Reference count information |
<< ' ---------------------------------------------------------------------------- ;
for (Counts::iterator it = _counts.begin();
it != _counts.end(); ++it)
{
const std::string name(it->first);
const unsigned int creations = it->second.first;
const unsigned int destructions = it->second.second;
out << '| ' << name << ' reference count information:
<< '| Creations: ' << creations << '
<< '| Destructions: ' << destructions << ';
}
out << ' ---------------------------------------------------------------------------- ;
return out.str();
#else
return '';
#endif
}
Reimplemented in RemoteElem.
Definition at line 1176 of file elem.h.
References Elem::_nodes, and Elem::n_nodes().
Referenced by Elem::_cast_node_address_to_unsigned_int(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Generation::build_cube(), Tri6::build_side(), Tri3::build_side(), Quad9::build_side(), Quad8::build_side(), Quad4::build_side(), InfQuad6::build_side(), Edge::build_side(), Tet4::build_side(), Tet10::build_side(), Pyramid5::build_side(), Prism6::build_side(), Prism18::build_side(), Prism15::build_side(), InfPrism12::build_side(), InfHex18::build_side(), InfHex16::build_side(), Hex8::build_side(), Hex27::build_side(), Hex20::build_side(), Elem::coarsen(), DofMap::constrain_p_dofs(), MeshTools::correct_node_proc_ids(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), UNVIO::element_out(), MeshTools::Modification::flatten(), Elem::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_node_procids(), DofMap::old_dof_indices(), Tri::quality(), Elem::refine(), DofMap::reinit(), Tet4::reselect_diagonal(), HPCoarsenTest::select_refinement(), Partitioner::set_node_processor_ids(), Tri::side(), Quad::side(), InfQuad::side(), Edge::side(), Tet::side(), Pyramid::side(), Prism::side(), InfPrism::side(), InfHex::side(), Hex::side(), MeshTools::Modification::smooth(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), Tri3::volume(), Tet4::volume(), Pyramid5::volume(), and GnuPlotIO::write_solution().
{
libmesh_assert (i < this->n_nodes());
libmesh_assert (_nodes[i] != NULL);
return _nodes[i];
}
Referenced by Elem::is_ancestor_of(), and XdrIO::read_serialized_connectivity().
Reimplemented in Hex20, Hex27, Hex8, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, Quad4, Quad8, Quad9, Tri3, Tri6, and NodeElem.
Definition at line 465 of file elem.h.
Referenced by FEBase::compute_map(), FEXYZ< Dim >::init_shape_functions(), and FE< Dim, T >::init_shape_functions().
{ return false; }
Definition at line 1351 of file elem.h.
References Elem::_children, Elem::child(), Elem::has_children(), and Elem::n_children().
{
#ifdef LIBMESH_ENABLE_AMR
if (_children == NULL)
return false;
else
for (unsigned int c=0; c != this->n_children(); c++)
if (this->child(c)->has_children())
return true;
#endif
return false;
}
Definition at line 1337 of file elem.h.
References Elem::_children.
Referenced by UnstructuredMesh::all_first_order(), Elem::ancestor(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_nelem_target(), Elem::has_ancestor_children(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), FEMSystem::mesh_position_set(), System::ProjectVector::operator()(), Elem::subactive(), and Parallel::sync_element_data_by_parent_id().
{
#ifdef LIBMESH_ENABLE_AMR
if (_children == NULL)
return false;
else
return true;
#else
return false;
#endif
}
Definition at line 583 of file dof_object.h.
References libMesh::invalid_uint, DofObject::n_systems(), and DofObject::n_vars().
Referenced by DofMap::reinit().
{
if (sys == libMesh::invalid_uint)
{
for (unsigned int s=0; s<this->n_systems(); s++)
if (this->n_vars(s))
return true;
}
else
{
libmesh_assert (sys < this->n_systems());
if (this->n_vars(sys))
return true;
}
return false;
}
Definition at line 1233 of file elem.h.
References Elem::n_neighbors(), and Elem::neighbor().
Referenced by Elem::active_family_tree_by_neighbor(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_subneighbor(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), and Elem::on_boundary().
{
for (unsigned int n=0; n<this->n_neighbors(); n++)
if (this->neighbor(n) == elem)
return true;
return false;
}
Definition at line 306 of file elem.C.
References std::max(), Elem::n_vertices(), Elem::point(), and TypeVector< T >::size().
Referenced by KellyErrorEstimator::boundary_side_integration(), DiscontinuityMeasure::boundary_side_integration(), KellyErrorEstimator::internal_side_integration(), LaplacianErrorEstimator::internal_side_integration(), DiscontinuityMeasure::internal_side_integration(), and HPCoarsenTest::select_refinement().
{
Real h_max=0;
for (unsigned int n_outer=0; n_outer<this->n_vertices(); n_outer++)
for (unsigned int n_inner=n_outer+1; n_inner<this->n_vertices(); n_inner++)
{
const Point diff = (this->point(n_outer) - this->point(n_inner));
h_max = std::max(h_max,diff.size());
}
return h_max;
}
Definition at line 289 of file elem.C.
References std::min(), Elem::n_vertices(), Elem::point(), and TypeVector< T >::size().
Referenced by UnstructuredMesh::find_neighbors(), FEMSystem::numerical_jacobian(), and Elem::refine().
{
Real h_min=1.e30;
for (unsigned int n_outer=0; n_outer<this->n_vertices(); n_outer++)
for (unsigned int n_inner=n_outer+1; n_inner<this->n_vertices(); n_inner++)
{
const Point diff = (this->point(n_outer) - this->point(n_inner));
h_min = std::min(h_min,diff.size());
}
return h_min;
}
Definition at line 449 of file dof_object.h.
References DofObject::_id, and DofObject::valid_id().
Referenced by SFCPartitioner::_do_partition(), UniformRefinementEstimator::_estimate_error(), SerialMesh::add_elem(), ParallelMesh::add_elem(), SerialMesh::add_node(), ParallelMesh::add_node(), ParallelMesh::add_point(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), FEMSystem::assembly(), MeshData::assign(), ParmetisPartitioner::assign_partitioning(), MeshTools::Generation::build_delaunay_square(), ParmetisPartitioner::build_graph(), InfElemBuilder::build_inf_elem(), VTKIO::cells_to_vtk(), FEBase::compute_single_point_map(), UnstructuredMesh::copy_nodes_and_elements(), MeshRefinement::create_parent_error_vector(), SerialMesh::delete_elem(), ParallelMesh::delete_elem(), SerialMesh::delete_node(), ParallelMesh::delete_node(), MeshCommunication::delete_remote_elements(), MeshData::elem_to_foreign_id(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), UnstructuredMesh::find_neighbors(), MeshTools::find_nodal_neighbors(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_mean_stddev(), TetGenMeshInterface::get_node_index(), LaplaceMeshSmoother::init(), ParmetisPartitioner::initialize(), ExodusII_IO_Helper::initialize(), TreeNode< N >::insert(), SerialMesh::insert_elem(), ParallelMesh::insert_elem(), ParallelMesh::insert_node(), FE< Dim, T >::inverse_map(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_valid_elem_ids(), MeshTools::libmesh_assert_valid_node_procids(), MeshTools::libmesh_assert_valid_refinement_flags(), Node::Node(), Elem::node(), MeshData::node_to_foreign_id(), VTKIO::nodes_to_vtk(), PatchRecoveryErrorEstimator::EstimateError::operator()(), XdrIO::pack_element(), ErrorVector::plot_error(), DofObject::processor_id(), Nemesis_IO::read(), ExodusII_IO::read(), ParallelMesh::renumber_elem(), ParallelMesh::renumber_node(), ParallelMesh::renumber_nodes_and_elements(), HPCoarsenTest::select_refinement(), DofObject::set_id(), Partitioner::set_node_processor_ids(), DofMap::set_nonlocal_dof_objects(), Partitioner::set_parent_processor_ids(), FE< Dim, T >::shape(), FE< Dim, T >::shape_deriv(), FE< Dim, T >::shape_second_deriv(), LaplaceMeshSmoother::smooth(), MeshTools::Modification::smooth(), BoundaryInfo::sync(), Parallel::sync_dofobject_data_by_id(), Parallel::sync_element_data_by_parent_id(), GMVIO::write_ascii_new_impl(), GMVIO::write_ascii_old_impl(), ExodusII_IO_Helper::write_elements(), LegacyXdrIO::write_mesh(), GmshIO::write_mesh(), and XdrIO::write_serialized_connectivity().
{
libmesh_assert (this->valid_id());
return _id;
}
Definition at line 149 of file reference_counter.h.
References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.
Referenced by ReferenceCountedObject< Value >::ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.first++;
}
Definition at line 149 of file reference_counter.h.
References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.
Referenced by ReferenceCountedObject< Value >::ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.first++;
}
Definition at line 167 of file reference_counter.h.
References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.
Referenced by ReferenceCountedObject< Value >::~ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.second++;
}
Definition at line 167 of file reference_counter.h.
References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.
Referenced by ReferenceCountedObject< Value >::~ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.second++;
}
Implements Elem.
Definition at line 65 of file cell_inf.h.
{ return true; }
Referenced by Elem::is_ancestor_of().
Definition at line 378 of file dof_object.h.
References DofObject::invalidate_dofs(), DofObject::invalidate_id(), and DofObject::invalidate_processor_id().
Referenced by DofObject::DofObject().
{
this->invalidate_dofs ();
this->invalidate_id ();
this->invalidate_processor_id ();
}
Definition at line 342 of file dof_object.h.
References DofObject::invalid_id, DofObject::n_comp(), DofObject::n_systems(), DofObject::n_vars(), and DofObject::set_dof_number().
Referenced by DofObject::invalidate().
{
// If the user does not specify the system number...
if (sys_num >= this->n_systems())
{
for (unsigned int s=0; s<this->n_systems(); s++)
for (unsigned int v=0; v<this->n_vars(s); v++)
if (this->n_comp(s,v))
this->set_dof_number(s,v,0,invalid_id);
}
// ...otherwise invalidate the dofs for all systems
else
for (unsigned int v=0; v<n_vars(sys_num); v++)
if (this->n_comp(sys_num,v))
this->set_dof_number(sys_num,v,0,invalid_id);
}
Definition at line 362 of file dof_object.h.
References DofObject::invalid_id, and DofObject::set_id().
Referenced by DofObject::invalidate().
{
this->set_id (invalid_id);
}
Definition at line 370 of file dof_object.h.
References DofObject::invalid_processor_id, and DofObject::processor_id().
Referenced by MeshTools::correct_node_proc_ids(), DofObject::invalidate(), Partitioner::set_node_processor_ids(), and Partitioner::set_parent_processor_ids().
{
this->processor_id (invalid_processor_id);
}
Convenient way to communicate elements. This class packes up an element so that it can easily be communicated through an MPI array.
Author:
Date:
Iterator pointing to the beginning of this packed element's index buffer.
Constructor. Takes an input iterator pointing to the beginning of the connectivity block for this element.
An Elem can be packed into an integer array which is header_size + elem->n_nodes() in length.
For each element it is of the form [ level p_level r_flag p_r_flag etype processor_id subdomain_id self_ID parent_ID which_child node_0 node_1 ... node_n] We cannot use unsigned int because parent_ID can be negative
Unpacks this packed element. Returns a pointer to the new element. Takes a pointer to the parent, which is required unless this packed element is at level 0.
return the level of this packed element.
return the p-level of this packed element.
return the refinement state of this packed element.
return the p-refinement state of this packed element.
return the element type of this packed element.
return the processor id of this packed element.
return the subdomain id of this packed element.
return the id of this packed element.
return the parent id of this packed element.
return which child this packed element is.
return the number of nodes in this packed element
return the global index of the packed element's nth node.
The definition of the protected nested SideIter class.
The definition of the struct used for iterating over sides.
Definition at line 1368 of file elem.h.
References Elem::_children, Elem::_first_side(), Elem::_last_side(), Elem::_p_level, Elem::_parent, Elem::_pflag, Elem::_rflag, Elem::active(), Elem::build_side(), Elem::child(), Elem::compute_key(), Elem::dim(), Elem::hack_p_level(), Elem::has_children(), DofObject::id(), Elem::interior_parent(), libMesh::invalid_uint, Elem::level(), std::max(), Elem::max_descendant_p_level(), std::min(), Elem::n_children(), Elem::n_neighbors(), Elem::n_nodes(), Elem::neighbor(), Elem::node(), operator*(), Elem::operator==(), Elem::p_level(), Elem::p_refinement_flag(), Elem::parent(), DofObject::processor_id(), Elem::refinement_flag(), Elem::set_p_level(), Elem::set_p_refinement_flag(), Elem::set_parent(), Elem::set_refinement_flag(), Elem::subactive(), Elem::subdomain_id(), Elem::top_parent(), Elem::type(), Elem::type_to_n_nodes_map, and Elem::which_child_am_i().
Referenced by Elem::family_tree_by_subneighbor().
Definition at line 864 of file elem.C.
References Elem::build_edge(), Elem::n_children(), and Elem::n_edges().
Referenced by FEBase::coarsened_dof_values().
{
libmesh_assert (c < this->n_children());
libmesh_assert (e < this->n_edges());
AutoPtr<Elem> my_edge = this->build_edge(e);
AutoPtr<Elem> child_edge = this->build_edge(e);
// We're assuming that an overlapping child edge has the same
// number and orientation as its parent
return (child_edge->node(0) == my_edge->node(0) ||
child_edge->node(1) == my_edge->node(1));
}
Implemented in Hex, InfHex, InfPrism, Prism, Pyramid, Tet, Edge, InfQuad, Quad, Tri, NodeElem, and RemoteElem.
Referenced by Elem::active_family_tree_by_side(), FEBase::coarsened_dof_values(), and Elem::family_tree_by_side().
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Referenced by FE< Dim, T >::dofs_on_edge().
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Referenced by DofMap::constrain_p_dofs(), FE< Dim, T >::dofs_on_side(), and MeshTools::find_hanging_nodes_and_parents().
Reimplemented in RemoteElem.
Definition at line 238 of file elem.h.
Referenced by Elem::active_family_tree(), Elem::family_tree(), and Partitioner::set_parent_processor_ids().
{ return false; }
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Referenced by FEBase::coarsened_dof_values(), DofMap::constrain_p_dofs(), DofMap::dof_indices(), DofMap::old_dof_indices(), System::ProjectVector::operator()(), DofMap::reinit(), and HPCoarsenTest::select_refinement().
Implemented in Hex, Hex27, InfHex, InfHex18, InfPrism, Prism, Pyramid, Tet, Edge, InfQuad, Quad, Quad8, Quad9, Tri, Tri6, NodeElem, and RemoteElem.
Referenced by UnstructuredMesh::find_neighbors().
Definition at line 323 of file elem.C.
References Elem::n_vertices(), and Elem::point().
Referenced by Quad::quality(), InfHex::quality(), and Hex::quality().
{
libmesh_assert ( n1 < this->n_vertices() );
libmesh_assert ( n2 < this->n_vertices() );
return (this->point(n1) - this->point(n2)).size();
}
Referenced by MeshRefinement::_coarsen_elements(), Elem::active_family_tree_by_neighbor(), BoundaryInfo::add_side(), UnstructuredMesh::all_second_order(), BoundaryInfo::boundary_id(), JumpErrorEstimator::coarse_n_flux_faces_increment(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), MeshTools::find_hanging_nodes_and_parents(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_mean_stddev(), MeshRefinement::flag_elements_by_nelem_target(), Elem::is_ancestor_of(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::nullify_neighbors(), BoundaryInfo::remove_side(), BoundaryInfo::side_with_boundary_id(), MeshRefinement::test_level_one(), Elem::which_neighbor_am_i(), and LegacyXdrIO::write_mesh().
Definition at line 515 of file elem.C.
References Elem::n_neighbors(), Elem::neighbor(), Elem::parent(), remote_elem, Elem::subactive(), and Elem::which_neighbor_am_i().
Referenced by MeshTools::libmesh_assert_valid_neighbors().
{
for (unsigned int s=0; s<this->n_neighbors(); s++)
{
const Elem *neigh = this->neighbor(s);
// Any element might have a remote neighbor; checking
// to make sure that's not inaccurate is tough.
if (neigh == remote_elem)
continue;
if (neigh)
{
// Only subactive elements have subactive neighbors
libmesh_assert (this->subactive() || !neigh->subactive());
const Elem *elem = this;
// If we're subactive but our neighbor isn't, its
// return neighbor link will be to our first active
// ancestor OR to our inactive ancestor of the same
// level as neigh,
if (this->subactive() && !neigh->subactive())
{
for (elem = this; !elem->active();
elem = elem->parent())
libmesh_assert(elem);
}
unsigned int rev = neigh->which_neighbor_am_i(elem);
libmesh_assert (rev < neigh->n_neighbors());
if (this->subactive() && !neigh->subactive())
{
while (neigh->neighbor(rev) != elem)
{
libmesh_assert(elem->parent());
elem = elem->parent();
}
}
else
{
Elem *nn = neigh->neighbor(rev);
libmesh_assert(nn);
for (; elem != nn; elem = elem->parent())
libmesh_assert(elem);
}
}
else
{
const Elem *parent = this->parent();
if (parent)
libmesh_assert (!parent->neighbor(s));
}
}
}
Definition at line 503 of file elem.C.
References Elem::get_node(), Elem::n_nodes(), and DofObject::valid_id().
Referenced by MeshTools::libmesh_assert_valid_node_pointers().
{
libmesh_assert(this->valid_id());
for (unsigned int n=0; n != this->n_nodes(); ++n)
{
libmesh_assert(this->get_node(n));
libmesh_assert(this->get_node(n)->valid_id());
}
}
Definition at line 577 of file elem.C.
References Elem::_children, Elem::ancestor(), Elem::child(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_subneighbor(), Elem::has_children(), Elem::has_neighbor(), Elem::level(), Elem::n_children(), Elem::n_neighbors(), Elem::n_sides(), Elem::neighbor(), Elem::parent(), remote_elem, Elem::set_neighbor(), Elem::subactive(), Elem::which_child_am_i(), and Elem::which_neighbor_am_i().
Referenced by MeshCommunication::delete_remote_elements().
{
libmesh_assert (this != remote_elem);
// We need to have handled any children first
#if defined(LIBMESH_ENABLE_AMR) && defined(DEBUG)
if (this->has_children())
for (unsigned int c = 0; c != this->n_children(); ++c)
{
Elem *child = this->child(c);
libmesh_assert (child == remote_elem);
}
#endif
// Remotify any neighbor links
for (unsigned int s = 0; s != this->n_sides(); ++s)
{
Elem *neigh = this->neighbor(s);
if (neigh && neigh != remote_elem)
{
// My neighbor should never be more refined than me; my real
// neighbor would have been its parent in that case.
libmesh_assert(this->level() >= neigh->level());
if (this->level() == neigh->level() &&
neigh->has_neighbor(this))
{
#ifdef LIBMESH_ENABLE_AMR
// My neighbor may have descendants which also consider me a
// neighbor
std::vector<const Elem*> family;
neigh->family_tree_by_neighbor (family, this);
// FIXME - There's a lot of ugly const_casts here; we
// may want to make remote_elem non-const and create
// non-const versions of the family_tree methods
for (unsigned int i=0; i != family.size(); ++i)
{
Elem *n = const_cast<Elem*>(family[i]);
libmesh_assert (n);
if (n == remote_elem)
continue;
unsigned int my_s = n->which_neighbor_am_i(this);
libmesh_assert (my_s < n->n_neighbors());
libmesh_assert (n->neighbor(my_s) == this);
n->set_neighbor(my_s, const_cast<RemoteElem*>(remote_elem));
}
#else
unsigned int my_s = neigh->which_neighbor_am_i(this);
libmesh_assert (my_s < neigh->n_neighbors());
libmesh_assert (neigh->neighbor(my_s) == this);
neigh->set_neighbor(my_s, const_cast<RemoteElem*>(remote_elem));
#endif
}
#ifdef LIBMESH_ENABLE_AMR
// Even if my neighbor doesn't link back to me, it might
// have subactive descendants which do
else if (neigh->has_children())
{
// If my neighbor at the same level doesn't have me as a
// neighbor, I must be subactive
libmesh_assert(this->level() > neigh->level() ||
this->subactive());
// My neighbor must have some ancestor of mine as a
// neighbor
Elem *ancestor = this->parent();
libmesh_assert(ancestor);
while (!neigh->has_neighbor(ancestor))
{
ancestor = ancestor->parent();
libmesh_assert(ancestor);
}
// My neighbor may have descendants which consider me a
// neighbor
std::vector<const Elem*> family;
neigh->family_tree_by_subneighbor (family, ancestor, this);
// FIXME - There's a lot of ugly const_casts here; we
// may want to make remote_elem non-const and create
// non-const versions of the family_tree methods
for (unsigned int i=0; i != family.size(); ++i)
{
Elem *n = const_cast<Elem*>(family[i]);
libmesh_assert (n);
if (n == remote_elem)
continue;
unsigned int my_s = n->which_neighbor_am_i(this);
libmesh_assert (my_s < n->n_neighbors());
libmesh_assert (n->neighbor(my_s) == this);
n->set_neighbor(my_s, const_cast<RemoteElem*>(remote_elem));
}
}
#endif
}
}
#ifdef LIBMESH_ENABLE_AMR
// Remotify parent's child link
Elem *parent = this->parent();
if (parent && parent != remote_elem)
{
unsigned int me = parent->which_child_am_i(this);
libmesh_assert (parent->_children[me] == this);
parent->_children[me] = const_cast<RemoteElem*>(remote_elem);
}
#endif
}
Referenced by FEBase::coarsened_dof_values(), and Elem::is_ancestor_of().
Definition at line 1124 of file elem.C.
References Elem::active(), Elem::child(), Elem::COARSEN, Elem::has_neighbor(), std::min(), Elem::min_new_p_level_by_neighbor(), Elem::n_children(), Elem::p_level(), Elem::p_refinement_flag(), Elem::REFINE, remote_elem, and Elem::subactive().
Referenced by MeshRefinement::eliminate_unrefined_patches(), and Elem::min_new_p_level_by_neighbor().
{
libmesh_assert(!this->subactive());
libmesh_assert(neighbor->active());
// If we're an active element this is simple
if (this->active())
{
unsigned int new_p_level = this->p_level();
if (this->p_refinement_flag() == Elem::REFINE)
new_p_level += 1;
if (this->p_refinement_flag() == Elem::COARSEN)
{
libmesh_assert (new_p_level > 0);
new_p_level -= 1;
}
return std::min(current_min, new_p_level);
}
libmesh_assert(has_neighbor(neighbor));
unsigned int min_p_level = current_min;
for (unsigned int c=0; c<this->n_children(); c++)
{
const Elem* const child = this->child(c);
if (child && child != remote_elem)
if (child->has_neighbor(neighbor))
min_p_level =
child->min_new_p_level_by_neighbor(neighbor,
min_p_level);
}
return min_p_level;
}
Definition at line 1091 of file elem.C.
References Elem::active(), Elem::child(), Elem::has_neighbor(), std::min(), Elem::min_p_level_by_neighbor(), Elem::n_children(), Elem::p_level(), remote_elem, and Elem::subactive().
Referenced by FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), and Elem::min_p_level_by_neighbor().
{
libmesh_assert(!this->subactive());
libmesh_assert(neighbor->active());
// If we're an active element this is simple
if (this->active())
return std::min(current_min, this->p_level());
libmesh_assert(has_neighbor(neighbor));
// The p_level() of an ancestor element is already the minimum
// p_level() of its children - so if that's high enough, we don't
// need to examine any children.
if (current_min <= this->p_level())
return current_min;
unsigned int min_p_level = current_min;
for (unsigned int c=0; c<this->n_children(); c++)
{
const Elem* const child = this->child(c);
if (child != remote_elem && child->has_neighbor(neighbor))
min_p_level =
child->min_p_level_by_neighbor(neighbor,
min_p_level);
}
return min_p_level;
}
Implemented in Hex, InfHex, InfPrism, Prism, Pyramid, Tet, Edge, InfQuad, Quad, Quad8, Tri, NodeElem, and RemoteElem.
Referenced by Elem::active_family_tree(), Elem::active_family_tree_by_neighbor(), Elem::active_family_tree_by_side(), Elem::add_child(), HPCoarsenTest::add_projection(), UnstructuredMesh::all_first_order(), Elem::coarsen(), FEBase::coarsened_dof_values(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), Elem::family_tree(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_side(), Elem::family_tree_by_subneighbor(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_nelem_target(), Elem::has_ancestor_children(), Elem::is_ancestor_of(), Elem::is_child_on_edge(), MeshTools::libmesh_assert_no_links_to_elem(), MeshTools::libmesh_assert_valid_remote_elems(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), Elem::refine(), HPCoarsenTest::select_refinement(), Partitioner::set_parent_processor_ids(), MeshTools::Modification::smooth(), and XdrIO::write_serialized_connectivity().
Definition at line 538 of file dof_object.h.
References DofObject::_dof_ids, DofObject::_n_v_comp, DofObject::n_systems(), and DofObject::n_vars().
Referenced by DofMap::constrain_p_dofs(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), DofObject::dof_number(), DofObject::DofObject(), DofObject::invalidate_dofs(), DofObject::n_dofs(), DofMap::old_dof_indices(), DofMap::reinit(), DofObject::set_dof_number(), DofObject::set_n_comp(), DofMap::set_nonlocal_dof_objects(), and System::zero_variable().
{
libmesh_assert (s < this->n_systems());
libmesh_assert (_dof_ids != NULL);
libmesh_assert (_dof_ids[s] != NULL);
libmesh_assert (_n_v_comp != NULL);
libmesh_assert (_n_v_comp[s] != NULL);
# ifdef DEBUG
// Does this ever happen? I doubt it... 3/7/2003 (BSK)
if (var >= this->n_vars(s))
{
std::cout << 's=' << s << ', var=' << var << std::endl
<< 'this->n_vars(s)=' << this->n_vars(s) << std::endl
<< 'this->n_systems()=' << this->n_systems() << std::endl;
libmesh_error();
}
# endif
return static_cast<unsigned int>(_n_v_comp[s][var+1]);
}
Definition at line 425 of file dof_object.h.
References libMesh::invalid_uint, DofObject::n_comp(), DofObject::n_systems(), and DofObject::n_vars().
{
libmesh_assert (s < this->n_systems());
unsigned int num = 0;
// Count all variables
if (var == libMesh::invalid_uint)
for (unsigned int v=0; v<this->n_vars(s); v++)
num += this->n_comp(s,v);
// Only count specified variable
else
{
num = this->n_comp(s,var);
}
return num;
}
Implemented in Hex, InfHex, InfPrism, Prism, Pyramid, Tet, Edge, InfQuad, Quad, Tri, NodeElem, and RemoteElem.
Referenced by FEBase::coarsened_dof_values(), Elem::is_child_on_edge(), MeshRefinement::limit_level_mismatch_at_edge(), and System::ProjectVector::operator()().
Implemented in Hex, InfHex, InfPrism, Prism, Pyramid, Tet, Edge, Face, InfQuad, NodeElem, and RemoteElem.
Definition at line 301 of file elem.h.
References Elem::n_sides().
Referenced by MetisPartitioner::_do_partition(), DofMap::add_neighbors_to_send_list(), ParmetisPartitioner::build_graph(), InfElemBuilder::build_inf_elem(), Elem::child_neighbor(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), UnstructuredMesh::find_neighbors(), Elem::has_neighbor(), LaplaceMeshSmoother::init(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), Elem::libmesh_assert_valid_neighbors(), MeshTools::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_remote_elems(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), Elem::neighbor(), Elem::nullify_neighbors(), Elem::set_neighbor(), MeshTools::Modification::smooth(), MeshRefinement::test_level_one(), TetGenMeshInterface::triangulate_conformingDelaunayMesh(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and Elem::which_neighbor_am_i().
{ return this->n_sides(); }
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism, Prism15, Prism18, Pyramid, Tet10, Tet4, Edge, Edge3, Edge4, InfQuad4, InfQuad6, Quad, Quad8, Quad9, Tri, Tri6, NodeElem, and RemoteElem.
Referenced by MetisPartitioner::_do_partition(), DofMap::add_neighbors_to_send_list(), EquationSystems::build_discontinuous_solution_vector(), EquationSystems::build_solution_vector(), VTKIO::cells_to_vtk(), Elem::coarsen(), FEBase::coarsened_dof_values(), FEBase::compute_proj_constraints(), DofMap::constrain_p_dofs(), MeshTools::correct_node_proc_ids(), UnstructuredMesh::create_submesh(), MeshCommunication::delete_remote_elements(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), FE< Dim, T >::dofs_on_edge(), FE< Dim, T >::dofs_on_side(), FEMContext::elem_position_get(), FEMContext::elem_position_set(), UNVIO::element_out(), MeshTools::Modification::flatten(), Elem::get_node(), MeshTools::get_not_subactive_node_ids(), ParmetisPartitioner::initialize(), TreeNode< N >::insert(), Elem::is_ancestor_of(), Elem::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_node_procids(), MeshRefinement::limit_level_mismatch_at_node(), FE< Dim, T >::nodal_soln(), Elem::node(), DofMap::old_dof_indices(), System::ProjectVector::operator()(), Elem::operator==(), XdrIO::pack_element(), Elem::point(), TetGenMeshInterface::pointset_convexhull(), VTKIO::read(), UCDIO::read_implementation(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), Elem::refine(), FE< Dim, T >::reinit(), DofMap::reinit(), SerialMesh::renumber_nodes_and_elements(), ParallelMesh::renumber_nodes_and_elements(), Tet4::reselect_diagonal(), HPCoarsenTest::select_refinement(), Elem::set_node(), Partitioner::set_node_processor_ids(), LaplaceMeshSmoother::smooth(), MeshTools::Modification::smooth(), MeshTools::subdomain_bounding_box(), BoundaryInfo::sync(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), TetGenMeshInterface::triangulate_pointset(), GMVIO::write_ascii_new_impl(), Elem::write_connectivity(), ExodusII_IO_Helper::write_elements(), EnsightIO::write_geometry_ascii(), LegacyXdrIO::write_mesh(), GmshIO::write_mesh(), EnsightIO::write_scalar_ascii(), GnuPlotIO::write_solution(), and EnsightIO::write_vector_ascii().
Definition at line 76 of file reference_counter.h.
References ReferenceCounter::_n_objects.
Referenced by System::read_serialized_blocked_dof_objects(), and System::write_serialized_blocked_dof_objects().
{ return _n_objects; }
Definition at line 76 of file reference_counter.h.
References ReferenceCounter::_n_objects.
Referenced by System::read_serialized_blocked_dof_objects(), and System::write_serialized_blocked_dof_objects().
{ return _n_objects; }
Reimplemented in Hex20, Hex27, InfHex16, InfHex18, InfPrism12, Prism15, Prism18, Tet10, Edge3, Edge4, InfQuad6, Quad8, Quad9, and Tri6.
Definition at line 1209 of file elem.C.
Referenced by LaplaceMeshSmoother::smooth(), and MeshTools::Modification::smooth().
{
// for linear elements, always return 0
return 0;
}
Implemented in Hex, InfHex, InfPrism, Prism, Pyramid, Tet, Edge, InfQuad, Quad, Quad8, Tri, NodeElem, and RemoteElem.
Referenced by Elem::active_family_tree_by_side(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), FEMSystem::assemble_qoi(), FEMSystem::assemble_qoi_derivative(), FEMSystem::assembly(), MeshTools::Generation::build_cube(), MeshTools::Generation::build_delaunay_square(), MeshTools::Modification::change_boundary_id(), FEBase::coarsened_dof_values(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), UnstructuredMesh::create_submesh(), Elem::family_tree_by_side(), Elem::family_tree_by_subneighbor(), Patch::find_face_neighbors(), MeshTools::find_hanging_nodes_and_parents(), Elem::find_point_neighbors(), MeshTools::Modification::flatten(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::n_neighbors(), System::ProjectVector::operator()(), SparsityPattern::Build::operator()(), PostscriptIO::plot_quadratic_elem(), FEMSystem::postprocess(), GmshIO::read_mesh(), BoundaryInfo::sync(), XdrIO::write_serialized_bcs(), and DivaIO::write_stream().
the number of sub-elements this element may be broken down into for visualization purposes. For example, this returns 1 for a linear triangle, 4 for a quadratic (6-noded) triangle, etc...
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Referenced by GMVIO::write_ascii_new_impl(), GMVIO::write_ascii_old_impl(), Elem::write_connectivity(), and DivaIO::write_stream().
Definition at line 517 of file dof_object.h.
References DofObject::_n_systems.
Referenced by DofObject::add_system(), DofObject::clear_dofs(), DofMap::dof_indices(), DofObject::dof_number(), DofObject::DofObject(), DofObject::has_dofs(), DofObject::invalidate_dofs(), DofObject::n_comp(), DofObject::n_dofs(), DofObject::n_vars(), DofMap::old_dof_indices(), Elem::refine(), DofObject::set_dof_number(), DofObject::set_n_comp(), DofObject::set_n_systems(), and DofObject::set_n_vars().
{
return static_cast<unsigned int>(_n_systems);
}
Definition at line 525 of file dof_object.h.
References DofObject::_n_v_comp, and DofObject::n_systems().
Referenced by DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofObject::dof_number(), DofObject::DofObject(), DofObject::has_dofs(), DofObject::invalidate_dofs(), DofObject::n_comp(), DofObject::n_dofs(), DofObject::set_dof_number(), DofObject::set_n_comp(), DofObject::set_n_vars(), and DofMap::set_nonlocal_dof_objects().
{
libmesh_assert (s < this->n_systems());
libmesh_assert (_n_v_comp != NULL);
if (_n_v_comp[s] == NULL)
return 0;
return static_cast<unsigned int>(_n_v_comp[s][0]);
}
Implemented in Hex, InfHex, InfPrism, Prism, Pyramid, Tet, Edge, InfQuad, Quad, Tri, NodeElem, and RemoteElem.
Referenced by UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), InfElemBuilder::build_inf_elem(), Elem::centroid(), Elem::contains_vertex_of(), Elem::hmax(), Elem::hmin(), Elem::length(), origin(), PostscriptIO::plot_linear_elem(), LaplaceMeshSmoother::smooth(), MeshTools::Modification::smooth(), and GmshIO::write_post().
Definition at line 1213 of file elem.h.
References Elem::_neighbors, and Elem::n_neighbors().
Referenced by MetisPartitioner::_do_partition(), DofMap::add_neighbors_to_send_list(), FEMSystem::assemble_qoi(), FEMSystem::assemble_qoi_derivative(), FEMSystem::assembly(), MeshTools::Generation::build_delaunay_square(), ParmetisPartitioner::build_graph(), InfElemBuilder::build_inf_elem(), Elem::child_neighbor(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), UnstructuredMesh::create_submesh(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), Elem::family_tree_by_subneighbor(), Patch::find_face_neighbors(), MeshTools::find_hanging_nodes_and_parents(), UnstructuredMesh::find_neighbors(), Elem::find_point_neighbors(), MeshTools::Modification::flatten(), Elem::has_neighbor(), LaplaceMeshSmoother::init(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), Elem::libmesh_assert_valid_neighbors(), MeshTools::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_remote_elems(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::nullify_neighbors(), SparsityPattern::Build::operator()(), FEMSystem::postprocess(), GmshIO::read_mesh(), REINIT_ERROR(), MeshTools::Modification::smooth(), BoundaryInfo::sync(), MeshRefinement::test_level_one(), TetGenMeshInterface::triangulate_conformingDelaunayMesh(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), Elem::which_neighbor_am_i(), XdrIO::write_serialized_bcs(), GnuPlotIO::write_solution(), and DivaIO::write_stream().
{
libmesh_assert (i < this->n_neighbors());
return _neighbors[i];
}
Reimplemented in RemoteElem.
Definition at line 1164 of file elem.h.
References Elem::_nodes, DofObject::id(), DofObject::invalid_id, and Elem::n_nodes().
Referenced by DofMap::add_neighbors_to_send_list(), EquationSystems::build_solution_vector(), FEBase::compute_face_map(), Tri6::connectivity(), Tri3::connectivity(), Quad9::connectivity(), Quad8::connectivity(), Quad4::connectivity(), InfQuad6::connectivity(), InfQuad4::connectivity(), InfEdge2::connectivity(), Edge4::connectivity(), Edge3::connectivity(), Edge2::connectivity(), Tet4::connectivity(), Tet10::connectivity(), Pyramid5::connectivity(), Prism6::connectivity(), Prism18::connectivity(), Prism15::connectivity(), InfPrism6::connectivity(), InfPrism12::connectivity(), InfHex8::connectivity(), InfHex18::connectivity(), InfHex16::connectivity(), Hex8::connectivity(), Hex27::connectivity(), Hex20::connectivity(), UnstructuredMesh::copy_nodes_and_elements(), UnstructuredMesh::create_submesh(), MeshCommunication::delete_remote_elements(), MeshTools::find_hanging_nodes_and_parents(), MeshTools::get_not_subactive_node_ids(), Elem::is_ancestor_of(), Tri6::key(), Tri::key(), Quad9::key(), Quad8::key(), Quad::key(), InfQuad::key(), Edge::key(), Tet::key(), Pyramid::key(), Prism::key(), InfPrism::key(), InfHex18::key(), InfHex::key(), Hex27::key(), Hex::key(), MeshRefinement::limit_level_mismatch_at_node(), Elem::operator==(), XdrIO::pack_element(), SerialMesh::renumber_nodes_and_elements(), ParallelMesh::renumber_nodes_and_elements(), LaplaceMeshSmoother::smooth(), MeshTools::subdomain_bounding_box(), BoundaryInfo::sync(), GMVIO::write_ascii_new_impl(), Elem::write_connectivity(), ExodusII_IO_Helper::write_elements(), EnsightIO::write_geometry_ascii(), LegacyXdrIO::write_mesh(), GmshIO::write_mesh(), GmshIO::write_post(), EnsightIO::write_scalar_ascii(), GnuPlotIO::write_solution(), DivaIO::write_stream(), and EnsightIO::write_vector_ascii().
{
libmesh_assert (i < this->n_nodes());
libmesh_assert (_nodes[i] != NULL);
libmesh_assert (_nodes[i]->id() != Node::invalid_id);
return _nodes[i]->id();
}
Definition at line 1183 of file elem.C.
References Elem::level(), Elem::n_neighbors(), Elem::neighbor(), remote_elem, Elem::set_neighbor(), and Elem::which_neighbor_am_i().
Referenced by MeshRefinement::_coarsen_elements().
{
// Tell any of my neighbors about my death...
// Looks strange, huh?
for (unsigned int n=0; n<this->n_neighbors(); n++)
{
Elem* neighbor = this->neighbor(n);
if (neighbor && neighbor != remote_elem)
{
// Note: it is possible that I see the neighbor
// (which is coarser than me)
// but they don't see me, so avoid that case.
if (neighbor->level() == this->level())
{
const unsigned int w_n_a_i = neighbor->which_neighbor_am_i(this);
libmesh_assert (w_n_a_i < neighbor->n_neighbors());
neighbor->set_neighbor(w_n_a_i, NULL);
this->set_neighbor(n, NULL);
}
}
}
}
Definition at line 1271 of file elem.h.
References Elem::has_neighbor().
{
// By convention, the element is on the boundary
// if it has a NULL neighbor.
return this->has_neighbor(NULL);
}
Reimplemented from DofObject.
Definition at line 334 of file elem.C.
References Elem::n_nodes(), and Elem::node().
Referenced by Elem::is_ancestor_of().
{
// Cast rhs to an Elem*
const Elem* rhs_elem = dynamic_cast<const Elem*>(&rhs);
// If we cannot cast to an Elem*, rhs must be a Node
if(rhs_elem == static_cast<const Elem*>(NULL))
return false;
// libmesh_assert (n_nodes());
// libmesh_assert (rhs.n_nodes());
// // Elements can only be equal if they
// // contain the same number of nodes.
// if (this->n_nodes() == rhs.n_nodes())
// {
// // Create a set that contains our global
// // node numbers and those of our neighbor.
// // If the set is the same size as the number
// // of nodes in both elements then they must
// // be connected to the same nodes.
// std::set<unsigned int> nodes_set;
// for (unsigned int n=0; n<this->n_nodes(); n++)
// {
// nodes_set.insert(this->node(n));
// nodes_set.insert(rhs.node(n));
// }
// // If this passes the elements are connected
// // to the same global nodes
// if (nodes_set.size() == this->n_nodes())
// return true;
// }
// // If we get here it is because the elements either
// // do not have the same number of nodes or they are
// // connected to different nodes. Either way they
// // are not the same element
// return false;
// Useful typedefs
typedef std::vector<unsigned int>::iterator iterator;
// Elements can only be equal if they
// contain the same number of nodes.
// However, we will only test the vertices,
// which is sufficient & cheaper
if (this->n_nodes() == rhs_elem->n_nodes())
{
// The number of nodes in the element
const unsigned int nn = this->n_nodes();
// Create a vector that contains our global
// node numbers and those of our neighbor.
// If the sorted, unique vector is the same size
// as the number of nodes in both elements then
// they must be connected to the same nodes.
//
// The vector will be no larger than 2*n_nodes(),
// so we might as well reserve the space.
std::vector<unsigned int> common_nodes;
common_nodes.reserve (2*nn);
// Add the global indices of the nodes
for (unsigned int n=0; n<nn; n++)
{
common_nodes.push_back (this->node(n));
common_nodes.push_back (rhs_elem->node(n));
}
// Sort the vector and find out how long
// the sorted vector is.
std::sort (common_nodes.begin(), common_nodes.end());
iterator new_end = std::unique (common_nodes.begin(),
common_nodes.end());
const int new_size = std::distance (common_nodes.begin(),
new_end);
// If this passes the elements are connected
// to the same global vertex nodes
if (new_size == static_cast<int>(nn))
return true;
}
// If we get here it is because the elements either
// do not have the same number of nodes or they are
// connected to different nodes. Either way they
// are not the same element
return false;
}
Reimplemented from Elem.
Definition at line 78 of file cell_inf.h.
References Elem::n_vertices(), and Elem::point().
Referenced by InfPrism6::contains_point(), and InfHex8::contains_point().
{
return ( this->point(0)*2. - this->point( this->n_vertices()/2 ) );
}
Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), UnstructuredMesh::all_first_order(), Elem::coarsen(), FEBase::coarsened_dof_values(), FEInterface::compute_data(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), DofMap::constrain_p_dofs(), DofMap::dof_indices(), FE< Dim, T >::dofs_on_edge(), FE< Dim, T >::dofs_on_side(), FE< Dim, T >::edge_reinit(), Elem::Elem(), MeshRefinement::eliminate_unrefined_patches(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), Elem::is_ancestor_of(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), FE< Dim, T >::nodal_soln(), DofMap::old_dof_indices(), System::ProjectVector::operator()(), PatchRecoveryErrorEstimator::EstimateError::operator()(), XdrIO::pack_element(), Elem::refine(), InfFE< Dim, T_radial, T_map >::reinit(), FEXYZ< Dim >::reinit(), FE< Dim, T >::reinit(), DofMap::reinit(), REINIT_ERROR(), HPCoarsenTest::select_refinement(), FE< Dim, T >::shape(), FE< Dim, T >::shape_deriv(), FE< Dim, T >::shape_second_deriv(), MeshRefinement::test_level_one(), and GMVIO::write_ascii_new_impl().
Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), UnstructuredMesh::all_first_order(), UnstructuredMesh::copy_nodes_and_elements(), MeshRefinement::eliminate_unrefined_patches(), Elem::is_ancestor_of(), ParallelMesh::libmesh_assert_valid_parallel_flags(), MeshTools::libmesh_assert_valid_refinement_flags(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), DofMap::old_dof_indices(), System::ProjectVector::operator()(), Elem::refine(), and MeshRefinement::test_unflagged().
Referenced by LinearPartitioner::_do_partition(), UniformRefinementEstimator::_estimate_error(), Elem::add_child(), UnstructuredMesh::all_first_order(), Edge::build_side(), Elem::child_neighbor(), FEBase::compute_face_map(), UnstructuredMesh::contract(), UnstructuredMesh::copy_nodes_and_elements(), MeshRefinement::create_parent_error_vector(), MeshCommunication::delete_remote_elements(), Elem::Elem(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), Elem::family_tree_by_subneighbor(), MeshTools::find_hanging_nodes_and_parents(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), Elem::libmesh_assert_valid_neighbors(), MeshTools::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_remote_elems(), MeshRefinement::limit_level_mismatch_at_edge(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), System::ProjectVector::operator()(), Elem::refine(), HPCoarsenTest::select_refinement(), Partitioner::set_parent_processor_ids(), Edge::side(), MeshTools::Modification::smooth(), Parallel::sync_element_data_by_parent_id(), Elem::which_neighbor_am_i(), and LegacyXdrIO::write_mesh().
Reimplemented in RemoteElem.
Definition at line 1142 of file elem.h.
References Elem::_nodes, DofObject::invalid_id, and Elem::n_nodes().
Referenced by PostscriptIO::_compute_edge_bezier_coeffs(), Elem::coarsen(), FEBase::compute_affine_map(), InfFE< Dim, T_radial, T_map >::compute_data(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEXYZ< Dim >::compute_face_values(), FEBase::compute_single_point_map(), InfQuad4::contains_point(), InfPrism6::contains_point(), InfHex8::contains_point(), Elem::contains_vertex_of(), UnstructuredMesh::create_submesh(), FEMContext::elem_position_get(), FEMContext::elem_position_set(), Tet4::embedding_matrix(), Tet10::embedding_matrix(), Tri6::has_affine_map(), Quad9::has_affine_map(), Quad8::has_affine_map(), Quad4::has_affine_map(), Edge4::has_affine_map(), Edge3::has_affine_map(), Tet10::has_affine_map(), Prism6::has_affine_map(), Prism18::has_affine_map(), Prism15::has_affine_map(), Hex8::has_affine_map(), Hex27::has_affine_map(), Hex20::has_affine_map(), Elem::hmax(), Elem::hmin(), TreeNode< N >::insert(), InfFE< Dim, T_radial, T_map >::inverse_map(), Elem::length(), InfFE< Dim, T_radial, T_map >::map(), FE< Dim, T >::map(), FE< Dim, T >::map_eta(), FE< Dim, T >::map_xi(), FE< Dim, T >::map_zeta(), Tri3::min_and_max_angle(), Tet4::min_and_max_angle(), FE< Dim, T >::nodal_soln(), FEMSystem::numerical_jacobian(), System::ProjectVector::operator()(), InfQuad::origin(), InfEdge2::origin(), origin(), PostscriptIO::plot_linear_elem(), Elem::refine(), FE< Dim, T >::reinit(), Tet4::reselect_optimal_diagonal(), FE< Dim, T >::shape(), FE< Dim, T >::shape_deriv(), MeshTools::Modification::smooth(), Quad4::volume(), Edge3::volume(), Edge2::volume(), EnsightIO::write_geometry_ascii(), and GmshIO::write_post().
{
libmesh_assert (i < this->n_nodes());
libmesh_assert (_nodes[i] != NULL);
libmesh_assert (_nodes[i]->id() != Node::invalid_id);
return *_nodes[i];
}
Reimplemented in RemoteElem.
Definition at line 1154 of file elem.h.
References Elem::_nodes, and Elem::n_nodes().
{
libmesh_assert (i < this->n_nodes());
return *_nodes[i];
}
Definition at line 83 of file reference_counter.C.
References ReferenceCounter::get_info().
{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
std::cout << ReferenceCounter::get_info();
#endif
}
Definition at line 83 of file reference_counter.C.
References ReferenceCounter::get_info().
{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
std::cout << ReferenceCounter::get_info();
#endif
}
Definition at line 473 of file dof_object.h.
References DofObject::_processor_id.
Referenced by SFCPartitioner::_do_partition(), MetisPartitioner::_do_partition(), LinearPartitioner::_do_partition(), CentroidPartitioner::_do_partition(), GMVIO::_read_materials(), ParallelMesh::add_elem(), Patch::add_local_face_neighbors(), Patch::add_local_point_neighbors(), DofMap::add_neighbors_to_send_list(), ParallelMesh::add_node(), SerialMesh::add_point(), ParallelMesh::add_point(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), ParmetisPartitioner::assign_partitioning(), Patch::build_around_element(), InfElemBuilder::build_inf_elem(), UnstructuredMesh::copy_nodes_and_elements(), MeshTools::correct_node_proc_ids(), UnstructuredMesh::create_submesh(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), Elem::Elem(), UnstructuredMesh::find_neighbors(), MeshTools::Modification::flatten(), DofObject::invalidate_processor_id(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_valid_elem_ids(), MeshRefinement::make_coarsening_compatible(), XdrIO::pack_element(), Partitioner::partition_unpartitioned_elements(), DofObject::processor_id(), Nemesis_IO::read(), XdrIO::read_serialized_connectivity(), MeshData::read_xdr(), Elem::refine(), Partitioner::set_node_processor_ids(), DofMap::set_nonlocal_dof_objects(), Partitioner::set_parent_processor_ids(), BoundaryInfo::sync(), Parallel::sync_dofobject_data_by_id(), Parallel::sync_element_data_by_parent_id(), GmshIO::write_mesh(), and XdrIO::write_serialized_connectivity().
{
return _processor_id;
}
Definition at line 481 of file dof_object.h.
References DofObject::_processor_id.
{
return _processor_id;
}
Definition at line 489 of file dof_object.h.
References DofObject::id(), and DofObject::processor_id().
{
#ifdef DEBUG
if (id != static_cast<unsigned int>(static_cast<unsigned short int>(id)))
{
std::cerr << 'ERROR: id too large for unsigned short int!' << std::endl
<< 'Recompile with DofObject::_processor_id larger!' << std::endl;
libmesh_error();
}
#endif
this->processor_id() = id;
}
Reimplemented in Hex, InfHex, Tet, InfQuad, Quad, and Tri.
Definition at line 452 of file elem.h.
{ libmesh_error(); return std::make_pair(0.,0.); }
I don't know what to do for this metric.
Reimplemented in Hex, InfHex, Tet, InfQuad, Quad, and Tri.
Definition at line 768 of file elem.C.
{
switch (q)
{
default:
{
libmesh_here();
std::cerr << 'ERROR: unknown quality metric: '
<< q
<< std::endl
<< 'Cowardly returning 1.'
<< std::endl;
return 1.;
}
}
// Will never get here...
libmesh_error();
return 0.;
}
The following functions only apply when AMR is enabled and thus are not present otherwise.
Definition at line 40 of file elem_refinement.C.
References Elem::_children, Elem::active(), MeshRefinement::add_elem(), MeshRefinement::add_point(), Elem::ancestor(), Elem::build(), Elem::child(), Elem::embedding_matrix(), Elem::get_node(), Elem::hmin(), Elem::INACTIVE, Elem::JUST_REFINED, Elem::n_children(), Elem::n_nodes(), DofObject::n_systems(), Elem::p_level(), Elem::p_refinement_flag(), Elem::parent(), Elem::point(), DofObject::processor_id(), Elem::REFINE, Elem::refinement_flag(), DofObject::set_n_systems(), Elem::set_node(), Elem::set_p_level(), Elem::set_p_refinement_flag(), Elem::set_refinement_flag(), Elem::subactive(), and Elem::type().
{
libmesh_assert (this->refinement_flag() == Elem::REFINE);
libmesh_assert (this->active());
// Create my children if necessary
if (!_children)
{
_children = new Elem*[this->n_children()];
unsigned int parent_p_level = this->p_level();
for (unsigned int c=0; c<this->n_children(); c++)
{
_children[c] = Elem::build(this->type(), this).release();
_children[c]->set_refinement_flag(Elem::JUST_REFINED);
_children[c]->set_p_level(parent_p_level);
_children[c]->set_p_refinement_flag(this->p_refinement_flag());
}
// Compute new nodal locations
// and asssign nodes to children
// Make these static. It is unlikely the
// sizes will change from call to call, so having these
// static should save on reallocations
std::vector<std::vector<Point> > p (this->n_children());
std::vector<std::vector<Node*> > nodes(this->n_children());
// compute new nodal locations
for (unsigned int c=0; c<this->n_children(); c++)
{
Elem *child = this->child(c);
p[c].resize (child->n_nodes());
nodes[c].resize(child->n_nodes());
for (unsigned int nc=0; nc<child->n_nodes(); nc++)
{
// zero entries
p[c][nc].zero();
nodes[c][nc] = NULL;
for (unsigned int n=0; n<this->n_nodes(); n++)
{
// The value from the embedding matrix
const float em_val = this->embedding_matrix(c,nc,n);
if (em_val != 0.)
{
p[c][nc].add_scaled (this->point(n), em_val);
// We may have found the node, in which case we
// won't need to look it up later.
if (em_val == 1.)
nodes[c][nc] = this->get_node(n);
}
}
}
// assign nodes to children & add them to the mesh
const Real pointtol = this->hmin() * TOLERANCE;
for (unsigned int nc=0; nc<child->n_nodes(); nc++)
{
if (nodes[c][nc] != NULL)
{
child->set_node(nc) = nodes[c][nc];
}
else
{
child->set_node(nc) =
mesh_refinement.add_point(p[c][nc],
child->processor_id(),
pointtol);
child->get_node(nc)->set_n_systems
(this->n_systems());
}
}
mesh_refinement.add_elem (child);
child->set_n_systems(this->n_systems());
}
}
else
{
unsigned int parent_p_level = this->p_level();
for (unsigned int c=0; c<this->n_children(); c++)
{
Elem *child = this->child(c);
libmesh_assert(child->subactive());
child->set_refinement_flag(Elem::JUST_REFINED);
child->set_p_level(parent_p_level);
child->set_p_refinement_flag(this->p_refinement_flag());
}
}
// Un-set my refinement flag now
this->set_refinement_flag(Elem::INACTIVE);
this->set_p_refinement_flag(Elem::INACTIVE);
for (unsigned int c=0; c<this->n_children(); c++)
{
libmesh_assert(this->child(c)->parent() == this);
libmesh_assert(this->child(c)->active());
}
libmesh_assert (this->ancestor());
}
Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), Elem::active(), UnstructuredMesh::all_first_order(), Elem::coarsen(), MeshRefinement::coarsen_elements(), Elem::contract(), UnstructuredMesh::copy_nodes_and_elements(), MeshRefinement::eliminate_unrefined_patches(), Elem::is_ancestor_of(), ParallelMesh::libmesh_assert_valid_parallel_flags(), MeshTools::libmesh_assert_valid_refinement_flags(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), MeshRefinement::make_refinement_compatible(), DofMap::old_dof_indices(), System::ProjectVector::operator()(), Elem::refine(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), DofMap::reinit(), Tet4::reselect_diagonal(), HPSingularity::select_refinement(), HPCoarsenTest::select_refinement(), and MeshRefinement::test_unflagged().
Reimplemented in Hex20, Hex27, InfHex16, InfHex18, InfPrism12, Prism15, Prism18, Tet10, Edge3, Edge4, InfQuad6, Quad8, Quad9, and Tri6.
Definition at line 1217 of file elem.C.
Referenced by LaplaceMeshSmoother::smooth(), and MeshTools::Modification::smooth().
{
// for linear elements, always return 0
return 0;
}
Reimplemented in Hex20, Hex27, InfHex16, InfHex18, InfPrism12, Prism15, Prism18, Tet10, Edge3, InfQuad6, Quad8, Quad9, and Tri6.
Definition at line 1227 of file elem.C.
{
// for linear elements, always return 0
return std::pair<unsigned short int, unsigned short int>(0,0);
}
For some elements, there exist two second-order equivalents, e.g. for Quad4 there is Quad8 and Quad9. When the optional full_ordered is true, then QUAD9 is returned. When full_ordered is false, then QUAD8 is returned.
Definition at line 1285 of file elem.C.
References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INFEDGE2, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMeshEnums::INVALID_ELEM, libMeshEnums::PRISM15, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::PYRAMID5, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.
Referenced by UnstructuredMesh::all_second_order().
{
/* for second-order elements, always return
INVALID_ELEM
* since second-order elements should not be converted
* into something else. Only linear elements should
* return something sensible here
*/
switch (et)
{
case EDGE2:
{
// full_ordered not relevant
return EDGE3;
}
case TRI3:
{
// full_ordered not relevant
return TRI6;
}
case QUAD4:
{
if (full_ordered)
return QUAD9;
else
return QUAD8;
}
case TET4:
{
// full_ordered not relevant
return TET10;
}
case HEX8:
{
// see below how this correlates with INFHEX8
if (full_ordered)
return HEX27;
else
return HEX20;
}
case PRISM6:
{
if (full_ordered)
return PRISM18;
else
return PRISM15;
}
case PYRAMID5:
{
// libmesh_error();
return INVALID_ELEM;
}
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
// infinite elements
case INFEDGE2:
{
// libmesh_error();
return INVALID_ELEM;
}
case INFQUAD4:
{
// full_ordered not relevant
return INFQUAD6;
}
case INFHEX8:
{
/*
* Note that this matches with
Hex8:
* For full-ordered,
InfHex18 and
Hex27
* belong together, and for not full-ordered,
*
InfHex16 and
Hex20 belong together.
*/
if (full_ordered)
return INFHEX18;
else
return INFHEX16;
}
case INFPRISM6:
{
// full_ordered not relevant
return INFPRISM12;
}
#endif
default:
{
// second-order element
return INVALID_ELEM;
}
}
}
Definition at line 338 of file dof_object.C.
References DofObject::_dof_ids, DofObject::dof_number(), DofObject::invalid_id, DofObject::n_comp(), DofObject::n_systems(), and DofObject::n_vars().
Referenced by DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofObject::invalidate_dofs(), DofMap::reinit(), and DofMap::set_nonlocal_dof_objects().
{
libmesh_assert (s < this->n_systems());
libmesh_assert (var < this->n_vars(s));
libmesh_assert (_dof_ids != NULL);
libmesh_assert (_dof_ids[s] != NULL);
libmesh_assert (comp < this->n_comp(s,var));
//We intend to change all dof numbers together or not at all
if (comp)
libmesh_assert ((dn == invalid_id && _dof_ids[s][var] == invalid_id) ||
(dn == _dof_ids[s][var] + comp));
else
_dof_ids[s][var] = dn;
libmesh_assert(this->dof_number(s, var, comp) == dn);
}
Definition at line 458 of file dof_object.h.
References DofObject::_id.
Referenced by GMVIO::_read_one_cell(), SerialMesh::add_elem(), ParallelMesh::add_elem(), SerialMesh::add_node(), ParallelMesh::add_node(), UnstructuredMesh::all_first_order(), MeshCommunication::assign_global_indices(), InfElemBuilder::build_inf_elem(), UNVIO::element_in(), DofObject::invalidate_id(), Node::Node(), VTKIO::read(), Nemesis_IO::read(), UCDIO::read_implementation(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), OFFIO::read_stream(), MatlabIO::read_stream(), SerialMesh::renumber_elem(), ParallelMesh::renumber_elem(), SerialMesh::renumber_node(), ParallelMesh::renumber_node(), and SerialMesh::renumber_nodes_and_elements().
{
return _id;
}
Definition at line 143 of file dof_object.h.
References DofObject::id(), and DofObject::set_id().
Referenced by DofObject::set_id().
{ this->set_id() = id; }
Definition at line 298 of file dof_object.C.
References DofObject::_dof_ids, DofObject::_n_v_comp, DofObject::invalid_id, DofObject::n_comp(), DofObject::n_systems(), and DofObject::n_vars().
Referenced by DofMap::reinit(), and DofMap::set_nonlocal_dof_objects().
{
libmesh_assert (s < this->n_systems());
libmesh_assert (var < this->n_vars(s));
libmesh_assert (_dof_ids != NULL);
libmesh_assert (_dof_ids[s] != NULL);
// Check for trivial return
if (ncomp == this->n_comp(s,var)) return;
#ifdef DEBUG
if (ncomp != static_cast<unsigned int>(static_cast<unsigned char>(ncomp)))
{
std::cerr << 'Unsigned char not big enough to hold ncomp!' << std::endl
<< 'Recompile with _n_v_comp set to a bigger type!'
<< std::endl;
libmesh_error();
}
#endif
// We use (invalid_id - 1) to signify no
// components for this object
if (ncomp == 0)
{
_dof_ids[s][var] = (invalid_id - 1);
}
libmesh_assert (_n_v_comp != NULL);
libmesh_assert (_n_v_comp[s] != NULL);
_n_v_comp[s][var+1] = static_cast<unsigned char>(ncomp);
}
Definition at line 148 of file dof_object.C.
References DofObject::_dof_ids, DofObject::_n_systems, DofObject::_n_v_comp, DofObject::clear_dofs(), and DofObject::n_systems().
Referenced by Elem::refine().
{
// Check for trivial return
if (ns == this->n_systems()) return;
#ifdef DEBUG
if (ns != static_cast<unsigned int>(static_cast<unsigned char>(ns)))
{
std::cerr << 'Unsigned char not big enough to hold ns!' << std::endl
<< 'Recompile with _n_systems set to a bigger type!'
<< std::endl;
libmesh_error();
}
#endif
// Clear any existing data. This is safe to call
// even if we don't have any data.
this->clear_dofs();
// Set the new number of systems
_n_systems = static_cast<unsigned char>(ns);
// Allocate storage for the systems
_n_v_comp = new unsigned char* [this->n_systems()];
_dof_ids = new unsigned int* [this->n_systems()];
// No variables have been declared yet.
for (unsigned int s=0; s<this->n_systems(); s++)
{
_n_v_comp[s] = NULL;
_dof_ids[s] = NULL;
}
}
Definition at line 241 of file dof_object.C.
References DofObject::_dof_ids, DofObject::_n_v_comp, DofObject::invalid_id, DofObject::n_systems(), and DofObject::n_vars().
{
libmesh_assert (s < this->n_systems());
libmesh_assert (_n_v_comp != NULL);
libmesh_assert (_dof_ids != NULL);
#ifdef DEBUG
if (nvars != static_cast<unsigned int>(static_cast<unsigned char>(nvars)))
{
std::cerr << 'Unsigned char not big enough to hold nvar!' << std::endl
<< 'Recompile with _n_vars set to a bigger type!'
<< std::endl;
libmesh_error();
}
#endif
// If we already have memory allocated clear it.
if (this->n_vars(s) != 0)
{
libmesh_assert (_n_v_comp[s] != NULL); delete [] _n_v_comp[s]; _n_v_comp[s] = NULL;
libmesh_assert (_dof_ids[s] != NULL); delete [] _dof_ids[s]; _dof_ids[s] = NULL;
}
// Reset the number of variables in the system
if (nvars > 0)
{
libmesh_assert (_n_v_comp[s] == NULL);
libmesh_assert (_dof_ids[s] == NULL);
_n_v_comp[s] = new unsigned char [nvars+1];
_dof_ids[s] = new unsigned int [nvars];
_n_v_comp[s][0] = static_cast<unsigned char>(nvars);
libmesh_assert (nvars == this->n_vars(s));
for (unsigned int v=0; v<this->n_vars(s); v++)
{
_n_v_comp[s][v+1] = 0;
_dof_ids[s][v] = invalid_id - 1;
}
}
else // (nvars == 0)
{
libmesh_assert (_n_v_comp[s] == NULL);
libmesh_assert (_dof_ids[s] == NULL);
}
}
Definition at line 1223 of file elem.h.
References Elem::_neighbors, and Elem::n_neighbors().
Referenced by UnstructuredMesh::find_neighbors(), Elem::make_links_to_me_remote(), and Elem::nullify_neighbors().
{
libmesh_assert (i < this->n_neighbors());
_neighbors[i] = n;
}
Reimplemented in RemoteElem.
Definition at line 1187 of file elem.h.
References Elem::_nodes, and Elem::n_nodes().
Referenced by GMVIO::_read_one_cell(), UnstructuredMesh::all_first_order(), MeshTools::Modification::all_tri(), MeshTools::Generation::build_cube(), InfElemBuilder::build_inf_elem(), Tri6::build_side(), Tri3::build_side(), Quad9::build_side(), Quad8::build_side(), Quad4::build_side(), InfQuad6::build_side(), Edge::build_side(), Triangle::copy_tri_to_mesh(), UnstructuredMesh::create_submesh(), UNVIO::element_in(), MeshTools::Modification::flatten(), TetGenMeshInterface::pointset_convexhull(), VTKIO::read(), Nemesis_IO::read(), ExodusII_IO::read(), UCDIO::read_implementation(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), MatlabIO::read_stream(), Elem::refine(), Tet4::reselect_diagonal(), Tri::side(), Quad::side(), InfQuad::side(), Edge::side(), Tet::side(), Pyramid::side(), Prism::side(), InfPrism::side(), InfHex::side(), Hex::side(), BoundaryInfo::sync(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and TetGenMeshInterface::triangulate_pointset().
{
libmesh_assert (i < this->n_nodes());
return _nodes[i];
}
Definition at line 133 of file dof_object.C.
References DofObject::clear_old_dof_object(), DofObject::DofObject(), and DofObject::old_dof_object.
Referenced by DofMap::reinit().
{
this->clear_old_dof_object();
libmesh_assert (this->old_dof_object == NULL);
// Make a new DofObject, assign a copy of
this.
// Make sure the copy ctor for DofObject works!!
this->old_dof_object = new DofObject(*this);
}
Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), UnstructuredMesh::all_first_order(), Elem::coarsen(), Elem::Elem(), Elem::is_ancestor_of(), Elem::refine(), and DofMap::reinit().
Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), UnstructuredMesh::all_first_order(), MeshRefinement::coarsen_elements(), Elem::Elem(), MeshRefinement::eliminate_unrefined_patches(), Elem::is_ancestor_of(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), MeshRefinement::make_refinement_compatible(), Elem::refine(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), HPSingularity::select_refinement(), and HPCoarsenTest::select_refinement().
Referenced by UnstructuredMesh::all_first_order(), Elem::is_ancestor_of(), and BoundaryInfo::sync().
Referenced by UnstructuredMesh::all_first_order(), Elem::coarsen(), MeshRefinement::coarsen_elements(), Elem::contract(), Elem::Elem(), MeshRefinement::eliminate_unrefined_patches(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_mean_stddev(), MeshRefinement::flag_elements_by_nelem_target(), Elem::is_ancestor_of(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), MeshRefinement::make_refinement_compatible(), LegacyXdrIO::read_mesh(), XdrIO::read_serialized_connectivity(), Elem::refine(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), HPSingularity::select_refinement(), and HPCoarsenTest::select_refinement().
Implemented in Hex, InfHex, InfPrism, Prism, Pyramid, Tet, Edge, InfQuad, Quad, Tri, NodeElem, and RemoteElem.
Referenced by UnstructuredMesh::find_neighbors().
Definition at line 1321 of file elem.h.
References Elem::active(), Elem::child(), Elem::has_children(), and Elem::subactive().
Referenced by Elem::active_family_tree(), Elem::active_family_tree_by_neighbor(), Elem::active_family_tree_by_side(), HPCoarsenTest::add_projection(), UnstructuredMesh::contract(), Elem::family_tree(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_side(), Elem::family_tree_by_subneighbor(), UnstructuredMesh::find_neighbors(), MeshTools::get_not_subactive_node_ids(), Elem::is_ancestor_of(), Elem::libmesh_assert_valid_neighbors(), Elem::make_links_to_me_remote(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), Elem::refine(), Elem::subactive(), and LegacyXdrIO::write_mesh().
{
#ifdef LIBMESH_ENABLE_AMR
if (this->active())
return false;
if (!this->has_children())
return true;
return this->child(0)->subactive();
#else
return false;
#endif
}
Definition at line 1197 of file elem.h.
References Elem::_sbd_id.
Referenced by UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), UnstructuredMesh::create_submesh(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), Elem::Elem(), MeshTools::Modification::flatten(), ExodusII_IO_Helper::initialize(), Elem::is_ancestor_of(), DofMap::old_dof_indices(), XdrIO::pack_element(), Nemesis_IO::read(), ExodusII_IO::read(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), DofMap::reinit(), MeshTools::subdomain_bounding_box(), BoundaryInfo::sync(), and ExodusII_IO_Helper::write_elements().
{
return _sbd_id;
}
Definition at line 1205 of file elem.h.
References Elem::_sbd_id.
{
return _sbd_id;
}
Referenced by BoundaryInfo::boundary_id(), Elem::is_ancestor_of(), BoundaryInfo::side_with_boundary_id(), and BoundaryInfo::sync().
the type of element that has been derived from this base class.
Implemented in Hex20, Hex27, Hex8, InfHex16, InfHex18, InfHex8, InfPrism12, InfPrism6, Prism15, Prism18, Prism6, Pyramid5, Tet10, Tet4, Edge2, Edge3, Edge4, InfEdge2, InfQuad4, InfQuad6, Quad4, Quad8, Quad9, Tri3, Tri6, NodeElem, and RemoteElem.
Referenced by PostscriptIO::_compute_edge_bezier_coeffs(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), VTKIO::cells_to_vtk(), FEBase::coarsened_dof_values(), InfFE< Dim, T_radial, T_map >::combine_base_radial(), InfFE< Dim, T_radial, T_map >::compute_data(), FEInterface::compute_data(), DofMap::constrain_p_dofs(), Elem::contains_point(), UnstructuredMesh::copy_nodes_and_elements(), UnstructuredMesh::create_submesh(), DofMap::dof_indices(), FE< Dim, T >::dofs_on_edge(), FE< Dim, T >::dofs_on_side(), FE< Dim, T >::edge_reinit(), UNVIO::element_out(), MeshTools::find_hanging_nodes_and_parents(), MeshTools::Modification::flatten(), FE< Dim, T >::init_base_shape_functions(), FE< Dim, T >::init_edge_shape_functions(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), FE< Dim, T >::init_face_shape_functions(), InfFE< Dim, T_radial, T_map >::init_shape_functions(), FEXYZ< Dim >::init_shape_functions(), FE< Dim, T >::init_shape_functions(), InfFE< Dim, T_radial, T_map >::inverse_map(), FEInterface::inverse_map(), Elem::is_ancestor_of(), FE< Dim, T >::map(), FE< Dim, T >::map_eta(), FE< Dim, T >::map_xi(), FE< Dim, T >::map_zeta(), FEInterface::nodal_soln(), FE< Dim, T >::nodal_soln(), DofMap::old_dof_indices(), System::ProjectVector::operator()(), XdrIO::pack_element(), ExodusII_IO::read(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), Elem::refine(), InfFE< Dim, T_radial, T_map >::reinit(), FEXYZ< Dim >::reinit(), FE< Dim, T >::reinit(), DofMap::reinit(), REINIT_ERROR(), HPCoarsenTest::select_refinement(), InfFE< Dim, T_radial, T_map >::shape(), FEInterface::shape(), FE< Dim, T >::shape(), FE< Dim, T >::shape_deriv(), FE< Dim, T >::shape_second_deriv(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), GMVIO::write_ascii_new_impl(), ExodusII_IO_Helper::write_elements(), EnsightIO::write_geometry_ascii(), LegacyXdrIO::write_mesh(), GmshIO::write_mesh(), ExodusII_IO_Helper::write_sidesets(), and DivaIO::write_stream().
Definition at line 466 of file dof_object.h.
References DofObject::_id, and DofObject::invalid_id.
Referenced by SerialMesh::add_elem(), ParallelMesh::add_elem(), SerialMesh::add_node(), ParallelMesh::add_node(), DofObject::id(), and Elem::libmesh_assert_valid_node_pointers().
{
return (DofObject::invalid_id != _id);
}
Definition at line 509 of file dof_object.h.
References DofObject::_processor_id, and DofObject::invalid_processor_id.
{
return (DofObject::invalid_processor_id != _processor_id);
}
Reimplemented in Hex8, Prism6, Pyramid5, Tet4, Edge2, Edge3, Quad4, and Tri3.
Definition at line 1412 of file elem.C.
References FEBase::build(), Elem::default_order(), FEType::default_quadrature_order(), Elem::dim(), and libMeshEnums::LAGRANGE.
{
// The default implementation builds a finite element of the correct
// order and sums up the JxW contributions. This can be expensive,
// so the various element types can overload this method and compute
// the volume more efficiently.
FEType fe_type (this->default_order() , LAGRANGE);
AutoPtr<FEBase> fe (FEBase::build(this->dim(),
fe_type));
const std::vector<Real>& JxW = fe->get_JxW();
// The default quadrature rule should integrate the mass matrix,
// thus it should be plenty to compute the area
QGauss qrule (this->dim(), fe_type.default_quadrature_order());
fe->attach_quadrature_rule(&qrule);
fe->reinit(this);
Real vol=0.;
for (unsigned int qp=0; qp<qrule.n_points(); ++qp)
vol += JxW[qp];
return vol;
}
Referenced by UnstructuredMesh::copy_nodes_and_elements(), Elem::is_ancestor_of(), Elem::make_links_to_me_remote(), and Parallel::sync_element_data_by_parent_id().
Definition at line 1281 of file elem.h.
References libMesh::invalid_uint, Elem::level(), Elem::n_neighbors(), Elem::neighbor(), and Elem::parent().
Referenced by MetisPartitioner::_do_partition(), ParmetisPartitioner::build_graph(), FEBase::compute_proj_constraints(), MeshTools::find_hanging_nodes_and_parents(), Elem::libmesh_assert_valid_neighbors(), Elem::make_links_to_me_remote(), and Elem::nullify_neighbors().
{
libmesh_assert (e != NULL);
const Elem* eparent = e;
while (eparent->level() > this->level())
{
eparent = eparent->parent();
libmesh_assert(eparent);
}
for (unsigned int s=0; s<this->n_neighbors(); s++)
if (this->neighbor(s) == eparent)
return s;
return libMesh::invalid_uint;
}
Definition at line 689 of file elem.C.
References Elem::_nodes, Elem::connectivity(), libMeshEnums::INVALID_IO_PACKAGE, Elem::n_nodes(), Elem::n_sub_elem(), Elem::node(), libMeshEnums::TECPLOT, and libMeshEnums::UCD.
{
libmesh_assert (out.good());
libmesh_assert (_nodes != NULL);
libmesh_assert (iop != INVALID_IO_PACKAGE);
switch (iop)
{
case TECPLOT:
{
// This connectivity vector will be used repeatedly instead
// of being reconstructed inside the loop.
std::vector<unsigned int> conn;
for (unsigned int sc=0; sc <this->n_sub_elem(); sc++)
{
this->connectivity(sc, TECPLOT, conn);
std::copy(conn.begin(),
conn.end(),
std::ostream_iterator<unsigned int>(out, ' '));
out << ';
}
return;
}
case UCD:
{
for (unsigned int i=0; i<this->n_nodes(); i++)
out << this->node(i)+1 << ' ';
out << ';
return;
}
default:
libmesh_error();
}
libmesh_error();
}
Do we *really* need to protect the build member? It would seem that we are just getting around it by using friends!
Definition at line 1037 of file elem.h.
Definition at line 993 of file elem.h.
Referenced by Elem::add_child(), Elem::contract(), Elem::Elem(), Elem::has_ancestor_children(), Elem::has_children(), Elem::is_ancestor_of(), Elem::make_links_to_me_remote(), Elem::refine(), Tet4::reselect_diagonal(), and Elem::~Elem().
Definition at line 110 of file reference_counter.h.
Referenced by ReferenceCounter::get_info(), ReferenceCounter::increment_constructor_count(), and ReferenceCounter::increment_destructor_count().
Definition at line 110 of file reference_counter.h.
Referenced by ReferenceCounter::get_info(), ReferenceCounter::increment_constructor_count(), and ReferenceCounter::increment_destructor_count().
Definition at line 123 of file reference_counter.h.
Definition at line 123 of file reference_counter.h.
Definition at line 118 of file reference_counter.h.
Referenced by ReferenceCounter::n_objects(), ReferenceCounter::ReferenceCounter(), and ReferenceCounter::~ReferenceCounter().
Definition at line 118 of file reference_counter.h.
Referenced by ReferenceCounter::n_objects(), ReferenceCounter::ReferenceCounter(), and ReferenceCounter::~ReferenceCounter().
Definition at line 981 of file elem.h.
Referenced by Elem::Elem(), Elem::neighbor(), Elem::set_neighbor(), and Elem::~Elem().
Definition at line 976 of file elem.h.
Referenced by Tet4::connectivity(), Tet10::connectivity(), Pyramid5::connectivity(), Prism6::connectivity(), Prism18::connectivity(), Prism15::connectivity(), InfPrism6::connectivity(), InfPrism12::connectivity(), InfHex8::connectivity(), InfHex18::connectivity(), InfHex16::connectivity(), Hex8::connectivity(), Hex27::connectivity(), Hex20::connectivity(), Elem::Elem(), Elem::get_node(), Elem::node(), Elem::point(), Elem::set_node(), Prism6::volume(), Hex8::volume(), Elem::write_connectivity(), and Elem::~Elem().
Definition at line 1017 of file elem.h.
Referenced by Elem::is_ancestor_of().
Definition at line 986 of file elem.h.
Referenced by Elem::is_ancestor_of().
Definition at line 1006 of file elem.h.
Referenced by Elem::is_ancestor_of().
Definition at line 999 of file elem.h.
Referenced by Elem::is_ancestor_of().
Definition at line 1024 of file elem.h.
Referenced by Elem::subdomain_id().
Definition at line 257 of file dof_object.h.
Referenced by Node::active(), SerialMesh::add_point(), MeshRefinement::add_point(), UnstructuredMesh::all_second_order(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), DofObject::dof_number(), DofObject::DofObject(), DofObject::invalidate_dofs(), DofObject::invalidate_id(), ParallelMesh::libmesh_assert_valid_parallel_object_ids(), Node::Node(), Elem::node(), DofMap::old_dof_indices(), Elem::point(), System::read_legacy_data(), System::read_parallel_data(), DofObject::set_dof_number(), DofObject::set_n_comp(), DofObject::set_n_vars(), DofMap::set_nonlocal_dof_objects(), DofObject::valid_id(), DofMap::variable_first_local_dof(), DofMap::variable_last_local_dof(), and System::write_parallel_data().
Definition at line 263 of file dof_object.h.
Referenced by ParallelMesh::add_elem(), ParallelMesh::add_node(), MeshTools::bounding_box(), MeshTools::correct_node_proc_ids(), Elem::Elem(), MeshCommunication::find_global_indices(), DofObject::invalidate_processor_id(), ParallelMesh::libmesh_assert_valid_parallel_object_ids(), ParallelMesh::n_active_elem(), MeshBase::n_elem_on_proc(), MeshBase::n_nodes_on_proc(), MeshBase::n_unpartitioned_elem(), MeshBase::n_unpartitioned_nodes(), ParallelMesh::renumber_dof_objects(), Partitioner::set_node_processor_ids(), DofMap::set_nonlocal_dof_objects(), Partitioner::set_parent_processor_ids(), Parallel::sync_dofobject_data_by_id(), Parallel::sync_dofobject_data_by_xyz(), Parallel::sync_element_data_by_parent_id(), MeshTools::total_weight(), SerialMesh::unpartitioned_elements_begin(), ParallelMesh::unpartitioned_elements_begin(), SerialMesh::unpartitioned_elements_end(), ParallelMesh::unpartitioned_elements_end(), and DofObject::valid_processor_id().
Definition at line 81 of file dof_object.h.
Referenced by DofObject::clear_old_dof_object(), DofMap::old_dof_indices(), DofMap::reinit(), and DofObject::set_old_dof_object().
Definition at line 276 of file elem.h.
Referenced by Elem::is_ancestor_of(), XdrIO::pack_element(), and XdrIO::read_serialized_connectivity().
Generated automatically by Doxygen for libMesh from the source code.