Poster of Linux kernelThe best gift for a Linux geek
Quad4

Quad4

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

Quad4 -  

SYNOPSIS


#include <face_quad4.h>

Inherits Quad.  

Public Types


enum RefinementState { COARSEN = 0, DO_NOTHING, REFINE, JUST_REFINED, JUST_COARSENED, INACTIVE, COARSEN_INACTIVE }

typedef Predicates::multi_predicate Predicate
 

Public Member Functions


Quad4 (Elem *p=NULL)

Quad4 (const unsigned int nn, const unsigned int ns, Elem *p)

ElemType type () const

unsigned int n_sub_elem () const

virtual bool is_vertex (const unsigned int i) const

virtual bool is_edge (const unsigned int i) const

virtual bool is_face (const unsigned int i) const

virtual bool is_node_on_side (const unsigned int n, const unsigned int s) const

virtual bool is_node_on_edge (const unsigned int n, const unsigned int e) const

virtual bool has_affine_map () const

Order default_order () const

AutoPtr< Elem > build_side (const unsigned int i, bool proxy) const

virtual void connectivity (const unsigned int sf, const IOPackage iop, std::vector< unsigned int > &conn) const

virtual Real volume () const

unsigned int n_nodes () const

unsigned int n_sides () const

unsigned int n_vertices () const

unsigned int n_edges () const

unsigned int n_children () const

virtual bool is_child_on_side (const unsigned int c, const unsigned int s) const

unsigned int key (const unsigned int s) const

AutoPtr< DofObject > side (const unsigned int i) const

Real quality (const ElemQuality q) const

std::pair< Real, Real > qual_bounds (const ElemQuality q) const

unsigned int dim () const

unsigned int n_faces () const

AutoPtr< Elem > build_edge (const unsigned int i) const

bool infinite () const

virtual const Point & point (const unsigned int i) const

virtual Point & point (const unsigned int i)

virtual unsigned int node (const unsigned int i) const

virtual Node * get_node (const unsigned int i) const

virtual Node *& set_node (const unsigned int i)

subdomain_id_type subdomain_id () const

subdomain_id_type & subdomain_id ()

virtual bool operator== (const DofObject &rhs) const

Elem * neighbor (const unsigned int i) const

void set_neighbor (const unsigned int i, Elem *n)

bool has_neighbor (const Elem *elem) const

Elem * child_neighbor (Elem *elem) const

const Elem * child_neighbor (const Elem *elem) const

bool on_boundary () const

unsigned int which_neighbor_am_i (const Elem *e) const

bool contains_vertex_of (const Elem *e) const

void find_point_neighbors (std::set< const Elem * > &neighbor_set) const

void make_links_to_me_remote ()

virtual bool is_remote () const

void write_connectivity (std::ostream &out, const IOPackage iop) const

virtual unsigned int n_neighbors () const

virtual Point centroid () const

virtual Real hmin () const

virtual Real hmax () const

virtual bool contains_point (const Point &p) const

bool active () const

bool ancestor () const

bool subactive () const

bool has_children () const

bool has_ancestor_children () const

bool is_ancestor_of (const Elem *descendant) const

const Elem * parent () const

Elem * parent ()

void set_parent (Elem *p)

const Elem * top_parent () const

const Elem * interior_parent () const

Real length (const unsigned int n1, const unsigned int n2) const

virtual unsigned int n_second_order_adjacent_vertices (const unsigned int n) const

virtual unsigned short int second_order_adjacent_vertex (const unsigned int n, const unsigned int v) const

virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex (const unsigned int n) const

unsigned int level () const

unsigned int p_level () const

Elem * child (const unsigned int i) const

unsigned int which_child_am_i (const Elem *e) const

virtual bool is_child_on_edge (const unsigned int c, const unsigned int e) const

void add_child (Elem *elem)

void add_child (Elem *elem, unsigned int c)

void family_tree (std::vector< const Elem * > &family, const bool reset=true) const

void active_family_tree (std::vector< const Elem * > &active_family, const bool reset=true) const

void family_tree_by_side (std::vector< const Elem * > &family, const unsigned int side, const bool reset=true) const

void active_family_tree_by_side (std::vector< const Elem * > &family, const unsigned int side, const bool reset=true) const

void family_tree_by_neighbor (std::vector< const Elem * > &family, const Elem *neighbor, const bool reset=true) const

void family_tree_by_subneighbor (std::vector< const Elem * > &family, const Elem *neighbor, const Elem *subneighbor, const bool reset=true) const

void active_family_tree_by_neighbor (std::vector< const Elem * > &family, const Elem *neighbor, const bool reset=true) const

RefinementState refinement_flag () const

void set_refinement_flag (const RefinementState rflag)

RefinementState p_refinement_flag () const

void set_p_refinement_flag (const RefinementState pflag)

unsigned int max_descendant_p_level () const

unsigned int min_p_level_by_neighbor (const Elem *neighbor, unsigned int current_min) const

unsigned int min_new_p_level_by_neighbor (const Elem *neighbor, unsigned int current_min) const

void set_p_level (const unsigned int p)

void hack_p_level (const unsigned int p)

virtual void refine (MeshRefinement &mesh_refinement)

void coarsen ()

void contract ()

void libmesh_assert_valid_neighbors () const

void libmesh_assert_valid_node_pointers () const

side_iterator boundary_sides_begin ()

side_iterator boundary_sides_end ()

virtual Point origin () 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

unsigned int id () const

unsigned int & set_id ()

void set_id (const unsigned int id)

bool valid_id () const

unsigned short int processor_id () const

unsigned short int & processor_id ()

void processor_id (const unsigned int id)

bool valid_processor_id () const

unsigned int n_systems () const

void set_n_systems (const unsigned int s)

void add_system ()

unsigned int n_vars (const unsigned int s) const

void set_n_vars (const unsigned int s, const unsigned int nvars)

unsigned int n_comp (const unsigned int s, const unsigned int var) const

void set_n_comp (const unsigned int s, const unsigned int var, const unsigned int ncomp)

unsigned int dof_number (const unsigned int s, const unsigned int var, const unsigned int comp) const

void set_dof_number (const unsigned int s, const unsigned int var, const unsigned int comp, const unsigned int dn)

bool has_dofs (const unsigned int s=libMesh::invalid_uint) const
 

Static Public Member Functions


static ElemType second_order_equivalent_type (const ElemType et, const bool full_ordered=true)

static ElemType first_order_equivalent_type (const ElemType et)

static AutoPtr< Elem > build (const ElemType type, Elem *p=NULL)

static std::string get_info ()

static std::string get_info ()

static void print_info ()

static void print_info ()

static unsigned int n_objects ()

static unsigned int n_objects ()
 

Public Attributes


DofObject * old_dof_object
 

Static Public Attributes


static const unsigned int side_nodes_map [4][2]

static const unsigned short int _second_order_adjacent_vertices [4][2]

static const unsigned short int _second_order_vertex_child_number [9]

static const unsigned short int _second_order_vertex_child_index [9]

static const unsigned int type_to_n_nodes_map [INVALID_ELEM]

static const unsigned int invalid_id = libMesh::invalid_uint

static const unsigned short int invalid_processor_id = static_cast<unsigned short int>(-1)
 

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


float embedding_matrix (const unsigned int i, const unsigned int j, const unsigned int k) const

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 unsigned int compute_key (unsigned int n0)

static unsigned int compute_key (unsigned int n0, unsigned int n1)

static unsigned int compute_key (unsigned int n0, unsigned int n1, unsigned int n2)

static unsigned int compute_key (unsigned int n0, unsigned int n1, unsigned int n2, unsigned int n3)
 

Protected Attributes


Node ** _nodes

Elem ** _neighbors

Elem * _parent

Elem ** _children

unsigned char _rflag

unsigned char _pflag

unsigned char _p_level

subdomain_id_type _sbd_id
 

Static Protected Attributes


static const float _embedding_matrix [4][4][4]

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
 

Friends


class MeshRefinement
 

Detailed Description

The QUAD4 is an element in 2D composed of 4 nodes. It is numbered like this:


 *        3           2
 * QUAD4: o-----------o
 *        |           |
 *        |           |
 *        |           | 
 *        |           |
 *        |           |
 *        o-----------o
 *        0           1
 * 


 

Definition at line 57 of file face_quad4.h.  

Member Typedef Documentation

 

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > ReferenceCounter::Counts [protected, inherited]Data structure to log the information. The log is identified by the class name.

Definition at line 105 of file reference_counter.h.  

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > ReferenceCounter::Counts [protected, inherited]Data structure to log the information. The log is identified by the class name.

Definition at line 105 of file reference_counter.h.  

typedef Predicates::multi_predicate Elem::Predicate [inherited]Useful iterator typedefs

Definition at line 844 of file elem.h.  

Member Enumeration Documentation

 

enum Elem::RefinementState [inherited]Useful ENUM describing the refinement state of an element.

Enumerator:

COARSEN
DO_NOTHING
REFINE
JUST_REFINED
JUST_COARSENED
INACTIVE
COARSEN_INACTIVE

Definition at line 627 of file elem.h.

                       { COARSEN = 0,
                         DO_NOTHING,
                         REFINE,
                         JUST_REFINED,
                         JUST_COARSENED,
                         INACTIVE,
                         COARSEN_INACTIVE };
 

Constructor & Destructor Documentation

 

Quad4::Quad4 (Elem *p = NULL) [inline]Constructor. By default this element has no parent.

Definition at line 64 of file face_quad4.h.

                       :
    Quad(Quad::n_nodes(), p) {}
 

Quad4::Quad4 (const unsigned intnn, const unsigned intns, Elem *p) [inline]Constructor. Explicitly specifies the number of nodes and neighbors for which storage will be allocated.

Definition at line 71 of file face_quad4.h.

                  :
    Quad(nn, ns, p) {}
 

Member Function Documentation

 

bool Elem::active () const [inline, inherited]Returns:

true if the element is active (i.e. has no active descendants), false otherwise. Note that it suffices to check the first child only. Always returns true if AMR is disabled.

Definition at line 1303 of file elem.h.

References Elem::COARSEN_INACTIVE, Elem::INACTIVE, and Elem::refinement_flag().

Referenced by MeshRefinement::_coarsen_elements(), MetisPartitioner::_do_partition(), MeshRefinement::_refine_elements(), Elem::active_family_tree(), Elem::active_family_tree_by_neighbor(), Elem::active_family_tree_by_side(), DofMap::add_neighbors_to_send_list(), HPCoarsenTest::add_projection(), Elem::ancestor(), Patch::build_around_element(), ParmetisPartitioner::build_graph(), Elem::coarsen(), MeshRefinement::coarsen_elements(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), UnstructuredMesh::contract(), Elem::contract(), DofMap::dof_indices(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), Elem::family_tree(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_side(), Elem::family_tree_by_subneighbor(), Patch::find_face_neighbors(), UnstructuredMesh::find_neighbors(), Elem::find_point_neighbors(), MeshRefinement::flag_elements_by_nelem_target(), ErrorVector::is_active_elem(), Elem::is_ancestor_of(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), DofMap::old_dof_indices(), PointLocatorTree::operator()(), PointLocatorList::operator()(), Elem::refine(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), Elem::subactive(), Parallel::sync_element_data_by_parent_id(), MeshRefinement::test_level_one(), ExodusII_IO_Helper::write_elements(), and DivaIO::write_stream().

{
#ifdef LIBMESH_ENABLE_AMR
  if ((this->refinement_flag() == INACTIVE) ||
      (this->refinement_flag() == COARSEN_INACTIVE))
    return false;
  else
    return true;
#else
  return true;
#endif
}
 

void Elem::active_family_tree (std::vector< const Elem * > &active_family, const boolreset = 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 903 of file elem.C.

References Elem::active(), Elem::active_family_tree(), Elem::child(), Elem::is_remote(), Elem::n_children(), and Elem::subactive().

Referenced by MetisPartitioner::_do_partition(), Elem::active_family_tree(), and ParmetisPartitioner::build_graph().

{
  // The 'family tree' doesn't include subactive elements
  libmesh_assert(!this->subactive());

  // Clear the vector if the flag reset tells us to.
  if (reset)
    active_family.clear();

  // Add this element to the family tree if it is active
  if (this->active())
    active_family.push_back(this);

  // Otherwise recurse into the element's children.
  // Do not clear the vector any more.
  else 
    for (unsigned int c=0; c<this->n_children(); c++)
      if (!this->child(c)->is_remote())
        this->child(c)->active_family_tree (active_family, false);
}
 

void Elem::active_family_tree_by_neighbor (std::vector< const Elem * > &family, const Elem *neighbor, const boolreset = true) const [inherited]Same as the active_family_tree() member, but only adds elements which are next to neighbor.

Definition at line 1059 of file elem.C.

References Elem::active(), Elem::active_family_tree_by_neighbor(), Elem::child(), Elem::has_neighbor(), Elem::level(), Elem::n_children(), remote_elem, and Elem::subactive().

Referenced by Elem::active_family_tree_by_neighbor(), DofMap::add_neighbors_to_send_list(), Patch::find_face_neighbors(), Elem::find_point_neighbors(), and SparsityPattern::Build::operator()().

{
  // The 'family tree' doesn't include subactive elements
  libmesh_assert(!this->subactive());

  // Clear the vector if the flag reset tells us to.
  if (reset)
    family.clear();

  // This only makes sense if we're already a neighbor
  if (this->level() >= neighbor->level())
    libmesh_assert (this->has_neighbor(neighbor));

  // Add an active element to the family tree.
  if (this->active())
    family.push_back(this);

  // Or recurse into an ancestor element's children.
  // Do not clear the vector any more.
  else if (!this->active())
    for (unsigned int c=0; c<this->n_children(); c++)
      {
        Elem *child = this->child(c);
        if (child != remote_elem && child->has_neighbor(neighbor))
          child->active_family_tree_by_neighbor (family, neighbor, false);
      }
}
 

void Elem::active_family_tree_by_side (std::vector< const Elem * > &family, const unsigned intside, const boolreset = true) const [inherited]Same as the active_family_tree() member, but only adds elements which are next to side.

Definition at line 954 of file elem.C.

References Elem::active(), Elem::active_family_tree_by_side(), Elem::child(), Elem::is_child_on_side(), Elem::n_children(), Elem::n_sides(), and Elem::subactive().

Referenced by Elem::active_family_tree_by_side(), and BoundaryInfo::build_node_list_from_side_list().

{
  // The 'family tree' doesn't include subactive elements
  libmesh_assert(!this->subactive());

  // Clear the vector if the flag reset tells us to.
  if (reset)
    family.clear();

  libmesh_assert(s < this->n_sides());

  // Add an active element to the family tree.
  if (this->active())
    family.push_back(this);

  // Or recurse into an ancestor element's children.
  // Do not clear the vector any more.
  else
    for (unsigned int c=0; c<this->n_children(); c++)
      if (this->child(c)->is_child_on_side(c, s))
        this->child(c)->active_family_tree_by_side (family, s, false);
}
 

void 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 819 of file elem.C.

References Elem::_children, Elem::n_children(), Elem::parent(), and remote_elem.

Referenced by UnstructuredMesh::all_first_order(), UnstructuredMesh::copy_nodes_and_elements(), LegacyXdrIO::read_mesh(), and XdrIO::read_serialized_connectivity().

{
  if(_children == NULL)
    {
      _children = new Elem*[this->n_children()];
      
      for (unsigned int c=0; c<this->n_children(); c++)
        _children[c] = NULL;
    }
  
  for (unsigned int c=0; c<this->n_children(); c++)
    {
      if(_children[c] == NULL || _children[c] == remote_elem)
        {
          libmesh_assert (this == elem->parent());
          _children[c] = elem;
          return;
        }
    }

  std::cerr << 'Error: Tried to add a child to an element with full children array'
            << std::endl;
  libmesh_error();
}
 

void Elem::add_child (Elem *elem, unsigned intc) [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 846 of file elem.C.

References Elem::_children, Elem::n_children(), Elem::parent(), and remote_elem.

{
  if(_children == NULL)
    {
      _children = new Elem*[this->n_children()];
      
      for (unsigned int i=0; i<this->n_children(); i++)
        _children[i] = NULL;
    }
  
  libmesh_assert (_children[c] == NULL || _children[c] == remote_elem);
  libmesh_assert (this == elem->parent());

  _children[c] = elem;
}
 

void DofObject::add_system () [inherited]Adds an additional system to the DofObject

Definition at line 188 of file dof_object.C.

References DofObject::_dof_ids, DofObject::_n_systems, DofObject::_n_v_comp, and DofObject::n_systems().

{
  if (this->n_systems() > 0)
    {
      // Copy the old systems to temporary storage
      unsigned char **old_n_v_comp = new unsigned char* [this->n_systems()];
      unsigned int  **old_dof_ids  = new unsigned int*  [this->n_systems()]; 
      
      for (unsigned int s=0; s<this->n_systems(); s++)
        {
          old_n_v_comp[s] = _n_v_comp[s];
          old_dof_ids[s]  = _dof_ids[s];
        }
      
      // Delete old storage
      libmesh_assert (_n_v_comp != NULL); delete [] _n_v_comp; _n_v_comp = NULL;
      libmesh_assert (_dof_ids  != NULL); delete [] _dof_ids;  _dof_ids  = NULL;
  
      // Allocate space for new system
      _n_v_comp= new unsigned char* [this->n_systems()+1];
      _dof_ids = new unsigned int*  [this->n_systems()+1];
      
      // Copy the other systems
      for (unsigned int s=0; s<this->n_systems(); s++)
        {
          _n_v_comp[s] = old_n_v_comp[s];
          _dof_ids[s]  = old_dof_ids[s];
        }
               
      // Delete temporary storage
      libmesh_assert (old_n_v_comp != NULL); delete [] old_n_v_comp; old_n_v_comp = NULL;
      libmesh_assert (old_dof_ids  != NULL); delete [] old_dof_ids;  old_dof_ids  = NULL;
    }
  else
    {
      libmesh_assert (_n_v_comp == NULL);
      libmesh_assert (_dof_ids  == NULL);
      
      // Allocate space for new system
      _n_v_comp = new unsigned char* [this->n_systems()+1];
      _dof_ids  = new unsigned int*  [this->n_systems()+1];      
    }
  
  // Initialize the new system
  _n_v_comp[this->n_systems()] = NULL;
  _dof_ids[this->n_systems()]  = NULL;
  
  // Done. Don't forget to increment the number of systems!
  _n_systems++;
}
 

bool Elem::ancestor () const [inherited]Returns:

true if the element is an ancestor (i.e. has an active child or ancestor child), false otherwise. Always returns false if AMR is disabled.

Definition at line 797 of file elem.C.

References Elem::active(), Elem::ancestor(), Elem::child(), and Elem::has_children().

Referenced by Elem::ancestor(), UnstructuredMesh::contract(), MeshRefinement::eliminate_unrefined_patches(), UnstructuredMesh::find_neighbors(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), and Elem::refine().

{
#ifdef LIBMESH_ENABLE_AMR

  if (this->active())
    return false;

if (!this->has_children())
    return false;
  if (this->child(0)->active())
    return true;

  return this->child(0)->ancestor();
#else
  return false;
#endif
}
 

Elem::side_iterator Elem::boundary_sides_begin () [inherited]Iterator accessor functions

Definition at line 1394 of file elem.C.

References Elem::_first_side(), and Elem::_last_side().

{
  Predicates::BoundarySide<SideIter> bsp;
  return side_iterator(this->_first_side(), this->_last_side(), bsp);
}
 

Elem::side_iterator Elem::boundary_sides_end () [inherited]

Definition at line 1403 of file elem.C.

References Elem::_last_side().

{
  Predicates::BoundarySide<SideIter> bsp;
  return side_iterator(this->_last_side(), this->_last_side(), bsp);
}
 

AutoPtr< Elem > Elem::build (const ElemTypetype, Elem *p = NULL) [static, inherited]Build an element of type type. Since this method allocates memory the new Elem is returned in a AutoPtr<>

Definition at line 108 of file elem.C.

References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::EDGE4, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INFEDGE2, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMeshEnums::PRISM15, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::PYRAMID5, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.

Referenced by GMVIO::_read_one_cell(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), UnstructuredMesh::copy_nodes_and_elements(), UnstructuredMesh::create_submesh(), MeshTools::Modification::flatten(), Nemesis_IO::read(), ExodusII_IO::read(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), Elem::refine(), and GMVIO::write_ascii_old_impl().

{
  Elem* elem = NULL;
 
  switch (type)
    {
      // 1D elements 
    case EDGE2:
      {
        elem = new Edge2(p);
        break;
      }
    case EDGE3:
      {
        elem = new Edge3(p);
        break;
      }
    case EDGE4:
      {
        elem = new Edge4(p);
        break;
      }


      
      // 2D elements
    case TRI3:
      {
        elem = new Tri3(p);
        break;
      }
    case TRI6:
      {
        elem = new Tri6(p);
        break;
      }
    case QUAD4:
      {
        elem = new Quad4(p);
        break;
      }
    case QUAD8:
      {
        elem = new Quad8(p);
        break;
      }
    case QUAD9:
      {
        elem = new Quad9(p);
        break;
      }
   

      // 3D elements
    case TET4:
      {
        elem = new Tet4(p);
        break;
      }
    case TET10:
      {
        elem = new Tet10(p);
        break;
      }
    case HEX8:
      {
        elem = new Hex8(p);
        break;
      }
    case HEX20:
      {
        elem = new Hex20(p);
        break;
      }
    case HEX27:
      {
        elem = new Hex27(p);
        break;
      }
    case PRISM6:
      {
        elem = new Prism6(p);
        break;
      }
    case PRISM15:
      {
        elem = new Prism15(p);
        break;
      }
    case PRISM18:
      {
        elem = new Prism18(p);
        break;
      }
    case PYRAMID5:
      {
        elem = new Pyramid5(p);
        break;
      }



#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS

      // 1D infinite elements
    case INFEDGE2:
      {
        elem = new InfEdge2(p);
        break;
      }


      // 2D infinite elements
    case INFQUAD4:
      {
        elem = new InfQuad4(p);
        break;
      }
    case INFQUAD6:
      {
        elem = new InfQuad6(p);
        break;
      }

   
    // 3D infinite elements
    case INFHEX8:
      {
        elem = new InfHex8(p);
        break;
      }
    case INFHEX16:
      {
        elem = new InfHex16(p);
        break;
      }
    case INFHEX18:
      {
        elem = new InfHex18(p);
        break;
      }
    case INFPRISM6:
      {
        elem = new InfPrism6(p);
        break;
      }
    case INFPRISM12:
      {
        elem = new InfPrism12(p);
        break;
      }

#endif
           
    default:
      {
        std::cerr << 'ERROR: Undefined element type!.' << std::endl;
        libmesh_error();
      }
    }
  

  AutoPtr<Elem> ap(elem);
  return ap;
}
 

AutoPtr<Elem> Face::build_edge (const unsigned inti) const [inline, virtual, inherited]build_side and build_edge are identical for faces

Implements Elem.

Definition at line 71 of file face.h.

References Elem::build_side().

    { return build_side(i); }
 

AutoPtr< Elem > Quad4::build_side (const unsigned inti, boolproxy) const [virtual]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.

Implements Elem.

Definition at line 126 of file face_quad4.C.

References Elem::get_node(), Quad::n_sides(), and Elem::set_node().

{
  libmesh_assert (i < this->n_sides());

  if (proxy)
    {
      AutoPtr<Elem> ap(new Side<Edge2,Quad4>(this,i));
      return ap;
    }

  else
    {

      switch (i)
        {
        case 0:
          {
            Edge2* edge = new Edge2;

            edge->set_node(0) = this->get_node(0);
            edge->set_node(1) = this->get_node(1);
        
            AutoPtr<Elem> ap(edge);  return ap;
          }
        case 1:
          {
            Edge2* edge = new Edge2;

            edge->set_node(0) = this->get_node(1);
            edge->set_node(1) = this->get_node(2);
        
            AutoPtr<Elem> ap(edge);  return ap;
          }
        case 2:
          {
            Edge2* edge = new Edge2;

            edge->set_node(0) = this->get_node(2);
            edge->set_node(1) = this->get_node(3);
        
            AutoPtr<Elem> ap(edge);  return ap;
          }
        case 3:
          {
            Edge2* edge = new Edge2;

            edge->set_node(0) = this->get_node(3);
            edge->set_node(1) = this->get_node(0);
        
            AutoPtr<Elem> ap(edge);  return ap;
          }
        default:
          {
            libmesh_error();
          }
        }
    }

  // We will never get here...
  AutoPtr<Elem> ap(NULL);  return ap;
}
 

Point 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 277 of file elem.C.

References TypeVector< T >::add(), and Elem::n_vertices().

Referenced by SFCPartitioner::_do_partition(), MeshCommunication::assign_global_indices(), CentroidPartitioner::compute_centroids(), UnstructuredMesh::find_neighbors(), LocationMap< T >::point_of(), FE< Dim, T >::shape(), FE< Dim, T >::shape_deriv(), FE< Dim, T >::shape_second_deriv(), Prism6::volume(), and Hex8::volume().

{
  Point cp;

  for (unsigned int n=0; n<this->n_vertices(); n++)
    cp.add (this->point(n));

  return (cp /= static_cast<Real>(this->n_vertices()));    
}
 

Elem* Elem::child (const unsigned inti) const [inherited]Returns:

a pointer to the $ i^{th} $ child for this element. Do not call if this element has no children, i.e. is active.

Referenced by Elem::active_family_tree(), Elem::active_family_tree_by_neighbor(), Elem::active_family_tree_by_side(), HPCoarsenTest::add_projection(), UnstructuredMesh::all_first_order(), Elem::ancestor(), Elem::coarsen(), FEBase::coarsened_dof_values(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), Elem::family_tree(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_side(), Elem::family_tree_by_subneighbor(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_nelem_target(), Elem::has_ancestor_children(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), MeshTools::libmesh_assert_valid_remote_elems(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), Elem::refine(), Tet4::reselect_diagonal(), Partitioner::set_parent_processor_ids(), MeshTools::Modification::smooth(), Elem::subactive(), Parallel::sync_element_data_by_parent_id(), and XdrIO::write_serialized_connectivity().  

Elem * Elem::child_neighbor (Elem *elem) const [inline, inherited]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 1245 of file elem.h.

References Elem::n_neighbors(), Elem::neighbor(), and Elem::parent().

{
  for (unsigned int n=0; n<elem->n_neighbors(); n++)
    if (elem->neighbor(n) &&
        elem->neighbor(n)->parent() == this)
      return elem->neighbor(n);

  return NULL;
}
 

const Elem * Elem::child_neighbor (const Elem *elem) const [inline, inherited]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 1258 of file elem.h.

References Elem::n_neighbors(), Elem::neighbor(), and Elem::parent().

{
  for (unsigned int n=0; n<elem->n_neighbors(); n++)
    if (elem->neighbor(n) &&
        elem->neighbor(n)->parent() == this)
      return elem->neighbor(n);

  return NULL;
}
 

void DofObject::clear_dofs () [inline, inherited]Clear the DofMap data structures and return to a pristine state.

Definition at line 388 of file dof_object.h.

References DofObject::_dof_ids, DofObject::_n_systems, DofObject::_n_v_comp, and DofObject::n_systems().

Referenced by DofObject::set_n_systems(), and DofObject::~DofObject().

{
  // Only clear if there is data
  if (this->n_systems() != 0)
    {
      libmesh_assert (_n_v_comp != NULL);
      libmesh_assert (_dof_ids  != NULL);
      
      for (unsigned int s=0; s<this->n_systems(); s++)
        {
          if (_dof_ids[s] != NULL) // This has only been allocated if 
            {                      // variables were declared
              delete [] _dof_ids[s]; _dof_ids[s] = NULL;
            }
          
          if (_n_v_comp[s] != NULL) // it is possible the number of variables is 0,
            {                       // but this was allocated (_n_v_comp[s][0] == 0)
              delete [] _n_v_comp[s]; _n_v_comp[s] = NULL;
            }
        }
      
      delete [] _n_v_comp; _n_v_comp = NULL;
      delete [] _dof_ids;  _dof_ids  = NULL;
    }
  
  // Make sure we cleaned up
  // (or there was nothing there)
  libmesh_assert (_n_v_comp == NULL);
  libmesh_assert (_dof_ids  == NULL);
  
  // No systems now.
  _n_systems = 0;
}
 

void DofObject::clear_old_dof_object () [inherited]Sets the old_dof_object to NULL

Definition at line 120 of file dof_object.C.

References DofObject::old_dof_object.

Referenced by DofObject::set_old_dof_object(), and DofObject::~DofObject().

{
  // If we have been called before...
  // prevent a memory leak
  if (old_dof_object != NULL)
    {
      delete this->old_dof_object;
      this->old_dof_object = NULL;
    }  
}
 

void Elem::coarsen () [inherited]Coarsen the element. This is not virtual since it is the same for all element types.

Definition at line 184 of file elem_refinement.C.

References Elem::active(), TypeVector< T >::add_scaled(), Elem::child(), Elem::COARSEN, Elem::COARSEN_INACTIVE, Elem::embedding_matrix(), Elem::get_node(), Elem::INACTIVE, Elem::JUST_COARSENED, Elem::n_children(), Elem::n_nodes(), Elem::p_level(), Elem::point(), Elem::refinement_flag(), remote_elem, Elem::set_p_level(), and Elem::set_refinement_flag().

Referenced by MeshRefinement::_coarsen_elements().

{
  libmesh_assert (this->refinement_flag() == Elem::COARSEN_INACTIVE);
  libmesh_assert (!this->active());

  // We no longer delete children until MeshRefinement::contract()
  // delete [] _children;
  // _children = NULL;

  unsigned int parent_p_level = 0;

  // re-compute hanging node nodal locations
  for (unsigned int c=0; c<this->n_children(); c++)
  {     
    Elem *mychild = this->child(c);
    if (mychild == remote_elem)
      continue;
    for (unsigned int nc=0; nc<mychild->n_nodes(); nc++)
    {
      Point new_pos;
      bool calculated_new_pos = false;

      for (unsigned int n=0; n<this->n_nodes(); n++)
      {
        // The value from the embedding matrix
        const float em_val = this->embedding_matrix(c,nc,n);
         
        // The node location is somewhere between existing vertices
        if ((em_val != 0.) && (em_val != 1.)) 
        {
          new_pos.add_scaled (this->point(n), em_val);
          calculated_new_pos = true;
        }
      }

      if(calculated_new_pos)
      { 
        //Move the existing node back into it's original location
        for(unsigned int i=0; i<LIBMESH_DIM; i++)
        {
          Point & child_node = *(mychild->get_node(nc));
          child_node(i)=new_pos(i);
        }
      }
    }
  }

  for (unsigned int c=0; c<this->n_children(); c++)
    {   
      Elem *mychild = this->child(c);
      if (mychild == remote_elem)
        continue;
      libmesh_assert (mychild->refinement_flag() == Elem::COARSEN);
      mychild->set_refinement_flag(Elem::INACTIVE);
      if (mychild->p_level() > parent_p_level)
        parent_p_level = mychild->p_level();
    }

  this->set_refinement_flag(Elem::JUST_COARSENED);
  this->set_p_level(parent_p_level);

  libmesh_assert (this->active());
}
 

static unsigned int Elem::compute_key (unsigned intn0) [static, protected, inherited]Compute a key from the specified nodes.

Referenced by Elem::is_ancestor_of(), Tri6::key(), Tri::key(), Quad9::key(), Quad8::key(), Quad::key(), InfQuad::key(), Edge::key(), Tet::key(), Pyramid::key(), Prism::key(), InfPrism::key(), InfHex18::key(), InfHex::key(), Hex27::key(), and Hex::key().  

static unsigned int Elem::compute_key (unsigned intn0, unsigned intn1) [static, protected, inherited]Compute a key from the specified nodes.

 

static unsigned int Elem::compute_key (unsigned intn0, unsigned intn1, unsigned intn2) [static, protected, inherited]Compute a key from the specified nodes.

 

static unsigned int Elem::compute_key (unsigned intn0, unsigned intn1, unsigned intn2, unsigned intn3) [static, protected, inherited]Compute a key from the specified nodes.

 

void Quad4::connectivity (const unsigned intsc, const IOPackageiop, std::vector< unsigned int > &conn) const [virtual]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.

Implements Elem.

Definition at line 193 of file face_quad4.C.

References libMeshEnums::INVALID_IO_PACKAGE, n_sub_elem(), Elem::node(), libMeshEnums::TECPLOT, and libMeshEnums::VTK.

{
  libmesh_assert (sf < this->n_sub_elem());
  libmesh_assert (iop != INVALID_IO_PACKAGE);

  // Create storage.
  conn.resize(4);

  switch (iop)
    {
    case TECPLOT:
      {
        conn[0] = this->node(0)+1;
        conn[1] = this->node(1)+1;
        conn[2] = this->node(2)+1;
        conn[3] = this->node(3)+1;
        return;
      }

    case VTK:
      {
        conn[0] = this->node(0);
        conn[1] = this->node(1);
        conn[2] = this->node(2);
        conn[3] = this->node(3);
        return;
      }

    default:
      libmesh_error();
    }

  libmesh_error();
}
 

bool Elem::contains_point (const Point &p) const [virtual, inherited]Returns:

true if the point p is contained in this element, false otherwise.

Reimplemented in InfHex8, InfPrism6, and InfQuad4.

Definition at line 1165 of file elem.C.

References Elem::default_order(), Elem::dim(), FEInterface::inverse_map(), FEInterface::on_reference_element(), and Elem::type().

Referenced by Elem::contains_vertex_of(), PointLocatorTree::operator()(), and HPSingularity::select_refinement().

{
  // Declare a basic FEType.  Will ue a Lagrange
  // element by default.
  FEType fe_type(this->default_order());
  
  const Point mapped_point = FEInterface::inverse_map(this->dim(),
                                                      fe_type,
                                                      this,
                                                      p,
                                                      1.e-4,
                                                      false);

  return FEInterface::on_reference_element(mapped_point, this->type());
}
 

bool 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 432 of file elem.C.

References Elem::contains_point(), Elem::n_vertices(), and Elem::point().

Referenced by Elem::find_point_neighbors().

{
  // Our vertices are the first numbered nodes
  for (unsigned int n = 0; n != e->n_vertices(); ++n)
    if (this->contains_point(e->point(n)))
      return true;
  return false;
}
 

void 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 250 of file elem_refinement.C.

References Elem::_children, Elem::active(), Elem::DO_NOTHING, Elem::JUST_COARSENED, Elem::refinement_flag(), and Elem::set_refinement_flag().

Referenced by UnstructuredMesh::contract().

{
  // Subactive elements get deleted entirely, not contracted
  libmesh_assert (this->active());

  // Active contracted elements no longer can have children
  if (_children)
    {
      delete [] _children;
      _children = NULL;
    }
  if (this->refinement_flag() == Elem::JUST_COARSENED)
    this->set_refinement_flag(Elem::DO_NOTHING);
}
 

Order Quad4::default_order () const [inline, virtual]Returns:

FIRST

Implements Elem.

Definition at line 125 of file face_quad4.h.

References libMeshEnums::FIRST.

{ return FIRST; }
 

unsigned int Face::dim () const [inline, virtual, inherited]Returns:

2, the dimensionality of the object.

Implements Elem.

Definition at line 60 of file face.h.

{ return 2; }
 

unsigned int DofObject::dof_number (const unsigned ints, const unsigned intvar, const unsigned intcomp) const [inline, inherited]Returns:

the global degree of freedom number variable var, component comp for system s associated with this DofObject

Definition at line 564 of file dof_object.h.

References DofObject::_dof_ids, DofObject::invalid_id, DofObject::n_comp(), DofObject::n_systems(), and DofObject::n_vars().

Referenced by DofMap::constrain_p_dofs(), GMVIO::copy_nodal_solution(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), DofObject::DofObject(), DofMap::old_dof_indices(), DofMap::reinit(), HPCoarsenTest::select_refinement(), DofObject::set_dof_number(), DofMap::set_nonlocal_dof_objects(), VTKIO::solution_to_vtk(), and System::zero_variable().

{
  libmesh_assert (s < this->n_systems());
  libmesh_assert (var  < this->n_vars(s));
  libmesh_assert (_dof_ids != NULL);
  libmesh_assert (_dof_ids[s] != NULL);  
  libmesh_assert (comp < this->n_comp(s,var));
  
  if (_dof_ids[s][var] == invalid_id)
    return invalid_id;
  else
    return (_dof_ids[s][var] + comp);
}
 

float Quad4::embedding_matrix (const unsigned inti, const unsigned intj, const unsigned intk) const [inline, protected, virtual]Matrix used to create the elements children.

Implements Elem.

Definition at line 155 of file face_quad4.h.

References _embedding_matrix.

  { return _embedding_matrix[i][j][k]; }
 

void Elem::family_tree (std::vector< const Elem * > &family, const boolreset = 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.

Definition at line 880 of file elem.C.

References Elem::active(), Elem::child(), Elem::family_tree(), Elem::is_remote(), Elem::n_children(), and Elem::subactive().

Referenced by Elem::family_tree().

{
  // The 'family tree' doesn't include subactive elements
  libmesh_assert(!this->subactive());

  // Clear the vector if the flag reset tells us to.
  if (reset)
    family.clear();

  // Add this element to the family tree.
  family.push_back(this);

  // Recurse into the elements children, if it has them.
  // Do not clear the vector any more.
  if (!this->active())
    for (unsigned int c=0; c<this->n_children(); c++)
      if (!this->child(c)->is_remote())
        this->child(c)->family_tree (family, false);
}
 

void Elem::family_tree_by_neighbor (std::vector< const Elem * > &family, const Elem *neighbor, const boolreset = true) const [inherited]Same as the family_tree() member, but only adds elements which are next to neighbor.

Definition at line 981 of file elem.C.

References Elem::active(), Elem::child(), Elem::family_tree_by_neighbor(), Elem::has_neighbor(), Elem::n_children(), remote_elem, and Elem::subactive().

Referenced by Elem::family_tree_by_neighbor(), and Elem::make_links_to_me_remote().

{
  // The 'family tree' doesn't include subactive elements
  libmesh_assert(!this->subactive());

  // Clear the vector if the flag reset tells us to.
  if (reset)
    family.clear();

  // This only makes sense if we're already a neighbor
  libmesh_assert (this->has_neighbor(neighbor));

  // Add this element to the family tree.
  family.push_back(this);

  // Recurse into the elements children, if it's not active.
  // Do not clear the vector any more.
  if (!this->active())
    for (unsigned int c=0; c<this->n_children(); c++)
      {
        Elem *child = this->child(c);
        if (child != remote_elem && child->has_neighbor(neighbor))
          child->family_tree_by_neighbor (family, neighbor, false);
      }
}
 

void Elem::family_tree_by_side (std::vector< const Elem * > &family, const unsigned intside, const boolreset = true) const [inherited]Same as the family_tree() member, but only adds elements which are next to side.

Definition at line 927 of file elem.C.

References Elem::active(), Elem::child(), Elem::family_tree_by_side(), Elem::is_child_on_side(), Elem::n_children(), Elem::n_sides(), and Elem::subactive().

Referenced by Elem::family_tree_by_side().

{
  // The 'family tree' doesn't include subactive elements
  libmesh_assert(!this->subactive());

  // Clear the vector if the flag reset tells us to.
  if (reset)
    family.clear();

  libmesh_assert(s < this->n_sides());

  // Add this element to the family tree.
  family.push_back(this);

  // Recurse into the elements children, if it has them.
  // Do not clear the vector any more.
  if (!this->active())
    for (unsigned int c=0; c<this->n_children(); c++)
      if (this->child(c)->is_child_on_side(c, s))
        this->child(c)->family_tree_by_side (family, s, false);

}
 

void Elem::family_tree_by_subneighbor (std::vector< const Elem * > &family, const Elem *neighbor, const Elem *subneighbor, const boolreset = 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 1011 of file elem.C.

References Elem::active(), Elem::child(), Elem::family_tree_by_subneighbor(), Elem::has_neighbor(), Elem::is_ancestor_of(), Elem::n_children(), Elem::n_sides(), Elem::neighbor(), Elem::parent(), remote_elem, and Elem::subactive().

Referenced by Elem::family_tree_by_subneighbor(), and Elem::make_links_to_me_remote().

{
  // The 'family tree' doesn't include subactive elements
  libmesh_assert(!this->subactive());

  // Clear the vector if the flag reset tells us to.
  if (reset)
    family.clear();

  // To simplifly this function we need an existing neighbor
  libmesh_assert (neighbor);
  libmesh_assert (neighbor != remote_elem);
  libmesh_assert (this->has_neighbor(neighbor));

  // This only makes sense if subneighbor descends from neighbor
  libmesh_assert (subneighbor);
  libmesh_assert (subneighbor != remote_elem);
  libmesh_assert (neighbor->is_ancestor_of(subneighbor));

  // Add this element to the family tree if applicable.
  if (neighbor == subneighbor)
    family.push_back(this);

  // Recurse into the elements children, if it's not active.
  // Do not clear the vector any more.
  if (!this->active())
    for (unsigned int c=0; c != this->n_children(); ++c)
      {
        Elem *child = this->child(c);
        if (child != remote_elem)
          for (unsigned int s=0; s != child->n_sides(); ++s)
            {
              Elem *child_neigh = child->neighbor(s);
              if (child_neigh &&
                  (child_neigh == neighbor ||
                   (child_neigh->parent() == neighbor &&
                    child_neigh->is_ancestor_of(subneighbor))))
                child->family_tree_by_subneighbor (family, child_neigh,
                                                   subneighbor, false);
            }
      }
}
 

void Elem::find_point_neighbors (std::set< const Elem * > &neighbor_set) const [inherited]This function finds all elements which touch the current element at any point

Definition at line 443 of file elem.C.

References Elem::active(), Elem::active_family_tree_by_neighbor(), Elem::contains_vertex_of(), Elem::n_sides(), Elem::neighbor(), and remote_elem.

Referenced by Patch::find_point_neighbors().

{
  neighbor_set.clear();
  neighbor_set.insert(this);

  unsigned int old_size;
  do
    {
      old_size = neighbor_set.size();

      // Loop over all the elements in the patch
      std::set<const Elem*>::const_iterator       it  = neighbor_set.begin();
      const std::set<const Elem*>::const_iterator end = neighbor_set.end();

      for (; it != end; ++it)
        {
          const Elem* elem = *it;

          for (unsigned int s=0; s<elem->n_sides(); s++)
            {
              const Elem* neighbor = elem->neighbor(s);
              if (neighbor &&
                  neighbor != remote_elem)    // we have a real neighbor on this side
                {
                  if (neighbor->active())                // ... if it is active
                    {
                      if (this->contains_vertex_of(neighbor) // ... and touches us
                          || neighbor->contains_vertex_of(this))  
                        neighbor_set.insert (neighbor);  // ... then add it
                    }
#ifdef LIBMESH_ENABLE_AMR
                  else                                 // ... the neighbor is *not* active,
                    {                                  // ... so add *all* neighboring
                                                       // active children
                      std::vector<const Elem*> active_neighbor_children;
  
                      neighbor->active_family_tree_by_neighbor
                        (active_neighbor_children, elem);

                      std::vector<const Elem*>::const_iterator
                        child_it = active_neighbor_children.begin();
                      const std::vector<const Elem*>::const_iterator
                        child_end = active_neighbor_children.end();
                      for (; child_it != child_end; ++child_it)
                        if (this->contains_vertex_of(*child_it) ||
                            (*child_it)->contains_vertex_of(this))
                          neighbor_set.insert (*child_it);
                    }
#endif // #ifdef LIBMESH_ENABLE_AMR
                }
            }
        }
    }
  while (old_size != neighbor_set.size());
}
 

ElemType Elem::first_order_equivalent_type (const ElemTypeet) [static, inherited]Returns:

the element type of the associated first-order element, e.g. when this is a TET10, then TET4 is returned. Returns INVALID_ELEM for first order or other elements that should not or cannot be converted into lower order equivalents.

Definition at line 1235 of file elem.C.

References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::EDGE4, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMeshEnums::INVALID_ELEM, libMeshEnums::PRISM15, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.

Referenced by UnstructuredMesh::all_first_order(), and GMVIO::write_ascii_old_impl().

{ 
  switch (et)
    {
    case EDGE2:
    case EDGE3:
    case EDGE4:
      return EDGE2;
    case TRI3:
    case TRI6:
      return TRI3;
    case QUAD4:
    case QUAD8:
    case QUAD9:
      return QUAD4;
    case TET4:
    case TET10:
      return TET4;
    case HEX8:
    case HEX27:
    case HEX20:
      return HEX8;
    case PRISM6:
    case PRISM15:
    case PRISM18:
      return PRISM6;

#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS

    case INFQUAD4:
    case INFQUAD6:
      return INFQUAD4;
    case INFHEX8:
    case INFHEX16:
    case INFHEX18:
      return INFHEX8;
    case INFPRISM6:
    case INFPRISM12:
      return INFPRISM6;

#endif

    default:
      // unknown element
      return INVALID_ELEM;
    }
}
 

std::string ReferenceCounter::get_info () [static, inherited]Gets a string containing the reference information.

Definition at line 45 of file reference_counter.C.

References ReferenceCounter::_counts, and Quality::name().

Referenced by ReferenceCounter::print_info().

{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)

  std::ostringstream out;
  
  out << '
      << ' ---------------------------------------------------------------------------- 
      << '| Reference count information                                                |
      << ' ---------------------------------------------------------------------------- ;
  
  for (Counts::iterator it = _counts.begin();
       it != _counts.end(); ++it)
    {
      const std::string name(it->first);
      const unsigned int creations    = it->second.first;
      const unsigned int destructions = it->second.second;

      out << '| ' << name << ' reference count information:
          << '|  Creations:    ' << creations    << '
          << '|  Destructions: ' << destructions << ';
    }
  
  out << ' ---------------------------------------------------------------------------- ;

  return out.str();

#else

  return '';
  
#endif
}
 

std::string ReferenceCounter::get_info () [static, inherited]Gets a string containing the reference information.

Definition at line 45 of file reference_counter.C.

References ReferenceCounter::_counts, and Quality::name().

Referenced by ReferenceCounter::print_info().

{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)

  std::ostringstream out;
  
  out << '
      << ' ---------------------------------------------------------------------------- 
      << '| Reference count information                                                |
      << ' ---------------------------------------------------------------------------- ;
  
  for (Counts::iterator it = _counts.begin();
       it != _counts.end(); ++it)
    {
      const std::string name(it->first);
      const unsigned int creations    = it->second.first;
      const unsigned int destructions = it->second.second;

      out << '| ' << name << ' reference count information:
          << '|  Creations:    ' << creations    << '
          << '|  Destructions: ' << destructions << ';
    }
  
  out << ' ---------------------------------------------------------------------------- ;

  return out.str();

#else

  return '';
  
#endif
}
 

Node * Elem::get_node (const unsigned inti) const [inline, virtual, inherited]Returns:

the pointer to local Node i.

Reimplemented in RemoteElem.

Definition at line 1176 of file elem.h.

References Elem::_nodes, and Elem::n_nodes().

Referenced by Elem::_cast_node_address_to_unsigned_int(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Generation::build_cube(), Tri6::build_side(), Tri3::build_side(), Quad9::build_side(), Quad8::build_side(), build_side(), InfQuad6::build_side(), Edge::build_side(), Tet4::build_side(), Tet10::build_side(), Pyramid5::build_side(), Prism6::build_side(), Prism18::build_side(), Prism15::build_side(), InfPrism12::build_side(), InfHex18::build_side(), InfHex16::build_side(), Hex8::build_side(), Hex27::build_side(), Hex20::build_side(), Elem::coarsen(), DofMap::constrain_p_dofs(), MeshTools::correct_node_proc_ids(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), UNVIO::element_out(), MeshTools::Modification::flatten(), Elem::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_node_procids(), DofMap::old_dof_indices(), Tri::quality(), Elem::refine(), DofMap::reinit(), Tet4::reselect_diagonal(), HPCoarsenTest::select_refinement(), Partitioner::set_node_processor_ids(), Tri::side(), Quad::side(), InfQuad::side(), Edge::side(), Tet::side(), Pyramid::side(), Prism::side(), InfPrism::side(), InfHex::side(), Hex::side(), MeshTools::Modification::smooth(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), Tri3::volume(), Tet4::volume(), Pyramid5::volume(), and GnuPlotIO::write_solution().

{
  libmesh_assert (i < this->n_nodes());
  libmesh_assert (_nodes[i] != NULL);

  return _nodes[i];
}
 

void Elem::hack_p_level (const unsigned intp) [inherited]Sets the value of the p refinement level for the element without altering the p level of its ancestors

Referenced by Elem::is_ancestor_of(), and XdrIO::read_serialized_connectivity().  

bool Quad4::has_affine_map () const [virtual]Returns:

true iff the element map is definitely affine (i.e. the same at every quadrature point) within numerical tolerances

Reimplemented from Elem.

Definition at line 118 of file face_quad4.C.

References Elem::point(), and TypeVector< T >::relative_fuzzy_equals().

{
  Point v = this->point(3) - this->point(0);
  return (v.relative_fuzzy_equals(this->point(2) - this->point(1)));
}
 

bool Elem::has_ancestor_children () const [inline, inherited]Returns:

true if the element has any descendants other than its immediate children, false otherwise. Always returns false if AMR is disabled.

Definition at line 1351 of file elem.h.

References Elem::_children, Elem::child(), Elem::has_children(), and Elem::n_children().

{
#ifdef LIBMESH_ENABLE_AMR
  if (_children == NULL)
    return false;
  else
    for (unsigned int c=0; c != this->n_children(); c++)
      if (this->child(c)->has_children())
        return true;
#endif
  return false;
}
 

bool Elem::has_children () const [inline, inherited]Returns:

true if the element has any children (active or not), false otherwise. Always returns false if AMR is disabled.

Definition at line 1337 of file elem.h.

References Elem::_children.

Referenced by UnstructuredMesh::all_first_order(), Elem::ancestor(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_nelem_target(), Elem::has_ancestor_children(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), FEMSystem::mesh_position_set(), System::ProjectVector::operator()(), Elem::subactive(), and Parallel::sync_element_data_by_parent_id().

{
#ifdef LIBMESH_ENABLE_AMR
  if (_children == NULL)
    return false;
  else
    return true;
#else
  return false;
#endif
}
 

bool DofObject::has_dofs (const unsigned ints = libMesh::invalid_uint) const [inline, inherited]Returns:

true if any system has variables which have been assigned, false otherwise

Definition at line 583 of file dof_object.h.

References libMesh::invalid_uint, DofObject::n_systems(), and DofObject::n_vars().

Referenced by DofMap::reinit().

{
  if (sys == libMesh::invalid_uint)
    {
      for (unsigned int s=0; s<this->n_systems(); s++)
        if (this->n_vars(s))
          return true;
    }
  
  else
    {
      libmesh_assert (sys < this->n_systems());

      if (this->n_vars(sys))
        return true;
    }
  
  return false;
}
 

bool Elem::has_neighbor (const Elem *elem) const [inline, inherited]Returns:

true if the element elem in question is a neighbor of this element, false otherwise.

Definition at line 1233 of file elem.h.

References Elem::n_neighbors(), and Elem::neighbor().

Referenced by Elem::active_family_tree_by_neighbor(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_subneighbor(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), and Elem::on_boundary().

{
  for (unsigned int n=0; n<this->n_neighbors(); n++)
    if (this->neighbor(n) == elem)
      return true;

  return false;
}
 

Real Elem::hmax () const [virtual, inherited]Returns:

the maximum vertex separation for the element.

Definition at line 306 of file elem.C.

References std::max(), Elem::n_vertices(), Elem::point(), and TypeVector< T >::size().

Referenced by KellyErrorEstimator::boundary_side_integration(), DiscontinuityMeasure::boundary_side_integration(), KellyErrorEstimator::internal_side_integration(), LaplacianErrorEstimator::internal_side_integration(), DiscontinuityMeasure::internal_side_integration(), and HPCoarsenTest::select_refinement().

{
  Real h_max=0;

  for (unsigned int n_outer=0; n_outer<this->n_vertices(); n_outer++)
    for (unsigned int n_inner=n_outer+1; n_inner<this->n_vertices(); n_inner++)
      {
        const Point diff = (this->point(n_outer) - this->point(n_inner));
        
        h_max = std::max(h_max,diff.size());
      }

  return h_max;
}
 

Real Elem::hmin () const [virtual, inherited]Returns:

the minimum vertex separation for the element.

Definition at line 289 of file elem.C.

References std::min(), Elem::n_vertices(), Elem::point(), and TypeVector< T >::size().

Referenced by UnstructuredMesh::find_neighbors(), FEMSystem::numerical_jacobian(), and Elem::refine().

{
  Real h_min=1.e30;

  for (unsigned int n_outer=0; n_outer<this->n_vertices(); n_outer++)
    for (unsigned int n_inner=n_outer+1; n_inner<this->n_vertices(); n_inner++)
      {
        const Point diff = (this->point(n_outer) - this->point(n_inner));
        
        h_min = std::min(h_min,diff.size());
      }

  return h_min;
}
 

unsigned int DofObject::id () const [inline, inherited]Returns:

the id for this DofObject

Definition at line 449 of file dof_object.h.

References DofObject::_id, and DofObject::valid_id().

Referenced by SFCPartitioner::_do_partition(), UniformRefinementEstimator::_estimate_error(), SerialMesh::add_elem(), ParallelMesh::add_elem(), SerialMesh::add_node(), ParallelMesh::add_node(), ParallelMesh::add_point(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), FEMSystem::assembly(), MeshData::assign(), ParmetisPartitioner::assign_partitioning(), MeshTools::Generation::build_delaunay_square(), ParmetisPartitioner::build_graph(), InfElemBuilder::build_inf_elem(), VTKIO::cells_to_vtk(), FEBase::compute_single_point_map(), UnstructuredMesh::copy_nodes_and_elements(), MeshRefinement::create_parent_error_vector(), SerialMesh::delete_elem(), ParallelMesh::delete_elem(), SerialMesh::delete_node(), ParallelMesh::delete_node(), MeshCommunication::delete_remote_elements(), MeshData::elem_to_foreign_id(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), UnstructuredMesh::find_neighbors(), MeshTools::find_nodal_neighbors(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_mean_stddev(), TetGenMeshInterface::get_node_index(), LaplaceMeshSmoother::init(), ParmetisPartitioner::initialize(), ExodusII_IO_Helper::initialize(), TreeNode< N >::insert(), SerialMesh::insert_elem(), ParallelMesh::insert_elem(), ParallelMesh::insert_node(), FE< Dim, T >::inverse_map(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_valid_elem_ids(), MeshTools::libmesh_assert_valid_node_procids(), MeshTools::libmesh_assert_valid_refinement_flags(), Node::Node(), Elem::node(), MeshData::node_to_foreign_id(), VTKIO::nodes_to_vtk(), PatchRecoveryErrorEstimator::EstimateError::operator()(), XdrIO::pack_element(), ErrorVector::plot_error(), DofObject::processor_id(), Nemesis_IO::read(), ExodusII_IO::read(), ParallelMesh::renumber_elem(), ParallelMesh::renumber_node(), ParallelMesh::renumber_nodes_and_elements(), HPCoarsenTest::select_refinement(), DofObject::set_id(), Partitioner::set_node_processor_ids(), DofMap::set_nonlocal_dof_objects(), Partitioner::set_parent_processor_ids(), FE< Dim, T >::shape(), FE< Dim, T >::shape_deriv(), FE< Dim, T >::shape_second_deriv(), LaplaceMeshSmoother::smooth(), MeshTools::Modification::smooth(), BoundaryInfo::sync(), Parallel::sync_dofobject_data_by_id(), Parallel::sync_element_data_by_parent_id(), GMVIO::write_ascii_new_impl(), GMVIO::write_ascii_old_impl(), ExodusII_IO_Helper::write_elements(), LegacyXdrIO::write_mesh(), GmshIO::write_mesh(), and XdrIO::write_serialized_connectivity().

{
  libmesh_assert (this->valid_id());
  return _id;
}
 

void 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 149 of file reference_counter.h.

References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.

Referenced by ReferenceCountedObject< Value >::ReferenceCountedObject().

{
  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
  std::pair<unsigned int, unsigned int>& p = _counts[name];

  p.first++;
}
 

void 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 149 of file reference_counter.h.

References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.

Referenced by ReferenceCountedObject< Value >::ReferenceCountedObject().

{
  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
  std::pair<unsigned int, unsigned int>& p = _counts[name];

  p.first++;
}
 

void 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 167 of file reference_counter.h.

References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.

Referenced by ReferenceCountedObject< Value >::~ReferenceCountedObject().

{
  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
  std::pair<unsigned int, unsigned int>& p = _counts[name];

  p.second++;
}
 

void 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 167 of file reference_counter.h.

References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.

Referenced by ReferenceCountedObject< Value >::~ReferenceCountedObject().

{
  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
  std::pair<unsigned int, unsigned int>& p = _counts[name];

  p.second++;
}
 

bool Face::infinite () const [inline, virtual, inherited]Returns:

2

false. All classes derived from Face are finite elements.

Implements Elem.

Definition at line 85 of file face.h.

{ return false; }
 

const Elem* Elem::interior_parent () const [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.

Referenced by Elem::is_ancestor_of().  

void DofObject::invalidate () [inline, inherited]Invalidates all the indices for this DofObject

Definition at line 378 of file dof_object.h.

References DofObject::invalidate_dofs(), DofObject::invalidate_id(), and DofObject::invalidate_processor_id().

Referenced by DofObject::DofObject().

{
  this->invalidate_dofs ();
  this->invalidate_id ();
  this->invalidate_processor_id ();
}
 

void DofObject::invalidate_dofs (const unsigned intsys_num = libMesh::invalid_uint) [inline, inherited]Sets all degree of freedom numbers to invalid_id

Definition at line 342 of file dof_object.h.

References DofObject::invalid_id, DofObject::n_comp(), DofObject::n_systems(), DofObject::n_vars(), and DofObject::set_dof_number().

Referenced by DofObject::invalidate().

{
  // If the user does not specify the system number...
  if (sys_num >= this->n_systems()) 
    {
      for (unsigned int s=0; s<this->n_systems(); s++)
        for (unsigned int v=0; v<this->n_vars(s); v++)
          if (this->n_comp(s,v))
            this->set_dof_number(s,v,0,invalid_id);
    }
  // ...otherwise invalidate the dofs for all systems
  else
    for (unsigned int v=0; v<n_vars(sys_num); v++)
      if (this->n_comp(sys_num,v))
        this->set_dof_number(sys_num,v,0,invalid_id);
}
 

void DofObject::invalidate_id () [inline, inherited]Sets the id to invalid_id

Definition at line 362 of file dof_object.h.

References DofObject::invalid_id, and DofObject::set_id().

Referenced by DofObject::invalidate().

{
  this->set_id (invalid_id);
}
 

void DofObject::invalidate_processor_id () [inline, inherited]Sets the processor id to invalid_processor_id

Definition at line 370 of file dof_object.h.

References DofObject::invalid_processor_id, and DofObject::processor_id().

Referenced by MeshTools::correct_node_proc_ids(), DofObject::invalidate(), Partitioner::set_node_processor_ids(), and Partitioner::set_parent_processor_ids().

{
  this->processor_id (invalid_processor_id);
}
 

bool Elem::is_ancestor_of (const Elem *descendant) const [inline, inherited]Returns:

true if descendant is a child of this, or a child of a child of this, etc. Always returns false if AMR is disabled.

Convenient way to communicate elements. This class packes up an element so that it can easily be communicated through an MPI array.

Author:

Benjamin S. Kirk

Date:

2008

Iterator pointing to the beginning of this packed element's index buffer.

Constructor. Takes an input iterator pointing to the beginning of the connectivity block for this element.

An Elem can be packed into an integer array which is header_size + elem->n_nodes() in length.

For each element it is of the form [ level p_level r_flag p_r_flag etype processor_id subdomain_id self_ID parent_ID which_child node_0 node_1 ... node_n] We cannot use unsigned int because parent_ID can be negative

Unpacks this packed element. Returns a pointer to the new element. Takes a pointer to the parent, which is required unless this packed element is at level 0.

return the level of this packed element.

return the p-level of this packed element.

return the refinement state of this packed element.

return the p-refinement state of this packed element.

return the element type of this packed element.

return the processor id of this packed element.

return the subdomain id of this packed element.

return the id of this packed element.

return the parent id of this packed element.

return which child this packed element is.

return the number of nodes in this packed element

return the global index of the packed element's nth node.

The definition of the protected nested SideIter class.

The definition of the struct used for iterating over sides.

Definition at line 1368 of file elem.h.

References Elem::_children, Elem::_first_side(), Elem::_last_side(), Elem::_p_level, Elem::_parent, Elem::_pflag, Elem::_rflag, Elem::active(), Elem::build_side(), Elem::child(), Elem::compute_key(), Elem::dim(), Elem::hack_p_level(), Elem::has_children(), DofObject::id(), Elem::interior_parent(), libMesh::invalid_uint, Elem::level(), std::max(), Elem::max_descendant_p_level(), std::min(), Elem::n_children(), Elem::n_neighbors(), Elem::n_nodes(), Elem::neighbor(), Elem::node(), operator*(), Elem::operator==(), Elem::p_level(), Elem::p_refinement_flag(), Elem::parent(), DofObject::processor_id(), Elem::refinement_flag(), Elem::set_p_level(), Elem::set_p_refinement_flag(), Elem::set_parent(), Elem::set_refinement_flag(), Elem::subactive(), Elem::subdomain_id(), Elem::top_parent(), Elem::type(), Elem::type_to_n_nodes_map, and Elem::which_child_am_i().

Referenced by Elem::family_tree_by_subneighbor().  

bool Elem::is_child_on_edge (const unsigned intc, const unsigned inte) const [virtual, inherited]Returns:

true iff the specified child is on the specified edge

Definition at line 864 of file elem.C.

References Elem::build_edge(), Elem::n_children(), and Elem::n_edges().

Referenced by FEBase::coarsened_dof_values().

{
  libmesh_assert (c < this->n_children());
  libmesh_assert (e < this->n_edges());

  AutoPtr<Elem> my_edge = this->build_edge(e);
  AutoPtr<Elem> child_edge = this->build_edge(e);

  // We're assuming that an overlapping child edge has the same
  // number and orientation as its parent
  return (child_edge->node(0) == my_edge->node(0) ||
      child_edge->node(1) == my_edge->node(1));
}
 

bool Quad::is_child_on_side (const unsigned intc, const unsigned ints) const [virtual, inherited]Returns:

true iff the specified child is on the specified side

Implements Elem.

Definition at line 119 of file face_quad.C.

References Quad::n_children(), and Quad::n_sides().

{
  libmesh_assert (c < this->n_children());
  libmesh_assert (s < this->n_sides());

  // A quad's children and nodes don't share the same ordering:
  // child 2 and 3 are swapped;
  unsigned int n = (c < 2) ? c : 5-c;
  return (n == s || n == (s+1)%4);
}
 

bool Quad4::is_edge (const unsigned inti) const [virtual]Returns:

true iff the specified (local) node number is an edge.

Implements Elem.

Definition at line 96 of file face_quad4.C.

{
  return false;
}
 

bool Quad4::is_face (const unsigned inti) const [virtual]Returns:

true iff the specified (local) node number is a face.

Implements Elem.

Definition at line 101 of file face_quad4.C.

{
  return false;
}
 

virtual bool Quad4::is_node_on_edge (const unsigned intn, const unsigned inte) const [inline, virtual]

Implements Elem.

Definition at line 112 of file face_quad4.h.

References is_node_on_side().

  { return this->is_node_on_side(n,e); }
 

bool Quad4::is_node_on_side (const unsigned intn, const unsigned ints) const [virtual]

Implements Elem.

Definition at line 106 of file face_quad4.C.

References Quad::n_sides(), and side_nodes_map.

Referenced by is_node_on_edge().

{
  libmesh_assert(s < n_sides());
  for (unsigned int i = 0; i != 2; ++i)
    if (side_nodes_map[s][i] == n)
      return true;
  return false;
}
 

virtual bool 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 RemoteElem.

Definition at line 238 of file elem.h.

Referenced by Elem::active_family_tree(), Elem::family_tree(), and Partitioner::set_parent_processor_ids().

  { return false; }
 

bool Quad4::is_vertex (const unsigned inti) const [virtual]Returns:

true iff the specified (local) node number is a vertex.

Implements Elem.

Definition at line 91 of file face_quad4.C.

{
  return true;
}
 

unsigned int Quad::key (const unsigned ints) const [virtual, inherited]Returns:

an id associated with the s side of this element. The id is not necessariy unique, but should be close. This is particularly useful in the MeshBase::find_neighbors() routine.

Implements Elem.

Reimplemented in Quad8, and Quad9.

Definition at line 29 of file face_quad.C.

References Elem::compute_key(), Quad::n_sides(), and Elem::node().

{
  libmesh_assert (s < this->n_sides());
  
  switch (s)
    {
    case 0:
      return
        this->compute_key (this->node(0),
                           this->node(1));
      
    case 1:
      return
        this->compute_key (this->node(1),
                           this->node(2));
        
    case 2:
      return
        this->compute_key (this->node(2),
                           this->node(3));
        
    case 3:
      return
        this->compute_key (this->node(3),
                           this->node(0));      
    }


  // We will never get here...  Look at the code above.
  libmesh_error();  
  return 0;
}
 

Real Elem::length (const unsigned intn1, const unsigned intn2) 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 323 of file elem.C.

References Elem::n_vertices(), and Elem::point().

Referenced by Quad::quality(), InfHex::quality(), and Hex::quality().

{
  libmesh_assert ( n1 < this->n_vertices() );
  libmesh_assert ( n2 < this->n_vertices() );

  return (this->point(n1) - this->point(n2)).size();
}
 

unsigned int Elem::level () const [inherited]Returns:

the refinement level of the current element. If the element's parent is NULL then by convention it is at level 0, otherwise it is simply at one level greater than its parent.

Referenced by MeshRefinement::_coarsen_elements(), Elem::active_family_tree_by_neighbor(), BoundaryInfo::add_side(), UnstructuredMesh::all_second_order(), BoundaryInfo::boundary_id(), JumpErrorEstimator::coarse_n_flux_faces_increment(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), MeshTools::find_hanging_nodes_and_parents(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_mean_stddev(), MeshRefinement::flag_elements_by_nelem_target(), Elem::is_ancestor_of(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::nullify_neighbors(), BoundaryInfo::remove_side(), BoundaryInfo::side_with_boundary_id(), MeshRefinement::test_level_one(), Elem::which_neighbor_am_i(), and LegacyXdrIO::write_mesh().  

void Elem::libmesh_assert_valid_neighbors () const [inherited]This function checks for consistent neighbor links at this element.

Definition at line 515 of file elem.C.

References Elem::n_neighbors(), Elem::neighbor(), Elem::parent(), remote_elem, Elem::subactive(), and Elem::which_neighbor_am_i().

Referenced by MeshTools::libmesh_assert_valid_neighbors().

{
  for (unsigned int s=0; s<this->n_neighbors(); s++)
    {
      const Elem *neigh = this->neighbor(s);

      // Any element might have a remote neighbor; checking
      // to make sure that's not inaccurate is tough.
      if (neigh == remote_elem)
        continue;

      if (neigh)
        {
          // Only subactive elements have subactive neighbors
          libmesh_assert (this->subactive() || !neigh->subactive());

          const Elem *elem = this;

          // If we're subactive but our neighbor isn't, its
          // return neighbor link will be to our first active
          // ancestor OR to our inactive ancestor of the same
          // level as neigh, 
          if (this->subactive() && !neigh->subactive())
            {
              for (elem = this; !elem->active();
                   elem = elem->parent())
                libmesh_assert(elem);
            }

          unsigned int rev = neigh->which_neighbor_am_i(elem);
          libmesh_assert (rev < neigh->n_neighbors());

          if (this->subactive() && !neigh->subactive())
            {
              while (neigh->neighbor(rev) != elem)
                {
                  libmesh_assert(elem->parent());
                  elem = elem->parent();
                }
            }
          else
            {
              Elem *nn = neigh->neighbor(rev);
              libmesh_assert(nn);

              for (; elem != nn; elem = elem->parent())
                libmesh_assert(elem);
            }
        }
      else
        {
          const Elem *parent = this->parent();
          if (parent)
            libmesh_assert (!parent->neighbor(s));
        }
    }
}
 

void 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 503 of file elem.C.

References Elem::get_node(), Elem::n_nodes(), and DofObject::valid_id().

Referenced by MeshTools::libmesh_assert_valid_node_pointers().

{
  libmesh_assert(this->valid_id());
  for (unsigned int n=0; n != this->n_nodes(); ++n)
    {
      libmesh_assert(this->get_node(n));
      libmesh_assert(this->get_node(n)->valid_id());
    }
}
 

void 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 577 of file elem.C.

References Elem::_children, Elem::ancestor(), Elem::child(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_subneighbor(), Elem::has_children(), Elem::has_neighbor(), Elem::level(), Elem::n_children(), Elem::n_neighbors(), Elem::n_sides(), Elem::neighbor(), Elem::parent(), remote_elem, Elem::set_neighbor(), Elem::subactive(), Elem::which_child_am_i(), and Elem::which_neighbor_am_i().

Referenced by MeshCommunication::delete_remote_elements().

{
  libmesh_assert (this != remote_elem);

  // We need to have handled any children first
#if defined(LIBMESH_ENABLE_AMR) && defined(DEBUG)
  if (this->has_children())
    for (unsigned int c = 0; c != this->n_children(); ++c)
      {
        Elem *child = this->child(c);
        libmesh_assert (child == remote_elem);
      }
#endif

  // Remotify any neighbor links
  for (unsigned int s = 0; s != this->n_sides(); ++s)
    {
      Elem *neigh = this->neighbor(s);
      if (neigh && neigh != remote_elem)
        {
          // My neighbor should never be more refined than me; my real
          // neighbor would have been its parent in that case.
          libmesh_assert(this->level() >= neigh->level());
          
          if (this->level() == neigh->level() &&
              neigh->has_neighbor(this))
            {
#ifdef LIBMESH_ENABLE_AMR
              // My neighbor may have descendants which also consider me a
              // neighbor
              std::vector<const Elem*> family;
              neigh->family_tree_by_neighbor (family, this);

              // FIXME - There's a lot of ugly const_casts here; we
              // may want to make remote_elem non-const and create
              // non-const versions of the family_tree methods
              for (unsigned int i=0; i != family.size(); ++i)
                {
                  Elem *n = const_cast<Elem*>(family[i]);
                  libmesh_assert (n);
                  if (n == remote_elem)
                    continue;
                  unsigned int my_s = n->which_neighbor_am_i(this);
                  libmesh_assert (my_s < n->n_neighbors());
                  libmesh_assert (n->neighbor(my_s) == this);
                  n->set_neighbor(my_s, const_cast<RemoteElem*>(remote_elem));
                }
#else
              unsigned int my_s = neigh->which_neighbor_am_i(this);
              libmesh_assert (my_s < neigh->n_neighbors());
              libmesh_assert (neigh->neighbor(my_s) == this);
              neigh->set_neighbor(my_s, const_cast<RemoteElem*>(remote_elem));
#endif
            }
#ifdef LIBMESH_ENABLE_AMR
          // Even if my neighbor doesn't link back to me, it might
          // have subactive descendants which do
          else if (neigh->has_children())
            {
              // If my neighbor at the same level doesn't have me as a
              // neighbor, I must be subactive
              libmesh_assert(this->level() > neigh->level() ||
                             this->subactive());

              // My neighbor must have some ancestor of mine as a
              // neighbor
              Elem *ancestor = this->parent();
              libmesh_assert(ancestor);
              while (!neigh->has_neighbor(ancestor))
                {
                  ancestor = ancestor->parent();
                  libmesh_assert(ancestor);
                }

              // My neighbor may have descendants which consider me a
              // neighbor
              std::vector<const Elem*> family;
              neigh->family_tree_by_subneighbor (family, ancestor, this);

              // FIXME - There's a lot of ugly const_casts here; we
              // may want to make remote_elem non-const and create
              // non-const versions of the family_tree methods
              for (unsigned int i=0; i != family.size(); ++i)
                {
                  Elem *n = const_cast<Elem*>(family[i]);
                  libmesh_assert (n);
                  if (n == remote_elem)
                    continue;
                  unsigned int my_s = n->which_neighbor_am_i(this);
                  libmesh_assert (my_s < n->n_neighbors());
                  libmesh_assert (n->neighbor(my_s) == this);
                  n->set_neighbor(my_s, const_cast<RemoteElem*>(remote_elem));
                }
            }
#endif
        }
    }

#ifdef LIBMESH_ENABLE_AMR
  // Remotify parent's child link
  Elem *parent = this->parent();
  if (parent && parent != remote_elem)
    {
      unsigned int me = parent->which_child_am_i(this);
      libmesh_assert (parent->_children[me] == this);
      parent->_children[me] = const_cast<RemoteElem*>(remote_elem);
    }
#endif
}
 

unsigned int Elem::max_descendant_p_level () const [inherited]Returns the maximum value of the p refinement levels of an ancestor element's descendants

Referenced by FEBase::coarsened_dof_values(), and Elem::is_ancestor_of().  

unsigned int Elem::min_new_p_level_by_neighbor (const Elem *neighbor, unsigned intcurrent_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 1124 of file elem.C.

References Elem::active(), Elem::child(), Elem::COARSEN, Elem::has_neighbor(), std::min(), Elem::min_new_p_level_by_neighbor(), Elem::n_children(), Elem::p_level(), Elem::p_refinement_flag(), Elem::REFINE, remote_elem, and Elem::subactive().

Referenced by MeshRefinement::eliminate_unrefined_patches(), and Elem::min_new_p_level_by_neighbor().

{
  libmesh_assert(!this->subactive());
  libmesh_assert(neighbor->active());

  // If we're an active element this is simple
  if (this->active())
    {
      unsigned int new_p_level = this->p_level();
      if (this->p_refinement_flag() == Elem::REFINE)
        new_p_level += 1;
      if (this->p_refinement_flag() == Elem::COARSEN)
        {
          libmesh_assert (new_p_level > 0);
          new_p_level -= 1;
        }
      return std::min(current_min, new_p_level);
    }

  libmesh_assert(has_neighbor(neighbor));

  unsigned int min_p_level = current_min;

  for (unsigned int c=0; c<this->n_children(); c++)
    {
      const Elem* const child = this->child(c);
      if (child && child != remote_elem)
        if (child->has_neighbor(neighbor))
          min_p_level =
            child->min_new_p_level_by_neighbor(neighbor,
                                               min_p_level);
    }

  return min_p_level;
}
 

unsigned int Elem::min_p_level_by_neighbor (const Elem *neighbor, unsigned intcurrent_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 1091 of file elem.C.

References Elem::active(), Elem::child(), Elem::has_neighbor(), std::min(), Elem::min_p_level_by_neighbor(), Elem::n_children(), Elem::p_level(), remote_elem, and Elem::subactive().

Referenced by FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), and Elem::min_p_level_by_neighbor().

{
  libmesh_assert(!this->subactive());
  libmesh_assert(neighbor->active());

  // If we're an active element this is simple
  if (this->active())
    return std::min(current_min, this->p_level());

  libmesh_assert(has_neighbor(neighbor));

  // The p_level() of an ancestor element is already the minimum
  // p_level() of its children - so if that's high enough, we don't
  // need to examine any children.
  if (current_min <= this->p_level())
    return current_min;

  unsigned int min_p_level = current_min;

  for (unsigned int c=0; c<this->n_children(); c++)
    {
      const Elem* const child = this->child(c);
      if (child != remote_elem && child->has_neighbor(neighbor))
        min_p_level =
          child->min_p_level_by_neighbor(neighbor,
                                         min_p_level);
    }

  return min_p_level;
}
 

unsigned int Quad::n_children () const [inline, virtual, inherited]Returns:

4

Implements Elem.

Reimplemented in Quad8.

Definition at line 99 of file face_quad.h.

Referenced by Quad::is_child_on_side().

{ return 4; }
 

unsigned int DofObject::n_comp (const unsigned ints, const unsigned intvar) const [inline, inherited]Returns:

the number of components for variable var of system s associated with this DofObject. For example, the HIERARCHIC shape functions may have multiple dof's associated with one node. Another example is the MONOMIALs, where only the elements hold the dof's, but for the different spatial directions, and orders, see FE.

Definition at line 538 of file dof_object.h.

References DofObject::_dof_ids, DofObject::_n_v_comp, DofObject::n_systems(), and DofObject::n_vars().

Referenced by DofMap::constrain_p_dofs(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), DofObject::dof_number(), DofObject::DofObject(), DofObject::invalidate_dofs(), DofObject::n_dofs(), DofMap::old_dof_indices(), DofMap::reinit(), DofObject::set_dof_number(), DofObject::set_n_comp(), DofMap::set_nonlocal_dof_objects(), and System::zero_variable().

{
  libmesh_assert (s < this->n_systems());
  libmesh_assert (_dof_ids != NULL);
  libmesh_assert (_dof_ids[s] != NULL);
  libmesh_assert (_n_v_comp != NULL);
  libmesh_assert (_n_v_comp[s] != NULL);

# ifdef DEBUG
  // Does this ever happen?  I doubt it... 3/7/2003 (BSK)
  if (var >= this->n_vars(s))
    {
      std::cout << 's=' << s << ', var=' << var << std::endl
                << 'this->n_vars(s)=' << this->n_vars(s) << std::endl
                << 'this->n_systems()=' << this->n_systems() << std::endl;
      libmesh_error();
    }
# endif
  
  return static_cast<unsigned int>(_n_v_comp[s][var+1]);
}
 

unsigned int DofObject::n_dofs (const unsigned ints, const unsigned intvar = libMesh::invalid_uint) const [inline, inherited]Returns:

the number of degrees of freedom associated with system s for this object. Optionally only counts degrees of freedom for variable number var

Definition at line 425 of file dof_object.h.

References libMesh::invalid_uint, DofObject::n_comp(), DofObject::n_systems(), and DofObject::n_vars().

{
  libmesh_assert (s < this->n_systems());
  
  unsigned int num = 0;

  // Count all variables
  if (var == libMesh::invalid_uint)
    for (unsigned int v=0; v<this->n_vars(s); v++)
      num += this->n_comp(s,v);
  
  // Only count specified variable
  else
    {
      num = this->n_comp(s,var);
    }

  return num;
}
 

unsigned int Quad::n_edges () const [inline, virtual, inherited]Returns:

4. All quadrilaterals have 4 edges.

Implements Elem.

Definition at line 94 of file face_quad.h.

{ return 4; }
 

unsigned int Face::n_faces () const [inline, virtual, inherited]Returns:

0. All 2D elements have no faces, just edges.

Implements Elem.

Definition at line 66 of file face.h.

{ return 0; }
 

virtual unsigned int 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 301 of file elem.h.

References Elem::n_sides().

Referenced by MetisPartitioner::_do_partition(), DofMap::add_neighbors_to_send_list(), ParmetisPartitioner::build_graph(), InfElemBuilder::build_inf_elem(), Elem::child_neighbor(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), UnstructuredMesh::find_neighbors(), Elem::has_neighbor(), LaplaceMeshSmoother::init(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), Elem::libmesh_assert_valid_neighbors(), MeshTools::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_remote_elems(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), Elem::neighbor(), Elem::nullify_neighbors(), Elem::set_neighbor(), MeshTools::Modification::smooth(), MeshRefinement::test_level_one(), TetGenMeshInterface::triangulate_conformingDelaunayMesh(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and Elem::which_neighbor_am_i().

  { return this->n_sides(); }
 

unsigned int Quad::n_nodes () const [inline, virtual, inherited]Returns:

4. All quad-derivatives are guaranteed to have at least 4 nodes.

Implements Elem.

Reimplemented in Quad8, and Quad9.

Definition at line 79 of file face_quad.h.

{ return 4; }
 

static unsigned int ReferenceCounter::n_objects () [inline, static, inherited]Prints the number of outstanding (created, but not yet destroyed) objects.

Definition at line 76 of file reference_counter.h.

References ReferenceCounter::_n_objects.

Referenced by System::read_serialized_blocked_dof_objects(), and System::write_serialized_blocked_dof_objects().

  { return _n_objects; }
 

static unsigned int ReferenceCounter::n_objects () [inline, static, inherited]Prints the number of outstanding (created, but not yet destroyed) objects.

Definition at line 76 of file reference_counter.h.

References ReferenceCounter::_n_objects.

Referenced by System::read_serialized_blocked_dof_objects(), and System::write_serialized_blocked_dof_objects().

  { return _n_objects; }
 

unsigned int Elem::n_second_order_adjacent_vertices (const unsigned intn) const [virtual, inherited]Returns:

the number of adjacent vertices, that uniquely define the location of the $ n^{th} $ second-order node. For linear elements ( default_order()==FIRST ), this returns 0. This method is useful when converting linear elements to quadratic elements. Note that n has to be greater or equal this->n_vertices().

Reimplemented in Hex20, Hex27, InfHex16, InfHex18, InfPrism12, Prism15, Prism18, Tet10, Edge3, Edge4, InfQuad6, Quad8, Quad9, and Tri6.

Definition at line 1209 of file elem.C.

Referenced by LaplaceMeshSmoother::smooth(), and MeshTools::Modification::smooth().

{
  // for linear elements, always return 0
  return 0;
}
 

unsigned int Quad::n_sides () const [inline, virtual, inherited]Returns:

4

Implements Elem.

Reimplemented in Quad8.

Definition at line 84 of file face_quad.h.

Referenced by Quad9::build_side(), build_side(), Quad::is_child_on_side(), Quad9::is_node_on_side(), is_node_on_side(), Quad9::key(), Quad::key(), and Quad::side().

{ return 4; }  
 

unsigned int Quad4::n_sub_elem () const [inline, virtual]Returns:

1

Implements Elem.

Definition at line 84 of file face_quad4.h.

Referenced by connectivity().

{ return 1; }
 

unsigned int DofObject::n_systems () const [inline, inherited]Returns:

the number of systems associated with this DofObject

Definition at line 517 of file dof_object.h.

References DofObject::_n_systems.

Referenced by DofObject::add_system(), DofObject::clear_dofs(), DofMap::dof_indices(), DofObject::dof_number(), DofObject::DofObject(), DofObject::has_dofs(), DofObject::invalidate_dofs(), DofObject::n_comp(), DofObject::n_dofs(), DofObject::n_vars(), DofMap::old_dof_indices(), Elem::refine(), DofObject::set_dof_number(), DofObject::set_n_comp(), DofObject::set_n_systems(), and DofObject::set_n_vars().

{
  return static_cast<unsigned int>(_n_systems);
}
 

unsigned int DofObject::n_vars (const unsigned ints) const [inline, inherited]Returns:

the number of variables associated with system s for this DofObject

Definition at line 525 of file dof_object.h.

References DofObject::_n_v_comp, and DofObject::n_systems().

Referenced by DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofObject::dof_number(), DofObject::DofObject(), DofObject::has_dofs(), DofObject::invalidate_dofs(), DofObject::n_comp(), DofObject::n_dofs(), DofObject::set_dof_number(), DofObject::set_n_comp(), DofObject::set_n_vars(), and DofMap::set_nonlocal_dof_objects().

{
  libmesh_assert (s < this->n_systems());
  libmesh_assert (_n_v_comp != NULL);
  if (_n_v_comp[s] == NULL)
    return 0;
  return static_cast<unsigned int>(_n_v_comp[s][0]);
}
 

unsigned int Quad::n_vertices () const [inline, virtual, inherited]Returns:

4. All quadrilaterals have 4 vertices.

Implements Elem.

Definition at line 89 of file face_quad.h.

Referenced by Quad9::second_order_adjacent_vertex(), Quad8::second_order_adjacent_vertex(), Quad9::second_order_child_vertex(), and Quad8::second_order_child_vertex().

{ return 4; }
 

Elem * Elem::neighbor (const unsigned inti) const [inline, inherited]Returns:

a pointer to the $ i^{th} $ neighbor of this element. If MeshBase::find_neighbors() has not been called this simply returns NULL. If MeshBase::find_neighbors() has been called and this returns NULL then the side is on a boundary of the domain.

Definition at line 1213 of file elem.h.

References Elem::_neighbors, and Elem::n_neighbors().

Referenced by MetisPartitioner::_do_partition(), DofMap::add_neighbors_to_send_list(), FEMSystem::assemble_qoi(), FEMSystem::assemble_qoi_derivative(), FEMSystem::assembly(), MeshTools::Generation::build_delaunay_square(), ParmetisPartitioner::build_graph(), InfElemBuilder::build_inf_elem(), Elem::child_neighbor(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), UnstructuredMesh::create_submesh(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), Elem::family_tree_by_subneighbor(), Patch::find_face_neighbors(), MeshTools::find_hanging_nodes_and_parents(), UnstructuredMesh::find_neighbors(), Elem::find_point_neighbors(), MeshTools::Modification::flatten(), Elem::has_neighbor(), LaplaceMeshSmoother::init(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), Elem::libmesh_assert_valid_neighbors(), MeshTools::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_remote_elems(), MeshRefinement::make_coarsening_compatible(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), Elem::nullify_neighbors(), SparsityPattern::Build::operator()(), FEMSystem::postprocess(), GmshIO::read_mesh(), REINIT_ERROR(), MeshTools::Modification::smooth(), BoundaryInfo::sync(), MeshRefinement::test_level_one(), TetGenMeshInterface::triangulate_conformingDelaunayMesh(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), Elem::which_neighbor_am_i(), XdrIO::write_serialized_bcs(), GnuPlotIO::write_solution(), and DivaIO::write_stream().

{
  libmesh_assert (i < this->n_neighbors());

  return _neighbors[i];
}
 

unsigned int Elem::node (const unsigned inti) const [inline, virtual, inherited]Returns:

the global id number of local Node i.

Reimplemented in RemoteElem.

Definition at line 1164 of file elem.h.

References Elem::_nodes, DofObject::id(), DofObject::invalid_id, and Elem::n_nodes().

Referenced by DofMap::add_neighbors_to_send_list(), EquationSystems::build_solution_vector(), FEBase::compute_face_map(), Tri6::connectivity(), Tri3::connectivity(), Quad9::connectivity(), Quad8::connectivity(), connectivity(), InfQuad6::connectivity(), InfQuad4::connectivity(), InfEdge2::connectivity(), Edge4::connectivity(), Edge3::connectivity(), Edge2::connectivity(), Tet4::connectivity(), Tet10::connectivity(), Pyramid5::connectivity(), Prism6::connectivity(), Prism18::connectivity(), Prism15::connectivity(), InfPrism6::connectivity(), InfPrism12::connectivity(), InfHex8::connectivity(), InfHex18::connectivity(), InfHex16::connectivity(), Hex8::connectivity(), Hex27::connectivity(), Hex20::connectivity(), UnstructuredMesh::copy_nodes_and_elements(), UnstructuredMesh::create_submesh(), MeshCommunication::delete_remote_elements(), MeshTools::find_hanging_nodes_and_parents(), MeshTools::get_not_subactive_node_ids(), Elem::is_ancestor_of(), Tri6::key(), Tri::key(), Quad9::key(), Quad8::key(), Quad::key(), InfQuad::key(), Edge::key(), Tet::key(), Pyramid::key(), Prism::key(), InfPrism::key(), InfHex18::key(), InfHex::key(), Hex27::key(), Hex::key(), MeshRefinement::limit_level_mismatch_at_node(), Elem::operator==(), XdrIO::pack_element(), SerialMesh::renumber_nodes_and_elements(), ParallelMesh::renumber_nodes_and_elements(), LaplaceMeshSmoother::smooth(), MeshTools::subdomain_bounding_box(), BoundaryInfo::sync(), GMVIO::write_ascii_new_impl(), Elem::write_connectivity(), ExodusII_IO_Helper::write_elements(), EnsightIO::write_geometry_ascii(), LegacyXdrIO::write_mesh(), GmshIO::write_mesh(), GmshIO::write_post(), EnsightIO::write_scalar_ascii(), GnuPlotIO::write_solution(), DivaIO::write_stream(), and EnsightIO::write_vector_ascii().

{
  libmesh_assert (i < this->n_nodes());
  libmesh_assert (_nodes[i] != NULL);
  libmesh_assert (_nodes[i]->id() != Node::invalid_id);

  return _nodes[i]->id();
}
 

void 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 1183 of file elem.C.

References Elem::level(), Elem::n_neighbors(), Elem::neighbor(), remote_elem, Elem::set_neighbor(), and Elem::which_neighbor_am_i().

Referenced by MeshRefinement::_coarsen_elements().

{
  // Tell any of my neighbors about my death...
  // Looks strange, huh?
  for (unsigned int n=0; n<this->n_neighbors(); n++)
    {
      Elem* neighbor = this->neighbor(n);
      if (neighbor && neighbor != remote_elem)
        {
          // Note:  it is possible that I see the neighbor
          // (which is coarser than me)
          // but they don't see me, so avoid that case.
          if (neighbor->level() == this->level())
            {   
              const unsigned int w_n_a_i = neighbor->which_neighbor_am_i(this);
              libmesh_assert (w_n_a_i < neighbor->n_neighbors());
              neighbor->set_neighbor(w_n_a_i, NULL);
              this->set_neighbor(n, NULL);
            }
        }
    }
}
 

bool Elem::on_boundary () const [inline, inherited]Returns:

true if this element has a side coincident with a boundary (indicated by a NULL neighbor), false otherwise.

Definition at line 1271 of file elem.h.

References Elem::has_neighbor().

{
  // By convention, the element is on the boundary
  // if it has a NULL neighbor.
  return this->has_neighbor(NULL);
}
 

bool Elem::operator== (const DofObject &rhs) const [virtual, 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.

Reimplemented from DofObject.

Definition at line 334 of file elem.C.

References Elem::n_nodes(), and Elem::node().

Referenced by Elem::is_ancestor_of().

{

    // Cast rhs to an Elem*
    const Elem* rhs_elem = dynamic_cast<const Elem*>(&rhs);

    // If we cannot cast to an Elem*, rhs must be a Node
    if(rhs_elem == static_cast<const Elem*>(NULL))
        return false;

//   libmesh_assert (n_nodes());
//   libmesh_assert (rhs.n_nodes());

//   // Elements can only be equal if they
//   // contain the same number of nodes.
//   if (this->n_nodes() == rhs.n_nodes())
//     {
//       // Create a set that contains our global
//       // node numbers and those of our neighbor.
//       // If the set is the same size as the number
//       // of nodes in both elements then they must
//       // be connected to the same nodes.     
//       std::set<unsigned int> nodes_set;

//       for (unsigned int n=0; n<this->n_nodes(); n++)
//         {
//           nodes_set.insert(this->node(n));
//           nodes_set.insert(rhs.node(n));
//         }

//       // If this passes the elements are connected
//       // to the same global nodes
//       if (nodes_set.size() == this->n_nodes())
//         return true;
//     }

//   // If we get here it is because the elements either
//   // do not have the same number of nodes or they are
//   // connected to different nodes.  Either way they
//   // are not the same element
//   return false;
  
  // Useful typedefs
  typedef std::vector<unsigned int>::iterator iterator;

  
  // Elements can only be equal if they
  // contain the same number of nodes.
  // However, we will only test the vertices,
  // which is sufficient & cheaper
  if (this->n_nodes() == rhs_elem->n_nodes())
    {
      // The number of nodes in the element
      const unsigned int nn = this->n_nodes();
      
      // Create a vector that contains our global
      // node numbers and those of our neighbor.
      // If the sorted, unique vector is the same size
      // as the number of nodes in both elements then
      // they must be connected to the same nodes.
      //
      // The vector will be no larger than 2*n_nodes(),
      // so we might as well reserve the space.
      std::vector<unsigned int> common_nodes;
      common_nodes.reserve (2*nn);

      // Add the global indices of the nodes
      for (unsigned int n=0; n<nn; n++)
        {
          common_nodes.push_back (this->node(n));
          common_nodes.push_back (rhs_elem->node(n));
        }

      // Sort the vector and find out how long
      // the sorted vector is.
      std::sort (common_nodes.begin(), common_nodes.end());
      
      iterator new_end = std::unique (common_nodes.begin(),
                                      common_nodes.end());
      
      const int new_size = std::distance (common_nodes.begin(),
                                          new_end);
      
      // If this passes the elements are connected
      // to the same global vertex nodes
      if (new_size == static_cast<int>(nn))
        return true;
    }

  // If we get here it is because the elements either
  // do not have the same number of nodes or they are
  // connected to different nodes.  Either way they
  // are not the same element
  return false;
}
 

virtual Point Elem::origin () const [inline, virtual, inherited]Returns:

the origin for an infinite element. Currently, all infinite elements used in a mesh share the same origin. Overload this in infinite element classes. By default, issues an error, because returning the all zero point would very likely lead to unexpected behavior.

Reimplemented in InfCell, InfEdge2, and InfQuad.

Definition at line 891 of file elem.h.

Referenced by InfFE< Dim, T_radial, T_map >::combine_base_radial(), InfFE< Dim, T_radial, T_map >::compute_data(), InfFE< Dim, T_radial, T_map >::inverse_map(), and InfFE< Dim, T_radial, T_map >::map().

{ libmesh_error(); return Point(); }
 

unsigned int Elem::p_level () const [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

Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), UnstructuredMesh::all_first_order(), Elem::coarsen(), FEBase::coarsened_dof_values(), FEInterface::compute_data(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), DofMap::constrain_p_dofs(), DofMap::dof_indices(), FE< Dim, T >::dofs_on_edge(), FE< Dim, T >::dofs_on_side(), FE< Dim, T >::edge_reinit(), Elem::Elem(), MeshRefinement::eliminate_unrefined_patches(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), Elem::is_ancestor_of(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), FE< Dim, T >::nodal_soln(), DofMap::old_dof_indices(), System::ProjectVector::operator()(), PatchRecoveryErrorEstimator::EstimateError::operator()(), XdrIO::pack_element(), Elem::refine(), InfFE< Dim, T_radial, T_map >::reinit(), FEXYZ< Dim >::reinit(), FE< Dim, T >::reinit(), DofMap::reinit(), REINIT_ERROR(), HPCoarsenTest::select_refinement(), FE< Dim, T >::shape(), FE< Dim, T >::shape_deriv(), FE< Dim, T >::shape_second_deriv(), MeshRefinement::test_level_one(), and GMVIO::write_ascii_new_impl().  

RefinementState Elem::p_refinement_flag () const [inherited]Returns the value of the p refinement flag for the element.

Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), UnstructuredMesh::all_first_order(), UnstructuredMesh::copy_nodes_and_elements(), MeshRefinement::eliminate_unrefined_patches(), Elem::is_ancestor_of(), ParallelMesh::libmesh_assert_valid_parallel_flags(), MeshTools::libmesh_assert_valid_refinement_flags(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), MeshRefinement::make_refinement_compatible(), Elem::min_new_p_level_by_neighbor(), DofMap::old_dof_indices(), System::ProjectVector::operator()(), Elem::refine(), and MeshRefinement::test_unflagged().  

Elem* Elem::parent () [inherited]Returns:

a pointer to the element's parent. Returns NULL if the element was not created via refinement, i.e. was read from file.

 

const Elem* Elem::parent () const [inherited]Returns:

a const pointer to the element's parent. Returns NULL if the element was not created via refinement, i.e. was read from file.

Referenced by LinearPartitioner::_do_partition(), UniformRefinementEstimator::_estimate_error(), Elem::add_child(), UnstructuredMesh::all_first_order(), Edge::build_side(), Elem::child_neighbor(), FEBase::compute_face_map(), UnstructuredMesh::contract(), UnstructuredMesh::copy_nodes_and_elements(), MeshRefinement::create_parent_error_vector(), MeshCommunication::delete_remote_elements(), Elem::Elem(), MeshRefinement::eliminate_unrefined_patches(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), Elem::family_tree_by_subneighbor(), MeshTools::find_hanging_nodes_and_parents(), UnstructuredMesh::find_neighbors(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_no_links_to_elem(), Elem::libmesh_assert_valid_neighbors(), MeshTools::libmesh_assert_valid_node_pointers(), MeshTools::libmesh_assert_valid_remote_elems(), MeshRefinement::limit_level_mismatch_at_edge(), Elem::make_links_to_me_remote(), MeshRefinement::make_refinement_compatible(), System::ProjectVector::operator()(), Elem::refine(), HPCoarsenTest::select_refinement(), Partitioner::set_parent_processor_ids(), Edge::side(), MeshTools::Modification::smooth(), Parallel::sync_element_data_by_parent_id(), Elem::which_neighbor_am_i(), and LegacyXdrIO::write_mesh().  

Point & Elem::point (const unsigned inti) [inline, virtual, inherited]Returns:

the Point associated with local Node i as a writeable reference.

Reimplemented in RemoteElem.

Definition at line 1154 of file elem.h.

References Elem::_nodes, and Elem::n_nodes().

{
  libmesh_assert (i < this->n_nodes());

  return *_nodes[i];
}
 

const Point & Elem::point (const unsigned inti) const [inline, virtual, inherited]Returns:

the Point associated with local Node i.

Reimplemented in RemoteElem.

Definition at line 1142 of file elem.h.

References Elem::_nodes, DofObject::invalid_id, and Elem::n_nodes().

Referenced by PostscriptIO::_compute_edge_bezier_coeffs(), Elem::coarsen(), FEBase::compute_affine_map(), InfFE< Dim, T_radial, T_map >::compute_data(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEXYZ< Dim >::compute_face_values(), FEBase::compute_single_point_map(), InfQuad4::contains_point(), InfPrism6::contains_point(), InfHex8::contains_point(), Elem::contains_vertex_of(), UnstructuredMesh::create_submesh(), FEMContext::elem_position_get(), FEMContext::elem_position_set(), Tet4::embedding_matrix(), Tet10::embedding_matrix(), Tri6::has_affine_map(), Quad9::has_affine_map(), Quad8::has_affine_map(), has_affine_map(), Edge4::has_affine_map(), Edge3::has_affine_map(), Tet10::has_affine_map(), Prism6::has_affine_map(), Prism18::has_affine_map(), Prism15::has_affine_map(), Hex8::has_affine_map(), Hex27::has_affine_map(), Hex20::has_affine_map(), Elem::hmax(), Elem::hmin(), TreeNode< N >::insert(), InfFE< Dim, T_radial, T_map >::inverse_map(), Elem::length(), InfFE< Dim, T_radial, T_map >::map(), FE< Dim, T >::map(), FE< Dim, T >::map_eta(), FE< Dim, T >::map_xi(), FE< Dim, T >::map_zeta(), Tri3::min_and_max_angle(), Tet4::min_and_max_angle(), FE< Dim, T >::nodal_soln(), FEMSystem::numerical_jacobian(), System::ProjectVector::operator()(), InfQuad::origin(), InfEdge2::origin(), InfCell::origin(), PostscriptIO::plot_linear_elem(), Elem::refine(), FE< Dim, T >::reinit(), Tet4::reselect_optimal_diagonal(), FE< Dim, T >::shape(), FE< Dim, T >::shape_deriv(), MeshTools::Modification::smooth(), volume(), Edge3::volume(), Edge2::volume(), EnsightIO::write_geometry_ascii(), and GmshIO::write_post().

{
  libmesh_assert (i < this->n_nodes());
  libmesh_assert (_nodes[i] != NULL);
  libmesh_assert (_nodes[i]->id() != Node::invalid_id);

  return *_nodes[i];
}
 

void ReferenceCounter::print_info () [static, inherited]Prints the reference information to std::cout.

Definition at line 83 of file reference_counter.C.

References ReferenceCounter::get_info().

{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
  
  std::cout << ReferenceCounter::get_info();
  
#endif
}
 

void ReferenceCounter::print_info () [static, inherited]Prints the reference information to std::cout.

Definition at line 83 of file reference_counter.C.

References ReferenceCounter::get_info().

{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
  
  std::cout << ReferenceCounter::get_info();
  
#endif
}
 

unsigned short int DofObject::processor_id () const [inline, inherited]Returns:

the processor that this element belongs to. To conserve space this is stored as a short integer.

Definition at line 473 of file dof_object.h.

References DofObject::_processor_id.

Referenced by SFCPartitioner::_do_partition(), MetisPartitioner::_do_partition(), LinearPartitioner::_do_partition(), CentroidPartitioner::_do_partition(), GMVIO::_read_materials(), ParallelMesh::add_elem(), Patch::add_local_face_neighbors(), Patch::add_local_point_neighbors(), DofMap::add_neighbors_to_send_list(), ParallelMesh::add_node(), SerialMesh::add_point(), ParallelMesh::add_point(), UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), ParmetisPartitioner::assign_partitioning(), Patch::build_around_element(), InfElemBuilder::build_inf_elem(), UnstructuredMesh::copy_nodes_and_elements(), MeshTools::correct_node_proc_ids(), UnstructuredMesh::create_submesh(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), Elem::Elem(), UnstructuredMesh::find_neighbors(), MeshTools::Modification::flatten(), DofObject::invalidate_processor_id(), Elem::is_ancestor_of(), MeshTools::libmesh_assert_valid_elem_ids(), MeshRefinement::make_coarsening_compatible(), XdrIO::pack_element(), Partitioner::partition_unpartitioned_elements(), DofObject::processor_id(), Nemesis_IO::read(), XdrIO::read_serialized_connectivity(), MeshData::read_xdr(), Elem::refine(), Partitioner::set_node_processor_ids(), DofMap::set_nonlocal_dof_objects(), Partitioner::set_parent_processor_ids(), BoundaryInfo::sync(), Parallel::sync_dofobject_data_by_id(), Parallel::sync_element_data_by_parent_id(), GmshIO::write_mesh(), and XdrIO::write_serialized_connectivity().

{
  return _processor_id;
}
 

unsigned short int & DofObject::processor_id () [inline, inherited]Returns:

the processor that this element belongs to as a writeable reference.

Definition at line 481 of file dof_object.h.

References DofObject::_processor_id.

{
  return _processor_id;
}
 

void DofObject::processor_id (const unsigned intid) [inline, inherited]Sets the processor_id for this DofObject.

Definition at line 489 of file dof_object.h.

References DofObject::id(), and DofObject::processor_id().

{
#ifdef DEBUG
  
  if (id != static_cast<unsigned int>(static_cast<unsigned short int>(id)))
    {
      std::cerr << 'ERROR: id too large for unsigned short int!' << std::endl
                << 'Recompile with DofObject::_processor_id larger!' << std::endl;
      
      libmesh_error();
    }

#endif
  
  this->processor_id() = id;
}
 

std::pair< Real, Real > Quad::qual_bounds (const ElemQualityq) const [virtual, inherited]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 Elem.

Definition at line 178 of file face_quad.C.

References libMeshEnums::ASPECT_RATIO, libMeshEnums::CONDITION, libMeshEnums::DISTORTION, libMeshEnums::JACOBIAN, libMeshEnums::MAX_ANGLE, libMeshEnums::MIN_ANGLE, libMeshEnums::SHAPE, libMeshEnums::SHEAR, libMeshEnums::SIZE, libMeshEnums::SKEW, libMeshEnums::STRETCH, libMeshEnums::TAPER, and libMeshEnums::WARP.

{
  std::pair<Real, Real> bounds;
  
  switch (q)
    {

    case ASPECT_RATIO:
      bounds.first  = 1.;
      bounds.second = 4.;
      break;
      
    case SKEW:
      bounds.first  = 0.;
      bounds.second = 0.5;
      break;

    case TAPER:
      bounds.first  = 0.;
      bounds.second = 0.7;
      break;

    case WARP:
      bounds.first  = 0.9;
      bounds.second = 1.;
      break;
     
    case STRETCH:
      bounds.first  = 0.25;
      bounds.second = 1.;
      break;

    case MIN_ANGLE:
      bounds.first  = 45.;
      bounds.second = 90.;
      break;
      
    case MAX_ANGLE:
      bounds.first  = 90.;
      bounds.second = 135.;
      break;
      
    case CONDITION:
      bounds.first  = 1.;
      bounds.second = 4.;
      break;

    case JACOBIAN:
      bounds.first  = 0.5;
      bounds.second = 1.;
      break;
      
    case SHEAR:
    case SHAPE:
    case SIZE:
      bounds.first  = 0.3;
      bounds.second = 1.;
      break;
      
    case DISTORTION:
      bounds.first  = 0.6;
      bounds.second = 1.;
      break;
      
    default:
      std::cout << 'Warning: Invalid quality measure chosen.' << std::endl;
      bounds.first  = -1;
      bounds.second = -1;
    }

  return bounds;
}
 

Real Quad::quality (const ElemQualityq) const [virtual, inherited]Based on the quality metric q specified by the user, returns a quantitative assessment of element quality.

Compue the min/max diagonal ratio. This is modeled after the Hex element

I don't know what to do for this metric. Maybe the base class knows. We won't get here because of the default case above.

Reimplemented from Elem.

Definition at line 133 of file face_quad.C.

References libMeshEnums::DIAGONAL, libMeshEnums::DISTORTION, Elem::length(), and libMeshEnums::STRETCH.

{
  switch (q)
    {
      
    case DISTORTION:
    case DIAGONAL:
    case STRETCH:
      {
        // Diagonal between node 0 and node 2
        const Real d02 = this->length(0,2);

        // Diagonal between node 1 and node 3
        const Real d13 = this->length(1,3);

        // Find the biggest and smallest diagonals
        if ( (d02 > 0.) && (d13 >0.) )
          if (d02 < d13) return d02 / d13;
          else return d13 / d02;
        else
          return 0.;
        break;
      }

    default:
      return Elem::quality(q);
    }
      
  return Elem::quality(q);
}
 

void 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 40 of file elem_refinement.C.

References Elem::_children, Elem::active(), MeshRefinement::add_elem(), MeshRefinement::add_point(), Elem::ancestor(), Elem::build(), Elem::child(), Elem::embedding_matrix(), Elem::get_node(), Elem::hmin(), Elem::INACTIVE, Elem::JUST_REFINED, Elem::n_children(), Elem::n_nodes(), DofObject::n_systems(), Elem::p_level(), Elem::p_refinement_flag(), Elem::parent(), Elem::point(), DofObject::processor_id(), Elem::REFINE, Elem::refinement_flag(), DofObject::set_n_systems(), Elem::set_node(), Elem::set_p_level(), Elem::set_p_refinement_flag(), Elem::set_refinement_flag(), Elem::subactive(), and Elem::type().

{
  libmesh_assert (this->refinement_flag() == Elem::REFINE);
  libmesh_assert (this->active());
  
  // Create my children if necessary
  if (!_children)
    {
      _children = new Elem*[this->n_children()];

      unsigned int parent_p_level = this->p_level();
      for (unsigned int c=0; c<this->n_children(); c++)
        {
          _children[c] = Elem::build(this->type(), this).release();
          _children[c]->set_refinement_flag(Elem::JUST_REFINED);
          _children[c]->set_p_level(parent_p_level);
          _children[c]->set_p_refinement_flag(this->p_refinement_flag());
        }

      // Compute new nodal locations
      // and asssign nodes to children
      // Make these static.  It is unlikely the
      // sizes will change from call to call, so having these
      // static should save on reallocations
      std::vector<std::vector<Point> >        p    (this->n_children());
      std::vector<std::vector<Node*> >        nodes(this->n_children());
    

      // compute new nodal locations
      for (unsigned int c=0; c<this->n_children(); c++)
        {       
          Elem *child = this->child(c);
          p[c].resize    (child->n_nodes());
          nodes[c].resize(child->n_nodes());

          for (unsigned int nc=0; nc<child->n_nodes(); nc++)
            {
              // zero entries
              p[c][nc].zero();
              nodes[c][nc] = NULL;
          
              for (unsigned int n=0; n<this->n_nodes(); n++)
                {
                  // The value from the embedding matrix
                  const float em_val = this->embedding_matrix(c,nc,n);
              
                  if (em_val != 0.)
                    {
                      p[c][nc].add_scaled (this->point(n), em_val);
                  
                      // We may have found the node, in which case we
                      // won't need to look it up later.
                      if (em_val == 1.)
                        nodes[c][nc] = this->get_node(n);
                    }
                }
            }
      
        // assign nodes to children & add them to the mesh
          const Real pointtol = this->hmin() * TOLERANCE;
          for (unsigned int nc=0; nc<child->n_nodes(); nc++)
            {
              if (nodes[c][nc] != NULL)
                {
                  child->set_node(nc) = nodes[c][nc];
                }
              else
                {
                  child->set_node(nc) =
                    mesh_refinement.add_point(p[c][nc],
                                              child->processor_id(),
                                              pointtol);
                  child->get_node(nc)->set_n_systems
                    (this->n_systems());
                }
            }
      
          mesh_refinement.add_elem (child);
          child->set_n_systems(this->n_systems());
        }
    }
  else
    {
      unsigned int parent_p_level = this->p_level();
      for (unsigned int c=0; c<this->n_children(); c++)
        {       
          Elem *child = this->child(c);
          libmesh_assert(child->subactive());
          child->set_refinement_flag(Elem::JUST_REFINED);
          child->set_p_level(parent_p_level);
          child->set_p_refinement_flag(this->p_refinement_flag());
        }
    }

  // Un-set my refinement flag now
  this->set_refinement_flag(Elem::INACTIVE);
  this->set_p_refinement_flag(Elem::INACTIVE);

  for (unsigned int c=0; c<this->n_children(); c++)
    {   
      libmesh_assert(this->child(c)->parent() == this);
      libmesh_assert(this->child(c)->active());
    }
  libmesh_assert (this->ancestor());
}
 

RefinementState Elem::refinement_flag () const [inherited]Returns the value of the refinement flag for the element.

Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), Elem::active(), UnstructuredMesh::all_first_order(), Elem::coarsen(), MeshRefinement::coarsen_elements(), Elem::contract(), UnstructuredMesh::copy_nodes_and_elements(), MeshRefinement::eliminate_unrefined_patches(), Elem::is_ancestor_of(), ParallelMesh::libmesh_assert_valid_parallel_flags(), MeshTools::libmesh_assert_valid_refinement_flags(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), MeshRefinement::make_refinement_compatible(), DofMap::old_dof_indices(), System::ProjectVector::operator()(), Elem::refine(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), DofMap::reinit(), Tet4::reselect_diagonal(), HPSingularity::select_refinement(), HPCoarsenTest::select_refinement(), and MeshRefinement::test_unflagged().  

unsigned short int Elem::second_order_adjacent_vertex (const unsigned intn, const unsigned intv) const [virtual, inherited]Returns:

the element-local number of the $ v^{th} $ vertex that defines the $ n^{th} $ second-order node. Note that the return value is always less this->n_vertices(), while n has to be greater or equal this->n_vertices(). For linear elements this returns 0.

Reimplemented in Hex20, Hex27, InfHex16, InfHex18, InfPrism12, Prism15, Prism18, Tet10, Edge3, Edge4, InfQuad6, Quad8, Quad9, and Tri6.

Definition at line 1217 of file elem.C.

Referenced by LaplaceMeshSmoother::smooth(), and MeshTools::Modification::smooth().

{
  // for linear elements, always return 0
  return 0;
}
 

std::pair< unsigned short int, unsigned short int > Elem::second_order_child_vertex (const unsigned intn) const [virtual, inherited]Returns:

the child number c and element-local index v of the $ n^{th} $ second-order node on the parent element. Note that the return values are always less this->n_children() and this->child(c)->n_vertices(), while n has 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 satisfy this->get_node(n)==this->child(c)->get_node(v)

Reimplemented in Hex20, Hex27, InfHex16, InfHex18, InfPrism12, Prism15, Prism18, Tet10, Edge3, InfQuad6, Quad8, Quad9, and Tri6.

Definition at line 1227 of file elem.C.

{
  // for linear elements, always return 0
  return std::pair<unsigned short int, unsigned short int>(0,0);
}
 

ElemType Elem::second_order_equivalent_type (const ElemTypeet, const boolfull_ordered = true) [static, inherited]Returns:

the element type of the associated second-order element, e.g. when this is a TET4, then TET10 is returned. Returns INVALID_ELEM for 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 1285 of file elem.C.

References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INFEDGE2, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMeshEnums::INVALID_ELEM, libMeshEnums::PRISM15, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::PYRAMID5, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.

Referenced by UnstructuredMesh::all_second_order().

{ 
  /* for second-order elements, always return 
INVALID_ELEM * since second-order elements should not be converted * into something else. Only linear elements should * return something sensible here */ switch (et) { case EDGE2: { // full_ordered not relevant return EDGE3; } case TRI3: { // full_ordered not relevant return TRI6; } case QUAD4: { if (full_ordered) return QUAD9; else return QUAD8; } case TET4: { // full_ordered not relevant return TET10; } case HEX8: { // see below how this correlates with INFHEX8 if (full_ordered) return HEX27; else return HEX20; } case PRISM6: { if (full_ordered) return PRISM18; else return PRISM15; } case PYRAMID5: { // libmesh_error(); return INVALID_ELEM; } #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS // infinite elements case INFEDGE2: { // libmesh_error(); return INVALID_ELEM; } case INFQUAD4: { // full_ordered not relevant return INFQUAD6; } case INFHEX8: { /* * Note that this matches with
Hex8: * For full-ordered,
InfHex18 and
Hex27 * belong together, and for not full-ordered, *
InfHex16 and
Hex20 belong together. */ if (full_ordered) return INFHEX18; else return INFHEX16; } case INFPRISM6: { // full_ordered not relevant return INFPRISM12; } #endif default: { // second-order element return INVALID_ELEM; } } }
 

void DofObject::set_dof_number (const unsigned ints, const unsigned intvar, const unsigned intcomp, const unsigned intdn) [inherited]Sets the global degree of freedom number variable var, component comp for system s associated with this DofObject

Definition at line 338 of file dof_object.C.

References DofObject::_dof_ids, DofObject::dof_number(), DofObject::invalid_id, DofObject::n_comp(), DofObject::n_systems(), and DofObject::n_vars().

Referenced by DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofObject::invalidate_dofs(), DofMap::reinit(), and DofMap::set_nonlocal_dof_objects().

{
  libmesh_assert (s < this->n_systems());
  libmesh_assert (var  < this->n_vars(s));
  libmesh_assert (_dof_ids != NULL);
  libmesh_assert (_dof_ids[s] != NULL);
  libmesh_assert (comp < this->n_comp(s,var));
  
  //We intend to change all dof numbers together or not at all
  if (comp)
    libmesh_assert ((dn == invalid_id && _dof_ids[s][var] == invalid_id) || 
                    (dn == _dof_ids[s][var] + comp));
  else
    _dof_ids[s][var] = dn;


  libmesh_assert(this->dof_number(s, var, comp) == dn);
}
 

unsigned int & DofObject::set_id () [inline, inherited]Returns:

the id for this DofObject as a writeable reference.

Definition at line 458 of file dof_object.h.

References DofObject::_id.

Referenced by GMVIO::_read_one_cell(), SerialMesh::add_elem(), ParallelMesh::add_elem(), SerialMesh::add_node(), ParallelMesh::add_node(), UnstructuredMesh::all_first_order(), MeshCommunication::assign_global_indices(), InfElemBuilder::build_inf_elem(), UNVIO::element_in(), DofObject::invalidate_id(), Node::Node(), VTKIO::read(), Nemesis_IO::read(), UCDIO::read_implementation(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), OFFIO::read_stream(), MatlabIO::read_stream(), SerialMesh::renumber_elem(), ParallelMesh::renumber_elem(), SerialMesh::renumber_node(), ParallelMesh::renumber_node(), and SerialMesh::renumber_nodes_and_elements().

{
  return _id;
}
 

void DofObject::set_id (const unsigned intid) [inline, inherited]Sets the id for this DofObject

Definition at line 143 of file dof_object.h.

References DofObject::id(), and DofObject::set_id().

Referenced by DofObject::set_id().

  { this->set_id() = id; }
 

void DofObject::set_n_comp (const unsigned ints, const unsigned intvar, const unsigned intncomp) [inherited]Sets the number of components for variable var of system s associated with this DofObject

Definition at line 298 of file dof_object.C.

References DofObject::_dof_ids, DofObject::_n_v_comp, DofObject::invalid_id, DofObject::n_comp(), DofObject::n_systems(), and DofObject::n_vars().

Referenced by DofMap::reinit(), and DofMap::set_nonlocal_dof_objects().

{
  libmesh_assert (s < this->n_systems());
  libmesh_assert (var < this->n_vars(s));
  libmesh_assert (_dof_ids != NULL);
  libmesh_assert (_dof_ids[s] != NULL);
  
  // Check for trivial return
  if (ncomp == this->n_comp(s,var)) return;

#ifdef DEBUG

  if (ncomp != static_cast<unsigned int>(static_cast<unsigned char>(ncomp)))
    {
      std::cerr << 'Unsigned char not big enough to hold ncomp!' << std::endl
                << 'Recompile with _n_v_comp set to a bigger type!'
                << std::endl;
      
      libmesh_error();
    }
  
#endif

  // We use (invalid_id - 1) to signify no
  // components for this object
  if (ncomp == 0)
    {
      _dof_ids[s][var] = (invalid_id - 1);
    }
  
  libmesh_assert (_n_v_comp    != NULL);
  libmesh_assert (_n_v_comp[s] != NULL);
    
  _n_v_comp[s][var+1]  = static_cast<unsigned char>(ncomp);
}
 

void DofObject::set_n_systems (const unsigned ints) [inherited]Sets the number of systems for this DofObject

Definition at line 148 of file dof_object.C.

References DofObject::_dof_ids, DofObject::_n_systems, DofObject::_n_v_comp, DofObject::clear_dofs(), and DofObject::n_systems().

Referenced by Elem::refine().

{
  // Check for trivial return
  if (ns == this->n_systems()) return;
 
#ifdef DEBUG

  if (ns != static_cast<unsigned int>(static_cast<unsigned char>(ns)))
    {
      std::cerr << 'Unsigned char not big enough to hold ns!' << std::endl
                << 'Recompile with _n_systems set to a bigger type!'
                << std::endl;
      
      libmesh_error();
    }
                                        
#endif


  // Clear any existing data.  This is safe to call
  // even if we don't have any data.
  this->clear_dofs();

  // Set the new number of systems
  _n_systems = static_cast<unsigned char>(ns);
  
  // Allocate storage for the systems
  _n_v_comp = new unsigned char* [this->n_systems()];
  _dof_ids  = new unsigned int*  [this->n_systems()];

  // No variables have been declared yet.
  for (unsigned int s=0; s<this->n_systems(); s++)
    {
      _n_v_comp[s] = NULL;
      _dof_ids[s]  = NULL;
    }
}
 

void DofObject::set_n_vars (const unsigned ints, const unsigned intnvars) [inherited]Sets number of variables associated with system s for this DofObject

Definition at line 241 of file dof_object.C.

References DofObject::_dof_ids, DofObject::_n_v_comp, DofObject::invalid_id, DofObject::n_systems(), and DofObject::n_vars().

{
  libmesh_assert (s < this->n_systems());
  libmesh_assert (_n_v_comp != NULL);
  libmesh_assert (_dof_ids  != NULL);

#ifdef DEBUG

  if (nvars != static_cast<unsigned int>(static_cast<unsigned char>(nvars)))
    {
      std::cerr << 'Unsigned char not big enough to hold nvar!' << std::endl
                << 'Recompile with _n_vars set to a bigger type!'
                << std::endl;
      
      libmesh_error();
    }
                                        
#endif

  
  
  // If we already have memory allocated clear it.
  if (this->n_vars(s) != 0)
    {
      libmesh_assert (_n_v_comp[s] != NULL); delete [] _n_v_comp[s]; _n_v_comp[s] = NULL;
      libmesh_assert (_dof_ids[s]  != NULL); delete [] _dof_ids[s];  _dof_ids[s]  = NULL;
    }

  // Reset the number of variables in the system  
  if (nvars > 0)
    {
      libmesh_assert (_n_v_comp[s] == NULL);
      libmesh_assert (_dof_ids[s]  == NULL);
      
      _n_v_comp[s] = new unsigned char [nvars+1];
      _dof_ids[s]  = new unsigned int  [nvars];
      
      _n_v_comp[s][0] = static_cast<unsigned char>(nvars);

      libmesh_assert (nvars == this->n_vars(s));
      
      for (unsigned int v=0; v<this->n_vars(s); v++)
        {
          _n_v_comp[s][v+1] = 0;
          _dof_ids[s][v]    = invalid_id - 1;
        }
    }
  else // (nvars == 0)
    {
      libmesh_assert (_n_v_comp[s] == NULL);
      libmesh_assert (_dof_ids[s]  == NULL);
    }
}
 

void Elem::set_neighbor (const unsigned inti, Elem *n) [inline, inherited]Assigns n as the $ i^{th} $ neighbor.

Definition at line 1223 of file elem.h.

References Elem::_neighbors, and Elem::n_neighbors().

Referenced by UnstructuredMesh::find_neighbors(), Elem::make_links_to_me_remote(), and Elem::nullify_neighbors().

{
  libmesh_assert (i < this->n_neighbors());
  
  _neighbors[i] = n;
}
 

Node *& Elem::set_node (const unsigned inti) [inline, virtual, inherited]Returns:

the pointer to local Node i as a writeable reference.

Reimplemented in RemoteElem.

Definition at line 1187 of file elem.h.

References Elem::_nodes, and Elem::n_nodes().

Referenced by GMVIO::_read_one_cell(), UnstructuredMesh::all_first_order(), MeshTools::Modification::all_tri(), MeshTools::Generation::build_cube(), InfElemBuilder::build_inf_elem(), Tri6::build_side(), Tri3::build_side(), Quad9::build_side(), Quad8::build_side(), build_side(), InfQuad6::build_side(), Edge::build_side(), Triangle::copy_tri_to_mesh(), UnstructuredMesh::create_submesh(), UNVIO::element_in(), MeshTools::Modification::flatten(), TetGenMeshInterface::pointset_convexhull(), VTKIO::read(), Nemesis_IO::read(), ExodusII_IO::read(), UCDIO::read_implementation(), LegacyXdrIO::read_mesh(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), MatlabIO::read_stream(), Elem::refine(), Tet4::reselect_diagonal(), Tri::side(), Quad::side(), InfQuad::side(), Edge::side(), Tet::side(), Pyramid::side(), Prism::side(), InfPrism::side(), InfHex::side(), Hex::side(), BoundaryInfo::sync(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and TetGenMeshInterface::triangulate_pointset().

{
  libmesh_assert (i < this->n_nodes());

  return _nodes[i];
}
 

void DofObject::set_old_dof_object () [inherited]Sets the old_dof_object to a copy of this

Definition at line 133 of file dof_object.C.

References DofObject::clear_old_dof_object(), DofObject::DofObject(), and DofObject::old_dof_object.

Referenced by DofMap::reinit().

{
  this->clear_old_dof_object();

  libmesh_assert (this->old_dof_object == NULL);
  
  // Make a new DofObject, assign a copy of 
this. // Make sure the copy ctor for DofObject works!! this->old_dof_object = new DofObject(*this); }
 

void Elem::set_p_level (const unsigned intp) [inherited]Sets the value of the p refinement level for the element Note that the maximum p refinement level is currently 255

Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), UnstructuredMesh::all_first_order(), Elem::coarsen(), Elem::Elem(), Elem::is_ancestor_of(), Elem::refine(), and DofMap::reinit().  

void Elem::set_p_refinement_flag (const RefinementStatepflag) [inherited]Sets the value of the p refinement flag for the element.

Referenced by MeshRefinement::_coarsen_elements(), MeshRefinement::_refine_elements(), UnstructuredMesh::all_first_order(), MeshRefinement::coarsen_elements(), Elem::Elem(), MeshRefinement::eliminate_unrefined_patches(), Elem::is_ancestor_of(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), MeshRefinement::make_refinement_compatible(), Elem::refine(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), HPSingularity::select_refinement(), and HPCoarsenTest::select_refinement().  

void Elem::set_parent (Elem *p) [inherited]the pointer to the element's parent. Dangerous to use in high-level code.

Referenced by UnstructuredMesh::all_first_order(), Elem::is_ancestor_of(), and BoundaryInfo::sync().  

void Elem::set_refinement_flag (const RefinementStaterflag) [inherited]Sets the value of the refinement flag for the element.

Referenced by UnstructuredMesh::all_first_order(), Elem::coarsen(), MeshRefinement::coarsen_elements(), Elem::contract(), Elem::Elem(), MeshRefinement::eliminate_unrefined_patches(), MeshRefinement::flag_elements_by_elem_fraction(), MeshRefinement::flag_elements_by_error_fraction(), MeshRefinement::flag_elements_by_error_tolerance(), MeshRefinement::flag_elements_by_mean_stddev(), MeshRefinement::flag_elements_by_nelem_target(), Elem::is_ancestor_of(), MeshRefinement::limit_level_mismatch_at_edge(), MeshRefinement::limit_level_mismatch_at_node(), MeshRefinement::make_coarsening_compatible(), MeshRefinement::make_flags_parallel_consistent(), MeshRefinement::make_refinement_compatible(), LegacyXdrIO::read_mesh(), XdrIO::read_serialized_connectivity(), Elem::refine(), MeshRefinement::refine_and_coarsen_elements(), MeshRefinement::refine_elements(), HPSingularity::select_refinement(), and HPCoarsenTest::select_refinement().  

AutoPtr< DofObject > Quad::side (const unsigned inti) const [virtual, inherited]Returns:

a primitive (2-noded) edge for edge i.

Implements Elem.

Definition at line 64 of file face_quad.C.

References Elem::get_node(), Quad::n_sides(), and Elem::set_node().

{
  libmesh_assert (i < this->n_sides());

  Elem* edge = new Edge2;

  switch (i)
    {
    case 0:
      {
        edge->set_node(0) = this->get_node(0);
        edge->set_node(1) = this->get_node(1);
        
        AutoPtr<DofObject> ap_edge(edge);
        return ap_edge;
      }
    case 1:
      {
        edge->set_node(0) = this->get_node(1);
        edge->set_node(1) = this->get_node(2);
        
        AutoPtr<DofObject> ap_edge(edge);
        return ap_edge;
      }
    case 2:
      {
        edge->set_node(0) = this->get_node(2);
        edge->set_node(1) = this->get_node(3);
        
        AutoPtr<DofObject> ap_edge(edge);
        return ap_edge;
      }
    case 3:
      {
        edge->set_node(0) = this->get_node(3);
        edge->set_node(1) = this->get_node(0);
        
        AutoPtr<DofObject> ap_edge(edge);
        return ap_edge;
      }
    default:
      {
        libmesh_error();
      }
    }


  // We will never get here...  Look at the code above.
  libmesh_error();  
  AutoPtr<DofObject> ap_edge(edge);
  return ap_edge;
}
 

bool Elem::subactive () const [inline, inherited]Returns:

true if the element is subactive (i.e. has no active descendants), false otherwise. Always returns false if AMR is disabled.

Definition at line 1321 of file elem.h.

References Elem::active(), Elem::child(), Elem::has_children(), and Elem::subactive().

Referenced by Elem::active_family_tree(), Elem::active_family_tree_by_neighbor(), Elem::active_family_tree_by_side(), HPCoarsenTest::add_projection(), UnstructuredMesh::contract(), Elem::family_tree(), Elem::family_tree_by_neighbor(), Elem::family_tree_by_side(), Elem::family_tree_by_subneighbor(), UnstructuredMesh::find_neighbors(), MeshTools::get_not_subactive_node_ids(), Elem::is_ancestor_of(), Elem::libmesh_assert_valid_neighbors(), Elem::make_links_to_me_remote(), Elem::min_new_p_level_by_neighbor(), Elem::min_p_level_by_neighbor(), Elem::refine(), Elem::subactive(), and LegacyXdrIO::write_mesh().

{
#ifdef LIBMESH_ENABLE_AMR
  if (this->active())
    return false;
  if (!this->has_children())
    return true;
  return this->child(0)->subactive();
#else
  return false;
#endif
}
 

subdomain_id_type 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 1197 of file elem.h.

References Elem::_sbd_id.

Referenced by UnstructuredMesh::all_first_order(), UnstructuredMesh::all_second_order(), MeshTools::Modification::all_tri(), UnstructuredMesh::create_submesh(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), Elem::Elem(), MeshTools::Modification::flatten(), ExodusII_IO_Helper::initialize(), Elem::is_ancestor_of(), DofMap::old_dof_indices(), XdrIO::pack_element(), Nemesis_IO::read(), ExodusII_IO::read(), GmshIO::read_mesh(), XdrIO::read_serialized_connectivity(), DofMap::reinit(), MeshTools::subdomain_bounding_box(), BoundaryInfo::sync(), and ExodusII_IO_Helper::write_elements().

{
  return _sbd_id;
}
 

subdomain_id_type & Elem::subdomain_id () [inline, inherited]Returns:

the subdomain that this element belongs to as a writeable reference.

Definition at line 1205 of file elem.h.

References Elem::_sbd_id.

{
  return _sbd_id;
}
 

const Elem* Elem::top_parent () const [inherited]Returns:

a pointer to the element's top-most (i.e. level-0) parent. Returns this if 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...

Referenced by BoundaryInfo::boundary_id(), Elem::is_ancestor_of(), BoundaryInfo::side_with_boundary_id(), and BoundaryInfo::sync().  

ElemType Quad4::type () const [inline, virtual]Returns:

QUAD4

Implements Elem.

Definition at line 79 of file face_quad4.h.

References libMeshEnums::QUAD4.

{ return QUAD4; }
 

bool DofObject::valid_id () const [inline, inherited]Returns:

true if this DofObject has a valid id set, false otherwise.

Definition at line 466 of file dof_object.h.

References DofObject::_id, and DofObject::invalid_id.

Referenced by SerialMesh::add_elem(), ParallelMesh::add_elem(), SerialMesh::add_node(), ParallelMesh::add_node(), DofObject::id(), and Elem::libmesh_assert_valid_node_pointers().

{
  return (DofObject::invalid_id != _id);
}
 

bool DofObject::valid_processor_id () const [inline, inherited]Returns:

true if this DofObject has a valid id set, false otherwise.

Definition at line 509 of file dof_object.h.

References DofObject::_processor_id, and DofObject::invalid_processor_id.

{
  return (DofObject::invalid_processor_id != _processor_id);
}
 

Real Quad4::volume () const [virtual]An optimized method for computing the area of a 4-node quad with straight sides, but not necessarily a parallelogram.

Reimplemented from Elem.

Definition at line 232 of file face_quad4.C.

References TypeVector< T >::cross(), and Elem::point().

{
  // The A,B,C,D naming scheme here corresponds exactly to the
  // libmesh counter-clockwise numbering scheme.
  
  //        3           2        D           C
  // QUAD4: o-----------o        o-----------o
  //        |           |        |           |
  //        |           |        |           |
  //        |           |        |           |
  //        |           |        |           |
  //        |           |        |           |
  //        o-----------o        o-----------o
  //        0           1        A           B
  
  // Vector pointing from A to C
  Point AC ( this->point(2) - this->point(0) );
  
  // Vector pointing from A to B
  Point AB ( this->point(1) - this->point(0) );

  // Vector pointing from A to D
  Point AD ( this->point(3) - this->point(0) );

  // The diagonal vector minus the side vectors
  Point AC_AB_AD (AC - AB - AD);
    
  // Check for quick return for planar QUAD4.  This will
  // be the most common case, occuring for all purely 2D meshes.
  if (AC_AB_AD == Point(0.,0.,0.))
    return AB.cross(AD).size();
  
  else
    {
      // Use 2x2 quadrature to approximate the surface area.  (The
      // true integral is too difficult to compute analytically.)  The
      // accuracy here is exactly the same as would be obtained via a
      // call to Elem::volume(), however it is a bit more optimized to
      // do it this way.  The technique used is to integrate the magnitude
      // of the normal vector over the whole area.  See for example,
      //
      // Y. Zhang, C. Bajaj, G. Xu. Surface Smoothing and Quality
      // Improvement of Quadrilateral/Hexahedral Meshes with Geometric
      // Flow. The special issue of the Journal Communications in
      // Numerical Methods in Engineering (CNME), submitted as an
      // invited paper, 2006.
      // http://www.ices.utexas.edu/~jessica/paper/quadhexgf/quadhex_geomflow_CNM.pdf
      
      // 4-point rule
      const Real q[2] = {0.5 - std::sqrt(3.) / 6.,
                         0.5 + std::sqrt(3.) / 6.};

      Real vol=0.;
      for (unsigned int i=0; i<2; ++i)
        for (unsigned int j=0; j<2; ++j)
          vol += (AB + q[i]*AC_AB_AD).cross(AD + q[j]*AC_AB_AD).size();
      
      return 0.25*vol;
    }
}
 

unsigned int Elem::which_child_am_i (const Elem *e) const [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;

Referenced by UnstructuredMesh::copy_nodes_and_elements(), Elem::is_ancestor_of(), Elem::make_links_to_me_remote(), and Parallel::sync_element_data_by_parent_id().  

unsigned int 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 1281 of file elem.h.

References libMesh::invalid_uint, Elem::level(), Elem::n_neighbors(), Elem::neighbor(), and Elem::parent().

Referenced by MetisPartitioner::_do_partition(), ParmetisPartitioner::build_graph(), FEBase::compute_proj_constraints(), MeshTools::find_hanging_nodes_and_parents(), Elem::libmesh_assert_valid_neighbors(), Elem::make_links_to_me_remote(), and Elem::nullify_neighbors().

{
  libmesh_assert (e != NULL);

  const Elem* eparent = e;

  while (eparent->level() > this->level())
    {
      eparent = eparent->parent();
      libmesh_assert(eparent);
    }
  
  for (unsigned int s=0; s<this->n_neighbors(); s++)
    if (this->neighbor(s) == eparent)
      return s;
    
  return libMesh::invalid_uint;
}
 

void Elem::write_connectivity (std::ostream &out, const IOPackageiop) 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 689 of file elem.C.

References Elem::_nodes, Elem::connectivity(), libMeshEnums::INVALID_IO_PACKAGE, Elem::n_nodes(), Elem::n_sub_elem(), Elem::node(), libMeshEnums::TECPLOT, and libMeshEnums::UCD.

{
  libmesh_assert (out.good());
  libmesh_assert (_nodes != NULL);
  libmesh_assert (iop != INVALID_IO_PACKAGE);

  switch (iop)
    {
    case TECPLOT:
      {
        // This connectivity vector will be used repeatedly instead
        // of being reconstructed inside the loop.
        std::vector<unsigned int> conn;
        for (unsigned int sc=0; sc <this->n_sub_elem(); sc++)
          {
            this->connectivity(sc, TECPLOT, conn);
            
            std::copy(conn.begin(),
                      conn.end(),
                      std::ostream_iterator<unsigned int>(out, ' '));
            
            out << ';
          }
        return;
      }

    case UCD:
      {
        for (unsigned int i=0; i<this->n_nodes(); i++)
          out << this->node(i)+1 << '	';
        
        out << ';
        return;
      }

    default:
      libmesh_error();
    }

  libmesh_error();
}
 

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!

Definition at line 1037 of file elem.h.  

Member Data Documentation

 

Elem** Elem::_children [protected, inherited]Pointers to this element's children.

Definition at line 993 of file elem.h.

Referenced by Elem::add_child(), Elem::contract(), Elem::Elem(), Elem::has_ancestor_children(), Elem::has_children(), Elem::is_ancestor_of(), Elem::make_links_to_me_remote(), Elem::refine(), Tet4::reselect_diagonal(), and Elem::~Elem().  

ReferenceCounter::Counts ReferenceCounter::_counts [static, protected, inherited]Actually holds the data.

Definition at line 110 of file reference_counter.h.

Referenced by ReferenceCounter::get_info(), ReferenceCounter::increment_constructor_count(), and ReferenceCounter::increment_destructor_count().  

ReferenceCounter::Counts ReferenceCounter::_counts [static, protected, inherited]Actually holds the data.

Definition at line 110 of file reference_counter.h.

Referenced by ReferenceCounter::get_info(), ReferenceCounter::increment_constructor_count(), and ReferenceCounter::increment_destructor_count().  

const float Quad4::_embedding_matrix [static, protected]Matrix that computes new nodal locations/solution values from current nodes/solution.

Definition at line 164 of file face_quad4.h.

Referenced by embedding_matrix().  

Threads::spin_mutex ReferenceCounter::_mutex [static, protected, inherited]Mutual exclusion object to enable thread-safe reference counting.

Definition at line 123 of file reference_counter.h.  

Threads::spin_mutex ReferenceCounter::_mutex [static, protected, inherited]Mutual exclusion object to enable thread-safe reference counting.

Definition at line 123 of file reference_counter.h.  

Threads::atomic< unsigned int > ReferenceCounter::_n_objects [static, protected, inherited]The number of objects. Print the reference count information when the number returns to 0.

Definition at line 118 of file reference_counter.h.

Referenced by ReferenceCounter::n_objects(), ReferenceCounter::ReferenceCounter(), and ReferenceCounter::~ReferenceCounter().  

Threads::atomic< unsigned int > ReferenceCounter::_n_objects [static, protected, inherited]The number of objects. Print the reference count information when the number returns to 0.

Definition at line 118 of file reference_counter.h.

Referenced by ReferenceCounter::n_objects(), ReferenceCounter::ReferenceCounter(), and ReferenceCounter::~ReferenceCounter().  

Elem** Elem::_neighbors [protected, inherited]Pointers to this element's neighbors.

Definition at line 981 of file elem.h.

Referenced by Elem::Elem(), Elem::neighbor(), Elem::set_neighbor(), and Elem::~Elem().  

Node** Elem::_nodes [protected, inherited]Pointers to the nodes we are conneted to.

Definition at line 976 of file elem.h.

Referenced by Tet4::connectivity(), Tet10::connectivity(), Pyramid5::connectivity(), Prism6::connectivity(), Prism18::connectivity(), Prism15::connectivity(), InfPrism6::connectivity(), InfPrism12::connectivity(), InfHex8::connectivity(), InfHex18::connectivity(), InfHex16::connectivity(), Hex8::connectivity(), Hex27::connectivity(), Hex20::connectivity(), Elem::Elem(), Elem::get_node(), Elem::node(), Elem::point(), Elem::set_node(), Prism6::volume(), Hex8::volume(), Elem::write_connectivity(), and Elem::~Elem().  

unsigned char 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 1017 of file elem.h.

Referenced by Elem::is_ancestor_of().  

Elem* Elem::_parent [protected, inherited]A pointer to this element's parent.

Definition at line 986 of file elem.h.

Referenced by Elem::is_ancestor_of().  

unsigned char Elem::_pflag [protected, inherited]p refinement flag. This is stored as an unsigned char to save space.

Definition at line 1006 of file elem.h.

Referenced by Elem::is_ancestor_of().  

unsigned char Elem::_rflag [protected, inherited]h refinement flag. This is stored as an unsigned char to save space.

Definition at line 999 of file elem.h.

Referenced by Elem::is_ancestor_of().  

subdomain_id_type Elem::_sbd_id [protected, inherited]The subdomain to which this element belongs.

Definition at line 1024 of file elem.h.

Referenced by Elem::subdomain_id().  

const unsigned short int Quad::_second_order_adjacent_vertices [static, inherited]Initial value:

 
{
  {0, 1}, 
  {1, 2}, 
  {2, 3}, 
  {0, 3}  
}
Matrix that tells which vertices define the location of mid-side (or second-order) nodes. Since most second-order nodes are identical for Quad8 and Quad9, we keep this matrix here in Quad

Definition at line 140 of file face_quad.h.

Referenced by Quad9::second_order_adjacent_vertex(), and Quad8::second_order_adjacent_vertex().  

const unsigned short int Quad::_second_order_vertex_child_index [static, inherited]Initial value:


{
  99,99,99,99, 
  1,2,3,3,     
  2            
}
Vector that names the child vertex index for each second order node.

Definition at line 150 of file face_quad.h.

Referenced by Quad9::second_order_child_vertex(), and Quad8::second_order_child_vertex().  

const unsigned short int Quad::_second_order_vertex_child_number [static, inherited]Initial value:


{
  99,99,99,99, 
  0,1,2,0,     
  0            
}
Vector that names a child sharing each second order node.

Definition at line 145 of file face_quad.h.

Referenced by Quad9::second_order_child_vertex(), and Quad8::second_order_child_vertex().  

const unsigned int DofObject::invalid_id = libMesh::invalid_uint [static, inherited]An invaild id to distinguish an uninitialized DofObject

Definition at line 257 of file dof_object.h.

Referenced by Node::active(), SerialMesh::add_point(), MeshRefinement::add_point(), UnstructuredMesh::all_second_order(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), DofMap::distribute_local_dofs_node_major(), DofMap::distribute_local_dofs_var_major(), DofMap::dof_indices(), DofObject::dof_number(), DofObject::DofObject(), DofObject::invalidate_dofs(), DofObject::invalidate_id(), ParallelMesh::libmesh_assert_valid_parallel_object_ids(), Node::Node(), Elem::node(), DofMap::old_dof_indices(), Elem::point(), System::read_legacy_data(), System::read_parallel_data(), DofObject::set_dof_number(), DofObject::set_n_comp(), DofObject::set_n_vars(), DofMap::set_nonlocal_dof_objects(), DofObject::valid_id(), DofMap::variable_first_local_dof(), DofMap::variable_last_local_dof(), and System::write_parallel_data().  

const unsigned short int DofObject::invalid_processor_id = static_cast<unsigned short int>(-1) [static, inherited]An invalid processor_id to distinguish DOFs that have not been assigned to a processor.

Definition at line 263 of file dof_object.h.

Referenced by ParallelMesh::add_elem(), ParallelMesh::add_node(), MeshTools::bounding_box(), MeshTools::correct_node_proc_ids(), Elem::Elem(), MeshCommunication::find_global_indices(), DofObject::invalidate_processor_id(), ParallelMesh::libmesh_assert_valid_parallel_object_ids(), ParallelMesh::n_active_elem(), MeshBase::n_elem_on_proc(), MeshBase::n_nodes_on_proc(), MeshBase::n_unpartitioned_elem(), MeshBase::n_unpartitioned_nodes(), ParallelMesh::renumber_dof_objects(), Partitioner::set_node_processor_ids(), DofMap::set_nonlocal_dof_objects(), Partitioner::set_parent_processor_ids(), Parallel::sync_dofobject_data_by_id(), Parallel::sync_dofobject_data_by_xyz(), Parallel::sync_element_data_by_parent_id(), MeshTools::total_weight(), SerialMesh::unpartitioned_elements_begin(), ParallelMesh::unpartitioned_elements_begin(), SerialMesh::unpartitioned_elements_end(), ParallelMesh::unpartitioned_elements_end(), and DofObject::valid_processor_id().  

DofObject* DofObject::old_dof_object [inherited]This object on the last mesh. Useful for projecting solutions from one mesh to another.

Definition at line 81 of file dof_object.h.

Referenced by DofObject::clear_old_dof_object(), DofMap::old_dof_indices(), DofMap::reinit(), and DofObject::set_old_dof_object().  

const unsigned int Quad4::side_nodes_map [static]Initial value:


{
  {0, 1}, 
  {1, 2}, 
  {2, 3}, 
  {3, 0}  
}
This maps the $ j^{th} $ node of the $ i^{th} $ side to element node numbers.

Definition at line 138 of file face_quad4.h.

Referenced by is_node_on_side().  

const unsigned int 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 276 of file elem.h.

Referenced by Elem::is_ancestor_of(), XdrIO::pack_element(), and XdrIO::read_serialized_connectivity().

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Public Types
Public Member Functions
Static Public Member Functions
Public Attributes
Static Public Attributes
Protected Types
Protected Member Functions
Static Protected Member Functions
Protected Attributes
Static Protected Attributes
Friends
Detailed Description
Member Typedef Documentation
typedef std::map<std::string, std::pair<unsigned int, unsigned int> > ReferenceCounter::Counts [protected, inherited]Data structure to log the information. The log is identified by the class name.
typedef std::map<std::string, std::pair<unsigned int, unsigned int> > ReferenceCounter::Counts [protected, inherited]Data structure to log the information. The log is identified by the class name.
typedef Predicates::multi_predicate Elem::Predicate [inherited]Useful iterator typedefs
Member Enumeration Documentation
enum Elem::RefinementState [inherited]Useful ENUM describing the refinement state of an element.
Constructor & Destructor Documentation
Quad4::Quad4 (Elem *p = NULL) [inline]Constructor. By default this element has no parent.
Quad4::Quad4 (const unsigned intnn, const unsigned intns, Elem *p) [inline]Constructor. Explicitly specifies the number of nodes and neighbors for which storage will be allocated.
Member Function Documentation
bool Elem::active () const [inline, inherited]Returns:
void Elem::active_family_tree (std::vector< const Elem * > &active_family, const boolreset = 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.
void Elem::active_family_tree_by_neighbor (std::vector< const Elem * > &family, const Elem *neighbor, const boolreset = true) const [inherited]Same as the active_family_tree() member, but only adds elements which are next to neighbor.
void Elem::active_family_tree_by_side (std::vector< const Elem * > &family, const unsigned intside, const boolreset = true) const [inherited]Same as the active_family_tree() member, but only adds elements which are next to side.
void 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.
void Elem::add_child (Elem *elem, unsigned intc) [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.
void DofObject::add_system () [inherited]Adds an additional system to the DofObject
bool Elem::ancestor () const [inherited]Returns:
Elem::side_iterator Elem::boundary_sides_begin () [inherited]Iterator accessor functions
Elem::side_iterator Elem::boundary_sides_end () [inherited]
AutoPtr< Elem > Elem::build (const ElemTypetype, Elem *p = NULL) [static, inherited]Build an element of type type. Since this method allocates memory the new Elem is returned in a AutoPtr<>
AutoPtr<Elem> Face::build_edge (const unsigned inti) const [inline, virtual, inherited]build_side and build_edge are identical for faces
AutoPtr< Elem > Quad4::build_side (const unsigned inti, boolproxy) const [virtual]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.
Point Elem::centroid () const [virtual, inherited]Returns:
Elem* Elem::child (const unsigned inti) const [inherited]Returns:
Elem * Elem::child_neighbor (Elem *elem) const [inline, inherited]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.
const Elem * Elem::child_neighbor (const Elem *elem) const [inline, inherited]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.
void DofObject::clear_dofs () [inline, inherited]Clear the DofMap data structures and return to a pristine state.
void DofObject::clear_old_dof_object () [inherited]Sets the old_dof_object to NULL
void Elem::coarsen () [inherited]Coarsen the element. This is not virtual since it is the same for all element types.
static unsigned int Elem::compute_key (unsigned intn0) [static, protected, inherited]Compute a key from the specified nodes.
static unsigned int Elem::compute_key (unsigned intn0, unsigned intn1) [static, protected, inherited]Compute a key from the specified nodes.
static unsigned int Elem::compute_key (unsigned intn0, unsigned intn1, unsigned intn2) [static, protected, inherited]Compute a key from the specified nodes.
static unsigned int Elem::compute_key (unsigned intn0, unsigned intn1, unsigned intn2, unsigned intn3) [static, protected, inherited]Compute a key from the specified nodes.
void Quad4::connectivity (const unsigned intsc, const IOPackageiop, std::vector< unsigned int > &conn) const [virtual]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.
bool Elem::contains_point (const Point &p) const [virtual, inherited]Returns:
bool Elem::contains_vertex_of (const Elem *e) const [inherited]This function returns true iff a vertex of e is contained in this element
void 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
Order Quad4::default_order () const [inline, virtual]Returns:
unsigned int Face::dim () const [inline, virtual, inherited]Returns:
unsigned int DofObject::dof_number (const unsigned ints, const unsigned intvar, const unsigned intcomp) const [inline, inherited]Returns:
float Quad4::embedding_matrix (const unsigned inti, const unsigned intj, const unsigned intk) const [inline, protected, virtual]Matrix used to create the elements children.
void Elem::family_tree (std::vector< const Elem * > &family, const boolreset = 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.
void Elem::family_tree_by_neighbor (std::vector< const Elem * > &family, const Elem *neighbor, const boolreset = true) const [inherited]Same as the family_tree() member, but only adds elements which are next to neighbor.
void Elem::family_tree_by_side (std::vector< const Elem * > &family, const unsigned intside, const boolreset = true) const [inherited]Same as the family_tree() member, but only adds elements which are next to side.
void Elem::family_tree_by_subneighbor (std::vector< const Elem * > &family, const Elem *neighbor, const Elem *subneighbor, const boolreset = 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)
void Elem::find_point_neighbors (std::set< const Elem * > &neighbor_set) const [inherited]This function finds all elements which touch the current element at any point
ElemType Elem::first_order_equivalent_type (const ElemTypeet) [static, inherited]Returns:
std::string ReferenceCounter::get_info () [static, inherited]Gets a string containing the reference information.
std::string ReferenceCounter::get_info () [static, inherited]Gets a string containing the reference information.
Node * Elem::get_node (const unsigned inti) const [inline, virtual, inherited]Returns:
void Elem::hack_p_level (const unsigned intp) [inherited]Sets the value of the p refinement level for the element without altering the p level of its ancestors
bool Quad4::has_affine_map () const [virtual]Returns:
bool Elem::has_ancestor_children () const [inline, inherited]Returns:
bool Elem::has_children () const [inline, inherited]Returns:
bool DofObject::has_dofs (const unsigned ints = libMesh::invalid_uint) const [inline, inherited]Returns:
bool Elem::has_neighbor (const Elem *elem) const [inline, inherited]Returns:
Real Elem::hmax () const [virtual, inherited]Returns:
Real Elem::hmin () const [virtual, inherited]Returns:
unsigned int DofObject::id () const [inline, inherited]Returns:
void 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.
void 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.
void 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.
void 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.
bool Face::infinite () const [inline, virtual, inherited]Returns:
const Elem* Elem::interior_parent () const [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.
void DofObject::invalidate () [inline, inherited]Invalidates all the indices for this DofObject
void DofObject::invalidate_dofs (const unsigned intsys_num = libMesh::invalid_uint) [inline, inherited]Sets all degree of freedom numbers to invalid_id
void DofObject::invalidate_id () [inline, inherited]Sets the id to invalid_id
void DofObject::invalidate_processor_id () [inline, inherited]Sets the processor id to invalid_processor_id
bool Elem::is_ancestor_of (const Elem *descendant) const [inline, inherited]Returns:
bool Elem::is_child_on_edge (const unsigned intc, const unsigned inte) const [virtual, inherited]Returns:
bool Quad::is_child_on_side (const unsigned intc, const unsigned ints) const [virtual, inherited]Returns:
bool Quad4::is_edge (const unsigned inti) const [virtual]Returns:
bool Quad4::is_face (const unsigned inti) const [virtual]Returns:
virtual bool Quad4::is_node_on_edge (const unsigned intn, const unsigned inte) const [inline, virtual]
bool Quad4::is_node_on_side (const unsigned intn, const unsigned ints) const [virtual]
virtual bool 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.
bool Quad4::is_vertex (const unsigned inti) const [virtual]Returns:
unsigned int Quad::key (const unsigned ints) const [virtual, inherited]Returns:
Real Elem::length (const unsigned intn1, const unsigned intn2) const [inherited]Returns:
unsigned int Elem::level () const [inherited]Returns:
void Elem::libmesh_assert_valid_neighbors () const [inherited]This function checks for consistent neighbor links at this element.
void 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.
void 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.
unsigned int Elem::max_descendant_p_level () const [inherited]Returns the maximum value of the p refinement levels of an ancestor element's descendants
unsigned int Elem::min_new_p_level_by_neighbor (const Elem *neighbor, unsigned intcurrent_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
unsigned int Elem::min_p_level_by_neighbor (const Elem *neighbor, unsigned intcurrent_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
unsigned int Quad::n_children () const [inline, virtual, inherited]Returns:
unsigned int DofObject::n_comp (const unsigned ints, const unsigned intvar) const [inline, inherited]Returns:
unsigned int DofObject::n_dofs (const unsigned ints, const unsigned intvar = libMesh::invalid_uint) const [inline, inherited]Returns:
unsigned int Quad::n_edges () const [inline, virtual, inherited]Returns:
unsigned int Face::n_faces () const [inline, virtual, inherited]Returns:
virtual unsigned int Elem::n_neighbors () const [inline, virtual, inherited]Returns:
unsigned int Quad::n_nodes () const [inline, virtual, inherited]Returns:
static unsigned int ReferenceCounter::n_objects () [inline, static, inherited]Prints the number of outstanding (created, but not yet destroyed) objects.
static unsigned int ReferenceCounter::n_objects () [inline, static, inherited]Prints the number of outstanding (created, but not yet destroyed) objects.
unsigned int Elem::n_second_order_adjacent_vertices (const unsigned intn) const [virtual, inherited]Returns:
unsigned int Quad::n_sides () const [inline, virtual, inherited]Returns:
unsigned int Quad4::n_sub_elem () const [inline, virtual]Returns:
unsigned int DofObject::n_systems () const [inline, inherited]Returns:
unsigned int DofObject::n_vars (const unsigned ints) const [inline, inherited]Returns:
unsigned int Quad::n_vertices () const [inline, virtual, inherited]Returns:
Elem * Elem::neighbor (const unsigned inti) const [inline, inherited]Returns:
unsigned int Elem::node (const unsigned inti) const [inline, virtual, inherited]Returns:
void Elem::nullify_neighbors () [protected, inherited]Replaces this element with NULL for all of its neighbors. This is useful when deleting an element.
bool Elem::on_boundary () const [inline, inherited]Returns:
bool Elem::operator== (const DofObject &rhs) const [virtual, inherited]Returns:
virtual Point Elem::origin () const [inline, virtual, inherited]Returns:
unsigned int Elem::p_level () const [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
RefinementState Elem::p_refinement_flag () const [inherited]Returns the value of the p refinement flag for the element.
Elem* Elem::parent () [inherited]Returns:
const Elem* Elem::parent () const [inherited]Returns:
Point & Elem::point (const unsigned inti) [inline, virtual, inherited]Returns:
const Point & Elem::point (const unsigned inti) const [inline, virtual, inherited]Returns:
void ReferenceCounter::print_info () [static, inherited]Prints the reference information to std::cout.
void ReferenceCounter::print_info () [static, inherited]Prints the reference information to std::cout.
unsigned short int DofObject::processor_id () const [inline, inherited]Returns:
unsigned short int & DofObject::processor_id () [inline, inherited]Returns:
void DofObject::processor_id (const unsigned intid) [inline, inherited]Sets the processor_id for this DofObject.
std::pair< Real, Real > Quad::qual_bounds (const ElemQualityq) const [virtual, inherited]Returns the suggested quality bounds for the hex based on quality measure q. These are the values suggested by the CUBIT User's Manual.
Real Quad::quality (const ElemQualityq) const [virtual, inherited]Based on the quality metric q specified by the user, returns a quantitative assessment of element quality.
void Elem::refine (MeshRefinement &mesh_refinement) [virtual, inherited]Refine the element.
RefinementState Elem::refinement_flag () const [inherited]Returns the value of the refinement flag for the element.
unsigned short int Elem::second_order_adjacent_vertex (const unsigned intn, const unsigned intv) const [virtual, inherited]Returns:
std::pair< unsigned short int, unsigned short int > Elem::second_order_child_vertex (const unsigned intn) const [virtual, inherited]Returns:
ElemType Elem::second_order_equivalent_type (const ElemTypeet, const boolfull_ordered = true) [static, inherited]Returns:
void DofObject::set_dof_number (const unsigned ints, const unsigned intvar, const unsigned intcomp, const unsigned intdn) [inherited]Sets the global degree of freedom number variable var, component comp for system s associated with this DofObject
unsigned int & DofObject::set_id () [inline, inherited]Returns:
void DofObject::set_id (const unsigned intid) [inline, inherited]Sets the id for this DofObject
void DofObject::set_n_comp (const unsigned ints, const unsigned intvar, const unsigned intncomp) [inherited]Sets the number of components for variable var of system s associated with this DofObject
void DofObject::set_n_systems (const unsigned ints) [inherited]Sets the number of systems for this DofObject
void DofObject::set_n_vars (const unsigned ints, const unsigned intnvars) [inherited]Sets number of variables associated with system s for this DofObject
void Elem::set_neighbor (const unsigned inti, Elem *n) [inline, inherited]Assigns n as the $ i^{th} $ neighbor.
Node *& Elem::set_node (const unsigned inti) [inline, virtual, inherited]Returns:
void DofObject::set_old_dof_object () [inherited]Sets the old_dof_object to a copy of this
void Elem::set_p_level (const unsigned intp) [inherited]Sets the value of the p refinement level for the element Note that the maximum p refinement level is currently 255
void Elem::set_p_refinement_flag (const RefinementStatepflag) [inherited]Sets the value of the p refinement flag for the element.
void Elem::set_parent (Elem *p) [inherited]the pointer to the element's parent. Dangerous to use in high-level code.
void Elem::set_refinement_flag (const RefinementStaterflag) [inherited]Sets the value of the refinement flag for the element.
AutoPtr< DofObject > Quad::side (const unsigned inti) const [virtual, inherited]Returns:
bool Elem::subactive () const [inline, inherited]Returns:
subdomain_id_type Elem::subdomain_id () const [inline, inherited]Returns:
subdomain_id_type & Elem::subdomain_id () [inline, inherited]Returns:
const Elem* Elem::top_parent () const [inherited]Returns:
ElemType Quad4::type () const [inline, virtual]Returns:
bool DofObject::valid_id () const [inline, inherited]Returns:
bool DofObject::valid_processor_id () const [inline, inherited]Returns:
Real Quad4::volume () const [virtual]An optimized method for computing the area of a 4-node quad with straight sides, but not necessarily a parallelogram.
unsigned int Elem::which_child_am_i (const Elem *e) const [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;
unsigned int 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;
void Elem::write_connectivity (std::ostream &out, const IOPackageiop) 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.
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.
Member Data Documentation
Elem** Elem::_children [protected, inherited]Pointers to this element's children.
ReferenceCounter::Counts ReferenceCounter::_counts [static, protected, inherited]Actually holds the data.
ReferenceCounter::Counts ReferenceCounter::_counts [static, protected, inherited]Actually holds the data.
const float Quad4::_embedding_matrix [static, protected]Matrix that computes new nodal locations/solution values from current nodes/solution.
Threads::spin_mutex ReferenceCounter::_mutex [static, protected, inherited]Mutual exclusion object to enable thread-safe reference counting.
Threads::spin_mutex ReferenceCounter::_mutex [static, protected, inherited]Mutual exclusion object to enable thread-safe reference counting.
Threads::atomic< unsigned int > ReferenceCounter::_n_objects [static, protected, inherited]The number of objects. Print the reference count information when the number returns to 0.
Threads::atomic< unsigned int > ReferenceCounter::_n_objects [static, protected, inherited]The number of objects. Print the reference count information when the number returns to 0.
Elem** Elem::_neighbors [protected, inherited]Pointers to this element's neighbors.
Node** Elem::_nodes [protected, inherited]Pointers to the nodes we are conneted to.
unsigned char 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.
Elem* Elem::_parent [protected, inherited]A pointer to this element's parent.
unsigned char Elem::_pflag [protected, inherited]p refinement flag. This is stored as an unsigned char to save space.
unsigned char Elem::_rflag [protected, inherited]h refinement flag. This is stored as an unsigned char to save space.
subdomain_id_type Elem::_sbd_id [protected, inherited]The subdomain to which this element belongs.
const unsigned short int Quad::_second_order_adjacent_vertices [static, inherited]Initial value:
const unsigned short int Quad::_second_order_vertex_child_index [static, inherited]Initial value:
const unsigned short int Quad::_second_order_vertex_child_number [static, inherited]Initial value:
const unsigned int DofObject::invalid_id = libMesh::invalid_uint [static, inherited]An invaild id to distinguish an uninitialized DofObject
const unsigned short int DofObject::invalid_processor_id = static_cast<unsigned short int>(-1) [static, inherited]An invalid processor_id to distinguish DOFs that have not been assigned to a processor.
DofObject* DofObject::old_dof_object [inherited]This object on the last mesh. Useful for projecting solutions from one mesh to another.
const unsigned int Quad4::side_nodes_map [static]Initial value:
const unsigned int 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.
Author

This document was created by man2html, using the manual pages.
Time: 21:53:47 GMT, April 16, 2011