libMesh::InfQuad Class Reference
#include <face_inf_quad.h>

Public Types | |
| enum | RefinementState { COARSEN = 0, DO_NOTHING, REFINE, JUST_REFINED, JUST_COARSENED, INACTIVE, COARSEN_INACTIVE, INVALID_REFINEMENTSTATE } |
| typedef Predicates::multi_predicate | Predicate |
Public Member Functions | |
| InfQuad (const unsigned int nn, Elem *p, Node **nodelinkdata) | |
| unsigned int | dim () const |
| unsigned int | n_sides () const |
| unsigned int | n_vertices () const |
| unsigned int | n_edges () const |
| unsigned int | n_faces () const |
| unsigned int | n_children () const |
| virtual bool | is_child_on_side (const unsigned int c, const unsigned int s) const |
| dof_id_type | key (const unsigned int s) const |
| AutoPtr< Elem > | side (const unsigned int i) const |
| AutoPtr< Elem > | build_edge (const unsigned int i) const |
| virtual bool | is_edge_on_side (const unsigned int e, const unsigned int s) const |
| Real | quality (const ElemQuality q) const |
| std::pair< Real, Real > | qual_bounds (const ElemQuality q) const |
| bool | infinite () const |
| Point | origin () const |
| virtual const Point & | point (const unsigned int i) const |
| virtual Point & | point (const unsigned int i) |
| virtual dof_id_type | node (const unsigned int i) const |
| virtual unsigned int | local_node (const dof_id_type i) const |
| unsigned int | get_node_index (const Node *node_ptr) 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 () |
| bool | operator== (const Elem &rhs) const |
| Elem * | neighbor (const unsigned int i) const |
| const Elem * | topological_neighbor (const unsigned int i, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb) const |
| Elem * | topological_neighbor (const unsigned int i, MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb) |
| bool | has_topological_neighbor (const Elem *elem, const MeshBase &mesh, const PointLocatorBase &point_locator, PeriodicBoundaries *pb) 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 |
| bool | is_semilocal () const |
| unsigned int | which_neighbor_am_i (const Elem *e) const |
| unsigned int | which_side_am_i (const Elem *e) const |
| bool | contains_vertex_of (const Elem *e) const |
| bool | contains_edge_of (const Elem *e) const |
| void | find_point_neighbors (const Point &p, std::set< const Elem * > &neighbor_set) const |
| void | find_point_neighbors (std::set< const Elem * > &neighbor_set) const |
| void | find_edge_neighbors (const Point &p1, const Point &p2, std::set< const Elem * > &neighbor_set) const |
| void | find_edge_neighbors (std::set< const Elem * > &neighbor_set) const |
| void | make_links_to_me_remote () |
| void | make_links_to_me_local (unsigned int n) |
| virtual bool | is_remote () const |
| virtual void | connectivity (const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &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_neighbors () const |
| 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 | opposite_side (const unsigned int s) const |
| virtual unsigned int | opposite_node (const unsigned int n, const unsigned int s) const |
| virtual unsigned int | n_sub_elem () const =0 |
| virtual AutoPtr< Elem > | build_side (const unsigned int i, bool proxy=true) 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 bool | contains_point (const Point &p, Real tol=TOLERANCE) const |
| virtual bool | close_to_point (const Point &p, Real tol) const |
| virtual bool | has_affine_map () const |
| virtual bool | is_linear () const |
| void | print_info (std::ostream &os=libMesh::out) const |
| std::string | get_info () 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 |
| void | set_interior_parent (Elem *p) |
| 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_edge (const unsigned int c, const unsigned int e) const |
| void | add_child (Elem *elem) |
| void | add_child (Elem *elem, unsigned int c) |
| void | replace_child (Elem *elem, unsigned int c) |
| void | family_tree (std::vector< const Elem * > &family, const bool reset=true) const |
| void | total_family_tree (std::vector< const Elem * > &active_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 |
| unsigned int | packed_size () const |
| 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 |
| dof_id_type | id () const |
| dof_id_type & | set_id () |
| void | set_id (const dof_id_type dofid) |
| bool | valid_id () const |
| processor_id_type | processor_id () const |
| processor_id_type & | processor_id () |
| void | processor_id (const processor_id_type pid) |
| bool | valid_processor_id () const |
| unsigned int | n_systems () const |
| void | set_n_systems (const unsigned int s) |
| void | add_system () |
| unsigned int | n_var_groups (const unsigned int s) const |
| unsigned int | n_vars (const unsigned int s, const unsigned int vg) const |
| unsigned int | n_vars (const unsigned int s) const |
| void | set_n_vars_per_group (const unsigned int s, const std::vector< unsigned int > &nvpg) |
| unsigned int | n_comp (const unsigned int s, const unsigned int var) const |
| unsigned int | n_comp_group (const unsigned int s, const unsigned int vg) const |
| void | set_n_comp (const unsigned int s, const unsigned int var, const unsigned int ncomp) |
| void | set_n_comp_group (const unsigned int s, const unsigned int vg, const unsigned int ncomp) |
| dof_id_type | 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 dof_id_type dn) |
| bool | has_dofs (const unsigned int s=libMesh::invalid_uint) const |
| void | set_vg_dof_base (const unsigned int s, const unsigned int vg, const dof_id_type db) |
| dof_id_type | vg_dof_base (const unsigned int s, const unsigned int vg) const |
| unsigned int | packed_indexing_size () const |
| void | unpack_indexing (std::vector< int >::const_iterator begin) |
| void | pack_indexing (std::back_insert_iterator< std::vector< int > > target) const |
| void | debug_buffer () const |
| void | set_buffer (const std::vector< dof_id_type > &buf) |
Static Public Member Functions | |
| static void | print_info (std::ostream &out=libMesh::out) |
| static void | print_info (std::ostream &out=libMesh::out) |
| static std::string | get_info () |
| static std::string | get_info () |
| 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 unsigned int | n_objects () |
| static unsigned int | n_objects () |
| static void | enable_print_counter_info () |
| static void | enable_print_counter_info () |
| static void | disable_print_counter_info () |
| static void | disable_print_counter_info () |
| static unsigned int | unpackable_indexing_size (std::vector< int >::const_iterator begin) |
Public Attributes | |
| DofObject * | old_dof_object |
Static Public Attributes | |
| static const unsigned int | type_to_n_nodes_map [INVALID_ELEM] |
| static const unsigned int | type_to_n_sides_map [INVALID_ELEM] |
| static const dof_id_type | invalid_id = static_cast<dof_id_type>(-1) |
| static const processor_id_type | invalid_processor_id = static_cast<processor_id_type>(-1) |
Protected Types | |
| typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
| typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Protected Member Functions | |
| 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 Protected Member Functions | |
| static dof_id_type | compute_key (dof_id_type n0) |
| static dof_id_type | compute_key (dof_id_type n0, dof_id_type n1) |
| static dof_id_type | compute_key (dof_id_type n0, dof_id_type n1, dof_id_type n2) |
| static dof_id_type | compute_key (dof_id_type n0, dof_id_type n1, dof_id_type n2, dof_id_type n3) |
Protected Attributes | |
| Elem * | _elemlinks_data [4+(LIBMESH_DIM >2)] |
| Node ** | _nodes |
| Elem ** | _elemlinks |
| Elem ** | _children |
| unsigned char | _rflag |
| unsigned char | _pflag |
| unsigned char | _p_level |
| subdomain_id_type | _sbd_id |
Static Protected Attributes | |
| 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 |
| static bool | _enable_print_counter = true |
| static bool | _enable_print_counter = true |
Friends | |
| class | MeshRefinement |
Detailed Description
The InfQuad is an abstract element type that lives in two dimensions. Here, an infinite face is always a quadrilateral, so this class is directly derived from Elem, without an intermediate InfFace class or so. It looks like this:
closer to infinity
| |
| |
side 2 | | side 1
| |
| |
----------- base side
side 0
Definition at line 62 of file face_inf_quad.h.
Member Typedef Documentation
typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts [protected, inherited] |
Data structure to log the information. The log is identified by the class name.
Definition at line 113 of file reference_counter.h.
typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts [protected, inherited] |
Data structure to log the information. The log is identified by the class name.
Definition at line 113 of file reference_counter.h.
typedef Predicates::multi_predicate libMesh::Elem::Predicate [inherited] |
Member Enumeration Documentation
enum libMesh::Elem::RefinementState [inherited] |
Useful ENUM describing the refinement state of an element.
- Enumerator:
COARSEN DO_NOTHING REFINE JUST_REFINED JUST_COARSENED INACTIVE COARSEN_INACTIVE INVALID_REFINEMENTSTATE
Definition at line 812 of file elem.h.
00812 { COARSEN = 0, 00813 DO_NOTHING, 00814 REFINE, 00815 JUST_REFINED, 00816 JUST_COARSENED, 00817 INACTIVE, 00818 COARSEN_INACTIVE, 00819 INVALID_REFINEMENTSTATE };
Constructor & Destructor Documentation
| libMesh::InfQuad::InfQuad | ( | const unsigned int | nn, | |
| Elem * | p, | |||
| Node ** | nodelinkdata | |||
| ) | [inline, explicit] |
Constructor. Derived classes implement 'true' elements.
Definition at line 70 of file face_inf_quad.h.
00072 : 00073 Elem(nn, InfQuad::n_sides(), p, _elemlinks_data, nodelinkdata) {}
Member Function Documentation
| bool libMesh::Elem::active | ( | ) | const [inline, inherited] |
- Returns:
trueif the element is active (i.e. has no active descendants),falseotherwise. Note that it suffices to check the first child only. Always returnstrueif AMR is disabled.
Definition at line 1572 of file elem.h.
References libMesh::Elem::COARSEN_INACTIVE, libMesh::Elem::INACTIVE, and libMesh::Elem::refinement_flag().
Referenced by libMesh::MeshRefinement::_coarsen_elements(), libMesh::MetisPartitioner::_do_partition(), libMesh::MeshRefinement::_refine_elements(), libMesh::Elem::active_family_tree(), libMesh::Elem::active_family_tree_by_neighbor(), libMesh::Elem::active_family_tree_by_side(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::HPCoarsenTest::add_projection(), libMesh::Elem::ancestor(), libMesh::Patch::build_around_element(), libMesh::ParmetisPartitioner::build_graph(), libMesh::Elem::coarsen(), libMesh::MeshRefinement::coarsen_elements(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::UnstructuredMesh::contract(), libMesh::Elem::contract(), libMesh::DofMap::dof_indices(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::Elem::family_tree(), libMesh::Elem::family_tree_by_neighbor(), libMesh::Elem::family_tree_by_side(), libMesh::Elem::family_tree_by_subneighbor(), libMesh::Elem::find_edge_neighbors(), libMesh::Patch::find_face_neighbors(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::Elem::find_point_neighbors(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::Elem::get_info(), libMesh::ErrorVector::is_active_elem(), libMesh::MeshTools::libmesh_assert_valid_refinement_tree(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::Elem::make_links_to_me_local(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::min_new_p_level_by_neighbor(), libMesh::Elem::min_p_level_by_neighbor(), libMesh::DofMap::old_dof_indices(), libMesh::PointLocatorTree::operator()(), libMesh::PointLocatorList::operator()(), libMesh::Elem::refine(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::MeshRefinement::refine_elements(), libMesh::Elem::subactive(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::ExodusII_IO_Helper::write_element_values(), libMesh::ExodusII_IO_Helper::write_elements_discontinuous(), and libMesh::DivaIO::write_stream().
01573 { 01574 #ifdef LIBMESH_ENABLE_AMR 01575 if ((this->refinement_flag() == INACTIVE) || 01576 (this->refinement_flag() == COARSEN_INACTIVE)) 01577 return false; 01578 else 01579 return true; 01580 #else 01581 return true; 01582 #endif 01583 }
| void libMesh::Elem::active_family_tree | ( | std::vector< const Elem * > & | active_family, | |
| const bool | reset = true | |||
| ) | const [inherited] |
Same as the family_tree() member, but only adds the active children. Can be thought of as removing all the inactive elements from the vector created by family_tree, but is implemented more efficiently.
Definition at line 1418 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::active_family_tree(), libMesh::Elem::child(), libMesh::Elem::is_remote(), libMesh::Elem::n_children(), and libMesh::Elem::subactive().
Referenced by libMesh::MetisPartitioner::_do_partition(), libMesh::Elem::active_family_tree(), and libMesh::ParmetisPartitioner::build_graph().
01420 { 01421 // The "family tree" doesn't include subactive elements 01422 libmesh_assert(!this->subactive()); 01423 01424 // Clear the vector if the flag reset tells us to. 01425 if (reset) 01426 active_family.clear(); 01427 01428 // Add this element to the family tree if it is active 01429 if (this->active()) 01430 active_family.push_back(this); 01431 01432 // Otherwise recurse into the element's children. 01433 // Do not clear the vector any more. 01434 else 01435 for (unsigned int c=0; c<this->n_children(); c++) 01436 if (!this->child(c)->is_remote()) 01437 this->child(c)->active_family_tree (active_family, false); 01438 }
| void libMesh::Elem::active_family_tree_by_neighbor | ( | std::vector< const Elem * > & | family, | |
| const Elem * | neighbor, | |||
| const bool | reset = true | |||
| ) | const [inherited] |
Same as the active_family_tree() member, but only adds elements which are next to neighbor.
Definition at line 1573 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::active_family_tree_by_neighbor(), libMesh::Elem::child(), libMesh::Elem::has_neighbor(), libMesh::Elem::level(), libMesh::Elem::n_children(), libMesh::remote_elem, and libMesh::Elem::subactive().
Referenced by libMesh::Elem::active_family_tree_by_neighbor(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::Elem::find_edge_neighbors(), libMesh::Patch::find_face_neighbors(), libMesh::Elem::find_point_neighbors(), and libMesh::SparsityPattern::Build::operator()().
01576 { 01577 // The "family tree" doesn't include subactive elements 01578 libmesh_assert(!this->subactive()); 01579 01580 // Clear the vector if the flag reset tells us to. 01581 if (reset) 01582 family.clear(); 01583 01584 // This only makes sense if we're already a neighbor 01585 if (this->level() >= neighbor_in->level()) 01586 libmesh_assert (this->has_neighbor(neighbor_in)); 01587 01588 // Add an active element to the family tree. 01589 if (this->active()) 01590 family.push_back(this); 01591 01592 // Or recurse into an ancestor element's children. 01593 // Do not clear the vector any more. 01594 else if (!this->active()) 01595 for (unsigned int c=0; c<this->n_children(); c++) 01596 { 01597 Elem *current_child = this->child(c); 01598 if (current_child != remote_elem && current_child->has_neighbor(neighbor_in)) 01599 current_child->active_family_tree_by_neighbor (family, neighbor_in, false); 01600 } 01601 }
| void libMesh::Elem::active_family_tree_by_side | ( | std::vector< const Elem * > & | family, | |
| const unsigned int | side, | |||
| const bool | reset = true | |||
| ) | const [inherited] |
Same as the active_family_tree() member, but only adds elements which are next to side.
Definition at line 1468 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::active_family_tree_by_side(), libMesh::Elem::child(), libMesh::Elem::is_child_on_side(), libMesh::Elem::is_remote(), libMesh::Elem::n_children(), libMesh::Elem::n_sides(), and libMesh::Elem::subactive().
Referenced by libMesh::Elem::active_family_tree_by_side(), libMesh::Nemesis_IO_Helper::write_sidesets(), and libMesh::ExodusII_IO_Helper::write_sidesets().
01471 { 01472 // The "family tree" doesn't include subactive elements 01473 libmesh_assert(!this->subactive()); 01474 01475 // Clear the vector if the flag reset tells us to. 01476 if (reset) 01477 family.clear(); 01478 01479 libmesh_assert_less (s, this->n_sides()); 01480 01481 // Add an active element to the family tree. 01482 if (this->active()) 01483 family.push_back(this); 01484 01485 // Or recurse into an ancestor element's children. 01486 // Do not clear the vector any more. 01487 else 01488 for (unsigned int c=0; c<this->n_children(); c++) 01489 if (!this->child(c)->is_remote() && this->is_child_on_side(c, s)) 01490 this->child(c)->active_family_tree_by_side (family, s, false); 01491 }
| void libMesh::Elem::add_child | ( | Elem * | elem, | |
| unsigned int | c | |||
| ) | [inherited] |
Adds a new child pointer to the specified index in the array of children of this element. If this is the first child to be added, this method allocates memory in the parent's _children array, otherwise, it just sets the pointer.
Definition at line 1330 of file elem.C.
References libMesh::Elem::_children, libMesh::Elem::child(), libMesh::Elem::has_children(), libMesh::Elem::n_children(), libMesh::Elem::parent(), libMesh::remote_elem, and libMesh::Elem::set_child().
01331 { 01332 if(!this->has_children()) 01333 { 01334 _children = new Elem*[this->n_children()]; 01335 01336 for (unsigned int i=0; i<this->n_children(); i++) 01337 this->set_child(i, NULL); 01338 } 01339 01340 libmesh_assert (this->_children[c] == NULL || this->child(c) == remote_elem); 01341 libmesh_assert (elem == remote_elem || this == elem->parent()); 01342 01343 this->set_child(c, elem); 01344 }
| void libMesh::Elem::add_child | ( | Elem * | elem | ) | [inherited] |
Adds a child pointer to the array of children of this element. If this is the first child to be added, this method allocates memory in the parent's _children array, otherwise, it just sets the pointer.
Definition at line 1303 of file elem.C.
References libMesh::Elem::_children, libMesh::err, libMesh::Elem::n_children(), libMesh::Elem::parent(), libMesh::remote_elem, and libMesh::Elem::set_child().
Referenced by libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::LegacyXdrIO::read_mesh(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::Parallel::unpack(), and libMesh::Elem::PackedElem::unpack().
01304 { 01305 if(_children == NULL) 01306 { 01307 _children = new Elem*[this->n_children()]; 01308 01309 for (unsigned int c=0; c<this->n_children(); c++) 01310 this->set_child(c, NULL); 01311 } 01312 01313 for (unsigned int c=0; c<this->n_children(); c++) 01314 { 01315 if(this->_children[c] == NULL || this->_children[c] == remote_elem) 01316 { 01317 libmesh_assert_equal_to (this, elem->parent()); 01318 this->set_child(c, elem); 01319 return; 01320 } 01321 } 01322 01323 libMesh::err << "Error: Tried to add a child to an element with full children array" 01324 << std::endl; 01325 libmesh_error(); 01326 }
| void libMesh::DofObject::add_system | ( | ) | [inherited] |
Adds an additional system to the DofObject
Definition at line 182 of file dof_object.C.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), and libMesh::DofObject::set_n_systems().
00183 { 00184 // quick return? 00185 if (this->n_systems() == 0) 00186 { 00187 this->set_n_systems(1); 00188 return; 00189 } 00190 00191 DofObject::index_buffer_t::iterator it = _idx_buf.begin(); 00192 00193 std::advance(it, this->n_systems()); 00194 00195 // this inserts the current vector size at the position for the new system - creating the 00196 // entry we need for the new system indicating there are 0 variables. 00197 _idx_buf.insert(it, _idx_buf.size()); 00198 00199 // cache this value before we screw it up! 00200 const unsigned int ns_orig = this->n_systems(); 00201 00202 // incriment the number of systems and the offsets for each of 00203 // the systems including the new one we just added. 00204 for (unsigned int i=0; i<ns_orig+1; i++) 00205 _idx_buf[i]++; 00206 00207 libmesh_assert_equal_to (this->n_systems(), (ns_orig+1)); 00208 libmesh_assert_equal_to (this->n_vars(ns_orig), 0); 00209 libmesh_assert_equal_to (this->n_var_groups(ns_orig), 0); 00210 }
| bool libMesh::Elem::ancestor | ( | ) | const [inherited] |
- Returns:
trueif the element is an ancestor (i.e. has an active child or ancestor child),falseotherwise. Always returnsfalseif AMR is disabled.
Definition at line 1281 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::ancestor(), libMesh::Elem::child(), and libMesh::Elem::has_children().
Referenced by libMesh::Elem::ancestor(), libMesh::UnstructuredMesh::contract(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::Elem::get_info(), libMesh::MeshTools::libmesh_assert_valid_refinement_tree(), libMesh::MeshRefinement::make_coarsening_compatible(), and libMesh::Elem::refine().
01282 { 01283 #ifdef LIBMESH_ENABLE_AMR 01284 01285 if (this->active()) 01286 return false; 01287 01288 if (!this->has_children()) 01289 return false; 01290 if (this->child(0)->active()) 01291 return true; 01292 01293 return this->child(0)->ancestor(); 01294 #else 01295 return false; 01296 #endif 01297 }
| Elem::side_iterator libMesh::Elem::boundary_sides_begin | ( | ) | [inherited] |
Iterator accessor functions
Definition at line 2108 of file elem.C.
References libMesh::Elem::_first_side(), and libMesh::Elem::_last_side().
02109 { 02110 Predicates::BoundarySide<SideIter> bsp; 02111 return side_iterator(this->_first_side(), this->_last_side(), bsp); 02112 }
| Elem::side_iterator libMesh::Elem::boundary_sides_end | ( | ) | [inherited] |
Definition at line 2117 of file elem.C.
References libMesh::Elem::_last_side().
02118 { 02119 Predicates::BoundarySide<SideIter> bsp; 02120 return side_iterator(this->_last_side(), this->_last_side(), bsp); 02121 }
Build an element of type type. Since this method allocates memory the new Elem is returned in a AutoPtr<>
Definition at line 156 of file elem.C.
References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::EDGE4, libMesh::err, 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 libMesh::GMVIO::_read_one_cell(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::create_submesh(), libMesh::MeshTools::Modification::flatten(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::AbaqusIO::read_elements(), libMesh::LegacyXdrIO::read_mesh(), libMesh::GmshIO::read_mesh(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::Elem::refine(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::GMVIO::write_ascii_old_impl(), and libMesh::ExodusII_IO_Helper::write_elements().
00158 { 00159 Elem* elem = NULL; 00160 00161 switch (type) 00162 { 00163 // 1D elements 00164 case EDGE2: 00165 { 00166 elem = new Edge2(p); 00167 break; 00168 } 00169 case EDGE3: 00170 { 00171 elem = new Edge3(p); 00172 break; 00173 } 00174 case EDGE4: 00175 { 00176 elem = new Edge4(p); 00177 break; 00178 } 00179 00180 00181 00182 // 2D elements 00183 case TRI3: 00184 { 00185 elem = new Tri3(p); 00186 break; 00187 } 00188 case TRI6: 00189 { 00190 elem = new Tri6(p); 00191 break; 00192 } 00193 case QUAD4: 00194 { 00195 elem = new Quad4(p); 00196 break; 00197 } 00198 case QUAD8: 00199 { 00200 elem = new Quad8(p); 00201 break; 00202 } 00203 case QUAD9: 00204 { 00205 elem = new Quad9(p); 00206 break; 00207 } 00208 00209 00210 // 3D elements 00211 case TET4: 00212 { 00213 elem = new Tet4(p); 00214 break; 00215 } 00216 case TET10: 00217 { 00218 elem = new Tet10(p); 00219 break; 00220 } 00221 case HEX8: 00222 { 00223 elem = new Hex8(p); 00224 break; 00225 } 00226 case HEX20: 00227 { 00228 elem = new Hex20(p); 00229 break; 00230 } 00231 case HEX27: 00232 { 00233 elem = new Hex27(p); 00234 break; 00235 } 00236 case PRISM6: 00237 { 00238 elem = new Prism6(p); 00239 break; 00240 } 00241 case PRISM15: 00242 { 00243 elem = new Prism15(p); 00244 break; 00245 } 00246 case PRISM18: 00247 { 00248 elem = new Prism18(p); 00249 break; 00250 } 00251 case PYRAMID5: 00252 { 00253 elem = new Pyramid5(p); 00254 break; 00255 } 00256 00257 00258 00259 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00260 00261 // 1D infinite elements 00262 case INFEDGE2: 00263 { 00264 elem = new InfEdge2(p); 00265 break; 00266 } 00267 00268 00269 // 2D infinite elements 00270 case INFQUAD4: 00271 { 00272 elem = new InfQuad4(p); 00273 break; 00274 } 00275 case INFQUAD6: 00276 { 00277 elem = new InfQuad6(p); 00278 break; 00279 } 00280 00281 00282 // 3D infinite elements 00283 case INFHEX8: 00284 { 00285 elem = new InfHex8(p); 00286 break; 00287 } 00288 case INFHEX16: 00289 { 00290 elem = new InfHex16(p); 00291 break; 00292 } 00293 case INFHEX18: 00294 { 00295 elem = new InfHex18(p); 00296 break; 00297 } 00298 case INFPRISM6: 00299 { 00300 elem = new InfPrism6(p); 00301 break; 00302 } 00303 case INFPRISM12: 00304 { 00305 elem = new InfPrism12(p); 00306 break; 00307 } 00308 00309 #endif 00310 00311 default: 00312 { 00313 libMesh::err << "ERROR: Undefined element type!." << std::endl; 00314 libmesh_error(); 00315 } 00316 } 00317 00318 00319 AutoPtr<Elem> ap(elem); 00320 return ap; 00321 }
build_edge and build_side are identical in 2D
Implements libMesh::Elem.
Definition at line 137 of file face_inf_quad.h.
References libMesh::Elem::build_side().
00138 { return build_side(i); }
| virtual AutoPtr<Elem> libMesh::Elem::build_side | ( | const unsigned int | i, | |
| bool | proxy = true | |||
| ) | const [pure virtual, inherited] |
Creates an element coincident with side i. The element returned is full-ordered, in contrast to the side method. For example, calling build_side(0) on a 20-noded hex will build a 8-noded quadrilateral coincident with face 0 and pass back the pointer.
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 libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::Elem::SideIter::_update_side_ptr(), libMesh::MeshTools::Generation::build_cube(), libMesh::MeshTools::Generation::build_delaunay_square(), build_edge(), libMesh::Face::build_edge(), libMesh::InfFE< Dim, T_radial, T_map >::Base::build_elem(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::BoundaryInfo::build_side_list_from_node_list(), libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::LaplaceMeshSmoother::init(), libMesh::PeriodicBoundaries::neighbor(), libMesh::PostscriptIO::plot_quadratic_elem(), libMesh::GmshIO::read_mesh(), libMesh::InfFE< Dim, T_radial, T_map >::reinit(), libMesh::FEXYZ< Dim >::reinit(), libMesh::REINIT_ERROR(), libMesh::InfFE< Dim, T_radial, T_map >::shape(), libMesh::MeshTools::Modification::smooth(), libMesh::SerialMesh::stitch_meshes(), libMesh::BoundaryInfo::sync(), libMesh::FroIO::write(), and libMesh::DivaIO::write_stream().
| Point libMesh::Elem::centroid | ( | ) | const [virtual, inherited] |
- Returns:
- the centriod of the element. The centroid is computed as the average of all the element vertices. This method is overloadable since some derived elements might want to use shortcuts to compute their centroid.
Definition at line 325 of file elem.C.
References libMesh::TypeVector< T >::add(), and libMesh::Elem::n_vertices().
Referenced by libMesh::SFCPartitioner::_do_partition(), libMesh::MeshCommunication::assign_global_indices(), libMesh::CentroidPartitioner::compute_centroids(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::LocationMap< T >::point_of(), libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), libMesh::Prism6::volume(), and libMesh::Hex8::volume().
00326 { 00327 Point cp; 00328 00329 for (unsigned int n=0; n<this->n_vertices(); n++) 00330 cp.add (this->point(n)); 00331 00332 return (cp /= static_cast<Real>(this->n_vertices())); 00333 }
| Elem * libMesh::Elem::child | ( | const unsigned int | i | ) | const [inline, inherited] |
- Returns:
- a pointer to the
child for this element. Do not call if this element has no children, i.e. is active.
Definition at line 1790 of file elem.h.
References libMesh::Elem::_children.
Referenced by libMesh::Elem::active_family_tree(), libMesh::Elem::active_family_tree_by_neighbor(), libMesh::Elem::active_family_tree_by_side(), libMesh::Elem::add_child(), libMesh::HPCoarsenTest::add_projection(), libMesh::UnstructuredMesh::all_first_order(), libMesh::Elem::ancestor(), libMesh::Elem::coarsen(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::Elem::family_tree(), libMesh::Elem::family_tree_by_neighbor(), libMesh::Elem::family_tree_by_side(), libMesh::Elem::family_tree_by_subneighbor(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::Elem::has_ancestor_children(), libMesh::MeshTools::libmesh_assert_no_links_to_elem(), libMesh::MeshTools::libmesh_assert_valid_refinement_tree(), libMesh::MeshTools::libmesh_assert_valid_remote_elems(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::Elem::make_links_to_me_remote(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::min_new_p_level_by_neighbor(), libMesh::Elem::min_p_level_by_neighbor(), libMesh::Elem::refine(), libMesh::Elem::replace_child(), libMesh::Elem::set_p_level(), libMesh::MeshTools::Modification::smooth(), libMesh::Elem::total_family_tree(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), and libMesh::Elem::which_child_am_i().
If the element elem in question is a neighbor of a child of this element, this returns a pointer to that child. Otherwise it returns NULL.
Definition at line 1476 of file elem.h.
References libMesh::Elem::n_neighbors(), libMesh::Elem::neighbor(), and libMesh::Elem::parent().
If the element elem in question is a neighbor of a child of this element, this returns a pointer to that child. Otherwise it returns NULL.
Definition at line 1463 of file elem.h.
References libMesh::Elem::n_neighbors(), libMesh::Elem::neighbor(), and libMesh::Elem::parent().
| void libMesh::DofObject::clear_dofs | ( | ) | [inline, inherited] |
Clear the DofMap data structures and return to a pristine state.
Definition at line 535 of file dof_object.h.
References libMesh::DofObject::_idx_buf, and libMesh::DofObject::n_systems().
Referenced by libMesh::DofObject::set_n_systems(), and libMesh::DofObject::~DofObject().
00536 { 00537 // vector swap trick to force deallocation 00538 index_buffer_t().swap(_idx_buf); 00539 00540 libmesh_assert_equal_to (this->n_systems(), 0); 00541 libmesh_assert (_idx_buf.empty()); 00542 }
| void libMesh::DofObject::clear_old_dof_object | ( | ) | [inherited] |
Sets the old_dof_object to NULL
Definition at line 124 of file dof_object.C.
References libMesh::DofObject::old_dof_object.
Referenced by libMesh::DofObject::operator=(), libMesh::DofObject::set_old_dof_object(), libMesh::DofObject::unpack_indexing(), and libMesh::DofObject::~DofObject().
00125 { 00126 // If we have been called before... 00127 // prevent a memory leak 00128 if (old_dof_object != NULL) 00129 { 00130 delete this->old_dof_object; 00131 this->old_dof_object = NULL; 00132 } 00133 }
- Returns:
- true if this element is "close" to the point p, where "close" is determined by the tolerance tol.
Definition at line 1705 of file elem.C.
References libMesh::Elem::point_test().
01706 { 01707 // This test uses the user's passed-in tolerance for the 01708 // bounding box test as well, thereby allowing the routine to 01709 // find points which are not only "in" the element, but also 01710 // "nearby" to within some tolerance. 01711 return this->point_test(p, tol, tol); 01712 }
| void libMesh::Elem::coarsen | ( | ) | [inherited] |
Coarsen the element. This is not virtual since it is the same for all element types.
Definition at line 149 of file elem_refinement.C.
References libMesh::Elem::active(), libMesh::TypeVector< T >::add_scaled(), libMesh::Elem::child(), libMesh::Elem::COARSEN, libMesh::Elem::COARSEN_INACTIVE, libMesh::Elem::embedding_matrix(), libMesh::Elem::get_node(), libMesh::Elem::INACTIVE, libMesh::Elem::JUST_COARSENED, libMesh::Elem::n_children(), libMesh::Elem::n_nodes(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Elem::refinement_flag(), libMesh::remote_elem, libMesh::Elem::set_p_level(), and libMesh::Elem::set_refinement_flag().
Referenced by libMesh::MeshRefinement::_coarsen_elements().
00150 { 00151 libmesh_assert_equal_to (this->refinement_flag(), Elem::COARSEN_INACTIVE); 00152 libmesh_assert (!this->active()); 00153 00154 // We no longer delete children until MeshRefinement::contract() 00155 // delete [] _children; 00156 // _children = NULL; 00157 00158 unsigned int parent_p_level = 0; 00159 00160 // re-compute hanging node nodal locations 00161 for (unsigned int c=0; c<this->n_children(); c++) 00162 { 00163 Elem *mychild = this->child(c); 00164 if (mychild == remote_elem) 00165 continue; 00166 for (unsigned int nc=0; nc<mychild->n_nodes(); nc++) 00167 { 00168 Point new_pos; 00169 bool calculated_new_pos = false; 00170 00171 for (unsigned int n=0; n<this->n_nodes(); n++) 00172 { 00173 // The value from the embedding matrix 00174 const float em_val = this->embedding_matrix(c,nc,n); 00175 00176 // The node location is somewhere between existing vertices 00177 if ((em_val != 0.) && (em_val != 1.)) 00178 { 00179 new_pos.add_scaled (this->point(n), em_val); 00180 calculated_new_pos = true; 00181 } 00182 } 00183 00184 if(calculated_new_pos) 00185 { 00186 //Move the existing node back into it's original location 00187 for(unsigned int i=0; i<LIBMESH_DIM; i++) 00188 { 00189 Point & child_node = *(mychild->get_node(nc)); 00190 child_node(i)=new_pos(i); 00191 } 00192 } 00193 } 00194 } 00195 00196 for (unsigned int c=0; c<this->n_children(); c++) 00197 { 00198 Elem *mychild = this->child(c); 00199 if (mychild == remote_elem) 00200 continue; 00201 libmesh_assert_equal_to (mychild->refinement_flag(), Elem::COARSEN); 00202 mychild->set_refinement_flag(Elem::INACTIVE); 00203 if (mychild->p_level() > parent_p_level) 00204 parent_p_level = mychild->p_level(); 00205 } 00206 00207 this->set_refinement_flag(Elem::JUST_COARSENED); 00208 this->set_p_level(parent_p_level); 00209 00210 libmesh_assert (this->active()); 00211 }
| dof_id_type libMesh::Elem::compute_key | ( | dof_id_type | n0, | |
| dof_id_type | n1, | |||
| dof_id_type | n2, | |||
| dof_id_type | n3 | |||
| ) | [inline, static, protected, inherited] |
Compute a key from the specified nodes.
Definition at line 1981 of file elem.h.
References libMesh::Utility::hashword(), and swap().
01985 { 01986 // Sort first 01987 // Step 1 01988 if (n0 > n1) std::swap (n0, n1); 01989 01990 // Step 2 01991 if (n2 > n3) std::swap (n2, n3); 01992 01993 // Step 3 01994 if (n0 > n2) std::swap (n0, n2); 01995 01996 // Step 4 01997 if (n1 > n3) std::swap (n1, n3); 01998 01999 // Finally sort step 5 02000 if (n1 > n2) std::swap (n1, n2); 02001 02002 libmesh_assert ((n0 < n1) && (n1 < n2) && (n2 < n3)); 02003 02004 dof_id_type array[4] = {n0, n1, n2, n3}; 02005 return Utility::hashword(array, 4); 02006 }
| dof_id_type libMesh::Elem::compute_key | ( | dof_id_type | n0, | |
| dof_id_type | n1, | |||
| dof_id_type | n2 | |||
| ) | [inline, static, protected, inherited] |
Compute a key from the specified nodes.
Definition at line 1947 of file elem.h.
References libMesh::Utility::hashword(), and swap().
01950 { 01951 // Order the numbers such that n0 < n1 < n2. 01952 // We'll do it in 3 steps like this: 01953 // 01954 // n0 n1 n2 01955 // min(n0,n1) max(n0,n1) n2 01956 // min(n0,n1) min(n2,max(n0,n1) max(n2,max(n0,n1) 01957 // |\ /| | 01958 // | \ / | | 01959 // | / | | 01960 // | / \| | 01961 // gb min= min max gb max 01962 01963 // Step 1 01964 if (n0 > n1) std::swap (n0, n1); 01965 01966 // Step 2 01967 if (n1 > n2) std::swap (n1, n2); 01968 01969 // Step 3 01970 if (n0 > n1) std::swap (n0, n1); 01971 01972 libmesh_assert ((n0 < n1) && (n1 < n2)); 01973 01974 dof_id_type array[3] = {n0, n1, n2}; 01975 return Utility::hashword(array, 3); 01976 }
| dof_id_type libMesh::Elem::compute_key | ( | dof_id_type | n0, | |
| dof_id_type | n1 | |||
| ) | [inline, static, protected, inherited] |
Compute a key from the specified nodes.
Definition at line 1935 of file elem.h.
References libMesh::Utility::hashword2(), and swap().
01937 { 01938 // Order the two so that n0 < n1 01939 if (n0 > n1) std::swap (n0, n1); 01940 01941 return Utility::hashword2(n0, n1); 01942 }
| dof_id_type libMesh::Elem::compute_key | ( | dof_id_type | n0 | ) | [inline, static, protected, inherited] |
Compute a key from the specified nodes.
Definition at line 1927 of file elem.h.
Referenced by libMesh::Tri6::key(), libMesh::Tri::key(), libMesh::Quad9::key(), libMesh::Quad8::key(), libMesh::Quad::key(), key(), libMesh::Edge::key(), libMesh::Tet::key(), libMesh::Pyramid::key(), libMesh::Prism18::key(), libMesh::Prism::key(), libMesh::InfPrism::key(), libMesh::InfHex18::key(), libMesh::InfHex::key(), libMesh::Hex27::key(), and libMesh::Hex::key().
| virtual void libMesh::Elem::connectivity | ( | const unsigned int | sc, | |
| const IOPackage | iop, | |||
| std::vector< dof_id_type > & | conn | |||
| ) | const [pure virtual, inherited] |
Returns the connectivity for this element in a specific format, which is specified by the IOPackage tag. This method supercedes the tecplot_connectivity(...) and vtk_connectivity(...) routines.
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::VTKIO::cells_to_vtk(), libMesh::VTKIO::read(), libMesh::Elem::write_connectivity(), and libMesh::DivaIO::write_stream().
| bool libMesh::Elem::contains_edge_of | ( | const Elem * | e | ) | const [inherited] |
This function returns true iff an edge of e is contained in this element. (Internally, this is done by checking whether at least two vertices of e are contained in this element).
Definition at line 513 of file elem.C.
References libMesh::Elem::contains_point(), libMesh::Elem::n_vertices(), and libMesh::Elem::point().
Referenced by libMesh::Elem::find_edge_neighbors().
00514 { 00515 unsigned int num_contained_edges = 0; 00516 00517 // Our vertices are the first numbered nodes 00518 for (unsigned int n = 0; n != e->n_vertices(); ++n) 00519 { 00520 if (this->contains_point(e->point(n))) 00521 { 00522 num_contained_edges++; 00523 if(num_contained_edges>=2) 00524 { 00525 return true; 00526 } 00527 } 00528 } 00529 return false; 00530 }
| bool libMesh::Elem::contains_point | ( | const Point & | p, | |
| Real | tol = TOLERANCE | |||
| ) | const [virtual, inherited] |
- Returns:
- true if the point p is contained in this element, false otherwise.
For linear elements, performs an initial tight bounding box check (as an optimization step) and (if that passes) then uses the user-defined tolerance "tol" in a call to inverse_map() to actually test if the point is in the element. For quadratic elements, the bounding box optimization is skipped, and only the inverse_map() steps are performed.
Note that this routine should not be used to determine if a point is merely "nearby" an element to within some tolerance. For that, use Elem::close_to_point() instead.
Reimplemented in libMesh::InfHex8, libMesh::InfPrism6, and libMesh::InfQuad4.
Definition at line 1680 of file elem.C.
References libMesh::err, libMesh::Elem::point_test(), and libMesh::TOLERANCE.
Referenced by libMesh::Elem::contains_edge_of(), libMesh::Elem::contains_vertex_of(), libMesh::Elem::find_edge_neighbors(), libMesh::Elem::find_point_neighbors(), libMesh::PointLocatorTree::operator()(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::HPSingularity::select_refinement(), and libMesh::SerialMesh::stitch_meshes().
01681 { 01682 // We currently allow the user to enlarge the bounding box by 01683 // providing a tol > TOLERANCE (so this routine is identical to 01684 // Elem::close_to_point()), but print a warning so that the 01685 // user can eventually switch his code over to calling close_to_point() 01686 // instead, which is intended to be used for this purpose. 01687 if ( tol > TOLERANCE ) 01688 { 01689 libmesh_do_once(libMesh::err 01690 << "WARNING: Resizing bounding box to match user-specified tolerance!\n" 01691 << "In the future, calls to Elem::contains_point() with tol > TOLERANCE\n" 01692 << "will be more optimized, but should not be used\n" 01693 << "to search for points 'close to' elements!\n" 01694 << "Instead, use Elem::close_to_point() for this purpose.\n" 01695 << std::endl;); 01696 return this->point_test(p, tol, tol); 01697 } 01698 else 01699 return this->point_test(p, TOLERANCE, tol); 01700 }
| bool libMesh::Elem::contains_vertex_of | ( | const Elem * | e | ) | const [inherited] |
This function returns true iff a vertex of e is contained in this element
Definition at line 502 of file elem.C.
References libMesh::Elem::contains_point(), libMesh::Elem::n_vertices(), and libMesh::Elem::point().
Referenced by libMesh::Elem::find_point_neighbors().
00503 { 00504 // Our vertices are the first numbered nodes 00505 for (unsigned int n = 0; n != e->n_vertices(); ++n) 00506 if (this->contains_point(e->point(n))) 00507 return true; 00508 return false; 00509 }
| void libMesh::Elem::contract | ( | ) | [inherited] |
Contract an active element, i.e. remove pointers to any subactive children. This should only be called via MeshRefinement::contract, which will also remove subactive children from the mesh
Definition at line 215 of file elem_refinement.C.
References libMesh::Elem::_children, libMesh::Elem::active(), libMesh::Elem::DO_NOTHING, libMesh::Elem::JUST_COARSENED, libMesh::Elem::refinement_flag(), and libMesh::Elem::set_refinement_flag().
Referenced by libMesh::UnstructuredMesh::contract().
00216 { 00217 // Subactive elements get deleted entirely, not contracted 00218 libmesh_assert (this->active()); 00219 00220 // Active contracted elements no longer can have children 00221 if (_children) 00222 { 00223 delete [] _children; 00224 _children = NULL; 00225 } 00226 if (this->refinement_flag() == Elem::JUST_COARSENED) 00227 this->set_refinement_flag(Elem::DO_NOTHING); 00228 }
| void libMesh::DofObject::debug_buffer | ( | ) | const [inherited] |
Print our buffer for debugging.
Definition at line 534 of file dof_object.C.
References libMesh::DofObject::_idx_buf.
| virtual Order libMesh::Elem::default_order | ( | ) | const [pure virtual, inherited] |
- Returns:
- the default approximation order for this element type. This is the order that will be used to compute the map to the reference element.
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::UnstructuredMesh::all_second_order(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEMContext::elem_position_get(), libMesh::FEMap::init_edge_shape_functions(), libMesh::InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), libMesh::FEMap::init_face_shape_functions(), libMesh::FEMap::init_reference_to_physical_map(), libMesh::InfFE< Dim, T_radial, T_map >::init_shape_functions(), libMesh::FE< Dim, T >::map(), libMesh::FE< Dim, T >::map_eta(), libMesh::FE< Dim, T >::map_xi(), libMesh::FE< Dim, T >::map_zeta(), libMesh::Elem::point_test(), and libMesh::Elem::volume().
| unsigned int libMesh::InfQuad::dim | ( | ) | const [inline, virtual] |
- Returns:
- 2, the dimensionality of the object.
Implements libMesh::Elem.
Definition at line 78 of file face_inf_quad.h.
Referenced by libMesh::InfQuad4::contains_point().
| void libMesh::ReferenceCounter::disable_print_counter_info | ( | ) | [static, inherited] |
Definition at line 106 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
00107 { 00108 _enable_print_counter = false; 00109 return; 00110 }
| void libMesh::ReferenceCounter::disable_print_counter_info | ( | ) | [static, inherited] |
Definition at line 106 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
00107 { 00108 _enable_print_counter = false; 00109 return; 00110 }
| dof_id_type libMesh::DofObject::dof_number | ( | const unsigned int | s, | |
| const unsigned int | var, | |||
| const unsigned int | comp | |||
| ) | const [inline, inherited] |
- Returns:
- the global degree of freedom number for variable
var, componentcompfor systemsassociated with thisDofObject
Definition at line 709 of file dof_object.h.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), libMesh::DofObject::start_idx(), libMesh::DofObject::system_var_to_vg_var(), and libMesh::DofObject::var_to_vg().
Referenced by libMesh::DofMap::add_neighbors_to_send_list(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::GMVIO::copy_nodal_solution(), libMesh::DofMap::dof_indices(), libMesh::DofObject::DofObject(), libMesh::Node::get_info(), libMesh::Elem::get_info(), libMesh::DofMap::old_dof_indices(), libMesh::DofObject::operator=(), libMesh::HPCoarsenTest::select_refinement(), libMesh::DofObject::set_dof_number(), libMesh::DofMap::set_nonlocal_dof_objects(), and libMesh::System::zero_variable().
00712 { 00713 libmesh_assert_less (s, this->n_systems()); 00714 libmesh_assert_less (var, this->n_vars(s)); 00715 libmesh_assert_less (comp, this->n_comp(s,var)); 00716 00717 const unsigned int 00718 vg = this->var_to_vg(s,var), 00719 start_idx_sys = this->start_idx(s); 00720 00721 libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size()); 00722 00723 const dof_id_type 00724 base_idx = _idx_buf[start_idx_sys + 2*vg + 1]; 00725 00726 // if the first component is invalid, they 00727 // are all invalid 00728 if (base_idx == invalid_id) 00729 return invalid_id; 00730 00731 // otherwise the index is the first component 00732 // index augemented by the component number 00733 else 00734 { 00735 const unsigned int 00736 ncg = this->n_comp_group(s,vg), 00737 vig = this->system_var_to_vg_var(s,vg,var); 00738 00739 // std::cout << "base_idx, var, vg, vig, ncg, comp=" 00740 // << base_idx << " " 00741 // << var << " " 00742 // << vg << " " 00743 // << vig << " " 00744 // << ncg << " " 00745 // << comp << '\n'; 00746 00747 return libmesh_cast_int<dof_id_type>(base_idx + vig*ncg + comp); 00748 } 00749 }
| virtual float libMesh::Elem::embedding_matrix | ( | const unsigned int | i, | |
| const unsigned int | j, | |||
| const unsigned int | k | |||
| ) | const [pure virtual, inherited] |
Matrix that transforms the parents nodes into the children's nodes
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::Elem::coarsen(), libMesh::Tet::is_child_on_side_helper(), libMesh::Elem::refine(), and libMesh::MeshTools::Modification::smooth().
| void libMesh::ReferenceCounter::enable_print_counter_info | ( | ) | [static, inherited] |
Methods to enable/disable the reference counter output from print_info()
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
00101 { 00102 _enable_print_counter = true; 00103 return; 00104 }
| void libMesh::ReferenceCounter::enable_print_counter_info | ( | ) | [static, inherited] |
Methods to enable/disable the reference counter output from print_info()
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
00101 { 00102 _enable_print_counter = true; 00103 return; 00104 }
| void libMesh::Elem::family_tree | ( | std::vector< const Elem * > & | family, | |
| const bool | reset = true | |||
| ) | const [inherited] |
Fills the vector family with the children of this element, recursively. So, calling this method on a twice-refined element will give you the element itself, its direct children, and their children, etc... When the optional parameter reset is true then the vector will be cleared before the element and its descendants are added.
The family tree only includes ancestor and active elements; for subactive elements as well, use total_family_tree.
Definition at line 1375 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::child(), libMesh::Elem::family_tree(), libMesh::Elem::is_remote(), libMesh::Elem::n_children(), and libMesh::Elem::subactive().
Referenced by libMesh::Elem::family_tree().
01377 { 01378 // The "family tree" doesn't include subactive elements 01379 libmesh_assert(!this->subactive()); 01380 01381 // Clear the vector if the flag reset tells us to. 01382 if (reset) 01383 family.clear(); 01384 01385 // Add this element to the family tree. 01386 family.push_back(this); 01387 01388 // Recurse into the elements children, if it has them. 01389 // Do not clear the vector any more. 01390 if (!this->active()) 01391 for (unsigned int c=0; c<this->n_children(); c++) 01392 if (!this->child(c)->is_remote()) 01393 this->child(c)->family_tree (family, false); 01394 }
| void libMesh::Elem::family_tree_by_neighbor | ( | std::vector< const Elem * > & | family, | |
| const Elem * | neighbor, | |||
| const bool | reset = true | |||
| ) | const [inherited] |
Same as the family_tree() member, but only adds elements which are next to neighbor.
Definition at line 1495 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::child(), libMesh::Elem::family_tree_by_neighbor(), libMesh::Elem::has_neighbor(), libMesh::Elem::n_children(), libMesh::remote_elem, and libMesh::Elem::subactive().
Referenced by libMesh::Elem::family_tree_by_neighbor(), and libMesh::Elem::make_links_to_me_remote().
01498 { 01499 // The "family tree" doesn't include subactive elements 01500 libmesh_assert(!this->subactive()); 01501 01502 // Clear the vector if the flag reset tells us to. 01503 if (reset) 01504 family.clear(); 01505 01506 // This only makes sense if we're already a neighbor 01507 libmesh_assert (this->has_neighbor(neighbor_in)); 01508 01509 // Add this element to the family tree. 01510 family.push_back(this); 01511 01512 // Recurse into the elements children, if it's not active. 01513 // Do not clear the vector any more. 01514 if (!this->active()) 01515 for (unsigned int c=0; c<this->n_children(); c++) 01516 { 01517 Elem *current_child = this->child(c); 01518 if (current_child != remote_elem && current_child->has_neighbor(neighbor_in)) 01519 current_child->family_tree_by_neighbor (family, neighbor_in, false); 01520 } 01521 }
| void libMesh::Elem::family_tree_by_side | ( | std::vector< const Elem * > & | family, | |
| const unsigned int | side, | |||
| const bool | reset = true | |||
| ) | const [inherited] |
Same as the family_tree() member, but only adds elements which are next to side.
Definition at line 1442 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::child(), libMesh::Elem::family_tree_by_side(), libMesh::Elem::is_child_on_side(), libMesh::Elem::is_remote(), libMesh::Elem::n_children(), libMesh::Elem::n_sides(), and libMesh::Elem::subactive().
Referenced by libMesh::Elem::family_tree_by_side(), libMesh::Elem::make_links_to_me_local(), and libMesh::Elem::PackedElem::unpack().
01445 { 01446 // The "family tree" doesn't include subactive elements 01447 libmesh_assert(!this->subactive()); 01448 01449 // Clear the vector if the flag reset tells us to. 01450 if (reset) 01451 family.clear(); 01452 01453 libmesh_assert_less (s, this->n_sides()); 01454 01455 // Add this element to the family tree. 01456 family.push_back(this); 01457 01458 // Recurse into the elements children, if it has them. 01459 // Do not clear the vector any more. 01460 if (!this->active()) 01461 for (unsigned int c=0; c<this->n_children(); c++) 01462 if (!this->child(c)->is_remote() && this->is_child_on_side(c, s)) 01463 this->child(c)->family_tree_by_side (family, s, false); 01464 }
| void libMesh::Elem::family_tree_by_subneighbor | ( | std::vector< const Elem * > & | family, | |
| const Elem * | neighbor, | |||
| const Elem * | subneighbor, | |||
| const bool | reset = true | |||
| ) | const [inherited] |
Same as the family_tree() member, but only adds elements which are next to subneighbor. Only applicable when this->has_neighbor(neighbor) and neighbor->is_ancestor(subneighbor)
Definition at line 1525 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::child(), libMesh::Elem::family_tree_by_subneighbor(), libMesh::Elem::has_neighbor(), libMesh::Elem::is_ancestor_of(), libMesh::Elem::n_children(), libMesh::Elem::n_sides(), libMesh::Elem::neighbor(), libMesh::Elem::parent(), libMesh::remote_elem, and libMesh::Elem::subactive().
Referenced by libMesh::Elem::family_tree_by_subneighbor(), and libMesh::Elem::make_links_to_me_remote().
01529 { 01530 // The "family tree" doesn't include subactive elements 01531 libmesh_assert(!this->subactive()); 01532 01533 // Clear the vector if the flag reset tells us to. 01534 if (reset) 01535 family.clear(); 01536 01537 // To simplifly this function we need an existing neighbor 01538 libmesh_assert (neighbor_in); 01539 libmesh_assert_not_equal_to (neighbor_in, remote_elem); 01540 libmesh_assert (this->has_neighbor(neighbor_in)); 01541 01542 // This only makes sense if subneighbor descends from neighbor 01543 libmesh_assert (subneighbor); 01544 libmesh_assert_not_equal_to (subneighbor, remote_elem); 01545 libmesh_assert (neighbor_in->is_ancestor_of(subneighbor)); 01546 01547 // Add this element to the family tree if applicable. 01548 if (neighbor_in == subneighbor) 01549 family.push_back(this); 01550 01551 // Recurse into the elements children, if it's not active. 01552 // Do not clear the vector any more. 01553 if (!this->active()) 01554 for (unsigned int c=0; c != this->n_children(); ++c) 01555 { 01556 Elem *current_child = this->child(c); 01557 if (current_child != remote_elem) 01558 for (unsigned int s=0; s != current_child->n_sides(); ++s) 01559 { 01560 Elem *child_neigh = current_child->neighbor(s); 01561 if (child_neigh && 01562 (child_neigh == neighbor_in || 01563 (child_neigh->parent() == neighbor_in && 01564 child_neigh->is_ancestor_of(subneighbor)))) 01565 current_child->family_tree_by_subneighbor (family, child_neigh, 01566 subneighbor, false); 01567 } 01568 } 01569 }
| void libMesh::Elem::find_edge_neighbors | ( | std::set< const Elem * > & | neighbor_set | ) | const [inherited] |
This function finds all active elements which touch the current active element along any edge (more precisely, at at least two points).
Definition at line 714 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::active_family_tree_by_neighbor(), libMesh::Elem::contains_edge_of(), end, libMesh::Elem::n_sides(), libMesh::Elem::neighbor(), and libMesh::remote_elem.
00715 { 00716 neighbor_set.clear(); 00717 neighbor_set.insert(this); 00718 00719 std::set<const Elem *> untested_set, next_untested_set; 00720 untested_set.insert(this); 00721 00722 while (!untested_set.empty()) 00723 { 00724 // Loop over all the elements in the patch that haven't already 00725 // been tested 00726 std::set<const Elem*>::const_iterator it = untested_set.begin(); 00727 const std::set<const Elem*>::const_iterator end = untested_set.end(); 00728 00729 for (; it != end; ++it) 00730 { 00731 const Elem* elem = *it; 00732 00733 for (unsigned int s=0; s<elem->n_sides(); s++) 00734 { 00735 const Elem* current_neighbor = elem->neighbor(s); 00736 if (current_neighbor && 00737 current_neighbor != remote_elem) // we have a real neighbor on this side 00738 { 00739 if (current_neighbor->active()) // ... if it is active 00740 { 00741 if (this->contains_edge_of(current_neighbor) // ... and touches us 00742 || current_neighbor->contains_edge_of(this)) 00743 { 00744 // Make sure we'll test it 00745 if (!neighbor_set.count(current_neighbor)) 00746 next_untested_set.insert (current_neighbor); 00747 00748 // And add it 00749 neighbor_set.insert (current_neighbor); 00750 } 00751 } 00752 #ifdef LIBMESH_ENABLE_AMR 00753 else // ... the neighbor is *not* active, 00754 { // ... so add *all* neighboring 00755 // active children 00756 std::vector<const Elem*> active_neighbor_children; 00757 00758 current_neighbor->active_family_tree_by_neighbor 00759 (active_neighbor_children, elem); 00760 00761 std::vector<const Elem*>::const_iterator 00762 child_it = active_neighbor_children.begin(); 00763 const std::vector<const Elem*>::const_iterator 00764 child_end = active_neighbor_children.end(); 00765 for (; child_it != child_end; ++child_it) 00766 { 00767 const Elem *current_child = *child_it; 00768 if (this->contains_edge_of(*child_it) || 00769 (*child_it)->contains_edge_of(this)) 00770 { 00771 // Make sure we'll test it 00772 if (!neighbor_set.count(current_child)) 00773 next_untested_set.insert (current_child); 00774 00775 neighbor_set.insert (current_child); 00776 } 00777 } 00778 } 00779 #endif // #ifdef LIBMESH_ENABLE_AMR 00780 } 00781 } 00782 } 00783 untested_set.swap(next_untested_set); 00784 next_untested_set.clear(); 00785 } 00786 }
| void libMesh::Elem::find_edge_neighbors | ( | const Point & | p1, | |
| const Point & | p2, | |||
| std::set< const Elem * > & | neighbor_set | |||
| ) | const [inherited] |
This function finds all active elements which touch the current active element along the specified edge defined by the two points p1 and p2
Definition at line 687 of file elem.C.
References libMesh::Elem::contains_point(), end, and libMesh::Elem::find_point_neighbors().
00690 { 00691 // Simple but perhaps suboptimal code: find elements containing the 00692 // first point, then winnow this set down by removing elements which 00693 // don't also contain the second point 00694 00695 libmesh_assert(this->contains_point(p2)); 00696 this->find_point_neighbors(p1, neighbor_set); 00697 00698 std::set<const Elem*>::iterator it = neighbor_set.begin(); 00699 const std::set<const Elem*>::iterator end = neighbor_set.end(); 00700 00701 while(it != end) { 00702 std::set<const Elem*>::iterator current = it++; 00703 00704 const Elem* elem = *current; 00705 // This won't invalidate iterator it, because it is already 00706 // pointing to the next element 00707 if (!elem->contains_point(p2)) 00708 neighbor_set.erase(current); 00709 } 00710 }
| void libMesh::Elem::find_point_neighbors | ( | std::set< const Elem * > & | neighbor_set | ) | const [inherited] |
This function finds all elements (including this one) which touch the current element at any point
Definition at line 611 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::active_family_tree_by_neighbor(), libMesh::Elem::contains_vertex_of(), end, libMesh::Elem::n_sides(), libMesh::Elem::neighbor(), and libMesh::remote_elem.
00612 { 00613 neighbor_set.clear(); 00614 neighbor_set.insert(this); 00615 00616 std::set<const Elem *> untested_set, next_untested_set; 00617 untested_set.insert(this); 00618 00619 while (!untested_set.empty()) 00620 { 00621 // Loop over all the elements in the patch that haven't already 00622 // been tested 00623 std::set<const Elem*>::const_iterator it = untested_set.begin(); 00624 const std::set<const Elem*>::const_iterator end = untested_set.end(); 00625 00626 for (; it != end; ++it) 00627 { 00628 const Elem* elem = *it; 00629 00630 for (unsigned int s=0; s<elem->n_sides(); s++) 00631 { 00632 const Elem* current_neighbor = elem->neighbor(s); 00633 if (current_neighbor && 00634 current_neighbor != remote_elem) // we have a real neighbor on this side 00635 { 00636 if (current_neighbor->active()) // ... if it is active 00637 { 00638 if (this->contains_vertex_of(current_neighbor) // ... and touches us 00639 || current_neighbor->contains_vertex_of(this)) 00640 { 00641 // Make sure we'll test it 00642 if (!neighbor_set.count(current_neighbor)) 00643 next_untested_set.insert (current_neighbor); 00644 00645 // And add it 00646 neighbor_set.insert (current_neighbor); 00647 } 00648 } 00649 #ifdef LIBMESH_ENABLE_AMR 00650 else // ... the neighbor is *not* active, 00651 { // ... so add *all* neighboring 00652 // active children 00653 std::vector<const Elem*> active_neighbor_children; 00654 00655 current_neighbor->active_family_tree_by_neighbor 00656 (active_neighbor_children, elem); 00657 00658 std::vector<const Elem*>::const_iterator 00659 child_it = active_neighbor_children.begin(); 00660 const std::vector<const Elem*>::const_iterator 00661 child_end = active_neighbor_children.end(); 00662 for (; child_it != child_end; ++child_it) 00663 { 00664 const Elem *current_child = *child_it; 00665 if (this->contains_vertex_of(current_child) || 00666 (current_child)->contains_vertex_of(this)) 00667 { 00668 // Make sure we'll test it 00669 if (!neighbor_set.count(current_child)) 00670 next_untested_set.insert (current_child); 00671 00672 neighbor_set.insert (current_child); 00673 } 00674 } 00675 } 00676 #endif // #ifdef LIBMESH_ENABLE_AMR 00677 } 00678 } 00679 } 00680 untested_set.swap(next_untested_set); 00681 next_untested_set.clear(); 00682 } 00683 }
| void libMesh::Elem::find_point_neighbors | ( | const Point & | p, | |
| std::set< const Elem * > & | neighbor_set | |||
| ) | const [inherited] |
This function finds all elements (including this one) which touch the current active element at the specified point, which should be a point in the current element.
Definition at line 534 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::active_family_tree_by_neighbor(), libMesh::Elem::contains_point(), end, libMesh::Elem::n_sides(), libMesh::Elem::neighbor(), and libMesh::remote_elem.
Referenced by libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::Elem::find_edge_neighbors(), libMesh::Patch::find_point_neighbors(), libMesh::MeshFunction::gradient(), libMesh::MeshFunction::hessian(), libMesh::Elem::is_semilocal(), and libMesh::MeshFunction::operator()().
00536 { 00537 libmesh_assert(this->contains_point(p)); 00538 00539 neighbor_set.clear(); 00540 neighbor_set.insert(this); 00541 00542 std::set<const Elem *> untested_set, next_untested_set; 00543 untested_set.insert(this); 00544 00545 while (!untested_set.empty()) 00546 { 00547 // Loop over all the elements in the patch that haven't already 00548 // been tested 00549 std::set<const Elem*>::const_iterator it = untested_set.begin(); 00550 const std::set<const Elem*>::const_iterator end = untested_set.end(); 00551 00552 for (; it != end; ++it) 00553 { 00554 const Elem* elem = *it; 00555 00556 for (unsigned int s=0; s<elem->n_sides(); s++) 00557 { 00558 const Elem* current_neighbor = elem->neighbor(s); 00559 if (current_neighbor && 00560 current_neighbor != remote_elem) // we have a real neighbor on this side 00561 { 00562 if (current_neighbor->active()) // ... if it is active 00563 { 00564 if (current_neighbor->contains_point(p)) // ... and touches p 00565 { 00566 // Make sure we'll test it 00567 if (!neighbor_set.count(current_neighbor)) 00568 next_untested_set.insert (current_neighbor); 00569 00570 // And add it 00571 neighbor_set.insert (current_neighbor); 00572 } 00573 } 00574 #ifdef LIBMESH_ENABLE_AMR 00575 else // ... the neighbor is *not* active, 00576 { // ... so add *all* neighboring 00577 // active children that touch p 00578 std::vector<const Elem*> active_neighbor_children; 00579 00580 current_neighbor->active_family_tree_by_neighbor 00581 (active_neighbor_children, elem); 00582 00583 std::vector<const Elem*>::const_iterator 00584 child_it = active_neighbor_children.begin(); 00585 const std::vector<const Elem*>::const_iterator 00586 child_end = active_neighbor_children.end(); 00587 for (; child_it != child_end; ++child_it) 00588 { 00589 const Elem *current_child = *child_it; 00590 if (current_child->contains_point(p)) 00591 { 00592 // Make sure we'll test it 00593 if (!neighbor_set.count(current_child)) 00594 next_untested_set.insert (current_child); 00595 00596 neighbor_set.insert (current_child); 00597 } 00598 } 00599 } 00600 #endif // #ifdef LIBMESH_ENABLE_AMR 00601 } 00602 } 00603 } 00604 untested_set.swap(next_untested_set); 00605 next_untested_set.clear(); 00606 } 00607 }
| ElemType libMesh::Elem::first_order_equivalent_type | ( | const ElemType | et | ) | [static, inherited] |
- Returns:
- the element type of the associated first-order element, e.g. when
thisis aTET10, thenTET4is returned. ReturnsINVALID_ELEMfor first order or other elements that should not or cannot be converted into lower order equivalents.
Definition at line 1949 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 libMesh::UnstructuredMesh::all_first_order(), and libMesh::GMVIO::write_ascii_old_impl().
01950 { 01951 switch (et) 01952 { 01953 case EDGE2: 01954 case EDGE3: 01955 case EDGE4: 01956 return EDGE2; 01957 case TRI3: 01958 case TRI6: 01959 return TRI3; 01960 case QUAD4: 01961 case QUAD8: 01962 case QUAD9: 01963 return QUAD4; 01964 case TET4: 01965 case TET10: 01966 return TET4; 01967 case HEX8: 01968 case HEX27: 01969 case HEX20: 01970 return HEX8; 01971 case PRISM6: 01972 case PRISM15: 01973 case PRISM18: 01974 return PRISM6; 01975 01976 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 01977 01978 case INFQUAD4: 01979 case INFQUAD6: 01980 return INFQUAD4; 01981 case INFHEX8: 01982 case INFHEX16: 01983 case INFHEX18: 01984 return INFHEX8; 01985 case INFPRISM6: 01986 case INFPRISM12: 01987 return INFPRISM6; 01988 01989 #endif 01990 01991 default: 01992 // unknown element 01993 return INVALID_ELEM; 01994 } 01995 }
| std::string libMesh::ReferenceCounter::get_info | ( | ) | [static, inherited] |
Gets a string containing the reference information.
Definition at line 47 of file reference_counter.C.
References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().
Referenced by libMesh::ReferenceCounter::print_info().
00048 { 00049 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG) 00050 00051 std::ostringstream oss; 00052 00053 oss << '\n' 00054 << " ---------------------------------------------------------------------------- \n" 00055 << "| Reference count information |\n" 00056 << " ---------------------------------------------------------------------------- \n"; 00057 00058 for (Counts::iterator it = _counts.begin(); 00059 it != _counts.end(); ++it) 00060 { 00061 const std::string name(it->first); 00062 const unsigned int creations = it->second.first; 00063 const unsigned int destructions = it->second.second; 00064 00065 oss << "| " << name << " reference count information:\n" 00066 << "| Creations: " << creations << '\n' 00067 << "| Destructions: " << destructions << '\n'; 00068 } 00069 00070 oss << " ---------------------------------------------------------------------------- \n"; 00071 00072 return oss.str(); 00073 00074 #else 00075 00076 return ""; 00077 00078 #endif 00079 }
| std::string libMesh::ReferenceCounter::get_info | ( | ) | [static, inherited] |
Gets a string containing the reference information.
Definition at line 47 of file reference_counter.C.
References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().
Referenced by libMesh::ReferenceCounter::print_info().
00048 { 00049 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG) 00050 00051 std::ostringstream oss; 00052 00053 oss << '\n' 00054 << " ---------------------------------------------------------------------------- \n" 00055 << "| Reference count information |\n" 00056 << " ---------------------------------------------------------------------------- \n"; 00057 00058 for (Counts::iterator it = _counts.begin(); 00059 it != _counts.end(); ++it) 00060 { 00061 const std::string name(it->first); 00062 const unsigned int creations = it->second.first; 00063 const unsigned int destructions = it->second.second; 00064 00065 oss << "| " << name << " reference count information:\n" 00066 << "| Creations: " << creations << '\n' 00067 << "| Destructions: " << destructions << '\n'; 00068 } 00069 00070 oss << " ---------------------------------------------------------------------------- \n"; 00071 00072 return oss.str(); 00073 00074 #else 00075 00076 return ""; 00077 00078 #endif 00079 }
| std::string libMesh::Elem::get_info | ( | ) | const [inherited] |
Prints relevant information about the element to a string.
Definition at line 1828 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::ancestor(), libMesh::Elem::dim(), libMesh::DofObject::dof_number(), libMesh::Utility::enum_to_string(), libMesh::Elem::get_node(), libMesh::Elem::has_children(), libMesh::Elem::hmax(), libMesh::Elem::hmin(), libMesh::DofObject::id(), libMesh::Elem::infinite(), libMesh::Elem::level(), libMesh::DofObject::n_comp(), libMesh::Elem::n_nodes(), libMesh::Elem::n_sides(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), libMesh::Elem::neighbor(), libMesh::Elem::origin(), libMesh::Elem::p_level(), libMesh::Elem::p_refinement_flag(), libMesh::Elem::parent(), libMesh::DofObject::processor_id(), libMesh::Elem::refinement_flag(), libMesh::Elem::subactive(), libMesh::Elem::type(), libMesh::DofObject::valid_id(), and libMesh::Elem::volume().
Referenced by libMesh::Elem::print_info().
01829 { 01830 std::ostringstream oss; 01831 01832 oss << " Elem Information" << '\n' 01833 << " id()="; 01834 01835 if (this->valid_id()) 01836 oss << this->id(); 01837 else 01838 oss << "invalid"; 01839 01840 oss << ", processor_id()=" << this->processor_id() << '\n'; 01841 01842 oss << " type()=" << Utility::enum_to_string(this->type()) << '\n' 01843 << " dim()=" << this->dim() << '\n' 01844 << " n_nodes()=" << this->n_nodes() << '\n'; 01845 01846 for (unsigned int n=0; n != this->n_nodes(); ++n) 01847 oss << " " << n << *this->get_node(n); 01848 01849 oss << " n_sides()=" << this->n_sides() << '\n'; 01850 01851 for (unsigned int s=0; s != this->n_sides(); ++s) 01852 { 01853 oss << " neighbor(" << s << ")="; 01854 if (this->neighbor(s)) 01855 oss << this->neighbor(s)->id() << '\n'; 01856 else 01857 oss << "NULL\n"; 01858 } 01859 01860 oss << " hmin()=" << this->hmin() 01861 << ", hmax()=" << this->hmax() << '\n' 01862 << " volume()=" << this->volume() << '\n' 01863 << " active()=" << this->active() 01864 << ", ancestor()=" << this->ancestor() 01865 << ", subactive()=" << this->subactive() 01866 << ", has_children()=" << this->has_children() << '\n' 01867 << " parent()="; 01868 if (this->parent()) 01869 oss << this->parent()->id() << '\n'; 01870 else 01871 oss << "NULL\n"; 01872 oss << " level()=" << this->level() 01873 << ", p_level()=" << this->p_level() << '\n' 01874 #ifdef LIBMESH_ENABLE_AMR 01875 << " refinement_flag()=" << Utility::enum_to_string(this->refinement_flag()) << '\n' 01876 << " p_refinement_flag()=" << Utility::enum_to_string(this->p_refinement_flag()) << '\n' 01877 #endif 01878 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 01879 << " infinite()=" << this->infinite() << '\n'; 01880 if (this->infinite()) 01881 oss << " origin()=" << this->origin() << '\n' 01882 #endif 01883 ; 01884 01885 oss << " DoFs="; 01886 for (unsigned int s=0; s != this->n_systems(); ++s) 01887 for (unsigned int v=0; v != this->n_vars(s); ++v) 01888 for (unsigned int c=0; c != this->n_comp(s,v); ++c) 01889 oss << '(' << s << '/' << v << '/' << this->dof_number(s,v,c) << ") "; 01890 01891 01892 return oss.str(); 01893 }
| Node * libMesh::Elem::get_node | ( | const unsigned int | i | ) | const [inline, virtual, inherited] |
- Returns:
- the pointer to local
Nodei.
Reimplemented in libMesh::RemoteElem.
Definition at line 1382 of file elem.h.
References libMesh::Elem::_nodes, and libMesh::Elem::n_nodes().
Referenced by libMesh::DofMap::add_neighbors_to_send_list(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::MeshTools::Generation::build_cube(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::Tri6::build_side(), libMesh::Tri3::build_side(), libMesh::Quad9::build_side(), libMesh::Quad8::build_side(), libMesh::Quad4::build_side(), libMesh::InfQuad6::build_side(), libMesh::Edge::build_side(), libMesh::Tet4::build_side(), libMesh::Tet10::build_side(), libMesh::Pyramid5::build_side(), libMesh::Prism6::build_side(), libMesh::Prism18::build_side(), libMesh::Prism15::build_side(), libMesh::InfPrism12::build_side(), libMesh::InfHex18::build_side(), libMesh::InfHex16::build_side(), libMesh::Hex8::build_side(), libMesh::Hex27::build_side(), libMesh::Hex20::build_side(), libMesh::Elem::coarsen(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::UNVIO::element_out(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::MeshTools::Modification::flatten(), libMesh::Elem::get_info(), libMesh::MeshTools::libmesh_assert_connected_nodes(), libMesh::MeshTools::libmesh_assert_old_dof_objects(), libMesh::Elem::libmesh_assert_valid_node_pointers(), libMesh::DofMap::old_dof_indices(), libMesh::Tri::quality(), libMesh::Elem::refine(), libMesh::DofMap::reinit(), libMesh::SerialMesh::renumber_nodes_and_elements(), libMesh::HPCoarsenTest::select_refinement(), libMesh::Partitioner::set_node_processor_ids(), libMesh::Tri::side(), libMesh::Quad::side(), side(), libMesh::Edge::side(), libMesh::Tet::side(), libMesh::Pyramid::side(), libMesh::Prism::side(), libMesh::InfPrism::side(), libMesh::InfHex::side(), libMesh::Hex::side(), libMesh::MeshTools::Modification::smooth(), libMesh::BoundaryInfo::sync(), libMesh::Tri3::volume(), libMesh::Tet4::volume(), libMesh::Pyramid5::volume(), and libMesh::GnuPlotIO::write_solution().
| unsigned int libMesh::Elem::get_node_index | ( | const Node * | node_ptr | ) | const [inline, inherited] |
- Returns:
- the local index for the
Nodepointernode_ptr, orinvalid_idifnode_ptris not a local node.
Definition at line 1393 of file elem.h.
References libMesh::Elem::_nodes, libMesh::invalid_uint, and libMesh::Elem::n_nodes().
01394 { 01395 for (unsigned int n=0; n != this->n_nodes(); ++n) 01396 if (this->_nodes[n] == node_ptr) 01397 return n; 01398 01399 return libMesh::invalid_uint; 01400 }
| void libMesh::Elem::hack_p_level | ( | const unsigned int | p | ) | [inline, inherited] |
Sets the value of the p refinement level for the element without altering the p level of its ancestors
Definition at line 1916 of file elem.h.
References libMesh::Elem::_p_level.
Referenced by libMesh::XdrIO::read_serialized_connectivity().
01917 { 01918 _p_level = libmesh_cast_int<unsigned char>(p); 01919 }
| virtual bool libMesh::Elem::has_affine_map | ( | ) | const [inline, virtual, inherited] |
- Returns:
- true iff the element map is definitely affine (i.e. the same at every quadrature point) within numerical tolerances
Reimplemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, and libMesh::NodeElem.
Definition at line 628 of file elem.h.
Referenced by libMesh::FEMap::compute_map(), and libMesh::H1FETransformation< OutputShape >::map_d2phi().
| bool libMesh::Elem::has_ancestor_children | ( | ) | const [inline, inherited] |
- Returns:
trueif the element has any descendants other than its immediate children,falseotherwise. Always returnsfalseif AMR is disabled.
Definition at line 1624 of file elem.h.
References libMesh::Elem::_children, libMesh::Elem::child(), libMesh::Elem::has_children(), and libMesh::Elem::n_children().
01625 { 01626 #ifdef LIBMESH_ENABLE_AMR 01627 if (_children == NULL) 01628 return false; 01629 else 01630 for (unsigned int c=0; c != this->n_children(); c++) 01631 if (this->child(c)->has_children()) 01632 return true; 01633 #endif 01634 return false; 01635 }
| bool libMesh::Elem::has_children | ( | ) | const [inline, inherited] |
- Returns:
trueif the element has any children (active or not),falseotherwise. Always returnsfalseif AMR is disabled.
Definition at line 1610 of file elem.h.
References libMesh::Elem::_children.
Referenced by libMesh::Elem::add_child(), libMesh::UnstructuredMesh::all_first_order(), libMesh::Elem::ancestor(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::Elem::get_info(), libMesh::Elem::has_ancestor_children(), libMesh::MeshTools::libmesh_assert_no_links_to_elem(), libMesh::MeshTools::libmesh_assert_valid_refinement_tree(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::Elem::make_links_to_me_remote(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::FEMSystem::mesh_position_set(), libMesh::Elem::replace_child(), libMesh::Elem::set_child(), libMesh::Elem::subactive(), libMesh::Elem::total_family_tree(), and libMesh::Elem::which_child_am_i().
01611 { 01612 #ifdef LIBMESH_ENABLE_AMR 01613 if (_children == NULL) 01614 return false; 01615 else 01616 return true; 01617 #else 01618 return false; 01619 #endif 01620 }
| bool libMesh::DofObject::has_dofs | ( | const unsigned int | s = libMesh::invalid_uint |
) | const [inline, inherited] |
- Returns:
- true if any system has variables which have been assigned, false otherwise
Definition at line 754 of file dof_object.h.
References libMesh::invalid_uint, libMesh::DofObject::n_systems(), and libMesh::DofObject::n_vars().
Referenced by libMesh::MeshTools::libmesh_assert_old_dof_objects(), libMesh::DofMap::reinit(), and libMesh::Parallel::unpack().
00755 { 00756 if (sys == libMesh::invalid_uint) 00757 { 00758 for (unsigned int s=0; s<this->n_systems(); s++) 00759 if (this->n_vars(s)) 00760 return true; 00761 } 00762 00763 else 00764 { 00765 libmesh_assert_less (sys, this->n_systems()); 00766 00767 if (this->n_vars(sys)) 00768 return true; 00769 } 00770 00771 return false; 00772 }
| bool libMesh::Elem::has_neighbor | ( | const Elem * | elem | ) | const [inline, inherited] |
- Returns:
trueif the elementelemin question is a neighbor of this element,falseotherwise.
Definition at line 1451 of file elem.h.
References libMesh::Elem::n_neighbors(), and libMesh::Elem::neighbor().
Referenced by libMesh::Elem::active_family_tree_by_neighbor(), libMesh::Elem::family_tree_by_neighbor(), libMesh::Elem::family_tree_by_subneighbor(), libMesh::MeshRefinement::has_topological_neighbor(), libMesh::Elem::has_topological_neighbor(), libMesh::Elem::make_links_to_me_remote(), libMesh::Elem::min_new_p_level_by_neighbor(), libMesh::Elem::min_p_level_by_neighbor(), and libMesh::Elem::on_boundary().
01452 { 01453 for (unsigned int n=0; n<this->n_neighbors(); n++) 01454 if (this->neighbor(n) == elem) 01455 return true; 01456 01457 return false; 01458 }
| bool libMesh::Elem::has_topological_neighbor | ( | const Elem * | elem, | |
| const MeshBase & | mesh, | |||
| const PointLocatorBase & | point_locator, | |||
| PeriodicBoundaries * | pb | |||
| ) | const [inherited] |
- Returns:
trueif the elementelemin question is a neighbor or topological neighbor of this element,falseotherwise.
Definition at line 865 of file elem.C.
References libMesh::Elem::has_neighbor(), libMesh::Elem::n_neighbors(), and libMesh::Elem::topological_neighbor().
Referenced by libMesh::MeshRefinement::has_topological_neighbor().
00869 { 00870 // First see if this is a normal "interior" neighbor 00871 if (has_neighbor(elem)) 00872 return true; 00873 00874 for (unsigned int n=0; n<this->n_neighbors(); n++) 00875 if (this->topological_neighbor(n, mesh, point_locator, pb)) 00876 return true; 00877 00878 return false; 00879 }
| Real libMesh::Elem::hmax | ( | ) | const [virtual, inherited] |
- Returns:
- the maximum vertex separation for the element.
Definition at line 354 of file elem.C.
References std::max(), libMesh::Elem::n_vertices(), libMesh::Elem::point(), libMesh::Real, and libMesh::TypeVector< T >::size().
Referenced by libMesh::KellyErrorEstimator::boundary_side_integration(), libMesh::DiscontinuityMeasure::boundary_side_integration(), libMesh::Elem::get_info(), libMesh::KellyErrorEstimator::internal_side_integration(), libMesh::LaplacianErrorEstimator::internal_side_integration(), libMesh::DiscontinuityMeasure::internal_side_integration(), and libMesh::Elem::point_test().
00355 { 00356 Real h_max=0; 00357 00358 for (unsigned int n_outer=0; n_outer<this->n_vertices(); n_outer++) 00359 for (unsigned int n_inner=n_outer+1; n_inner<this->n_vertices(); n_inner++) 00360 { 00361 const Point diff = (this->point(n_outer) - this->point(n_inner)); 00362 00363 h_max = std::max(h_max,diff.size()); 00364 } 00365 00366 return h_max; 00367 }
| Real libMesh::Elem::hmin | ( | ) | const [virtual, inherited] |
- Returns:
- the minimum vertex separation for the element.
Definition at line 337 of file elem.C.
References std::min(), libMesh::Elem::n_vertices(), libMesh::Elem::point(), libMesh::Real, and libMesh::TypeVector< T >::size().
Referenced by libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::Elem::get_info(), libMesh::FEMSystem::numerical_jacobian(), and libMesh::Elem::refine().
00338 { 00339 Real h_min=1.e30; 00340 00341 for (unsigned int n_outer=0; n_outer<this->n_vertices(); n_outer++) 00342 for (unsigned int n_inner=n_outer+1; n_inner<this->n_vertices(); n_inner++) 00343 { 00344 const Point diff = (this->point(n_outer) - this->point(n_inner)); 00345 00346 h_min = std::min(h_min,diff.size()); 00347 } 00348 00349 return h_min; 00350 }
| dof_id_type libMesh::DofObject::id | ( | ) | const [inline, inherited] |
- Returns:
- the
idfor thisDofObject
Definition at line 569 of file dof_object.h.
References libMesh::DofObject::_id, and libMesh::DofObject::valid_id().
Referenced by libMesh::SFCPartitioner::_do_partition(), libMesh::MetisPartitioner::_do_partition(), libMesh::SerialMesh::add_elem(), libMesh::ParallelMesh::add_elem(), libMesh::SerialMesh::add_node(), libMesh::ParallelMesh::add_node(), libMesh::ParallelMesh::add_point(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::MeshData::assign(), libMesh::ParmetisPartitioner::assign_partitioning(), libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::ParmetisPartitioner::build_graph(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEMap::compute_single_point_map(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::MeshRefinement::create_parent_error_vector(), libMesh::SerialMesh::delete_elem(), libMesh::ParallelMesh::delete_elem(), libMesh::SerialMesh::delete_node(), libMesh::ParallelMesh::delete_node(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::MeshData::elem_to_foreign_id(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshTools::find_nodal_neighbors(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_error_tolerance(), libMesh::MeshRefinement::flag_elements_by_mean_stddev(), libMesh::MeshTools::Modification::flatten(), libMesh::Node::get_info(), libMesh::Elem::get_info(), libMesh::DofMap::get_local_constraints(), libMesh::EquationSystems::get_solution(), libMesh::LaplaceMeshSmoother::init(), libMesh::ParmetisPartitioner::initialize(), libMesh::ExodusII_IO_Helper::initialize(), libMesh::ExodusII_IO_Helper::initialize_discontinuous(), libMesh::TreeNode< N >::insert(), libMesh::SerialMesh::insert_elem(), libMesh::ParallelMesh::insert_elem(), libMesh::ParallelMesh::insert_node(), libMesh::FE< Dim, T >::inverse_map(), libMesh::MeshTools::libmesh_assert_valid_amr_elem_ids(), libMesh::MeshTools::libmesh_assert_valid_elem_ids(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::Elem::node(), libMesh::MeshData::node_to_foreign_id(), libMesh::VTKIO::nodes_to_vtk(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::BoundaryInfo::operator=(), libMesh::Parallel::pack(), libMesh::Node::PackedNode::pack(), libMesh::Elem::PackedElem::pack(), libMesh::XdrIO::pack_element(), libMesh::ErrorVector::plot_error(), libMesh::ParallelMesh::query_elem(), libMesh::ParallelMesh::query_node_ptr(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::AbaqusIO::read_elements(), libMesh::ParallelMesh::renumber_elem(), libMesh::ParallelMesh::renumber_node(), libMesh::ParallelMesh::renumber_nodes_and_elements(), libMesh::DofMap::scatter_constraints(), libMesh::HPCoarsenTest::select_refinement(), libMesh::Partitioner::set_node_processor_ids(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::MeshTools::Modification::smooth(), libMesh::SerialMesh::stitch_meshes(), libMesh::BoundaryInfo::sync(), libMesh::Parallel::sync_dofobject_data_by_id(), libMesh::Elem::topological_neighbor(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::GMVIO::write_ascii_new_impl(), libMesh::GMVIO::write_ascii_old_impl(), libMesh::ExodusII_IO_Helper::write_element_values(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_elements_discontinuous(), libMesh::LegacyXdrIO::write_mesh(), and libMesh::GmshIO::write_mesh().
| void libMesh::ReferenceCounter::increment_constructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the construction counter. Should be called in the constructor of any derived class that will be reference counted.
Definition at line 163 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
00164 { 00165 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); 00166 std::pair<unsigned int, unsigned int>& p = _counts[name]; 00167 00168 p.first++; 00169 }
| void libMesh::ReferenceCounter::increment_constructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the construction counter. Should be called in the constructor of any derived class that will be reference counted.
Definition at line 163 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
00164 { 00165 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); 00166 std::pair<unsigned int, unsigned int>& p = _counts[name]; 00167 00168 p.first++; 00169 }
| void libMesh::ReferenceCounter::increment_destructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the destruction counter. Should be called in the destructor of any derived class that will be reference counted.
Definition at line 176 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().
00177 { 00178 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); 00179 std::pair<unsigned int, unsigned int>& p = _counts[name]; 00180 00181 p.second++; 00182 }
| void libMesh::ReferenceCounter::increment_destructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the destruction counter. Should be called in the destructor of any derived class that will be reference counted.
Definition at line 176 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().
00177 { 00178 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx); 00179 std::pair<unsigned int, unsigned int>& p = _counts[name]; 00180 00181 p.second++; 00182 }
| bool libMesh::InfQuad::infinite | ( | ) | const [inline, virtual] |
- Returns:
true. All classes derived fromInfQuadare infinite elements.
Implements libMesh::Elem.
Definition at line 164 of file face_inf_quad.h.
| const Elem * libMesh::Elem::interior_parent | ( | ) | const [inline, inherited] |
In some cases it is desireable to extract the boundary (or a subset thereof) of a D-dimensional mesh as a (D-1)-dimensional manifold. In this case we may want to know the 'parent' element from which the manifold elements were extracted. We can easily do that for the level-0 manifold elements by storing the D-dimensional parent. This method provides access to that element.
Definition at line 1703 of file elem.h.
References libMesh::Elem::_elemlinks, libMesh::Elem::dim(), and libMesh::Elem::n_sides().
01704 { 01705 // interior parents make no sense for full-dimensional elements. 01706 libmesh_assert_less (this->dim(), LIBMESH_DIM); 01707 01708 // // and they [USED TO BE] only good for level-0 elements 01709 // if (this->level() != 0) 01710 // return this->parent()->interior_parent(); 01711 01712 // We store the interior_parent pointer after both the parent 01713 // neighbor and neighbor pointers 01714 Elem *interior_p = _elemlinks[1+this->n_sides()]; 01715 01716 // If we have an interior_parent, it had better be the 01717 // one-higher-dimensional interior element we are looking for. 01718 libmesh_assert (!interior_p || 01719 interior_p->dim() == (this->dim()+1)); 01720 01721 return interior_p; 01722 }
| void libMesh::DofObject::invalidate | ( | ) | [inline, inherited] |
Invalidates all the indices for this DofObject
Definition at line 525 of file dof_object.h.
References libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::invalidate_id(), and libMesh::DofObject::invalidate_processor_id().
Referenced by libMesh::DofObject::DofObject().
00526 { 00527 this->invalidate_dofs (); 00528 this->invalidate_id (); 00529 this->invalidate_processor_id (); 00530 }
| void libMesh::DofObject::invalidate_dofs | ( | const unsigned int | sys_num = libMesh::invalid_uint |
) | [inline, inherited] |
Sets all degree of freedom numbers to invalid_id
Definition at line 489 of file dof_object.h.
References libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::set_vg_dof_base().
Referenced by libMesh::DofObject::invalidate().
00490 { 00491 // If the user does not specify the system number... 00492 if (sys_num >= this->n_systems()) 00493 { 00494 for (unsigned int s=0; s<this->n_systems(); s++) 00495 for (unsigned int vg=0; vg<this->n_var_groups(s); vg++) 00496 if (this->n_comp_group(s,vg)) 00497 this->set_vg_dof_base(s,vg,invalid_id); 00498 } 00499 // ...otherwise invalidate the dofs for all systems 00500 else 00501 for (unsigned int vg=0; vg<this->n_var_groups(sys_num); vg++) 00502 if (this->n_comp_group(sys_num,vg)) 00503 this->set_vg_dof_base(sys_num,vg,invalid_id); 00504 }
| void libMesh::DofObject::invalidate_id | ( | ) | [inline, inherited] |
Sets the id to invalid_id
Definition at line 509 of file dof_object.h.
References libMesh::DofObject::invalid_id, and libMesh::DofObject::set_id().
Referenced by libMesh::DofObject::invalidate().
00510 { 00511 this->set_id (invalid_id); 00512 }
| void libMesh::DofObject::invalidate_processor_id | ( | ) | [inline, inherited] |
Sets the processor id to invalid_processor_id
Definition at line 517 of file dof_object.h.
References libMesh::DofObject::invalid_processor_id, and libMesh::DofObject::processor_id().
Referenced by libMesh::MeshTools::correct_node_proc_ids(), libMesh::DofObject::invalidate(), and libMesh::Partitioner::set_node_processor_ids().
00518 { 00519 this->processor_id (invalid_processor_id); 00520 }
| bool libMesh::Elem::is_ancestor_of | ( | const Elem * | descendant | ) | const [inherited] |
- Returns:
trueifdescendantis a child ofthis, or a child of a child ofthis, etc. Always returnsfalseif AMR is disabled.
Referenced by libMesh::Elem::family_tree_by_subneighbor().
| virtual bool libMesh::Elem::is_child_on_edge | ( | const unsigned int | c, | |
| const unsigned int | e | |||
| ) | const [virtual, inherited] |
- Returns:
- true iff the specified child is on the specified edge
Referenced by libMesh::FEGenericBase< OutputType >::coarsened_dof_values().
| bool libMesh::InfQuad::is_child_on_side | ( | const unsigned int | c, | |
| const unsigned int | s | |||
| ) | const [virtual] |
- Returns:
- true iff the specified child is on the specified side
Implements libMesh::Elem.
Definition at line 123 of file face_inf_quad.C.
References n_children(), and n_sides().
00125 { 00126 libmesh_assert_less (c, this->n_children()); 00127 libmesh_assert_less (s, this->n_sides()); 00128 00129 return (s == 0 || s == c+1); 00130 }
| virtual bool libMesh::Elem::is_edge | ( | const unsigned int | i | ) | const [pure virtual, inherited] |
- Returns:
- true iff the specified (local) node number is an edge.
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::FEGenericBase< OutputType >::compute_periodic_constraints().
| virtual bool libMesh::InfQuad::is_edge_on_side | ( | const unsigned int | e, | |
| const unsigned int | s | |||
| ) | const [inline, virtual] |
Implements libMesh::Elem.
Definition at line 143 of file face_inf_quad.h.
| virtual bool libMesh::Elem::is_face | ( | const unsigned int | i | ) | const [pure virtual, inherited] |
- Returns:
- true iff the specified (local) node number is a face.
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::FEGenericBase< OutputType >::compute_periodic_constraints().
| virtual bool libMesh::Elem::is_linear | ( | ) | const [inline, virtual, inherited] |
- Returns:
- true iff the Lagrange shape functions on this element are linear
Reimplemented in libMesh::Tet4, libMesh::Edge2, libMesh::Tri3, and libMesh::NodeElem.
Definition at line 634 of file elem.h.
Referenced by libMesh::FEMap::init_reference_to_physical_map().
| virtual bool libMesh::Elem::is_node_on_edge | ( | const unsigned int | n, | |
| const unsigned int | e | |||
| ) | const [pure virtual, inherited] |
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), and libMesh::FE< Dim, T >::dofs_on_edge().
| virtual bool libMesh::Elem::is_node_on_side | ( | const unsigned int | n, | |
| const unsigned int | s | |||
| ) | const [pure virtual, inherited] |
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::FE< Dim, T >::dofs_on_side(), libMesh::MeshTools::find_hanging_nodes_and_parents(), libMesh::Tet::is_edge_on_side(), libMesh::Pyramid::is_edge_on_side(), libMesh::Prism::is_edge_on_side(), libMesh::InfPrism::is_edge_on_side(), libMesh::InfHex::is_edge_on_side(), libMesh::Hex::is_edge_on_side(), libMesh::BoundaryProjectSolution::operator()(), libMesh::Quad::opposite_node(), libMesh::Hex::opposite_node(), and libMesh::Elem::which_side_am_i().
| virtual bool libMesh::Elem::is_remote | ( | ) | const [inline, virtual, inherited] |
Returns true if this element is remote, false otherwise. A remote element (see RemoteElem) is a syntactic convenience -- it is a placeholder for an element which exists on some other processor. Local elements are required to have valid neighbors, and these ghost elements may have remote neighbors for data structure consistency. The use of remote elements helps assure that any element we may access has a NULL neighbor if and only if it lies on the physical boundary of the domain.
Reimplemented in libMesh::RemoteElem.
Definition at line 348 of file elem.h.
Referenced by libMesh::Elem::active_family_tree(), libMesh::Elem::active_family_tree_by_side(), libMesh::Elem::family_tree(), libMesh::Elem::family_tree_by_side(), libMesh::Elem::make_links_to_me_local(), and libMesh::Elem::total_family_tree().
| bool libMesh::Elem::is_semilocal | ( | ) | const [inherited] |
- Returns:
trueif this element shares a vertex and/or a side with a local element.
Definition at line 481 of file elem.C.
References end, libMesh::Elem::find_point_neighbors(), and libMesh::DofObject::processor_id().
Referenced by libMesh::Patch::add_semilocal_face_neighbors(), and libMesh::Patch::add_semilocal_point_neighbors().
00482 { 00483 std::set<const Elem *> point_neighbors; 00484 00485 this->find_point_neighbors(point_neighbors); 00486 00487 std::set<const Elem*>::const_iterator it = point_neighbors.begin(); 00488 const std::set<const Elem*>::const_iterator end = point_neighbors.end(); 00489 00490 for (; it != end; ++it) 00491 { 00492 const Elem* elem = *it; 00493 if (elem->processor_id() == libMesh::processor_id()) 00494 return true; 00495 } 00496 00497 return false; 00498 }
| virtual bool libMesh::Elem::is_vertex | ( | const unsigned int | i | ) | const [pure virtual, inherited] |
- Returns:
- true iff the specified (local) node number is a vertex.
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::DofMap::dof_indices(), libMesh::DofMap::old_dof_indices(), libMesh::BoundaryProjectSolution::operator()(), libMesh::ProjectFEMSolution::operator()(), libMesh::ProjectSolution::operator()(), libMesh::DofMap::reinit(), and libMesh::HPCoarsenTest::select_refinement().
| dof_id_type libMesh::InfQuad::key | ( | const unsigned int | s | ) | const [virtual] |
- Returns:
- an id associated with the
sside of this element. The id is not necessariy unique, but should be close. This is particularly useful in theMeshBase::find_neighbors()routine.
Implements libMesh::Elem.
Definition at line 36 of file face_inf_quad.C.
References libMesh::Elem::compute_key(), n_sides(), and libMesh::Elem::node().
00037 { 00038 libmesh_assert_less (s, this->n_sides()); 00039 00040 00041 switch (s) 00042 { 00043 case 0: 00044 00045 return 00046 this->compute_key (this->node(0), 00047 this->node(1)); 00048 00049 case 1: 00050 00051 return 00052 this->compute_key (this->node(1), 00053 this->node(3)); 00054 00055 case 2: 00056 00057 return 00058 this->compute_key (this->node(0), 00059 this->node(2)); 00060 } 00061 00062 // We will never get here... Look at the code above. 00063 libmesh_error(); 00064 return 0; 00065 }
| Real libMesh::Elem::length | ( | const unsigned int | n1, | |
| const unsigned int | n2 | |||
| ) | const [inherited] |
- Returns:
- the magnitude of the distance between nodes n1 and n2. Useful for computing the lengths of the sides of elements.
Definition at line 371 of file elem.C.
References libMesh::Elem::n_vertices(), and libMesh::Elem::point().
Referenced by libMesh::Quad::quality(), libMesh::InfHex::quality(), and libMesh::Hex::quality().
00373 { 00374 libmesh_assert_less ( n1, this->n_vertices() ); 00375 libmesh_assert_less ( n2, this->n_vertices() ); 00376 00377 return (this->point(n1) - this->point(n2)).size(); 00378 }
| unsigned int libMesh::Elem::level | ( | ) | const [inline, inherited] |
- Returns:
- the refinement level of the current element. If the element's parent is
NULLthen by convention it is at level 0, otherwise it is simply at one level greater than its parent.
Definition at line 1742 of file elem.h.
References libMesh::Elem::dim(), libMesh::Elem::level(), and libMesh::Elem::parent().
Referenced by libMesh::MeshRefinement::_coarsen_elements(), libMesh::Elem::active_family_tree_by_neighbor(), libMesh::BoundaryInfo::add_side(), libMesh::UnstructuredMesh::all_second_order(), libMesh::BoundaryInfo::boundary_id(), libMesh::BoundaryInfo::boundary_ids(), libMesh::JumpErrorEstimator::coarse_n_flux_faces_increment(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::MeshTools::find_hanging_nodes_and_parents(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_error_tolerance(), libMesh::MeshRefinement::flag_elements_by_mean_stddev(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::Elem::get_info(), libMesh::BoundaryInfo::has_boundary_id(), libMesh::Elem::level(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::Elem::make_links_to_me_local(), libMesh::Elem::make_links_to_me_remote(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::BoundaryInfo::n_boundary_ids(), libMesh::Elem::nullify_neighbors(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::Parallel::packable_size(), libMesh::BoundaryInfo::remove_side(), libMesh::BoundaryInfo::side_with_boundary_id(), libMesh::Elem::top_parent(), libMesh::Elem::topological_neighbor(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::Elem::which_neighbor_am_i(), and libMesh::LegacyXdrIO::write_mesh().
01743 { 01744 #ifdef LIBMESH_ENABLE_AMR 01745 01746 // if I don't have a parent I was 01747 // created directly from file 01748 // or by the user, so I am a 01749 // level-0 element 01750 if (this->parent() == NULL) 01751 return 0; 01752 01753 // if the parent and this element are of different 01754 // dimensionality we are at the same level as 01755 // the parent (e.g. we are the 2D side of a 01756 // 3D element) 01757 if (this->dim() != this->parent()->dim()) 01758 return this->parent()->level(); 01759 01760 // otherwise we are at a level one 01761 // higher than our parent 01762 return (this->parent()->level() + 1); 01763 01764 #else 01765 01766 // Without AMR all elements are 01767 // at level 0. 01768 return 0; 01769 01770 #endif 01771 }
| void libMesh::Elem::libmesh_assert_valid_neighbors | ( | ) | const [inherited] |
This function checks for consistent neighbor links at this element.
Definition at line 898 of file elem.C.
References libMesh::Elem::dim(), libMesh::Elem::n_neighbors(), libMesh::Elem::neighbor(), libMesh::Elem::parent(), libMesh::remote_elem, libMesh::Elem::subactive(), and libMesh::Elem::which_neighbor_am_i().
Referenced by libMesh::MeshTools::libmesh_assert_valid_neighbors().
00899 { 00900 for (unsigned int s=0; s<this->n_neighbors(); s++) 00901 { 00902 const Elem *neigh = this->neighbor(s); 00903 00904 // Any element might have a remote neighbor; checking 00905 // to make sure that's not inaccurate is tough. 00906 if (neigh == remote_elem) 00907 continue; 00908 00909 if (neigh) 00910 { 00911 // Only subactive elements have subactive neighbors 00912 libmesh_assert (this->subactive() || !neigh->subactive()); 00913 00914 const Elem *elem = this; 00915 00916 // If we're subactive but our neighbor isn't, its 00917 // return neighbor link will be to our first active 00918 // ancestor OR to our inactive ancestor of the same 00919 // level as neigh, 00920 if (this->subactive() && !neigh->subactive()) 00921 { 00922 for (elem = this; !elem->active(); 00923 elem = elem->parent()) 00924 libmesh_assert(elem); 00925 } 00926 else 00927 { 00928 unsigned int rev = neigh->which_neighbor_am_i(elem); 00929 libmesh_assert_less (rev, neigh->n_neighbors()); 00930 00931 if (this->subactive() && !neigh->subactive()) 00932 { 00933 while (neigh->neighbor(rev) != elem) 00934 { 00935 libmesh_assert(elem->parent()); 00936 elem = elem->parent(); 00937 } 00938 } 00939 else 00940 { 00941 Elem *nn = neigh->neighbor(rev); 00942 libmesh_assert(nn); 00943 00944 for (; elem != nn; elem = elem->parent()) 00945 libmesh_assert(elem); 00946 } 00947 } 00948 } 00949 // If we don't have a neighbor and we're not subactive, our 00950 // ancestors shouldn't have any neighbors in this same 00951 // direction. 00952 else if (!this->subactive()) 00953 { 00954 const Elem *my_parent = this->parent(); 00955 if (my_parent && 00956 // A parent with a different dimension isn't really one of 00957 // our ancestors, it means we're on a boundary mesh and this 00958 // is an interior mesh element for which we're on a side. 00959 // Nothing to test for in that case. 00960 (my_parent->dim() == this->dim())) 00961 libmesh_assert (!my_parent->neighbor(s)); 00962 } 00963 } 00964 }
| void libMesh::Elem::libmesh_assert_valid_node_pointers | ( | ) | const [inherited] |
This function checks for a valid id and for pointers to nodes with valid ids at this element.
Definition at line 886 of file elem.C.
References libMesh::Elem::get_node(), libMesh::Elem::n_nodes(), and libMesh::DofObject::valid_id().
Referenced by libMesh::MeshTools::libmesh_assert_valid_node_pointers().
| unsigned int libMesh::Elem::local_node | ( | const dof_id_type | i | ) | const [inline, virtual, inherited] |
Definition at line 1370 of file elem.h.
References libMesh::invalid_uint, libMesh::Elem::n_nodes(), and libMesh::Elem::node().
Referenced by libMesh::SerialMesh::stitch_meshes().
01371 { 01372 for (unsigned int n=0; n != this->n_nodes(); ++n) 01373 if (this->node(n) == i) 01374 return n; 01375 01376 return libMesh::invalid_uint; 01377 }
| void libMesh::Elem::make_links_to_me_local | ( | unsigned int | n | ) | [inherited] |
Resets the appropriate neighbor pointers of our nth neighbor (and its descendants, if appropriate) to point to this Elem instead of to the global remote_elem. Used by the library when a formerly remote element is being added to the local processor.
Definition at line 970 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::family_tree_by_side(), libMesh::Elem::is_remote(), libMesh::Elem::JUST_REFINED, libMesh::Elem::level(), libMesh::Elem::n_sides(), libMesh::Elem::neighbor(), libMesh::Elem::parent(), libMesh::Elem::refinement_flag(), libMesh::remote_elem, libMesh::Elem::set_neighbor(), libMesh::Elem::side(), and libMesh::Elem::subactive().
Referenced by libMesh::Parallel::unpack().
00971 { 00972 Elem *neigh = this->neighbor(n); 00973 00974 // Don't bother calling this function unless it's necessary 00975 libmesh_assert(neigh); 00976 libmesh_assert(!neigh->is_remote()); 00977 00978 // We never have neighbors more refined than us 00979 libmesh_assert_less_equal (neigh->level(), this->level()); 00980 00981 // We never have subactive neighbors of non subactive elements 00982 libmesh_assert(!neigh->subactive() || this->subactive()); 00983 00984 // If we have a neighbor less refined than us then it must not 00985 // have any more refined active descendants we could have 00986 // pointed to instead. 00987 libmesh_assert(neigh->level() == this->level() || 00988 neigh->active()); 00989 00990 // If neigh is at our level, then its family might have 00991 // remote_elem neighbor links which need to point to us 00992 // instead, but if not, then we're done. 00993 if (neigh->level() != this->level()) 00994 return; 00995 00996 // If neigh is subactive then we're not updating its neighbor links 00997 // FIXME - this needs to change when we start using subactive 00998 // elements for more than just the two-phase 00999 // restriction/prolongation projections. 01000 if (neigh->subactive()) 01001 return; 01002 01003 // What side of neigh are we on? We can't use the usual Elem 01004 // method because we're in the middle of restoring topology 01005 const AutoPtr<Elem> my_side = this->side(n); 01006 unsigned int nn = 0; 01007 for (; nn != neigh->n_sides(); ++nn) 01008 { 01009 const AutoPtr<Elem> neigh_side = neigh->side(nn); 01010 if (*my_side == *neigh_side) 01011 break; 01012 } 01013 01014 // we had better be on *some* side of neigh 01015 libmesh_assert_less (nn, neigh->n_sides()); 01016 01017 // Find any elements that ought to point to elem 01018 std::vector<const Elem*> neigh_family; 01019 #ifdef LIBMESH_ENABLE_AMR 01020 if (this->active()) 01021 neigh->family_tree_by_side(neigh_family, nn); 01022 else 01023 #endif 01024 neigh_family.push_back(neigh); 01025 01026 // And point them to elem 01027 for (unsigned int i = 0; i != neigh_family.size(); ++i) 01028 { 01029 Elem* neigh_family_member = const_cast<Elem*>(neigh_family[i]); 01030 01031 // Ideally, the neighbor link ought to either be correct 01032 // already or ought to be to remote_elem. 01033 // 01034 // However, if we're redistributing a newly created elem, 01035 // after an AMR step but before find_neighbors has fixed up 01036 // neighbor links, we might have an out of date neighbor 01037 // link to elem's parent instead. 01038 #ifdef LIBMESH_ENABLE_AMR 01039 libmesh_assert((neigh_family_member->neighbor(nn) == this) || 01040 (neigh_family_member->neighbor(nn) == remote_elem) 01041 || ((this->refinement_flag() == JUST_REFINED) && 01042 (this->parent() != NULL) && 01043 (neigh_family_member->neighbor(nn) == this->parent()))); 01044 #else 01045 libmesh_assert((neigh_family_member->neighbor(nn) == this) || 01046 (neigh_family_member->neighbor(nn) == remote_elem)); 01047 #endif 01048 01049 neigh_family_member->set_neighbor(nn, this); 01050 } 01051 }
| void libMesh::Elem::make_links_to_me_remote | ( | ) | [inherited] |
Resets this element's neighbors' appropriate neighbor pointers and its parent's and children's appropriate pointers to point to the global remote_elem instead of this. Used by the library before a remote element is deleted on the local processor.
Definition at line 1054 of file elem.C.
References libMesh::Elem::child(), libMesh::Elem::dim(), libMesh::Elem::family_tree_by_neighbor(), libMesh::Elem::family_tree_by_subneighbor(), libMesh::Elem::has_children(), libMesh::Elem::has_neighbor(), libMesh::Elem::level(), libMesh::Elem::n_children(), libMesh::Elem::n_neighbors(), libMesh::Elem::n_sides(), libMesh::Elem::neighbor(), libMesh::Elem::parent(), libMesh::remote_elem, libMesh::Elem::set_child(), libMesh::Elem::set_neighbor(), libMesh::Elem::subactive(), libMesh::Elem::which_child_am_i(), and libMesh::Elem::which_neighbor_am_i().
Referenced by libMesh::MeshCommunication::delete_remote_elements().
01055 { 01056 libmesh_assert_not_equal_to (this, remote_elem); 01057 01058 // We need to have handled any children first 01059 #if defined(LIBMESH_ENABLE_AMR) && defined(DEBUG) 01060 if (this->has_children()) 01061 for (unsigned int c = 0; c != this->n_children(); ++c) 01062 { 01063 Elem *current_child = this->child(c); 01064 libmesh_assert_equal_to (current_child, remote_elem); 01065 } 01066 #endif 01067 01068 // Remotify any neighbor links to non-subactive elements 01069 if (!this->subactive()) 01070 { 01071 for (unsigned int s = 0; s != this->n_sides(); ++s) 01072 { 01073 Elem *neigh = this->neighbor(s); 01074 if (neigh && neigh != remote_elem && !neigh->subactive()) 01075 { 01076 // My neighbor should never be more refined than me; my real 01077 // neighbor would have been its parent in that case. 01078 libmesh_assert_greater_equal (this->level(), neigh->level()); 01079 01080 if (this->level() == neigh->level() && 01081 neigh->has_neighbor(this)) 01082 { 01083 #ifdef LIBMESH_ENABLE_AMR 01084 // My neighbor may have descendants which also consider me a 01085 // neighbor 01086 std::vector<const Elem*> family; 01087 neigh->family_tree_by_neighbor (family, this); 01088 01089 // FIXME - There's a lot of ugly const_casts here; we 01090 // may want to make remote_elem non-const and create 01091 // non-const versions of the family_tree methods 01092 for (unsigned int i=0; i != family.size(); ++i) 01093 { 01094 Elem *n = const_cast<Elem*>(family[i]); 01095 libmesh_assert (n); 01096 if (n == remote_elem) 01097 continue; 01098 unsigned int my_s = n->which_neighbor_am_i(this); 01099 libmesh_assert_less (my_s, n->n_neighbors()); 01100 libmesh_assert_equal_to (n->neighbor(my_s), this); 01101 n->set_neighbor(my_s, const_cast<RemoteElem*>(remote_elem)); 01102 } 01103 #else 01104 unsigned int my_s = neigh->which_neighbor_am_i(this); 01105 libmesh_assert_less (my_s, neigh->n_neighbors()); 01106 libmesh_assert_equal_to (neigh->neighbor(my_s), this); 01107 neigh->set_neighbor(my_s, const_cast<RemoteElem*>(remote_elem)); 01108 #endif 01109 } 01110 #ifdef LIBMESH_ENABLE_AMR 01111 // Even if my neighbor doesn't link back to me, it might 01112 // have subactive descendants which do 01113 else if (neigh->has_children()) 01114 { 01115 // If my neighbor at the same level doesn't have me as a 01116 // neighbor, I must be subactive 01117 libmesh_assert(this->level() > neigh->level() || 01118 this->subactive()); 01119 01120 // My neighbor must have some ancestor of mine as a 01121 // neighbor 01122 Elem *my_ancestor = this->parent(); 01123 libmesh_assert(my_ancestor); 01124 while (!neigh->has_neighbor(my_ancestor)) 01125 { 01126 my_ancestor = my_ancestor->parent(); 01127 libmesh_assert(my_ancestor); 01128 } 01129 01130 // My neighbor may have descendants which consider me a 01131 // neighbor 01132 std::vector<const Elem*> family; 01133 neigh->family_tree_by_subneighbor (family, my_ancestor, this); 01134 01135 // FIXME - There's a lot of ugly const_casts here; we 01136 // may want to make remote_elem non-const and create 01137 // non-const versions of the family_tree methods 01138 for (unsigned int i=0; i != family.size(); ++i) 01139 { 01140 Elem *n = const_cast<Elem*>(family[i]); 01141 libmesh_assert (n); 01142 if (n == remote_elem) 01143 continue; 01144 unsigned int my_s = n->which_neighbor_am_i(this); 01145 libmesh_assert_less (my_s, n->n_neighbors()); 01146 libmesh_assert_equal_to (n->neighbor(my_s), this); 01147 n->set_neighbor(my_s, const_cast<RemoteElem*>(remote_elem)); 01148 } 01149 } 01150 #endif 01151 } 01152 } 01153 } 01154 01155 #ifdef LIBMESH_ENABLE_AMR 01156 // Remotify parent's child link 01157 Elem *my_parent = this->parent(); 01158 if (my_parent && 01159 // As long as it's not already remote 01160 my_parent != remote_elem && 01161 // And it's a real parent, not an interior parent 01162 this->dim() == my_parent->dim()) 01163 { 01164 unsigned int me = my_parent->which_child_am_i(this); 01165 libmesh_assert_equal_to (my_parent->child(me), this); 01166 my_parent->set_child(me, const_cast<RemoteElem*>(remote_elem)); 01167 } 01168 #endif 01169 }
| unsigned int libMesh::Elem::max_descendant_p_level | ( | ) | const [inline, inherited] |
Returns the maximum value of the p refinement levels of an ancestor element's descendants
Definition at line 1863 of file elem.h.
References libMesh::Elem::_p_level, libMesh::Elem::active(), libMesh::Elem::child(), std::max(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::n_children(), libMesh::Elem::p_level(), and libMesh::Elem::subactive().
Referenced by libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), and libMesh::Elem::max_descendant_p_level().
01864 { 01865 // This is undefined for subactive elements, 01866 // which have no active descendants 01867 libmesh_assert (!this->subactive()); 01868 if (this->active()) 01869 return this->p_level(); 01870 01871 unsigned int max_p_level = _p_level; 01872 for (unsigned int c=0; c != this->n_children(); c++) 01873 max_p_level = std::max(max_p_level, 01874 this->child(c)->max_descendant_p_level()); 01875 return max_p_level; 01876 }
| unsigned int libMesh::Elem::min_new_p_level_by_neighbor | ( | const Elem * | neighbor, | |
| unsigned int | current_min | |||
| ) | const [inherited] |
Returns the minimum new p refinement level (i.e. after refinement and coarsening is done) of elements which are descended from this and which share a side with the active neighbor
Definition at line 1638 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::child(), libMesh::Elem::COARSEN, libMesh::Elem::has_neighbor(), std::min(), libMesh::Elem::min_new_p_level_by_neighbor(), libMesh::Elem::n_children(), libMesh::Elem::p_level(), libMesh::Elem::p_refinement_flag(), libMesh::Elem::REFINE, libMesh::remote_elem, and libMesh::Elem::subactive().
Referenced by libMesh::MeshRefinement::eliminate_unrefined_patches(), and libMesh::Elem::min_new_p_level_by_neighbor().
01640 { 01641 libmesh_assert(!this->subactive()); 01642 libmesh_assert(neighbor_in->active()); 01643 01644 // If we're an active element this is simple 01645 if (this->active()) 01646 { 01647 unsigned int new_p_level = this->p_level(); 01648 if (this->p_refinement_flag() == Elem::REFINE) 01649 new_p_level += 1; 01650 if (this->p_refinement_flag() == Elem::COARSEN) 01651 { 01652 libmesh_assert_greater (new_p_level, 0); 01653 new_p_level -= 1; 01654 } 01655 return std::min(current_min, new_p_level); 01656 } 01657 01658 libmesh_assert(has_neighbor(neighbor_in)); 01659 01660 unsigned int min_p_level = current_min; 01661 01662 for (unsigned int c=0; c<this->n_children(); c++) 01663 { 01664 const Elem* const current_child = this->child(c); 01665 if (current_child && current_child != remote_elem) 01666 if (current_child->has_neighbor(neighbor_in)) 01667 min_p_level = 01668 current_child->min_new_p_level_by_neighbor(neighbor_in, 01669 min_p_level); 01670 } 01671 01672 return min_p_level; 01673 }
| unsigned int libMesh::Elem::min_p_level_by_neighbor | ( | const Elem * | neighbor, | |
| unsigned int | current_min | |||
| ) | const [inherited] |
Returns the minimum p refinement level of elements which are descended from this and which share a side with the active neighbor
Definition at line 1605 of file elem.C.
References libMesh::Elem::active(), libMesh::Elem::child(), libMesh::Elem::has_neighbor(), std::min(), libMesh::Elem::min_p_level_by_neighbor(), libMesh::Elem::n_children(), libMesh::Elem::p_level(), libMesh::remote_elem, and libMesh::Elem::subactive().
Referenced by libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), and libMesh::Elem::min_p_level_by_neighbor().
01607 { 01608 libmesh_assert(!this->subactive()); 01609 libmesh_assert(neighbor_in->active()); 01610 01611 // If we're an active element this is simple 01612 if (this->active()) 01613 return std::min(current_min, this->p_level()); 01614 01615 libmesh_assert(has_neighbor(neighbor_in)); 01616 01617 // The p_level() of an ancestor element is already the minimum 01618 // p_level() of its children - so if that's high enough, we don't 01619 // need to examine any children. 01620 if (current_min <= this->p_level()) 01621 return current_min; 01622 01623 unsigned int min_p_level = current_min; 01624 01625 for (unsigned int c=0; c<this->n_children(); c++) 01626 { 01627 const Elem* const current_child = this->child(c); 01628 if (current_child != remote_elem && current_child->has_neighbor(neighbor_in)) 01629 min_p_level = 01630 current_child->min_p_level_by_neighbor(neighbor_in, 01631 min_p_level); 01632 } 01633 01634 return min_p_level; 01635 }
| unsigned int libMesh::InfQuad::n_children | ( | ) | const [inline, virtual] |
- Returns:
- 2
Implements libMesh::Elem.
Definition at line 112 of file face_inf_quad.h.
Referenced by is_child_on_side().
| unsigned int libMesh::DofObject::n_comp | ( | const unsigned int | s, | |
| const unsigned int | var | |||
| ) | const [inline, inherited] |
- Returns:
- the number of components for variable
varof systemsassociated with thisDofObject. For example, theHIERARCHICshape functions may have multiple dof's associated with one node. Another example is theMONOMIALs, where only the elements hold the dof's, but for the different spatial directions, and orders, seeFE.
Definition at line 679 of file dof_object.h.
References libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), and libMesh::DofObject::var_to_vg().
Referenced by libMesh::DofMap::add_neighbors_to_send_list(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::dof_indices(), libMesh::DofObject::dof_number(), libMesh::DofObject::DofObject(), libMesh::Node::get_info(), libMesh::Elem::get_info(), libMesh::DofObject::n_dofs(), libMesh::DofMap::old_dof_indices(), libMesh::DofObject::operator=(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofMap::set_nonlocal_dof_objects(), and libMesh::System::zero_variable().
00681 { 00682 libmesh_assert_less (s, this->n_systems()); 00683 libmesh_assert_less (var, this->n_vars(s)); 00684 00685 return this->n_comp_group(s,this->var_to_vg(s,var)); 00686 }
| unsigned int libMesh::DofObject::n_comp_group | ( | const unsigned int | s, | |
| const unsigned int | vg | |||
| ) | const [inline, inherited] |
- Returns:
- the number of components for
VariableGroupvgof systemsassociated with thisDofObject. For example, theHIERARCHICshape functions may have multiple dof's associated with one node. Another example is theMONOMIALs, where only the elements hold the dof's, but for the different spatial directions, and orders, seeFE.
Definition at line 692 of file dof_object.h.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::ncv_magic, and libMesh::DofObject::start_idx().
Referenced by libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofObject::dof_number(), libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::n_comp(), libMesh::DofMap::reinit(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_n_vars_per_group(), and libMesh::DofMap::set_nonlocal_dof_objects().
00694 { 00695 libmesh_assert_less (s, this->n_systems()); 00696 libmesh_assert_less (vg, this->n_var_groups(s)); 00697 00698 const unsigned int 00699 start_idx_sys = this->start_idx(s); 00700 00701 libmesh_assert_less ((start_idx_sys + 2*vg), _idx_buf.size()); 00702 00703 return (_idx_buf[start_idx_sys + 2*vg] % ncv_magic); 00704 }
| unsigned int libMesh::DofObject::n_dofs | ( | const unsigned int | s, | |
| const unsigned int | var = libMesh::invalid_uint | |||
| ) | const [inline, inherited] |
- Returns:
- the number of degrees of freedom associated with system
sfor this object. Optionally only counts degrees of freedom for variable numbervar
Definition at line 547 of file dof_object.h.
References libMesh::invalid_uint, libMesh::DofObject::n_comp(), libMesh::DofObject::n_systems(), and libMesh::DofObject::n_vars().
00549 { 00550 libmesh_assert_less (s, this->n_systems()); 00551 00552 unsigned int num = 0; 00553 00554 // Count all variables 00555 if (var == libMesh::invalid_uint) 00556 for (unsigned int v=0; v<this->n_vars(s); v++) 00557 num += this->n_comp(s,v); 00558 00559 // Only count specified variable 00560 else 00561 num = this->n_comp(s,var); 00562 00563 return num; 00564 }
| unsigned int libMesh::InfQuad::n_edges | ( | ) | const [inline, virtual] |
- Returns:
- 3. All infinite quads have 1 edge in the base, and 2 perpendicular to the base.
Implements libMesh::Elem.
Definition at line 101 of file face_inf_quad.h.
| unsigned int libMesh::InfQuad::n_faces | ( | ) | const [inline, virtual] |
- Returns:
- 0. All 2D elements have no faces, just edges.
Implements libMesh::Elem.
Definition at line 107 of file face_inf_quad.h.
| virtual unsigned int libMesh::Elem::n_neighbors | ( | ) | const [inline, virtual, inherited] |
- Returns:
- the number of neighbors the element that has been derived from this class has. By default only face (or edge in 2D) neighbors are stored, so this method returns n_sides(), however it may be overloaded in a derived class
Definition at line 417 of file elem.h.
References libMesh::Elem::n_sides().
Referenced by libMesh::MetisPartitioner::_do_partition(), libMesh::Elem::_last_side(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::ParmetisPartitioner::build_graph(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::TetGenMeshInterface::check_hull_integrity(), libMesh::Elem::child_neighbor(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::MeshTools::find_hanging_nodes_and_parents(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::Elem::has_neighbor(), libMesh::Elem::has_topological_neighbor(), libMesh::LaplaceMeshSmoother::init(), libMesh::MeshTools::libmesh_assert_no_links_to_elem(), libMesh::Elem::libmesh_assert_valid_neighbors(), libMesh::MeshTools::libmesh_assert_valid_node_pointers(), libMesh::MeshTools::libmesh_assert_valid_remote_elems(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::Elem::make_links_to_me_remote(), libMesh::Elem::neighbor(), libMesh::Elem::nullify_neighbors(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::Parallel::packable_size(), libMesh::Elem::packed_size(), libMesh::Elem::set_neighbor(), libMesh::MeshTools::Modification::smooth(), libMesh::Elem::topological_neighbor(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), and libMesh::Elem::which_neighbor_am_i().
00418 { return this->n_sides(); }
| virtual unsigned int libMesh::Elem::n_nodes | ( | ) | const [pure virtual, inherited] |
- Returns:
- the number of nodes this element contains.
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism, libMesh::Prism15, libMesh::Prism18, libMesh::Pyramid, libMesh::Tet10, libMesh::Tet4, libMesh::Edge, libMesh::Edge3, libMesh::Edge4, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad, libMesh::Quad8, libMesh::Quad9, libMesh::Tri, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::FEMContext::_do_elem_position_set(), libMesh::MetisPartitioner::_do_partition(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::TetGenMeshInterface::assign_nodes_to_elem(), libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::EquationSystems::build_solution_vector(), libMesh::VTKIO::cells_to_vtk(), libMesh::Elem::coarsen(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::UnstructuredMesh::create_submesh(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::FE< Dim, T >::dofs_on_edge(), libMesh::FE< Dim, T >::dofs_on_side(), libMesh::FEMContext::elem_position_get(), libMesh::UNVIO::element_out(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::MeshTools::Modification::flatten(), libMesh::Elem::get_info(), libMesh::Elem::get_node(), libMesh::Elem::get_node_index(), libMesh::MeshTools::get_not_subactive_node_ids(), libMesh::ParmetisPartitioner::initialize(), libMesh::TreeNode< N >::insert(), libMesh::MeshTools::libmesh_assert_connected_nodes(), libMesh::MeshTools::libmesh_assert_old_dof_objects(), libMesh::Elem::libmesh_assert_valid_node_pointers(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::Elem::local_node(), libMesh::Elem::node(), libMesh::DofMap::old_dof_indices(), libMesh::BoundaryProjectSolution::operator()(), libMesh::ProjectFEMSolution::operator()(), libMesh::ProjectSolution::operator()(), libMesh::Elem::operator==(), libMesh::Hex::opposite_node(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::XdrIO::pack_element(), libMesh::Parallel::packable_size(), libMesh::Elem::packed_size(), libMesh::Elem::point(), libMesh::Elem::point_test(), libMesh::TetGenMeshInterface::pointset_convexhull(), libMesh::VTKIO::read(), libMesh::UCDIO::read_implementation(), libMesh::LegacyXdrIO::read_mesh(), libMesh::GmshIO::read_mesh(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::Elem::refine(), libMesh::FE< Dim, T >::reinit(), libMesh::DofMap::reinit(), libMesh::SerialMesh::renumber_nodes_and_elements(), libMesh::ParallelMesh::renumber_nodes_and_elements(), libMesh::HPCoarsenTest::select_refinement(), libMesh::Elem::set_node(), libMesh::Partitioner::set_node_processor_ids(), libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), libMesh::FE< Dim, T >::side_map(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::MeshTools::Modification::smooth(), libMesh::MeshTools::subdomain_bounding_box(), libMesh::BoundaryInfo::sync(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), libMesh::TetGenMeshInterface::triangulate_pointset(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::Elem::which_side_am_i(), libMesh::GMVIO::write_ascii_new_impl(), libMesh::Elem::write_connectivity(), libMesh::Nemesis_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_elements_discontinuous(), libMesh::EnsightIO::write_geometry_ascii(), libMesh::LegacyXdrIO::write_mesh(), libMesh::GmshIO::write_mesh(), libMesh::EnsightIO::write_scalar_ascii(), libMesh::GnuPlotIO::write_solution(), and libMesh::EnsightIO::write_vector_ascii().
| static unsigned int libMesh::ReferenceCounter::n_objects | ( | ) | [inline, static, inherited] |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 79 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
00080 { return _n_objects; }
| static unsigned int libMesh::ReferenceCounter::n_objects | ( | ) | [inline, static, inherited] |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 79 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
00080 { return _n_objects; }
| unsigned int libMesh::Elem::n_second_order_adjacent_vertices | ( | const unsigned int | n | ) | const [virtual, inherited] |
- Returns:
- the number of adjacent vertices, that uniquely define the location of the
second-order node. For linear elements ( default_order()==FIRST), this returns 0. This method is useful when converting linear elements to quadratic elements. Note thatnhas to be greater or equalthis->n_vertices().
Reimplemented in libMesh::Hex20, libMesh::Hex27, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfPrism12, libMesh::Prism15, libMesh::Prism18, libMesh::Tet10, libMesh::Edge3, libMesh::Edge4, libMesh::InfQuad6, libMesh::Quad8, libMesh::Quad9, and libMesh::Tri6.
Definition at line 1923 of file elem.C.
Referenced by libMesh::LaplaceMeshSmoother::smooth(), and libMesh::MeshTools::Modification::smooth().
| unsigned int libMesh::InfQuad::n_sides | ( | ) | const [inline, virtual] |
- Returns:
- 2 for the base, 1 otherwise
- 3. Infinite faces have one side less than their conventional counterparts, since one side is supposed to be located at infinity.
Implements libMesh::Elem.
Definition at line 90 of file face_inf_quad.h.
Referenced by is_child_on_side(), libMesh::InfQuad6::is_node_on_side(), libMesh::InfQuad4::is_node_on_side(), key(), and side().
| virtual unsigned int libMesh::Elem::n_sub_elem | ( | ) | const [pure virtual, inherited] |
- Returns:
- the number of children this element has that share side
s - 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 libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::GMVIO::write_ascii_new_impl(), libMesh::GMVIO::write_ascii_old_impl(), libMesh::Elem::write_connectivity(), and libMesh::DivaIO::write_stream().
| unsigned int libMesh::DofObject::n_systems | ( | ) | const [inline, inherited] |
- Returns:
- the number of systems associated with this
DofObject
Definition at line 625 of file dof_object.h.
References libMesh::DofObject::_idx_buf.
Referenced by libMesh::DofObject::add_system(), libMesh::DofObject::clear_dofs(), libMesh::DofMap::dof_indices(), libMesh::DofObject::dof_number(), libMesh::DofObject::DofObject(), libMesh::DofObject::end_idx(), libMesh::Node::get_info(), libMesh::Elem::get_info(), libMesh::DofObject::has_dofs(), libMesh::DofObject::invalidate_dofs(), libMesh::MeshTools::libmesh_assert_equal_n_systems(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_dofs(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), libMesh::DofMap::old_dof_indices(), libMesh::DofObject::operator=(), libMesh::Elem::refine(), libMesh::EquationSystems::reinit(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_comp(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_n_systems(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofObject::set_vg_dof_base(), libMesh::DofObject::start_idx(), and libMesh::DofObject::vg_dof_base().
| unsigned int libMesh::DofObject::n_var_groups | ( | const unsigned int | s | ) | const [inline, inherited] |
- Returns:
- the number of
VariableGroupvariable groups associated with systemsfor thisDofObject
Definition at line 634 of file dof_object.h.
References libMesh::DofObject::end_idx(), libMesh::DofObject::n_systems(), and libMesh::DofObject::start_idx().
Referenced by libMesh::DofObject::add_system(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofObject::DofObject(), libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_vars(), libMesh::DofObject::operator=(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_n_systems(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::DofObject::set_vg_dof_base(), libMesh::DofObject::var_to_vg(), and libMesh::DofObject::vg_dof_base().
| unsigned int libMesh::DofObject::n_vars | ( | const unsigned int | s | ) | const [inline, inherited] |
Definition at line 661 of file dof_object.h.
References libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::n_vars().
00662 { 00663 libmesh_assert_less (s, this->n_systems()); 00664 00665 const unsigned int nvg = this->n_var_groups(s); 00666 00667 unsigned int val=0; 00668 00669 for (unsigned int vg=0; vg<nvg; vg++) 00670 val += this->n_vars(s,vg); 00671 00672 return val; 00673 }
| unsigned int libMesh::DofObject::n_vars | ( | const unsigned int | s, | |
| const unsigned int | vg | |||
| ) | const [inline, inherited] |
- Returns:
- the number of
Variablevariables associated withVariableGroupvgin systemsfor thisDofObject
Definition at line 644 of file dof_object.h.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::ncv_magic, and libMesh::DofObject::start_idx().
Referenced by libMesh::DofMap::add_neighbors_to_send_list(), libMesh::DofObject::add_system(), libMesh::DofObject::dof_number(), libMesh::DofObject::DofObject(), libMesh::Node::get_info(), libMesh::Elem::get_info(), libMesh::DofObject::has_dofs(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_dofs(), libMesh::DofObject::n_vars(), libMesh::DofObject::operator=(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_comp(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_n_systems(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::DofObject::system_var_to_vg_var(), and libMesh::DofObject::var_to_vg().
00646 { 00647 libmesh_assert_less (s, this->n_systems()); 00648 libmesh_assert_less (vg, this->n_var_groups(s)); 00649 00650 const unsigned int start_idx_sys = this->start_idx(s); 00651 00652 libmesh_assert_less ((start_idx_sys + 2*vg), _idx_buf.size()); 00653 00654 return (libmesh_cast_int<unsigned int> 00655 (_idx_buf[start_idx_sys + 2*vg]) / ncv_magic); 00656 }
| unsigned int libMesh::InfQuad::n_vertices | ( | ) | const [inline, virtual] |
- Returns:
- 4. All infinite quads (in our setting) have 4 vertices.
Implements libMesh::Elem.
Definition at line 95 of file face_inf_quad.h.
Referenced by origin(), libMesh::InfQuad6::second_order_adjacent_vertex(), and libMesh::InfQuad6::second_order_child_vertex().
| Elem * libMesh::Elem::neighbor | ( | const unsigned int | i | ) | const [inline, inherited] |
- Returns:
- a pointer to the
neighbor of this element. If MeshBase::find_neighbors()has not been called this simply returnsNULL. IfMeshBase::find_neighbors()has been called and this returnsNULLthen the side is on a boundary of the domain.
Definition at line 1431 of file elem.h.
References libMesh::Elem::_elemlinks, and libMesh::Elem::n_neighbors().
Referenced by libMesh::MetisPartitioner::_do_partition(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::BoundaryInfo::boundary_id(), libMesh::BoundaryInfo::boundary_ids(), libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::ParmetisPartitioner::build_graph(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::TetGenMeshInterface::check_hull_integrity(), libMesh::Elem::child_neighbor(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::Elem::family_tree_by_subneighbor(), libMesh::Elem::find_edge_neighbors(), libMesh::Patch::find_face_neighbors(), libMesh::MeshTools::find_hanging_nodes_and_parents(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::Elem::find_point_neighbors(), libMesh::MeshTools::Modification::flatten(), libMesh::Elem::get_info(), libMesh::BoundaryInfo::has_boundary_id(), libMesh::Elem::has_neighbor(), libMesh::LaplaceMeshSmoother::init(), libMesh::MeshTools::libmesh_assert_no_links_to_elem(), libMesh::Elem::libmesh_assert_valid_neighbors(), libMesh::MeshTools::libmesh_assert_valid_node_pointers(), libMesh::MeshTools::libmesh_assert_valid_remote_elems(), libMesh::Elem::make_links_to_me_local(), libMesh::Elem::make_links_to_me_remote(), libMesh::BoundaryInfo::n_boundary_ids(), libMesh::Elem::nullify_neighbors(), libMesh::SparsityPattern::Build::operator()(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::GmshIO::read_mesh(), libMesh::REINIT_ERROR(), libMesh::FE< Dim, T >::side_map(), libMesh::Elem::SideIter::side_on_boundary(), libMesh::BoundaryInfo::side_with_boundary_id(), libMesh::MeshTools::Modification::smooth(), libMesh::SerialMesh::stitch_meshes(), libMesh::BoundaryInfo::sync(), libMesh::MeshRefinement::topological_neighbor(), libMesh::Elem::topological_neighbor(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::Elem::which_neighbor_am_i(), libMesh::GnuPlotIO::write_solution(), and libMesh::DivaIO::write_stream().
01432 { 01433 libmesh_assert_less (i, this->n_neighbors()); 01434 01435 return _elemlinks[i+1]; 01436 }
| dof_id_type libMesh::Elem::node | ( | const unsigned int | i | ) | const [inline, virtual, inherited] |
- Returns:
- the global id number of local
Nodei.
Reimplemented in libMesh::RemoteElem.
Definition at line 1358 of file elem.h.
References libMesh::Elem::_nodes, libMesh::DofObject::id(), libMesh::DofObject::invalid_id, and libMesh::Elem::n_nodes().
Referenced by libMesh::DofMap::add_neighbors_to_send_list(), libMesh::UnstructuredMesh::all_first_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::EquationSystems::build_solution_vector(), libMesh::VTKIO::cells_to_vtk(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::FEMap::compute_face_map(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::Tri6::connectivity(), libMesh::Quad9::connectivity(), libMesh::Quad8::connectivity(), libMesh::InfQuad6::connectivity(), libMesh::Edge4::connectivity(), libMesh::Edge3::connectivity(), libMesh::Tet10::connectivity(), libMesh::Prism18::connectivity(), libMesh::InfPrism12::connectivity(), libMesh::InfHex18::connectivity(), libMesh::InfHex16::connectivity(), libMesh::Hex27::connectivity(), libMesh::Hex20::connectivity(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::create_submesh(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::MeshTools::find_hanging_nodes_and_parents(), libMesh::MeshTools::get_not_subactive_node_ids(), libMesh::Tri6::key(), libMesh::Tri::key(), libMesh::Quad9::key(), libMesh::Quad8::key(), libMesh::Quad::key(), key(), libMesh::Edge::key(), libMesh::Tet::key(), libMesh::Pyramid::key(), libMesh::Prism18::key(), libMesh::Prism::key(), libMesh::InfPrism::key(), libMesh::InfHex18::key(), libMesh::InfHex::key(), libMesh::Hex27::key(), libMesh::Hex::key(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::Elem::local_node(), libMesh::Elem::operator==(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::XdrIO::pack_element(), libMesh::SerialMesh::renumber_nodes_and_elements(), libMesh::ParallelMesh::renumber_nodes_and_elements(), libMesh::FE< Dim, T >::side_map(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::MeshTools::subdomain_bounding_box(), libMesh::BoundaryInfo::sync(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), libMesh::Parallel::unpack(), libMesh::GMVIO::write_ascii_new_impl(), libMesh::Elem::write_connectivity(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::EnsightIO::write_geometry_ascii(), libMesh::LegacyXdrIO::write_mesh(), libMesh::GmshIO::write_mesh(), libMesh::GmshIO::write_post(), libMesh::EnsightIO::write_scalar_ascii(), libMesh::GnuPlotIO::write_solution(), libMesh::DivaIO::write_stream(), and libMesh::EnsightIO::write_vector_ascii().
01359 { 01360 libmesh_assert_less (i, this->n_nodes()); 01361 libmesh_assert(_nodes[i]); 01362 libmesh_assert_not_equal_to (_nodes[i]->id(), Node::invalid_id); 01363 01364 return _nodes[i]->id(); 01365 }
| void libMesh::Elem::nullify_neighbors | ( | ) | [protected, inherited] |
Replaces this element with NULL for all of its neighbors. This is useful when deleting an element.
Definition at line 1897 of file elem.C.
References libMesh::Elem::level(), libMesh::Elem::n_neighbors(), libMesh::Elem::neighbor(), libMesh::remote_elem, libMesh::Elem::set_neighbor(), and libMesh::Elem::which_neighbor_am_i().
Referenced by libMesh::MeshRefinement::_coarsen_elements().
01898 { 01899 // Tell any of my neighbors about my death... 01900 // Looks strange, huh? 01901 for (unsigned int n=0; n<this->n_neighbors(); n++) 01902 { 01903 Elem* current_neighbor = this->neighbor(n); 01904 if (current_neighbor && current_neighbor != remote_elem) 01905 { 01906 // Note: it is possible that I see the neighbor 01907 // (which is coarser than me) 01908 // but they don't see me, so avoid that case. 01909 if (current_neighbor->level() == this->level()) 01910 { 01911 const unsigned int w_n_a_i = current_neighbor->which_neighbor_am_i(this); 01912 libmesh_assert_less (w_n_a_i, current_neighbor->n_neighbors()); 01913 current_neighbor->set_neighbor(w_n_a_i, NULL); 01914 this->set_neighbor(n, NULL); 01915 } 01916 } 01917 } 01918 }
| bool libMesh::Elem::on_boundary | ( | ) | const [inline, inherited] |
- Returns:
trueif this element has a side coincident with a boundary (indicated by aNULLneighbor),falseotherwise.
Definition at line 1489 of file elem.h.
References libMesh::Elem::has_neighbor().
01490 { 01491 // By convention, the element is on the boundary 01492 // if it has a NULL neighbor. 01493 return this->has_neighbor(NULL); 01494 }
| bool libMesh::Elem::operator== | ( | const Elem & | rhs | ) | const [inherited] |
- Returns:
- true if two elements are identical, false otherwise. This is true if the elements are connected to identical global nodes, regardless of how those nodes might be numbered local to the elements.
Definition at line 382 of file elem.C.
References libMesh::Elem::n_nodes(), and libMesh::Elem::node().
00383 { 00384 00385 // Cast rhs to an Elem* 00386 // const Elem* rhs_elem = dynamic_cast<const Elem*>(&rhs); 00387 const Elem* rhs_elem = &rhs; 00388 00389 // If we cannot cast to an Elem*, rhs must be a Node 00390 // if(rhs_elem == static_cast<const Elem*>(NULL)) 00391 // return false; 00392 00393 // libmesh_assert (n_nodes()); 00394 // libmesh_assert (rhs.n_nodes()); 00395 00396 // // Elements can only be equal if they 00397 // // contain the same number of nodes. 00398 // if (this->n_nodes() == rhs.n_nodes()) 00399 // { 00400 // // Create a set that contains our global 00401 // // node numbers and those of our neighbor. 00402 // // If the set is the same size as the number 00403 // // of nodes in both elements then they must 00404 // // be connected to the same nodes. 00405 // std::set<unsigned int> nodes_set; 00406 00407 // for (unsigned int n=0; n<this->n_nodes(); n++) 00408 // { 00409 // nodes_set.insert(this->node(n)); 00410 // nodes_set.insert(rhs.node(n)); 00411 // } 00412 00413 // // If this passes the elements are connected 00414 // // to the same global nodes 00415 // if (nodes_set.size() == this->n_nodes()) 00416 // return true; 00417 // } 00418 00419 // // If we get here it is because the elements either 00420 // // do not have the same number of nodes or they are 00421 // // connected to different nodes. Either way they 00422 // // are not the same element 00423 // return false; 00424 00425 // Useful typedefs 00426 typedef std::vector<dof_id_type>::iterator iterator; 00427 00428 00429 // Elements can only be equal if they 00430 // contain the same number of nodes. 00431 // However, we will only test the vertices, 00432 // which is sufficient & cheaper 00433 if (this->n_nodes() == rhs_elem->n_nodes()) 00434 { 00435 // The number of nodes in the element 00436 const unsigned int nn = this->n_nodes(); 00437 00438 // Create a vector that contains our global 00439 // node numbers and those of our neighbor. 00440 // If the sorted, unique vector is the same size 00441 // as the number of nodes in both elements then 00442 // they must be connected to the same nodes. 00443 // 00444 // The vector will be no larger than 2*n_nodes(), 00445 // so we might as well reserve the space. 00446 std::vector<dof_id_type> common_nodes; 00447 common_nodes.reserve (2*nn); 00448 00449 // Add the global indices of the nodes 00450 for (unsigned int n=0; n<nn; n++) 00451 { 00452 common_nodes.push_back (this->node(n)); 00453 common_nodes.push_back (rhs_elem->node(n)); 00454 } 00455 00456 // Sort the vector and find out how long 00457 // the sorted vector is. 00458 std::sort (common_nodes.begin(), common_nodes.end()); 00459 00460 iterator new_end = std::unique (common_nodes.begin(), 00461 common_nodes.end()); 00462 00463 const int new_size = libmesh_cast_int<int> 00464 (std::distance (common_nodes.begin(), new_end)); 00465 00466 // If this passes the elements are connected 00467 // to the same global vertex nodes 00468 if (new_size == static_cast<int>(nn)) 00469 return true; 00470 } 00471 00472 // If we get here it is because the elements either 00473 // do not have the same number of nodes or they are 00474 // connected to different nodes. Either way they 00475 // are not the same element 00476 return false; 00477 }
| unsigned int libMesh::Elem::opposite_node | ( | const unsigned int | n, | |
| const unsigned int | s | |||
| ) | const [virtual, inherited] |
Reimplemented in libMesh::Hex, libMesh::Edge, and libMesh::Quad.
| unsigned int libMesh::Elem::opposite_side | ( | const unsigned int | s | ) | const [virtual, inherited] |
Reimplemented in libMesh::Hex, libMesh::Edge, and libMesh::Quad.
| Point libMesh::InfQuad::origin | ( | ) | const [inline, virtual] |
- Returns:
- the origin of this infinite element.
Reimplemented from libMesh::Elem.
Definition at line 204 of file face_inf_quad.h.
References n_vertices(), and libMesh::Elem::point().
Referenced by libMesh::InfQuad4::contains_point().
00205 { 00206 return ( this->point(0)*2 - this->point(this->n_vertices()/2) ); 00207 }
| unsigned int libMesh::Elem::p_level | ( | ) | const [inline, inherited] |
Returns the value of the p refinement level of an active element, or the minimum value of the p refinement levels of an ancestor element's descendants
Definition at line 1776 of file elem.h.
References libMesh::Elem::_p_level.
Referenced by libMesh::MeshRefinement::_coarsen_elements(), libMesh::MeshRefinement::_refine_elements(), libMesh::UnstructuredMesh::all_first_order(), libMesh::Elem::coarsen(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::FEInterface::compute_data(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::DofMap::dof_indices(), libMesh::FE< Dim, T >::dofs_on_edge(), libMesh::FE< Dim, T >::dofs_on_side(), libMesh::FE< Dim, T >::edge_reinit(), libMesh::Elem::Elem(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::Elem::get_info(), libMesh::InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::min_new_p_level_by_neighbor(), libMesh::Elem::min_p_level_by_neighbor(), libMesh::DofMap::old_dof_indices(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::XdrIO::pack_element(), libMesh::Elem::refine(), libMesh::InfFE< Dim, T_radial, T_map >::reinit(), libMesh::FEXYZ< Dim >::reinit(), libMesh::FE< Dim, T >::reinit(), libMesh::DofMap::reinit(), libMesh::REINIT_ERROR(), libMesh::HPCoarsenTest::select_refinement(), libMesh::Elem::set_p_level(), libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), libMesh::FE< Dim, T >::side_map(), libMesh::Parallel::unpack(), and libMesh::GMVIO::write_ascii_new_impl().
01777 { 01778 #ifdef LIBMESH_ENABLE_AMR 01779 return _p_level; 01780 #else 01781 return 0; 01782 #endif 01783 }
| Elem::RefinementState libMesh::Elem::p_refinement_flag | ( | ) | const [inline, inherited] |
Returns the value of the p refinement flag for the element.
Definition at line 1847 of file elem.h.
References libMesh::Elem::_pflag.
Referenced by libMesh::MeshRefinement::_coarsen_elements(), libMesh::MeshRefinement::_refine_elements(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::Elem::get_info(), libMesh::ParallelMesh::libmesh_assert_valid_parallel_flags(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshRefinement::make_flags_parallel_consistent(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::Elem::min_new_p_level_by_neighbor(), libMesh::DofMap::old_dof_indices(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::Elem::refine(), and libMesh::Parallel::unpack().
01848 { 01849 return static_cast<RefinementState>(_pflag); 01850 }
| void libMesh::DofObject::pack_indexing | ( | std::back_insert_iterator< std::vector< int > > | target | ) | const [inherited] |
A method for creating packed data from our index buffer - basically a copy with prepended size with our current implementation.
Definition at line 516 of file dof_object.C.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::old_dof_object, and libMesh::DofObject::pack_indexing().
Referenced by libMesh::Parallel::pack(), libMesh::Node::PackedNode::pack(), libMesh::Elem::PackedElem::pack(), and libMesh::DofObject::pack_indexing().
00517 { 00518 #ifdef LIBMESH_ENABLE_AMR 00519 // We might need to pack old_dof_object too 00520 *target++ = (old_dof_object == NULL) ? 0 : 1; 00521 #endif 00522 00523 *target++ = _idx_buf.size(); 00524 std::copy(_idx_buf.begin(), _idx_buf.end(), target); 00525 00526 #ifdef LIBMESH_ENABLE_AMR 00527 if (old_dof_object) 00528 old_dof_object->pack_indexing(target); 00529 #endif 00530 }
| unsigned int libMesh::DofObject::packed_indexing_size | ( | ) | const [inherited] |
If we pack our indices into an buffer for communications, how many ints do we need?
Definition at line 441 of file dof_object.C.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::old_dof_object, and libMesh::DofObject::packed_indexing_size().
Referenced by libMesh::Parallel::pack(), libMesh::Parallel::packable_size(), libMesh::DofObject::packed_indexing_size(), libMesh::Node::packed_size(), libMesh::Elem::packed_size(), and libMesh::Parallel::unpack().
00442 { 00443 return 00444 #ifdef LIBMESH_ENABLE_AMR 00445 ((old_dof_object == NULL) ? 0 : old_dof_object->packed_indexing_size()) + 2 + 00446 #else 00447 1 + 00448 #endif 00449 _idx_buf.size(); 00450 }
| unsigned int libMesh::Elem::packed_size | ( | ) | const [inline, inherited] |
Definition at line 2355 of file elem.h.
References libMesh::Elem::PackedElem::header_size, libMesh::Elem::n_neighbors(), libMesh::Elem::n_nodes(), and libMesh::DofObject::packed_indexing_size().
Referenced by libMesh::Elem::PackedElem::pack().
02356 { 02357 return PackedElem::header_size + this->n_nodes() + 02358 this->n_neighbors() + this->packed_indexing_size(); 02359 }
| Elem * libMesh::Elem::parent | ( | ) | [inline, inherited] |
- Returns:
- a pointer to the element's parent. Returns
NULLif the element was not created via refinement, i.e. was read from file.
Definition at line 1669 of file elem.h.
References libMesh::Elem::_elemlinks.
01670 { 01671 return _elemlinks[0]; 01672 }
| const Elem * libMesh::Elem::parent | ( | ) | const [inline, inherited] |
- Returns:
- a const pointer to the element's parent. Returns
NULLif the element was not created via refinement, i.e. was read from file.
Definition at line 1661 of file elem.h.
References libMesh::Elem::_elemlinks.
Referenced by libMesh::LinearPartitioner::_do_partition(), libMesh::Elem::add_child(), libMesh::UnstructuredMesh::all_first_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::BoundaryInfo::boundary_id(), libMesh::BoundaryInfo::boundary_ids(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::Elem::child_neighbor(), libMesh::FEMap::compute_face_map(), libMesh::FEAbstract::compute_node_constraints(), libMesh::UnstructuredMesh::contract(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::MeshRefinement::create_parent_error_vector(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::Elem::Elem(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::Elem::family_tree_by_subneighbor(), libMesh::MeshTools::find_hanging_nodes_and_parents(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_error_tolerance(), libMesh::Elem::get_info(), libMesh::BoundaryInfo::has_boundary_id(), libMesh::Elem::level(), libMesh::MeshTools::libmesh_assert_no_links_to_elem(), libMesh::MeshTools::libmesh_assert_valid_amr_elem_ids(), libMesh::Elem::libmesh_assert_valid_neighbors(), libMesh::MeshTools::libmesh_assert_valid_node_pointers(), libMesh::MeshTools::libmesh_assert_valid_refinement_tree(), libMesh::MeshTools::libmesh_assert_valid_remote_elems(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::Elem::make_links_to_me_local(), libMesh::Elem::make_links_to_me_remote(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::BoundaryInfo::n_boundary_ids(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::BoundaryInfo::raw_boundary_ids(), libMesh::Elem::refine(), libMesh::HPCoarsenTest::select_refinement(), libMesh::Elem::set_p_level(), libMesh::BoundaryInfo::side_with_boundary_id(), libMesh::MeshTools::Modification::smooth(), libMesh::Elem::subactive(), libMesh::BoundaryInfo::sync(), libMesh::Elem::top_parent(), libMesh::Elem::topological_neighbor(), libMesh::Parallel::unpack(), libMesh::Elem::which_neighbor_am_i(), and libMesh::LegacyXdrIO::write_mesh().
01662 { 01663 return _elemlinks[0]; 01664 }
| Point & libMesh::Elem::point | ( | const unsigned int | i | ) | [inline, virtual, inherited] |
Reimplemented in libMesh::RemoteElem.
Definition at line 1348 of file elem.h.
References libMesh::Elem::_nodes, and libMesh::Elem::n_nodes().
| const Point & libMesh::Elem::point | ( | const unsigned int | i | ) | const [inline, virtual, inherited] |
Reimplemented in libMesh::RemoteElem.
Definition at line 1336 of file elem.h.
References libMesh::Elem::_nodes, libMesh::DofObject::invalid_id, and libMesh::Elem::n_nodes().
Referenced by libMesh::PostscriptIO::_compute_edge_bezier_coeffs(), libMesh::MeshTools::Modification::all_tri(), libMesh::Tet::choose_diagonal(), libMesh::Elem::coarsen(), libMesh::InfFE< Dim, T_radial, T_map >::combine_base_radial(), libMesh::FEMap::compute_affine_map(), libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), libMesh::FEMap::compute_edge_map(), libMesh::FEXYZMap::compute_face_map(), libMesh::FEMap::compute_face_map(), libMesh::FEMap::compute_single_point_map(), libMesh::Elem::contains_edge_of(), libMesh::InfQuad4::contains_point(), libMesh::InfPrism6::contains_point(), libMesh::InfHex8::contains_point(), libMesh::Elem::contains_vertex_of(), libMesh::UnstructuredMesh::create_submesh(), libMesh::FEMContext::elem_position_get(), libMesh::Tri6::has_affine_map(), libMesh::Quad9::has_affine_map(), libMesh::Quad8::has_affine_map(), libMesh::Quad4::has_affine_map(), libMesh::Edge4::has_affine_map(), libMesh::Edge3::has_affine_map(), libMesh::Tet10::has_affine_map(), libMesh::Prism6::has_affine_map(), libMesh::Prism18::has_affine_map(), libMesh::Prism15::has_affine_map(), libMesh::Hex8::has_affine_map(), libMesh::Hex27::has_affine_map(), libMesh::Hex20::has_affine_map(), libMesh::Elem::hmax(), libMesh::Elem::hmin(), libMesh::TreeNode< N >::insert(), libMesh::InfFE< Dim, T_radial, T_map >::inverse_map(), libMesh::Elem::length(), libMesh::InfFE< Dim, T_radial, T_map >::map(), libMesh::FE< Dim, T >::map(), libMesh::FE< Dim, T >::map_eta(), libMesh::FE< Dim, T >::map_xi(), libMesh::FE< Dim, T >::map_zeta(), libMesh::Tri3::min_and_max_angle(), libMesh::Tet4::min_and_max_angle(), libMesh::BoundaryProjectSolution::operator()(), libMesh::ProjectFEMSolution::operator()(), libMesh::ProjectSolution::operator()(), origin(), libMesh::InfEdge2::origin(), libMesh::InfCell::origin(), libMesh::PostscriptIO::plot_linear_elem(), libMesh::Elem::point_test(), libMesh::Elem::refine(), libMesh::FE< Dim, T >::reinit(), libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), libMesh::MeshTools::Modification::smooth(), libMesh::Quad4::volume(), libMesh::Edge3::volume(), libMesh::Edge2::volume(), libMesh::Elem::which_side_am_i(), libMesh::EnsightIO::write_geometry_ascii(), and libMesh::GmshIO::write_post().
01337 { 01338 libmesh_assert_less (i, this->n_nodes()); 01339 libmesh_assert(_nodes[i]); 01340 libmesh_assert_not_equal_to (_nodes[i]->id(), Node::invalid_id); 01341 01342 return *_nodes[i]; 01343 }
| void libMesh::ReferenceCounter::print_info | ( | std::ostream & | out = libMesh::out |
) | [static, inherited] |
Prints the reference information, by default to libMesh::out.
Definition at line 88 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
00089 { 00090 if( _enable_print_counter ) out_stream << ReferenceCounter::get_info(); 00091 }
| void libMesh::ReferenceCounter::print_info | ( | std::ostream & | out = libMesh::out |
) | [static, inherited] |
Prints the reference information, by default to libMesh::out.
Definition at line 88 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
00089 { 00090 if( _enable_print_counter ) out_stream << ReferenceCounter::get_info(); 00091 }
| void libMesh::Elem::print_info | ( | std::ostream & | os = libMesh::out |
) | const [inherited] |
Prints relevant information about the element.
Definition at line 1820 of file elem.C.
References libMesh::Elem::get_info().
Referenced by libMesh::FE< Dim, T >::inverse_map(), and libMesh::operator<<().
01821 { 01822 os << this->get_info() 01823 << std::endl; 01824 }
| void libMesh::DofObject::processor_id | ( | const processor_id_type | pid | ) | [inline, inherited] |
Sets the processor_id for this DofObject.
Definition at line 609 of file dof_object.h.
References libMesh::DofObject::processor_id().
00610 { 00611 this->processor_id() = pid; 00612 }
| processor_id_type & libMesh::DofObject::processor_id | ( | ) | [inline, inherited] |
- Returns:
- the processor that this element belongs to as a writeable reference.
Definition at line 601 of file dof_object.h.
References libMesh::DofObject::_processor_id.
00602 { 00603 return _processor_id; 00604 }
| processor_id_type libMesh::DofObject::processor_id | ( | ) | const [inline, inherited] |
- Returns:
- the processor that this element belongs to.
Definition at line 593 of file dof_object.h.
References libMesh::DofObject::_processor_id.
Referenced by libMesh::MetisPartitioner::_do_partition(), libMesh::LinearPartitioner::_do_partition(), libMesh::CentroidPartitioner::_do_partition(), libMesh::GMVIO::_read_materials(), libMesh::ParallelMesh::add_elem(), libMesh::Patch::add_local_face_neighbors(), libMesh::Patch::add_local_point_neighbors(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::ParallelMesh::add_node(), libMesh::SerialMesh::add_point(), libMesh::ParallelMesh::add_point(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::ParmetisPartitioner::assign_partitioning(), libMesh::Patch::build_around_element(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::UnstructuredMesh::create_submesh(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::Elem::Elem(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshTools::Modification::flatten(), libMesh::Node::get_info(), libMesh::Elem::get_info(), libMesh::DofMap::get_info(), libMesh::DofMap::get_local_constraints(), libMesh::MeshFunction::gradient(), libMesh::MeshFunction::hessian(), libMesh::DofObject::invalidate_processor_id(), libMesh::Elem::is_semilocal(), libMesh::MeshTools::libmesh_assert_valid_amr_elem_ids(), libMesh::MeshTools::libmesh_assert_valid_elem_ids(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshFunction::operator()(), libMesh::Parallel::pack(), libMesh::Node::PackedNode::pack(), libMesh::Elem::PackedElem::pack(), libMesh::XdrIO::pack_element(), libMesh::Partitioner::partition_unpartitioned_elements(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::DofObject::processor_id(), libMesh::Nemesis_IO::read(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::MeshData::read_xdr(), libMesh::Elem::refine(), libMesh::DofMap::scatter_constraints(), libMesh::Partitioner::set_node_processor_ids(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::BoundaryInfo::sync(), libMesh::Parallel::sync_dofobject_data_by_id(), libMesh::Parallel::unpack(), libMesh::Node::PackedNode::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::GmshIO::write_mesh(), and libMesh::Nemesis_IO_Helper::write_sidesets().
00594 { 00595 return _processor_id; 00596 }
Returns the suggested quality bounds for the hex based on quality measure q. These are the values suggested by the CUBIT User's Manual.
Reimplemented from libMesh::Elem.
Definition at line 142 of file face_inf_quad.C.
References libMeshEnums::ASPECT_RATIO, libMeshEnums::CONDITION, libMeshEnums::DISTORTION, libMeshEnums::JACOBIAN, libMeshEnums::MAX_ANGLE, libMeshEnums::MIN_ANGLE, libMesh::out, libMeshEnums::SHAPE, libMeshEnums::SHEAR, libMeshEnums::SIZE, libMeshEnums::SKEW, libMeshEnums::STRETCH, libMeshEnums::TAPER, and libMeshEnums::WARP.
00143 { 00144 std::pair<Real, Real> bounds; 00145 00146 switch (q) 00147 { 00148 00149 case ASPECT_RATIO: 00150 bounds.first = 1.; 00151 bounds.second = 4.; 00152 break; 00153 00154 case SKEW: 00155 bounds.first = 0.; 00156 bounds.second = 0.5; 00157 break; 00158 00159 case TAPER: 00160 bounds.first = 0.; 00161 bounds.second = 0.7; 00162 break; 00163 00164 case WARP: 00165 bounds.first = 0.9; 00166 bounds.second = 1.; 00167 break; 00168 00169 case STRETCH: 00170 bounds.first = 0.25; 00171 bounds.second = 1.; 00172 break; 00173 00174 case MIN_ANGLE: 00175 bounds.first = 45.; 00176 bounds.second = 90.; 00177 break; 00178 00179 case MAX_ANGLE: 00180 bounds.first = 90.; 00181 bounds.second = 135.; 00182 break; 00183 00184 case CONDITION: 00185 bounds.first = 1.; 00186 bounds.second = 4.; 00187 break; 00188 00189 case JACOBIAN: 00190 bounds.first = 0.5; 00191 bounds.second = 1.; 00192 break; 00193 00194 case SHEAR: 00195 case SHAPE: 00196 case SIZE: 00197 bounds.first = 0.3; 00198 bounds.second = 1.; 00199 break; 00200 00201 case DISTORTION: 00202 bounds.first = 0.6; 00203 bounds.second = 1.; 00204 break; 00205 00206 default: 00207 libMesh::out << "Warning: Invalid quality measure chosen." << std::endl; 00208 bounds.first = -1; 00209 bounds.second = -1; 00210 } 00211 00212 return bounds; 00213 }
| Real libMesh::InfQuad::quality | ( | const ElemQuality | q | ) | const [virtual] |
Based on the quality metric q specified by the user, returns a quantitative assessment of element quality.
Reimplemented from libMesh::Elem.
Definition at line 134 of file face_inf_quad.C.
| void libMesh::Elem::refine | ( | MeshRefinement & | mesh_refinement | ) | [virtual, inherited] |
Refine the element.
The following functions only apply when AMR is enabled and thus are not present otherwise.
Definition at line 41 of file elem_refinement.C.
References libMesh::Elem::_children, libMesh::Elem::active(), libMesh::MeshRefinement::add_elem(), libMesh::MeshRefinement::add_point(), libMesh::Elem::ancestor(), libMesh::Elem::build(), libMesh::Elem::child(), libMesh::Elem::embedding_matrix(), libMesh::Elem::get_node(), libMesh::Elem::hmin(), libMesh::Elem::INACTIVE, libMesh::Elem::JUST_REFINED, libMesh::Elem::n_children(), libMesh::Elem::n_nodes(), libMesh::DofObject::n_systems(), libMesh::Elem::p_level(), libMesh::Elem::p_refinement_flag(), libMesh::Elem::parent(), libMesh::Elem::point(), libMesh::DofObject::processor_id(), libMesh::Real, libMesh::Elem::REFINE, libMesh::Elem::refinement_flag(), libMesh::AutoPtr< Tp >::release(), libMesh::DofObject::set_n_systems(), libMesh::Elem::set_node(), libMesh::Elem::set_p_level(), libMesh::Elem::set_p_refinement_flag(), libMesh::Elem::set_refinement_flag(), libMesh::Elem::subactive(), libMesh::TOLERANCE, and libMesh::Elem::type().
00042 { 00043 libmesh_assert_equal_to (this->refinement_flag(), Elem::REFINE); 00044 libmesh_assert (this->active()); 00045 00046 // Create my children if necessary 00047 if (!_children) 00048 { 00049 _children = new Elem*[this->n_children()]; 00050 00051 unsigned int parent_p_level = this->p_level(); 00052 for (unsigned int c=0; c<this->n_children(); c++) 00053 { 00054 _children[c] = Elem::build(this->type(), this).release(); 00055 _children[c]->set_refinement_flag(Elem::JUST_REFINED); 00056 _children[c]->set_p_level(parent_p_level); 00057 _children[c]->set_p_refinement_flag(this->p_refinement_flag()); 00058 } 00059 00060 // Compute new nodal locations 00061 // and asssign nodes to children 00062 // Make these static. It is unlikely the 00063 // sizes will change from call to call, so having these 00064 // static should save on reallocations 00065 std::vector<std::vector<Point> > p (this->n_children()); 00066 std::vector<std::vector<Node*> > nodes(this->n_children()); 00067 00068 00069 // compute new nodal locations 00070 for (unsigned int c=0; c<this->n_children(); c++) 00071 { 00072 Elem *current_child = this->child(c); 00073 p[c].resize (current_child->n_nodes()); 00074 nodes[c].resize(current_child->n_nodes()); 00075 00076 for (unsigned int nc=0; nc<current_child->n_nodes(); nc++) 00077 { 00078 // zero entries 00079 p[c][nc].zero(); 00080 nodes[c][nc] = NULL; 00081 00082 for (unsigned int n=0; n<this->n_nodes(); n++) 00083 { 00084 // The value from the embedding matrix 00085 const float em_val = this->embedding_matrix(c,nc,n); 00086 00087 if (em_val != 0.) 00088 { 00089 p[c][nc].add_scaled (this->point(n), em_val); 00090 00091 // We may have found the node, in which case we 00092 // won't need to look it up later. 00093 if (em_val == 1.) 00094 nodes[c][nc] = this->get_node(n); 00095 } 00096 } 00097 } 00098 00099 // assign nodes to children & add them to the mesh 00100 const Real pointtol = this->hmin() * TOLERANCE; 00101 for (unsigned int nc=0; nc<current_child->n_nodes(); nc++) 00102 { 00103 if (nodes[c][nc] != NULL) 00104 { 00105 current_child->set_node(nc) = nodes[c][nc]; 00106 } 00107 else 00108 { 00109 current_child->set_node(nc) = 00110 mesh_refinement.add_point(p[c][nc], 00111 current_child->processor_id(), 00112 pointtol); 00113 current_child->get_node(nc)->set_n_systems 00114 (this->n_systems()); 00115 } 00116 } 00117 00118 mesh_refinement.add_elem (current_child); 00119 current_child->set_n_systems(this->n_systems()); 00120 } 00121 } 00122 else 00123 { 00124 unsigned int parent_p_level = this->p_level(); 00125 for (unsigned int c=0; c<this->n_children(); c++) 00126 { 00127 Elem *current_child = this->child(c); 00128 libmesh_assert(current_child->subactive()); 00129 current_child->set_refinement_flag(Elem::JUST_REFINED); 00130 current_child->set_p_level(parent_p_level); 00131 current_child->set_p_refinement_flag(this->p_refinement_flag()); 00132 } 00133 } 00134 00135 // Un-set my refinement flag now 00136 this->set_refinement_flag(Elem::INACTIVE); 00137 this->set_p_refinement_flag(Elem::INACTIVE); 00138 00139 for (unsigned int c=0; c<this->n_children(); c++) 00140 { 00141 libmesh_assert_equal_to (this->child(c)->parent(), this); 00142 libmesh_assert(this->child(c)->active()); 00143 } 00144 libmesh_assert (this->ancestor()); 00145 }
| Elem::RefinementState libMesh::Elem::refinement_flag | ( | ) | const [inline, inherited] |
Returns the value of the refinement flag for the element.
Definition at line 1831 of file elem.h.
References libMesh::Elem::_rflag.
Referenced by libMesh::MeshRefinement::_coarsen_elements(), libMesh::MeshRefinement::_refine_elements(), libMesh::Elem::active(), libMesh::UnstructuredMesh::all_first_order(), libMesh::Elem::coarsen(), libMesh::MeshRefinement::coarsen_elements(), libMesh::Elem::contract(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::Elem::get_info(), libMesh::MeshTools::libmesh_assert_old_dof_objects(), libMesh::ParallelMesh::libmesh_assert_valid_parallel_flags(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshRefinement::make_flags_parallel_consistent(), libMesh::Elem::make_links_to_me_local(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::DofMap::old_dof_indices(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::Elem::refine(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::MeshRefinement::refine_elements(), libMesh::DofMap::reinit(), libMesh::HPSingularity::select_refinement(), libMesh::HPCoarsenTest::select_refinement(), and libMesh::Parallel::unpack().
01832 { 01833 return static_cast<RefinementState>(_rflag); 01834 }
| void libMesh::Elem::replace_child | ( | Elem * | elem, | |
| unsigned int | c | |||
| ) | [inherited] |
Replaces the child pointer at the specified index in the array of children of this element.
Definition at line 1348 of file elem.C.
References libMesh::Elem::child(), libMesh::Elem::has_children(), and libMesh::Elem::set_child().
Referenced by libMesh::UnstructuredMesh::all_first_order().
01349 { 01350 libmesh_assert(this->has_children()); 01351 01352 libmesh_assert(this->child(c)); 01353 01354 this->set_child(c, elem); 01355 }
| unsigned short int libMesh::Elem::second_order_adjacent_vertex | ( | const unsigned int | n, | |
| const unsigned int | v | |||
| ) | const [virtual, inherited] |
- Returns:
- the element-local number of the
vertex that defines the
second-order node. Note that the return value is always less this->n_vertices(), whilenhas to be greater or equalthis->n_vertices(). For linear elements this returns 0.
Reimplemented in libMesh::Hex20, libMesh::Hex27, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfPrism12, libMesh::Prism15, libMesh::Prism18, libMesh::Tet10, libMesh::Edge3, libMesh::Edge4, libMesh::InfQuad6, libMesh::Quad8, libMesh::Quad9, and libMesh::Tri6.
Definition at line 1931 of file elem.C.
Referenced by libMesh::LaplaceMeshSmoother::smooth(), and libMesh::MeshTools::Modification::smooth().
| std::pair< unsigned short int, unsigned short int > libMesh::Elem::second_order_child_vertex | ( | const unsigned int | n | ) | const [virtual, inherited] |
- Returns:
- the child number
cand element-local indexvof the
second-order node on the parent element. Note that the return values are always less this->n_children()andthis->child(c)->n_vertices(), whilenhas to be greater or equal to*this->n_vertices(). For linear elements this returns 0,0. On refined second order elements, the return value will satisfythis->get_node(n)==this->child(c)->get_node(v)
Reimplemented in libMesh::Hex20, libMesh::Hex27, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfPrism12, libMesh::Prism15, libMesh::Prism18, libMesh::Tet10, libMesh::Edge3, libMesh::InfQuad6, libMesh::Quad8, libMesh::Quad9, and libMesh::Tri6.
| ElemType libMesh::Elem::second_order_equivalent_type | ( | const ElemType | et, | |
| const bool | full_ordered = true | |||
| ) | [static, inherited] |
- Returns:
- the element type of the associated second-order element, e.g. when
thisis aTET4, thenTET10is returned. ReturnsINVALID_ELEMfor second order or other elements that should not or cannot be converted into higher order equivalents.
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 1999 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 libMesh::UnstructuredMesh::all_second_order().
02001 { 02002 /* for second-order elements, always return \p INVALID_ELEM 02003 * since second-order elements should not be converted 02004 * into something else. Only linear elements should 02005 * return something sensible here 02006 */ 02007 switch (et) 02008 { 02009 case EDGE2: 02010 { 02011 // full_ordered not relevant 02012 return EDGE3; 02013 } 02014 02015 case TRI3: 02016 { 02017 // full_ordered not relevant 02018 return TRI6; 02019 } 02020 02021 case QUAD4: 02022 { 02023 if (full_ordered) 02024 return QUAD9; 02025 else 02026 return QUAD8; 02027 } 02028 02029 case TET4: 02030 { 02031 // full_ordered not relevant 02032 return TET10; 02033 } 02034 02035 case HEX8: 02036 { 02037 // see below how this correlates with INFHEX8 02038 if (full_ordered) 02039 return HEX27; 02040 else 02041 return HEX20; 02042 } 02043 02044 case PRISM6: 02045 { 02046 if (full_ordered) 02047 return PRISM18; 02048 else 02049 return PRISM15; 02050 } 02051 02052 case PYRAMID5: 02053 { 02054 // libmesh_error(); 02055 return INVALID_ELEM; 02056 } 02057 02058 02059 02060 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 02061 02062 // infinite elements 02063 case INFEDGE2: 02064 { 02065 // libmesh_error(); 02066 return INVALID_ELEM; 02067 } 02068 02069 case INFQUAD4: 02070 { 02071 // full_ordered not relevant 02072 return INFQUAD6; 02073 } 02074 02075 case INFHEX8: 02076 { 02077 /* 02078 * Note that this matches with \p Hex8: 02079 * For full-ordered, \p InfHex18 and \p Hex27 02080 * belong together, and for not full-ordered, 02081 * \p InfHex16 and \p Hex20 belong together. 02082 */ 02083 if (full_ordered) 02084 return INFHEX18; 02085 else 02086 return INFHEX16; 02087 } 02088 02089 case INFPRISM6: 02090 { 02091 // full_ordered not relevant 02092 return INFPRISM12; 02093 } 02094 02095 #endif 02096 02097 02098 default: 02099 { 02100 // second-order element 02101 return INVALID_ELEM; 02102 } 02103 } 02104 }
| void libMesh::DofObject::set_buffer | ( | const std::vector< dof_id_type > & | buf | ) | [inline, inherited] |
Definition at line 452 of file dof_object.h.
References libMesh::DofObject::_idx_buf.
00453 { _idx_buf = buf; }
| void libMesh::DofObject::set_dof_number | ( | const unsigned int | s, | |
| const unsigned int | var, | |||
| const unsigned int | comp, | |||
| const dof_id_type | dn | |||
| ) | [inherited] |
Sets the global degree of freedom number for variable var, component comp for system s associated with this DofObject
Definition at line 400 of file dof_object.C.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::dof_number(), libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), libMesh::DofObject::start_idx(), libMesh::DofObject::system_var_to_vg_var(), and libMesh::DofObject::var_to_vg().
00404 { 00405 libmesh_assert_less (s, this->n_systems()); 00406 libmesh_assert_less (var, this->n_vars(s)); 00407 libmesh_assert_less (comp, this->n_comp(s,var)); 00408 00409 const unsigned int 00410 vg = this->var_to_vg(s,var), 00411 ncg = this->n_comp_group(s,vg), 00412 vig = this->system_var_to_vg_var(s,vg,var), 00413 start_idx_sys = this->start_idx(s); 00414 00415 libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size()); 00416 00417 dof_id_type &base_idx = _idx_buf[start_idx_sys + 2*vg + 1]; 00418 00419 // We intend to change all dof numbers together or not at all 00420 if (comp || vig) 00421 libmesh_assert ((dn == invalid_id && base_idx == invalid_id) || 00422 (dn == base_idx + vig*ncg + comp)); 00423 00424 // only explicitly store the base index for vig==0, comp==0 00425 else 00426 base_idx = dn; 00427 00428 // #ifdef DEBUG 00429 // std::cout << " [ "; 00430 // for (unsigned int i=0; i<_idx_buf.size(); i++) 00431 // std::cout << _idx_buf[i] << " "; 00432 // std::cout << "]\n"; 00433 // #endif 00434 00435 libmesh_assert_equal_to (this->dof_number(s, var, comp), dn); 00436 }
| void libMesh::DofObject::set_id | ( | const dof_id_type | dofid | ) | [inline, inherited] |
Sets the id for this DofObject
Definition at line 151 of file dof_object.h.
References libMesh::DofObject::set_id().
Referenced by libMesh::DofObject::set_id().
00152 { this->set_id() = dofid; }
| dof_id_type & libMesh::DofObject::set_id | ( | ) | [inline, inherited] |
- Returns:
- the
idfor thisDofObjectas a writeable reference.
Definition at line 578 of file dof_object.h.
References libMesh::DofObject::_id.
Referenced by libMesh::GMVIO::_read_one_cell(), libMesh::SerialMesh::add_elem(), libMesh::ParallelMesh::add_elem(), libMesh::SerialMesh::add_node(), libMesh::ParallelMesh::add_node(), libMesh::UnstructuredMesh::all_first_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::MeshCommunication::assign_global_indices(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::UNVIO::element_in(), libMesh::MeshTools::Modification::flatten(), libMesh::DofObject::invalidate_id(), libMesh::Node::Node(), libMesh::VTKIO::read(), libMesh::Nemesis_IO::read(), libMesh::UCDIO::read_implementation(), libMesh::LegacyXdrIO::read_mesh(), libMesh::GmshIO::read_mesh(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::OFFIO::read_stream(), libMesh::MatlabIO::read_stream(), libMesh::RemoteElem::RemoteElem(), libMesh::SerialMesh::renumber_elem(), libMesh::ParallelMesh::renumber_elem(), libMesh::SerialMesh::renumber_node(), libMesh::ParallelMesh::renumber_node(), libMesh::SerialMesh::renumber_nodes_and_elements(), libMesh::SerialMesh::stitch_meshes(), libMesh::Parallel::unpack(), libMesh::Node::PackedNode::unpack(), and libMesh::Elem::PackedElem::unpack().
00579 { 00580 return _id; 00581 }
| void libMesh::Elem::set_interior_parent | ( | Elem * | p | ) | [inline, inherited] |
Sets the pointer to the element's interior_parent. Dangerous to use in high-level code.
Definition at line 1727 of file elem.h.
References libMesh::Elem::_elemlinks, libMesh::Elem::dim(), and libMesh::Elem::n_sides().
Referenced by libMesh::BoundaryInfo::sync().
01728 { 01729 // interior parents make no sense for full-dimensional elements. 01730 libmesh_assert_less (this->dim(), LIBMESH_DIM); 01731 01732 // this had better be a one-higher-dimensional interior element 01733 libmesh_assert (!p || 01734 p->dim() == (this->dim()+1)); 01735 01736 _elemlinks[1+this->n_sides()] = p; 01737 }
| void libMesh::DofObject::set_n_comp | ( | const unsigned int | s, | |
| const unsigned int | var, | |||
| const unsigned int | ncomp | |||
| ) | [inherited] |
Sets the number of components for Variable var of system s associated with this DofObject
Definition at line 333 of file dof_object.C.
References libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), libMesh::DofObject::set_n_comp_group(), and libMesh::DofObject::var_to_vg().
00336 { 00337 libmesh_assert_less (s, this->n_systems()); 00338 libmesh_assert_less (var, this->n_vars(s)); 00339 00340 this->set_n_comp_group(s, this->var_to_vg(s,var), ncomp); 00341 }
| void libMesh::DofObject::set_n_comp_group | ( | const unsigned int | s, | |
| const unsigned int | vg, | |||
| const unsigned int | ncomp | |||
| ) | [inherited] |
Sets the number of components for VariableGroup vg of system s associated with this DofObject
Definition at line 345 of file dof_object.C.
References libMesh::DofObject::_idx_buf, libMesh::err, libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), libMesh::DofObject::ncv_magic, and libMesh::DofObject::start_idx().
Referenced by libMesh::DofMap::reinit(), libMesh::DofObject::set_n_comp(), libMesh::DofObject::set_n_vars_per_group(), and libMesh::DofMap::set_nonlocal_dof_objects().
00348 { 00349 libmesh_assert_less (s, this->n_systems()); 00350 libmesh_assert_less (vg, this->n_var_groups(s)); 00351 00352 // Check for trivial return 00353 if (ncomp == this->n_comp_group(s,vg)) return; 00354 00355 #ifndef NDEBUG 00356 if (ncomp >= ncv_magic) 00357 { 00358 const index_t ncvm = ncv_magic; 00359 libMesh::err << "ERROR: ncomp must be less than DofObject::ncv_magic!\n" 00360 << "ncomp = " << ncomp << ", ncv_magic = " << ncvm 00361 << "\nrecompile and try again!\n"; 00362 libmesh_error(); 00363 } 00364 #endif 00365 00366 const unsigned int 00367 start_idx_sys = this->start_idx(s), 00368 n_vars_group = this->n_vars(s,vg), 00369 base_offset = start_idx_sys + 2*vg; 00370 00371 libmesh_assert_less ((base_offset + 1), _idx_buf.size()); 00372 00373 // if (ncomp) 00374 // std::cout << "s,vg,ncomp=" 00375 // << s << "," 00376 // << vg << "," 00377 // << ncomp << '\n'; 00378 00379 // set the number of components, maintaining the number 00380 // of variables in the group 00381 _idx_buf[base_offset] = ncv_magic*n_vars_group + ncomp; 00382 00383 // We use (invalid_id - 1) to signify no 00384 // components for this object 00385 _idx_buf[base_offset + 1] = (ncomp == 0) ? invalid_id - 1 : invalid_id; 00386 00387 // this->debug_buffer(); 00388 // std::cout << "s,vg = " << s << "," << vg << '\n' 00389 // << "base_offset=" << base_offset << '\n' 00390 // << "this->n_comp(s,vg)=" << this->n_comp(s,vg) << '\n' 00391 // << "this->n_comp_group(s,vg)=" << this->n_comp_group(s,vg) << '\n' 00392 // << "this->n_vars(s,vg)=" << this->n_vars(s,vg) << '\n' 00393 // << "this->n_var_groups(s)=" << this->n_var_groups(s) << '\n'; 00394 00395 libmesh_assert_equal_to (ncomp, this->n_comp_group(s,vg)); 00396 }
| void libMesh::DofObject::set_n_systems | ( | const unsigned int | s | ) | [inherited] |
Sets the number of systems for this DofObject
Definition at line 152 of file dof_object.C.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::clear_dofs(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::n_vars().
Referenced by libMesh::DofObject::add_system(), and libMesh::Elem::refine().
00153 { 00154 // Check for trivial return 00155 if (ns == this->n_systems()) 00156 return; 00157 00158 // Clear any existing data. This is safe to call 00159 // even if we don't have any data. 00160 this->clear_dofs(); 00161 00162 // Set the new number of systems 00163 _idx_buf.resize(ns, ns); 00164 _idx_buf[0] = ns; 00165 00166 00167 #ifdef DEBUG 00168 00169 // check that all systems now exist and that they have 0 size 00170 libmesh_assert_equal_to (ns, this->n_systems()); 00171 for (unsigned int s=0; s<this->n_systems(); s++) 00172 { 00173 libmesh_assert_equal_to (this->n_vars(s), 0); 00174 libmesh_assert_equal_to (this->n_var_groups(s), 0); 00175 } 00176 00177 #endif 00178 }
| void libMesh::DofObject::set_n_vars_per_group | ( | const unsigned int | s, | |
| const std::vector< unsigned int > & | nvpg | |||
| ) | [inherited] |
Sets number of variables in each group associated with system s for this DofObject. Implicit in this is salso setting the number of VariableGroup variable groups for the system. Has the effect of setting the number of components to 0 even when called even with (nvg == this->n_var_groups(s)).
Definition at line 214 of file dof_object.C.
References libMesh::DofObject::_idx_buf, end, libMesh::DofObject::end_idx(), libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), libMesh::DofObject::ncv_magic, libMesh::DofObject::set_n_comp_group(), and libMesh::DofObject::start_idx().
00216 { 00217 00218 libmesh_assert_less (s, this->n_systems()); 00219 00220 // number of varaible groups for this system - inferred 00221 const unsigned int nvg = libmesh_cast_int<unsigned int>(nvpg.size()); 00222 00223 // BSK - note that for compatibility with the previous implementation 00224 // calling this method when (nvars == this->n_vars()) requires that 00225 // we invalidate the DOF indices and set the number of components to 0. 00226 // Note this was a bit of a suprise to me - there was no quick return in 00227 // the old method, which caused removal and readdition of the DOF indices 00228 // even in the case of (nvars == this->n_vars()), resulting in n_comp(s,v) 00229 // implicitly becoming 0 regardless of any previous value. 00230 // quick return? 00231 if (nvg == this->n_var_groups(s)) 00232 { 00233 for (unsigned int vg=0; vg<nvg; vg++) 00234 { 00235 this->set_n_comp_group(s,vg,0); 00236 libmesh_assert_equal_to (this->n_vars(s,vg), nvpg[vg]); 00237 } 00238 return; 00239 } 00240 00241 // since there is ample opportunity to screw up other systems, let us 00242 // cache their current sizes and later assert that they are unchanged. 00243 #ifdef DEBUG 00244 DofObject::index_buffer_t old_system_sizes; 00245 old_system_sizes.reserve(this->n_systems()); 00246 00247 for (unsigned int s_ctr=0; s_ctr<this->n_systems(); s_ctr++) 00248 old_system_sizes.push_back(this->n_var_groups(s_ctr)); 00249 #endif 00250 00251 // remove current indices if we have some 00252 if (this->n_var_groups(s) != 0) 00253 { 00254 const unsigned int old_nvg_s = this->n_var_groups(s); 00255 00256 DofObject::index_buffer_t::iterator 00257 it = _idx_buf.begin(), 00258 end = _idx_buf.begin(); 00259 00260 std::advance(it, this->start_idx(s)); 00261 std::advance(end, this->end_idx(s)); 00262 _idx_buf.erase(it,end); 00263 00264 for (unsigned int ctr=(s+1); ctr<this->n_systems(); ctr++) 00265 _idx_buf[ctr] -= 2*old_nvg_s; 00266 } 00267 00268 // better not have any now! 00269 libmesh_assert_equal_to (this->n_var_groups(s), 0); 00270 00271 // had better not screwed up any of our sizes! 00272 #ifdef DEBUG 00273 for (unsigned int s_ctr=0; s_ctr<this->n_systems(); s_ctr++) 00274 if (s_ctr != s) 00275 libmesh_assert_equal_to (this->n_var_groups(s_ctr), old_system_sizes[s_ctr]); 00276 #endif 00277 00278 // OK, if the user requested 0 that is what we have 00279 if (nvg == 0) 00280 return; 00281 00282 { 00283 // array to hold new indices 00284 DofObject::index_buffer_t var_idxs(2*nvg); 00285 for (unsigned int vg=0; vg<nvg; vg++) 00286 { 00287 var_idxs[2*vg ] = ncv_magic*nvpg[vg] + 0; 00288 var_idxs[2*vg + 1] = invalid_id - 1; 00289 } 00290 00291 DofObject::index_buffer_t::iterator it = _idx_buf.begin(); 00292 std::advance(it, this->end_idx(s)); 00293 _idx_buf.insert(it, var_idxs.begin(), var_idxs.end()); 00294 00295 for (unsigned int ctr=(s+1); ctr<this->n_systems(); ctr++) 00296 _idx_buf[ctr] += 2*nvg; 00297 00298 // resize _idx_buf to fit so no memory is wasted. 00299 DofObject::index_buffer_t(_idx_buf).swap(_idx_buf); 00300 } 00301 00302 // that better had worked. Assert stuff. 00303 libmesh_assert_equal_to (nvg, this->n_var_groups(s)); 00304 00305 #ifdef DEBUG 00306 00307 // std::cout << " [ "; 00308 // for (unsigned int i=0; i<_idx_buf.size(); i++) 00309 // std::cout << _idx_buf[i] << " "; 00310 // std::cout << "]\n"; 00311 00312 libmesh_assert_equal_to (this->n_var_groups(s), nvpg.size()); 00313 00314 for (unsigned int vg=0; vg<this->n_var_groups(s); vg++) 00315 { 00316 libmesh_assert_equal_to (this->n_vars(s,vg), nvpg[vg]); 00317 libmesh_assert_equal_to (this->n_comp_group(s,vg), 0); 00318 } 00319 00320 for (unsigned int v=0; v<this->n_vars(s); v++) 00321 libmesh_assert_equal_to (this->n_comp(s,v), 0); 00322 00323 // again, all other system sizes shoudl be unchanged! 00324 for (unsigned int s_ctr=0; s_ctr<this->n_systems(); s_ctr++) 00325 if (s_ctr != s) 00326 libmesh_assert_equal_to (this->n_var_groups(s_ctr), old_system_sizes[s_ctr]); 00327 00328 #endif 00329 }
| void libMesh::Elem::set_neighbor | ( | const unsigned int | i, | |
| Elem * | n | |||
| ) | [inline, inherited] |
Assigns n as the
neighbor.
Definition at line 1441 of file elem.h.
References libMesh::Elem::_elemlinks, and libMesh::Elem::n_neighbors().
Referenced by libMesh::UnstructuredMesh::all_first_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshTools::Modification::flatten(), libMesh::Elem::make_links_to_me_local(), libMesh::Elem::make_links_to_me_remote(), libMesh::Elem::nullify_neighbors(), libMesh::Parallel::unpack(), and libMesh::Elem::PackedElem::unpack().
01442 { 01443 libmesh_assert_less (i, this->n_neighbors()); 01444 01445 _elemlinks[i+1] = n; 01446 }
| Node *& libMesh::Elem::set_node | ( | const unsigned int | i | ) | [inline, virtual, inherited] |
- Returns:
- the pointer to local
Nodeias a writeable reference.
Reimplemented in libMesh::RemoteElem.
Definition at line 1405 of file elem.h.
References libMesh::Elem::_nodes, and libMesh::Elem::n_nodes().
Referenced by libMesh::GMVIO::_read_one_cell(), libMesh::UnstructuredMesh::all_first_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::TetGenMeshInterface::assign_nodes_to_elem(), libMesh::MeshTools::Generation::build_cube(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::Tri6::build_side(), libMesh::Tri3::build_side(), libMesh::Quad9::build_side(), libMesh::Quad8::build_side(), libMesh::Quad4::build_side(), libMesh::InfQuad6::build_side(), libMesh::Edge::build_side(), libMesh::TriangleWrapper::copy_tri_to_mesh(), libMesh::UnstructuredMesh::create_submesh(), libMesh::UNVIO::element_in(), libMesh::MeshTools::Modification::flatten(), libMesh::VTKIO::read(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::AbaqusIO::read_elements(), libMesh::UCDIO::read_implementation(), libMesh::LegacyXdrIO::read_mesh(), libMesh::GmshIO::read_mesh(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::OFFIO::read_stream(), libMesh::MatlabIO::read_stream(), libMesh::Elem::refine(), libMesh::Tri::side(), libMesh::Quad::side(), side(), libMesh::Edge::side(), libMesh::Tet::side(), libMesh::Pyramid::side(), libMesh::Prism::side(), libMesh::InfPrism::side(), libMesh::InfHex::side(), libMesh::Hex::side(), libMesh::SerialMesh::stitch_meshes(), libMesh::BoundaryInfo::sync(), libMesh::Parallel::unpack(), and libMesh::Elem::PackedElem::unpack().
| void libMesh::DofObject::set_old_dof_object | ( | ) | [inherited] |
Sets the old_dof_object to a copy of this
Definition at line 137 of file dof_object.C.
References libMesh::DofObject::clear_old_dof_object(), libMesh::DofObject::DofObject(), and libMesh::DofObject::old_dof_object.
Referenced by libMesh::DofMap::reinit().
00138 { 00139 this->clear_old_dof_object(); 00140 00141 libmesh_assert (!this->old_dof_object); 00142 00143 // Make a new DofObject, assign a copy of \p this. 00144 // Make sure the copy ctor for DofObject works!! 00145 this->old_dof_object = new DofObject(*this); 00146 }
| void libMesh::Elem::set_p_level | ( | const unsigned int | p | ) | [inline, inherited] |
Sets the value of the p refinement level for the element Note that the maximum p refinement level is currently 255
Definition at line 1881 of file elem.h.
References libMesh::Elem::_p_level, libMesh::Elem::child(), std::min(), libMesh::Elem::n_children(), libMesh::Elem::p_level(), libMesh::Elem::parent(), and libMesh::Elem::set_p_level().
Referenced by libMesh::MeshRefinement::_coarsen_elements(), libMesh::MeshRefinement::_refine_elements(), libMesh::UnstructuredMesh::all_first_order(), libMesh::Elem::coarsen(), libMesh::Elem::Elem(), libMesh::Elem::refine(), libMesh::DofMap::reinit(), libMesh::Elem::set_p_level(), libMesh::Parallel::unpack(), and libMesh::Elem::PackedElem::unpack().
01882 { 01883 // Maintain the parent's p level as the minimum of it's children 01884 if (this->parent() != NULL) 01885 { 01886 unsigned int parent_p_level = this->parent()->p_level(); 01887 01888 // If our new p level is less than our parents, our parents drops 01889 if (parent_p_level > p) 01890 { 01891 this->parent()->set_p_level(p); 01892 } 01893 // If we are the lowest p level and it increases, so might 01894 // our parent's, but we have to check every other child to see 01895 else if (parent_p_level == _p_level && _p_level < p) 01896 { 01897 _p_level = libmesh_cast_int<unsigned char>(p); 01898 parent_p_level = libmesh_cast_int<unsigned char>(p); 01899 for (unsigned int c=0; c != this->parent()->n_children(); c++) 01900 parent_p_level = std::min(parent_p_level, 01901 this->parent()->child(c)->p_level()); 01902 01903 if (parent_p_level != this->parent()->p_level()) 01904 this->parent()->set_p_level(parent_p_level); 01905 01906 return; 01907 } 01908 } 01909 01910 _p_level = libmesh_cast_int<unsigned char>(p); 01911 }
| void libMesh::Elem::set_p_refinement_flag | ( | const RefinementState | pflag | ) | [inline, inherited] |
Sets the value of the p refinement flag for the element.
Definition at line 1855 of file elem.h.
References libMesh::Elem::_pflag.
Referenced by libMesh::MeshRefinement::_coarsen_elements(), libMesh::MeshRefinement::_refine_elements(), libMesh::UnstructuredMesh::all_first_order(), libMesh::MeshRefinement::coarsen_elements(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshRefinement::make_flags_parallel_consistent(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::Elem::refine(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::MeshRefinement::refine_elements(), libMesh::HPSingularity::select_refinement(), libMesh::HPCoarsenTest::select_refinement(), libMesh::Parallel::unpack(), and libMesh::Elem::PackedElem::unpack().
01856 { 01857 _pflag = libmesh_cast_int<unsigned char>(pflag); 01858 }
| void libMesh::Elem::set_parent | ( | Elem * | p | ) | [inline, inherited] |
Sets the pointer to the element's parent. Dangerous to use in high-level code.
Definition at line 1677 of file elem.h.
References libMesh::Elem::_elemlinks.
Referenced by libMesh::UnstructuredMesh::all_first_order(), and libMesh::BoundaryInfo::sync().
01678 { 01679 _elemlinks[0] = p; 01680 }
| void libMesh::Elem::set_refinement_flag | ( | const RefinementState | rflag | ) | [inline, inherited] |
Sets the value of the refinement flag for the element.
Definition at line 1839 of file elem.h.
References libMesh::Elem::_rflag.
Referenced by libMesh::UnstructuredMesh::all_first_order(), libMesh::Elem::coarsen(), libMesh::MeshRefinement::coarsen_elements(), libMesh::Elem::contract(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_error_tolerance(), libMesh::MeshRefinement::flag_elements_by_mean_stddev(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshRefinement::make_flags_parallel_consistent(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::LegacyXdrIO::read_mesh(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::Elem::refine(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::MeshRefinement::refine_elements(), libMesh::HPSingularity::select_refinement(), libMesh::HPCoarsenTest::select_refinement(), libMesh::Parallel::unpack(), and libMesh::Elem::PackedElem::unpack().
01840 { 01841 _rflag = libmesh_cast_int<RefinementState>(rflag); 01842 }
| void libMesh::DofObject::set_vg_dof_base | ( | const unsigned int | s, | |
| const unsigned int | vg, | |||
| const dof_id_type | db | |||
| ) | [inline, inherited] |
VariableGroup DOF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base.
Definition at line 801 of file dof_object.h.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::start_idx(), and libMesh::DofObject::vg_dof_base().
Referenced by libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofObject::invalidate_dofs(), libMesh::DofMap::reinit(), and libMesh::DofMap::set_nonlocal_dof_objects().
00804 { 00805 libmesh_assert_less (s, this->n_systems()); 00806 libmesh_assert_less (vg, this->n_var_groups(s)); 00807 00808 const unsigned int 00809 start_idx_sys = this->start_idx(s); 00810 00811 libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size()); 00812 00813 _idx_buf[start_idx_sys + 2*vg + 1] = db; 00814 00815 libmesh_assert_equal_to (this->vg_dof_base(s,vg), db); 00816 }
- Returns:
- a primitive (2-noded) edge or infedge for edge
i.
Implements libMesh::Elem.
Definition at line 69 of file face_inf_quad.C.
References libMesh::Elem::get_node(), n_sides(), and libMesh::Elem::set_node().
00070 { 00071 libmesh_assert_less (i, this->n_sides()); 00072 00073 00074 switch (i) 00075 { 00076 case 0: 00077 { 00078 // base face 00079 Edge2* edge = new Edge2; 00080 00081 edge->set_node(0) = this->get_node(0); 00082 edge->set_node(1) = this->get_node(1); 00083 00084 AutoPtr<Elem> ap(edge); return ap; 00085 } 00086 00087 case 1: 00088 { 00089 // adjacent to another infinite element 00090 InfEdge2* edge = new InfEdge2; 00091 00092 edge->set_node(0) = this->get_node(1); 00093 edge->set_node(1) = this->get_node(3); 00094 00095 AutoPtr<Elem> ap(edge); return ap; 00096 } 00097 00098 case 2: 00099 { 00100 // adjacent to another infinite element 00101 InfEdge2* edge = new InfEdge2; 00102 00103 edge->set_node(0) = this->get_node(0); // be aware of swapped nodes, 00104 edge->set_node(1) = this->get_node(2); // compared to conventional side numbering 00105 00106 AutoPtr<Elem> ap(edge); return ap; 00107 } 00108 00109 default: 00110 { 00111 libmesh_error(); 00112 AutoPtr<Elem> ap(NULL); return ap; 00113 } 00114 } 00115 00116 // We will never get here... Look at the code above. 00117 libmesh_error(); 00118 AutoPtr<Elem> ap(NULL); return ap; 00119 }
| bool libMesh::Elem::subactive | ( | ) | const [inline, inherited] |
- Returns:
trueif the element is subactive (i.e. has no active descendants),falseotherwise. Always returnsfalseif AMR is disabled.
Definition at line 1590 of file elem.h.
References libMesh::Elem::active(), libMesh::Elem::has_children(), and libMesh::Elem::parent().
Referenced by libMesh::Elem::active_family_tree(), libMesh::Elem::active_family_tree_by_neighbor(), libMesh::Elem::active_family_tree_by_side(), libMesh::HPCoarsenTest::add_projection(), libMesh::FEAbstract::compute_node_constraints(), libMesh::UnstructuredMesh::contract(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::Elem::family_tree(), libMesh::Elem::family_tree_by_neighbor(), libMesh::Elem::family_tree_by_side(), libMesh::Elem::family_tree_by_subneighbor(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::Elem::get_info(), libMesh::MeshTools::get_not_subactive_node_ids(), libMesh::Elem::libmesh_assert_valid_neighbors(), libMesh::MeshTools::libmesh_assert_valid_refinement_tree(), libMesh::Elem::make_links_to_me_local(), libMesh::Elem::make_links_to_me_remote(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::min_new_p_level_by_neighbor(), libMesh::Elem::min_p_level_by_neighbor(), libMesh::Elem::refine(), libMesh::Elem::PackedElem::unpack(), and libMesh::LegacyXdrIO::write_mesh().
01591 { 01592 #ifdef LIBMESH_ENABLE_AMR 01593 if (this->active()) 01594 return false; 01595 if (!this->has_children()) 01596 return true; 01597 for (const Elem* my_ancestor = this->parent(); 01598 my_ancestor != NULL; 01599 my_ancestor = my_ancestor->parent()) 01600 if (my_ancestor->active()) 01601 return true; 01602 #endif 01603 01604 return false; 01605 }
| subdomain_id_type & libMesh::Elem::subdomain_id | ( | ) | [inline, inherited] |
- Returns:
- the subdomain that this element belongs to as a writeable reference.
Definition at line 1423 of file elem.h.
References libMesh::Elem::_sbd_id.
01424 { 01425 return _sbd_id; 01426 }
| subdomain_id_type libMesh::Elem::subdomain_id | ( | ) | const [inline, inherited] |
- Returns:
- the subdomain that this element belongs to. To conserve space this is stored as an unsigned char.
Definition at line 1415 of file elem.h.
References libMesh::Elem::_sbd_id.
Referenced by libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::AbaqusIO::assign_subdomain_ids(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::MeshTools::Modification::change_subdomain_id(), libMesh::Nemesis_IO_Helper::compute_num_global_elem_blocks(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::create_submesh(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::Elem::Elem(), libMesh::MeshTools::Modification::flatten(), libMesh::SystemSubsetBySubdomain::init(), libMesh::ExodusII_IO_Helper::initialize(), libMesh::ExodusII_IO_Helper::initialize_discontinuous(), libMesh::DofMap::old_dof_indices(), libMesh::BoundaryProjectSolution::operator()(), libMesh::ProjectFEMSolution::operator()(), libMesh::ProjectSolution::operator()(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::XdrIO::pack_element(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::GmshIO::read_mesh(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::DofMap::reinit(), libMesh::MeshTools::subdomain_bounding_box(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::ExodusII_IO_Helper::write_element_values(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_elements_discontinuous(), and libMesh::GmshIO::write_mesh().
01416 { 01417 return _sbd_id; 01418 }
| const Elem * libMesh::Elem::top_parent | ( | ) | const [inline, inherited] |
- Returns:
- a pointer to the element's top-most (i.e. level-0) parent. Returns
thisif this is a level-0 element, this element's parent if this is a level-1 element, this element's grandparent if this is a level-2 element, etc...
Definition at line 1685 of file elem.h.
References libMesh::Elem::level(), and libMesh::Elem::parent().
Referenced by libMesh::BoundaryInfo::boundary_id(), libMesh::BoundaryInfo::boundary_ids(), libMesh::BoundaryInfo::has_boundary_id(), libMesh::BoundaryInfo::n_boundary_ids(), libMesh::BoundaryInfo::side_with_boundary_id(), and libMesh::BoundaryInfo::sync().
01686 { 01687 const Elem* tp = this; 01688 01689 // Keep getting the element's parent 01690 // until that parent is at level-0 01691 while (tp->parent() != NULL) 01692 tp = tp->parent(); 01693 01694 libmesh_assert(tp); 01695 libmesh_assert_equal_to (tp->level(), 0); 01696 01697 return tp; 01698 }
| Elem * libMesh::Elem::topological_neighbor | ( | const unsigned int | i, | |
| MeshBase & | mesh, | |||
| const PointLocatorBase & | point_locator, | |||
| const PeriodicBoundaries * | pb | |||
| ) | [inherited] |
- Returns:
- a writeable pointer to the
neighbor of this element for interior elements. If an element is on a periodic boundary, it will return a corresponding element on the opposite side.
Definition at line 790 of file elem.C.
References libMesh::PeriodicBoundaries::boundary(), libMesh::MeshBase::boundary_info, libMesh::MeshBase::elem(), libMesh::DofObject::id(), libMesh::Elem::level(), libMesh::Elem::n_neighbors(), libMesh::PeriodicBoundaries::neighbor(), libMesh::Elem::neighbor(), and libMesh::Elem::parent().
00794 { 00795 libmesh_assert_less (i, this->n_neighbors()); 00796 00797 Elem * neighbor_i = this->neighbor(i); 00798 if (neighbor_i != NULL) 00799 return neighbor_i; 00800 00801 if (pb) 00802 { 00803 // Since the neighbor is NULL it must be on a boundary. We need 00804 // see if this is a periodic boundary in which case it will have a 00805 // topological neighbor 00806 00807 std::vector<boundary_id_type> boundary_ids = mesh.boundary_info->boundary_ids(this, i); 00808 for (std::vector<boundary_id_type>::iterator j = boundary_ids.begin(); j != boundary_ids.end(); ++j) 00809 if (pb->boundary(*j)) 00810 { 00811 // Since the point locator inside of periodic boundaries 00812 // returns a const pointer we will retrieve the proper 00813 // pointer directly from the mesh object. Also since coarse 00814 // elements do not have more refined neighbors we need to make 00815 // sure that we don't return one of these types of neighbors. 00816 neighbor_i = mesh.elem(pb->neighbor(*j, point_locator, this, i)->id()); 00817 if (level() < neighbor_i->level()) 00818 neighbor_i = neighbor_i->parent(); 00819 return neighbor_i; 00820 } 00821 } 00822 00823 return NULL; 00824 }
| const Elem * libMesh::Elem::topological_neighbor | ( | const unsigned int | i, | |
| const MeshBase & | mesh, | |||
| const PointLocatorBase & | point_locator, | |||
| const PeriodicBoundaries * | pb | |||
| ) | const [inherited] |
- Returns:
- a pointer to the
neighbor of this element for interior elements. If an element is on a periodic boundary, it will return a corresponding element on the opposite side.
Definition at line 828 of file elem.C.
References libMesh::PeriodicBoundaries::boundary(), libMesh::MeshBase::boundary_info, libMesh::MeshBase::elem(), libMesh::DofObject::id(), libMesh::Elem::level(), libMesh::Elem::n_neighbors(), libMesh::PeriodicBoundaries::neighbor(), libMesh::Elem::neighbor(), and libMesh::Elem::parent().
Referenced by libMesh::Elem::has_topological_neighbor(), and libMesh::MeshRefinement::topological_neighbor().
00832 { 00833 libmesh_assert_less (i, this->n_neighbors()); 00834 00835 const Elem * neighbor_i = this->neighbor(i); 00836 if (neighbor_i != NULL) 00837 return neighbor_i; 00838 00839 if (pb) 00840 { 00841 // Since the neighbor is NULL it must be on a boundary. We need 00842 // see if this is a periodic boundary in which case it will have a 00843 // topological neighbor 00844 00845 std::vector<boundary_id_type> boundary_ids = mesh.boundary_info->boundary_ids(this, i); 00846 for (std::vector<boundary_id_type>::iterator j = boundary_ids.begin(); j != boundary_ids.end(); ++j) 00847 if (pb->boundary(*j)) 00848 { 00849 // Since the point locator inside of periodic boundaries 00850 // returns a const pointer we will retrieve the proper 00851 // pointer directly from the mesh object. Also since coarse 00852 // elements do not have more refined neighbors we need to make 00853 // sure that we don't return one of these types of neighbors. 00854 neighbor_i = mesh.elem(pb->neighbor(*j, point_locator, this, i)->id()); 00855 if (level() < neighbor_i->level()) 00856 neighbor_i = neighbor_i->parent(); 00857 return neighbor_i; 00858 } 00859 } 00860 00861 return NULL; 00862 }
| void libMesh::Elem::total_family_tree | ( | std::vector< const Elem * > & | active_family, | |
| const bool | reset = true | |||
| ) | const [inherited] |
Same as the family_tree() member, but also adds any subactive descendants.
Definition at line 1398 of file elem.C.
References libMesh::Elem::child(), libMesh::Elem::has_children(), libMesh::Elem::is_remote(), libMesh::Elem::n_children(), and libMesh::Elem::total_family_tree().
Referenced by libMesh::Elem::total_family_tree().
01400 { 01401 // Clear the vector if the flag reset tells us to. 01402 if (reset) 01403 family.clear(); 01404 01405 // Add this element to the family tree. 01406 family.push_back(this); 01407 01408 // Recurse into the elements children, if it has them. 01409 // Do not clear the vector any more. 01410 if (this->has_children()) 01411 for (unsigned int c=0; c<this->n_children(); c++) 01412 if (!this->child(c)->is_remote()) 01413 this->child(c)->total_family_tree (family, false); 01414 }
| virtual ElemType libMesh::Elem::type | ( | ) | const [pure virtual, inherited] |
- Returns:
- the VTK element type of the sc-th sub-element.
- the type of element that has been derived from this base class.
Implemented in libMesh::Hex20, libMesh::Hex27, libMesh::Hex8, libMesh::InfHex16, libMesh::InfHex18, libMesh::InfHex8, libMesh::InfPrism12, libMesh::InfPrism6, libMesh::Prism15, libMesh::Prism18, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet10, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Edge4, libMesh::InfEdge2, libMesh::InfQuad4, libMesh::InfQuad6, libMesh::Quad4, libMesh::Quad8, libMesh::Quad9, libMesh::Tri3, libMesh::Tri6, libMesh::NodeElem, and libMesh::RemoteElem.
Referenced by libMesh::PostscriptIO::_compute_edge_bezier_coeffs(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::AbaqusIO::assign_sideset_ids(), libMesh::AbaqusIO::assign_subdomain_ids(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::VTKIO::cells_to_vtk(), libMesh::TetGenMeshInterface::check_hull_integrity(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::InfFE< Dim, T_radial, T_map >::combine_base_radial(), libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), libMesh::FEInterface::compute_data(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::DofMap::constrain_p_dofs(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::create_submesh(), libMesh::TetGenMeshInterface::delete_2D_hull_elements(), libMesh::DofMap::dof_indices(), libMesh::FE< Dim, T >::dofs_on_edge(), libMesh::FE< Dim, T >::dofs_on_side(), libMesh::FE< Dim, T >::edge_reinit(), libMesh::UNVIO::element_out(), libMesh::MeshTools::find_hanging_nodes_and_parents(), libMesh::MeshTools::Modification::flatten(), libMesh::Elem::get_info(), libMesh::FE< Dim, T >::init_base_shape_functions(), libMesh::FEMap::init_edge_shape_functions(), libMesh::InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), libMesh::FEMap::init_face_shape_functions(), libMesh::FEMap::init_reference_to_physical_map(), libMesh::InfFE< Dim, T_radial, T_map >::init_shape_functions(), libMesh::InfFE< Dim, T_radial, T_map >::inverse_map(), libMesh::FE< Dim, T >::inverse_map(), libMesh::FEInterface::inverse_map(), libMesh::FE< Dim, T >::map(), libMesh::FE< Dim, T >::map_eta(), libMesh::FE< Dim, T >::map_xi(), libMesh::FE< Dim, T >::map_zeta(), libMesh::FEInterface::nodal_soln(), libMesh::DofMap::old_dof_indices(), libMesh::BoundaryProjectSolution::operator()(), libMesh::ProjectFEMSolution::operator()(), libMesh::ProjectSolution::operator()(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), libMesh::XdrIO::pack_element(), libMesh::Elem::point_test(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::LegacyXdrIO::read_mesh(), libMesh::Elem::refine(), libMesh::InfFE< Dim, T_radial, T_map >::reinit(), libMesh::FEXYZ< Dim >::reinit(), libMesh::FE< Dim, T >::reinit(), libMesh::DofMap::reinit(), libMesh::REINIT_ERROR(), libMesh::HPCoarsenTest::select_refinement(), libMesh::InfFE< Dim, T_radial, T_map >::shape(), libMesh::FEInterface::shape(), libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), libMesh::FE< Dim, T >::side_map(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::GMVIO::write_ascii_new_impl(), libMesh::Nemesis_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_elements_discontinuous(), libMesh::EnsightIO::write_geometry_ascii(), libMesh::LegacyXdrIO::write_mesh(), libMesh::GmshIO::write_mesh(), and libMesh::DivaIO::write_stream().
| void libMesh::DofObject::unpack_indexing | ( | std::vector< int >::const_iterator | begin | ) | [inherited] |
A method for creating our index buffer from packed data - basically with our current implementation we investigate the size term and then copy.
Definition at line 477 of file dof_object.C.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::clear_old_dof_object(), libMesh::DofObject::DofObject(), libMesh::DofObject::old_dof_object, and libMesh::DofObject::unpack_indexing().
Referenced by libMesh::Parallel::unpack(), libMesh::Node::PackedNode::unpack(), libMesh::Elem::PackedElem::unpack(), and libMesh::DofObject::unpack_indexing().
00478 { 00479 _idx_buf.clear(); 00480 00481 #ifdef LIBMESH_ENABLE_AMR 00482 this->clear_old_dof_object(); 00483 const int has_old_dof_object = *begin++; 00484 libmesh_assert(has_old_dof_object == 1 || 00485 has_old_dof_object == 0); 00486 #endif 00487 00488 const int size = *begin++; 00489 _idx_buf.reserve(size); 00490 std::copy(begin, begin+size, back_inserter(_idx_buf)); 00491 00492 // Check as best we can for internal consistency now 00493 libmesh_assert(_idx_buf.empty() || 00494 (_idx_buf[0] <= _idx_buf.size())); 00495 #ifdef DEBUG 00496 if (!_idx_buf.empty()) 00497 for (unsigned int i=1; i < _idx_buf[0]; ++i) 00498 { 00499 libmesh_assert_greater_equal (_idx_buf[i], _idx_buf[i-1]); 00500 libmesh_assert_equal_to ((_idx_buf[i] - _idx_buf[i-1])%2, 0); 00501 libmesh_assert_less_equal (_idx_buf[i], _idx_buf.size()); 00502 } 00503 #endif 00504 00505 #ifdef LIBMESH_ENABLE_AMR 00506 if (has_old_dof_object) 00507 { 00508 this->old_dof_object = new DofObject(); 00509 this->old_dof_object->unpack_indexing(begin+size); 00510 } 00511 #endif 00512 }
| unsigned int libMesh::DofObject::unpackable_indexing_size | ( | std::vector< int >::const_iterator | begin | ) | [static, inherited] |
If we have indices packed into an buffer for communications, how much of that buffer applies to this dof object?
Definition at line 455 of file dof_object.C.
Referenced by libMesh::Parallel::pack(), libMesh::Parallel::packed_size(), libMesh::Elem::PackedElem::packed_size(), and libMesh::Parallel::unpack().
00456 { 00457 #ifdef LIBMESH_ENABLE_AMR 00458 const int has_old_dof_object = *begin++; 00459 00460 // Either we have an old_dof_object or we don't 00461 libmesh_assert(has_old_dof_object == 1 || has_old_dof_object == 0); 00462 static const int dof_header_size = 2; 00463 #else 00464 static const bool has_old_dof_object = false; 00465 static const int dof_header_size = 1; 00466 #endif 00467 00468 const int this_indexing_size = *begin++; 00469 00470 return dof_header_size + this_indexing_size + 00471 (has_old_dof_object ? 00472 unpackable_indexing_size(begin+this_indexing_size) : 0); 00473 }
| bool libMesh::DofObject::valid_id | ( | ) | const [inline, inherited] |
- Returns:
trueif thisDofObjecthas a valididset,falseotherwise.
Definition at line 586 of file dof_object.h.
References libMesh::DofObject::_id, and libMesh::DofObject::invalid_id.
Referenced by libMesh::SerialMesh::add_elem(), libMesh::ParallelMesh::add_elem(), libMesh::SerialMesh::add_node(), libMesh::ParallelMesh::add_node(), libMesh::Node::get_info(), libMesh::Elem::get_info(), libMesh::DofObject::id(), and libMesh::Elem::libmesh_assert_valid_node_pointers().
00587 { 00588 return (DofObject::invalid_id != _id); 00589 }
| bool libMesh::DofObject::valid_processor_id | ( | ) | const [inline, inherited] |
- Returns:
trueif thisDofObjecthas a valididset,falseotherwise.
Definition at line 617 of file dof_object.h.
References libMesh::DofObject::_processor_id, and libMesh::DofObject::invalid_processor_id.
00618 { 00619 return (DofObject::invalid_processor_id != _processor_id); 00620 }
| dof_id_type libMesh::DofObject::vg_dof_base | ( | const unsigned int | s, | |
| const unsigned int | vg | |||
| ) | const [inline, inherited] |
VariableGroup DOF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base.
Definition at line 821 of file dof_object.h.
References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::start_idx().
Referenced by libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::reinit(), libMesh::DofMap::set_nonlocal_dof_objects(), and libMesh::DofObject::set_vg_dof_base().
00823 { 00824 libmesh_assert_less (s, this->n_systems()); 00825 libmesh_assert_less (vg, this->n_var_groups(s)); 00826 00827 const unsigned int 00828 start_idx_sys = this->start_idx(s); 00829 00830 libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size()); 00831 00832 // #ifdef DEBUG 00833 // std::cout << " [ "; 00834 // for (unsigned int i=0; i<_idx_buf.size(); i++) 00835 // std::cout << _idx_buf[i] << " "; 00836 // std::cout << "]\n"; 00837 // #endif 00838 00839 return _idx_buf[start_idx_sys + 2*vg + 1]; 00840 }
| Real libMesh::Elem::volume | ( | ) | const [virtual, inherited] |
- Returns:
- the (length/area/volume) of the geometric element.
Reimplemented in libMesh::Hex8, libMesh::Prism6, libMesh::Pyramid5, libMesh::Tet4, libMesh::Edge2, libMesh::Edge3, libMesh::Quad4, and libMesh::Tri3.
Definition at line 2126 of file elem.C.
References libMesh::FEGenericBase< Real >::build(), libMesh::Elem::default_order(), libMesh::FEType::default_quadrature_order(), libMesh::Elem::dim(), libMeshEnums::LAGRANGE, and libMesh::Real.
Referenced by libMesh::Elem::get_info().
02127 { 02128 // The default implementation builds a finite element of the correct 02129 // order and sums up the JxW contributions. This can be expensive, 02130 // so the various element types can overload this method and compute 02131 // the volume more efficiently. 02132 FEType fe_type (this->default_order() , LAGRANGE); 02133 02134 AutoPtr<FEBase> fe (FEBase::build(this->dim(), 02135 fe_type)); 02136 02137 const std::vector<Real>& JxW = fe->get_JxW(); 02138 02139 // The default quadrature rule should integrate the mass matrix, 02140 // thus it should be plenty to compute the area 02141 QGauss qrule (this->dim(), fe_type.default_quadrature_order()); 02142 02143 fe->attach_quadrature_rule(&qrule); 02144 02145 fe->reinit(this); 02146 02147 Real vol=0.; 02148 for (unsigned int qp=0; qp<qrule.n_points(); ++qp) 02149 vol += JxW[qp]; 02150 02151 return vol; 02152 02153 }
| unsigned int libMesh::Elem::which_child_am_i | ( | const Elem * | e | ) | const [inline, inherited] |
This function tells you which child you (e) are. I.e. if c = a->which_child_am_i(e); then a->child(c) will be e;
Definition at line 1811 of file elem.h.
References libMesh::Elem::child(), libMesh::err, libMesh::Elem::has_children(), libMesh::invalid_uint, and libMesh::Elem::n_children().
Referenced by libMesh::UnstructuredMesh::all_first_order(), libMesh::BoundaryInfo::boundary_id(), libMesh::BoundaryInfo::boundary_ids(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::BoundaryInfo::has_boundary_id(), libMesh::Elem::make_links_to_me_remote(), libMesh::BoundaryInfo::n_boundary_ids(), libMesh::Parallel::pack(), libMesh::Elem::PackedElem::pack(), and libMesh::BoundaryInfo::side_with_boundary_id().
01812 { 01813 libmesh_assert(e); 01814 libmesh_assert (this->has_children()); 01815 01816 for (unsigned int c=0; c<this->n_children(); c++) 01817 if (this->child(c) == e) 01818 return c; 01819 01820 libMesh::err << "ERROR: which_child_am_i() was called with a non-child!" 01821 << std::endl; 01822 01823 libmesh_error(); 01824 01825 return libMesh::invalid_uint; 01826 }
| unsigned int libMesh::Elem::which_neighbor_am_i | ( | const Elem * | e | ) | const [inline, inherited] |
This function tells you which neighbor you (e) are. I.e. if s = a->which_neighbor_am_i(e); then a->neighbor(s) will be an ancestor of e;
Definition at line 1499 of file elem.h.
References libMesh::invalid_uint, libMesh::Elem::level(), libMesh::Elem::n_neighbors(), libMesh::Elem::neighbor(), and libMesh::Elem::parent().
Referenced by libMesh::MetisPartitioner::_do_partition(), libMesh::ParmetisPartitioner::build_graph(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::MeshTools::find_hanging_nodes_and_parents(), libMesh::Elem::libmesh_assert_valid_neighbors(), libMesh::Elem::make_links_to_me_remote(), and libMesh::Elem::nullify_neighbors().
01500 { 01501 libmesh_assert(e); 01502 01503 const Elem* eparent = e; 01504 01505 while (eparent->level() > this->level()) 01506 { 01507 eparent = eparent->parent(); 01508 libmesh_assert(eparent); 01509 } 01510 01511 for (unsigned int s=0; s<this->n_neighbors(); s++) 01512 if (this->neighbor(s) == eparent) 01513 return s; 01514 01515 return libMesh::invalid_uint; 01516 }
| unsigned int libMesh::Elem::which_side_am_i | ( | const Elem * | e | ) | const [inline, inherited] |
This function tells you which side the boundary element e is. I.e. if e = a->build_side(s) or e = a->side(s); then a->which_side_am_i(e) will be s.
Returns invalid_uint if e is not a side of this
Definition at line 1521 of file elem.h.
References libMesh::invalid_uint, libMesh::Elem::is_node_on_side(), libMesh::Elem::n_nodes(), libMesh::Elem::n_sides(), and libMesh::Elem::point().
01522 { 01523 libmesh_assert(e); 01524 01525 const unsigned int ns = this->n_sides(); 01526 const unsigned int nn = this->n_nodes(); 01527 01528 const unsigned int en = e->n_nodes(); 01529 01530 // e might be on any side until proven otherwise 01531 std::vector<bool> might_be_side(ns, true); 01532 01533 for (unsigned int i=0; i != en; ++i) 01534 { 01535 Point side_point = e->point(i); 01536 unsigned int local_node_id = libMesh::invalid_uint; 01537 01538 // Look for a node of this that's contiguous with node i of e 01539 for (unsigned int j=0; j != nn; ++j) 01540 if (this->point(j) == side_point) 01541 local_node_id = j; 01542 01543 // If a node of e isn't contiguous with some node of this, then 01544 // e isn't a side of this. 01545 if (local_node_id == libMesh::invalid_uint) 01546 return libMesh::invalid_uint; 01547 01548 // If a node of e isn't contiguous with some node on side s of 01549 // this, then e isn't on side s. 01550 for (unsigned int s=0; s != ns; ++s) 01551 if (!this->is_node_on_side(local_node_id, s)) 01552 might_be_side[s] = false; 01553 } 01554 01555 for (unsigned int s=0; s != ns; ++s) 01556 if (might_be_side[s]) 01557 { 01558 #ifdef DEBUG 01559 for (unsigned int s2=s+1; s2 < ns; ++s2) 01560 libmesh_assert (!might_be_side[s2]); 01561 #endif 01562 return s; 01563 } 01564 01565 // Didn't find any matching side 01566 return libMesh::invalid_uint; 01567 }
| void libMesh::Elem::write_connectivity | ( | std::ostream & | out, | |
| const IOPackage | iop | |||
| ) | const [inherited] |
Writes the element connectivity for various IO packages to the passed ostream "out". Not virtual, since it is implemented in the base class. This function supercedes the write_tecplot_connectivity(...) and write_ucd_connectivity(...) routines.
Definition at line 1173 of file elem.C.
References libMesh::Elem::_nodes, libMesh::Elem::connectivity(), libMeshEnums::INVALID_IO_PACKAGE, libMesh::Elem::n_nodes(), libMesh::Elem::n_sub_elem(), libMesh::Elem::node(), libMeshEnums::TECPLOT, and libMeshEnums::UCD.
01175 { 01176 libmesh_assert (out_stream.good()); 01177 libmesh_assert(_nodes); 01178 libmesh_assert_not_equal_to (iop, INVALID_IO_PACKAGE); 01179 01180 switch (iop) 01181 { 01182 case TECPLOT: 01183 { 01184 // This connectivity vector will be used repeatedly instead 01185 // of being reconstructed inside the loop. 01186 std::vector<dof_id_type> conn; 01187 for (unsigned int sc=0; sc <this->n_sub_elem(); sc++) 01188 { 01189 this->connectivity(sc, TECPLOT, conn); 01190 01191 std::copy(conn.begin(), 01192 conn.end(), 01193 std::ostream_iterator<dof_id_type>(out_stream, " ")); 01194 01195 out_stream << '\n'; 01196 } 01197 return; 01198 } 01199 01200 case UCD: 01201 { 01202 for (unsigned int i=0; i<this->n_nodes(); i++) 01203 out_stream << this->node(i)+1 << "\t"; 01204 01205 out_stream << '\n'; 01206 return; 01207 } 01208 01209 default: 01210 libmesh_error(); 01211 } 01212 01213 libmesh_error(); 01214 }
Friends And Related Function Documentation
friend class MeshRefinement [friend, inherited] |
Make the classes that need to access our build member friends. These classes do not really fit the profile of what a "friend" should be, but if we are going to protect the constructor and the build method, there's no way around it.
Do we *really* need to protect the build member? It would seem that we are just getting around it by using friends!
Member Data Documentation
Elem** libMesh::Elem::_children [protected, inherited] |
Pointers to this element's children.
Definition at line 1200 of file elem.h.
Referenced by libMesh::Elem::add_child(), libMesh::Elem::child(), libMesh::Elem::contract(), libMesh::Elem::has_ancestor_children(), libMesh::Elem::has_children(), libMesh::Elem::refine(), libMesh::Elem::set_child(), and libMesh::Elem::~Elem().
ReferenceCounter::Counts libMesh::ReferenceCounter::_counts [static, protected, inherited] |
Actually holds the data.
Definition at line 118 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info(), libMesh::ReferenceCounter::increment_constructor_count(), and libMesh::ReferenceCounter::increment_destructor_count().
ReferenceCounter::Counts libMesh::ReferenceCounter::_counts [static, protected, inherited] |
Actually holds the data.
Definition at line 118 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info(), libMesh::ReferenceCounter::increment_constructor_count(), and libMesh::ReferenceCounter::increment_destructor_count().
Elem** libMesh::Elem::_elemlinks [protected, inherited] |
Pointers to this element's parent and neighbors, and for lower-dimensional elements interior_parent.
Definition at line 1193 of file elem.h.
Referenced by libMesh::Elem::Elem(), libMesh::Elem::interior_parent(), libMesh::Elem::neighbor(), libMesh::Elem::parent(), libMesh::Elem::set_interior_parent(), libMesh::Elem::set_neighbor(), and libMesh::Elem::set_parent().
Elem* libMesh::InfQuad::_elemlinks_data[4+(LIBMESH_DIM >2)] [protected] |
Data for links to parent/neighbor/interior_parent elements.
Definition at line 177 of file face_inf_quad.h.
bool libMesh::ReferenceCounter::_enable_print_counter = true [static, protected, inherited] |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 137 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
bool libMesh::ReferenceCounter::_enable_print_counter = true [static, protected, inherited] |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 137 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
Threads::spin_mutex libMesh::ReferenceCounter::_mutex [static, protected, inherited] |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 131 of file reference_counter.h.
Threads::spin_mutex libMesh::ReferenceCounter::_mutex [static, protected, inherited] |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 131 of file reference_counter.h.
Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects [static, protected, inherited] |
The number of objects. Print the reference count information when the number returns to 0.
Definition at line 126 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().
Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects [static, protected, inherited] |
The number of objects. Print the reference count information when the number returns to 0.
Definition at line 126 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().
Node** libMesh::Elem::_nodes [protected, inherited] |
Pointers to the nodes we are connected to.
Definition at line 1187 of file elem.h.
Referenced by libMesh::Tet10::connectivity(), libMesh::Prism18::connectivity(), libMesh::InfPrism12::connectivity(), libMesh::InfHex18::connectivity(), libMesh::InfHex16::connectivity(), libMesh::Hex27::connectivity(), libMesh::Hex20::connectivity(), libMesh::Elem::Elem(), libMesh::Elem::get_node(), libMesh::Elem::get_node_index(), libMesh::Elem::node(), libMesh::Elem::point(), libMesh::Elem::set_node(), libMesh::Prism6::volume(), libMesh::Hex8::volume(), and libMesh::Elem::write_connectivity().
unsigned char libMesh::Elem::_p_level [protected, inherited] |
p refinement level - the difference between the polynomial degree on this element and the minimum polynomial degree on the mesh. This is stored as an unsigned char to save space. In theory, these last four bytes might have been padding anyway.
Definition at line 1224 of file elem.h.
Referenced by libMesh::Elem::hack_p_level(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::p_level(), and libMesh::Elem::set_p_level().
unsigned char libMesh::Elem::_pflag [protected, inherited] |
p refinement flag. This is stored as an unsigned char to save space.
Definition at line 1213 of file elem.h.
Referenced by libMesh::Elem::p_refinement_flag(), and libMesh::Elem::set_p_refinement_flag().
unsigned char libMesh::Elem::_rflag [protected, inherited] |
h refinement flag. This is stored as an unsigned char to save space.
Definition at line 1206 of file elem.h.
Referenced by libMesh::Elem::refinement_flag(), and libMesh::Elem::set_refinement_flag().
subdomain_id_type libMesh::Elem::_sbd_id [protected, inherited] |
The subdomain to which this element belongs.
Definition at line 1231 of file elem.h.
Referenced by libMesh::Elem::subdomain_id().
const dof_id_type libMesh::DofObject::invalid_id = static_cast<dof_id_type>(-1) [static, inherited] |
An invaild id to distinguish an uninitialized DofObject
Definition at line 310 of file dof_object.h.
Referenced by libMesh::Node::active(), libMesh::SerialMesh::add_point(), libMesh::MeshRefinement::add_point(), libMesh::UnstructuredMesh::all_second_order(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::DofObject::dof_number(), libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::invalidate_id(), libMesh::ParallelMesh::libmesh_assert_valid_parallel_object_ids(), libMesh::Node::Node(), libMesh::Elem::node(), libMesh::DofMap::old_dof_indices(), libMesh::Elem::point(), libMesh::System::read_legacy_data(), libMesh::System::read_parallel_data(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::Parallel::unpack(), libMesh::Elem::PackedElem::unpack(), libMesh::DofObject::valid_id(), and libMesh::System::write_parallel_data().
const processor_id_type libMesh::DofObject::invalid_processor_id = static_cast<processor_id_type>(-1) [static, inherited] |
An invalid processor_id to distinguish DOFs that have not been assigned to a processor.
Definition at line 316 of file dof_object.h.
Referenced by libMesh::ParallelMesh::add_elem(), libMesh::ParallelMesh::add_node(), libMesh::MeshTools::bounding_box(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::Elem::Elem(), libMesh::MeshCommunication::find_global_indices(), libMesh::DofObject::invalidate_processor_id(), libMesh::ParallelMesh::libmesh_assert_valid_parallel_object_ids(), libMesh::ParallelMesh::n_active_elem(), libMesh::MeshBase::n_elem_on_proc(), libMesh::MeshBase::n_nodes_on_proc(), libMesh::MeshBase::n_unpartitioned_elem(), libMesh::MeshBase::n_unpartitioned_nodes(), libMesh::Elem::PackedElem::processor_id(), libMesh::ParallelMesh::renumber_dof_objects(), libMesh::Partitioner::set_node_processor_ids(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::BoundaryInfo::sync(), libMesh::Parallel::sync_dofobject_data_by_id(), libMesh::Parallel::sync_dofobject_data_by_xyz(), libMesh::MeshTools::total_weight(), libMesh::Parallel::unpack(), libMesh::Node::PackedNode::unpack(), libMesh::SerialMesh::unpartitioned_elements_begin(), libMesh::ParallelMesh::unpartitioned_elements_begin(), libMesh::SerialMesh::unpartitioned_elements_end(), libMesh::ParallelMesh::unpartitioned_elements_end(), and libMesh::DofObject::valid_processor_id().
DofObject* libMesh::DofObject::old_dof_object [inherited] |
This object on the last mesh. Useful for projecting solutions from one mesh to another.
Definition at line 89 of file dof_object.h.
Referenced by libMesh::DofObject::clear_old_dof_object(), libMesh::MeshTools::libmesh_assert_old_dof_objects(), libMesh::DofMap::old_dof_indices(), libMesh::DofObject::operator=(), libMesh::DofObject::pack_indexing(), libMesh::DofObject::packed_indexing_size(), libMesh::DofMap::reinit(), libMesh::DofObject::set_old_dof_object(), and libMesh::DofObject::unpack_indexing().
const unsigned int libMesh::Elem::type_to_n_nodes_map [static, inherited] |
This array maps the integer representation of the ElemType enum to the number of nodes in the element.
Definition at line 391 of file elem.h.
Referenced by libMesh::Elem::PackedElem::n_nodes(), libMesh::XdrIO::pack_element(), libMesh::Parallel::packed_size(), libMesh::XdrIO::read_serialized_connectivity(), and libMesh::Parallel::unpack().
const unsigned int libMesh::Elem::type_to_n_sides_map [static, inherited] |
This array maps the integer representation of the ElemType enum to the number of sides on the element.
Definition at line 402 of file elem.h.
Referenced by libMesh::Elem::PackedElem::n_neighbors(), and libMesh::Parallel::packed_size().
The documentation for this class was generated from the following files:
Site Created By: libMesh Developers
Last modified: February 05 2013 19:55:19 UTC
Hosted By: