moab
moab::AdjSides< CORNERS > Class Template Reference

List of all members.

Classes

struct  Side

Public Types

typedef std::vector< Side >
::iterator 
iterator
typedef std::vector< Side >
::const_iterator 
const_iterator

Public Member Functions

const_iterator begin () const
const_iterator end () const
void clear ()
bool empty () const
 AdjSides ()
size_t num_skin () const
void insert (const EntityHandle *handles, int skip_idx, EntityHandle adj_elem, unsigned short elem_side)
 insert side, specifying side connectivity
void insert (const EntityHandle *handles, int skip_idx, EntityHandle adj_elem, unsigned short elem_side, const short *indices)
 insert side, specifying list of indices into parent element connectivity.
bool find_and_unmark (const EntityHandle *other, int skip_index, EntityHandle &elem_out)
 Search list for a given side, and if found, mark as not skin.

Private Attributes

std::vector< Sidedata
 List of sides.
size_t skin_count
 Cached count of sides that are skin.

Detailed Description

template<unsigned CORNERS>
class moab::AdjSides< CORNERS >

Definition at line 1187 of file Skinner.cpp.


Member Typedef Documentation

template<unsigned CORNERS>
typedef std::vector<Side>::const_iterator moab::AdjSides< CORNERS >::const_iterator

Definition at line 1298 of file Skinner.cpp.

template<unsigned CORNERS>
typedef std::vector<Side>::iterator moab::AdjSides< CORNERS >::iterator

Definition at line 1297 of file Skinner.cpp.


Constructor & Destructor Documentation

template<unsigned CORNERS>
moab::AdjSides< CORNERS >::AdjSides ( ) [inline]

Definition at line 1305 of file Skinner.cpp.

: skin_count(0) {}

Member Function Documentation

template<unsigned CORNERS>
const_iterator moab::AdjSides< CORNERS >::begin ( ) const [inline]

Definition at line 1299 of file Skinner.cpp.

{ return data.begin(); }
template<unsigned CORNERS>
void moab::AdjSides< CORNERS >::clear ( ) [inline]

Definition at line 1302 of file Skinner.cpp.

{ data.clear(); skin_count = 0; }
template<unsigned CORNERS>
bool moab::AdjSides< CORNERS >::empty ( ) const [inline]

Definition at line 1303 of file Skinner.cpp.

{ return data.empty(); }
template<unsigned CORNERS>
const_iterator moab::AdjSides< CORNERS >::end ( ) const [inline]

Definition at line 1300 of file Skinner.cpp.

{ return data.end(); }
template<unsigned CORNERS>
bool moab::AdjSides< CORNERS >::find_and_unmark ( const EntityHandle other,
int  skip_index,
EntityHandle elem_out 
) [inline]

Search list for a given side, and if found, mark as not skin.

Parameters:
otherConnectivity of side
skip_indexIndex in 'other' at which implicit vertex occurs.
elem_outIf return value is true, the element that the side is a side of. If return value is false, not set.
Returns:
true if found and marked not-skin, false if not found.

Given the connectivity of some existing element, check if it occurs in the list. If it does, clear the "is skin" state of the side so that we know that we don't need to later create the side element.

Definition at line 1380 of file Skinner.cpp.

  {
    Side s( other, skip_index, 0, 0 );
    iterator p = std::find( data.begin(), data.end(), s );
    if (p == data.end() || !p->adj_elem)
      return false;
    else {
      elem_out = p->adj_elem;
      p->adj_elem = 0; // clear "is skin" state for side
      --skin_count;    // decrement cached count of skin sides
      return true;
    }
  }
template<unsigned CORNERS>
void moab::AdjSides< CORNERS >::insert ( const EntityHandle handles,
int  skip_idx,
EntityHandle  adj_elem,
unsigned short  elem_side 
) [inline]

insert side, specifying side connectivity

Either insert a new side, or if the side is already in the list, mark it as not on the skin.

Parameters:
handlesThe connectivity of the element side.
skip_idxThe index of the implicit vertex (contained in all sides in the list.)
adj_elemThe element that this is a side of.
elem_sideWhich side of adj_elem are we storing (CN side number.)

Definition at line 1321 of file Skinner.cpp.

  {
    Side side( handles, skip_idx, adj_elem, elem_side );
    iterator p = std::find( data.begin(), data.end(), side );
    if (p == data.end()) {
      data.push_back( side );
      ++skin_count; // not in list yet, so skin side (so far)
    }
    else if (p->adj_elem) {
      p->adj_elem = 0; // mark as not on skin
      --skin_count; // decrement cached count of skin elements
    }
  }
template<unsigned CORNERS>
void moab::AdjSides< CORNERS >::insert ( const EntityHandle handles,
int  skip_idx,
EntityHandle  adj_elem,
unsigned short  elem_side,
const short *  indices 
) [inline]

insert side, specifying list of indices into parent element connectivity.

Either insert a new side, or if the side is already in the list, mark it as not on the skin.

Parameters:
handlesThe connectivity of the parent element
skip_idxThe index of the implicit vertex (contained in all sides in the list.) This is an index into 'indices', not 'handles'.
adj_elemThe element that this is a side of (parent handle).
indicesThe indices into 'handles' at which the vertices representing the side occur.
elem_sideWhich side of adj_elem are we storing (CN side number.)

Definition at line 1352 of file Skinner.cpp.

  {
    Side side( handles, skip_idx, adj_elem, elem_side, indices );
    iterator p = std::find( data.begin(), data.end(), side );
    if (p == data.end()) {
      data.push_back( side );
      ++skin_count; // not in list yet, so skin side (so far)
    }
    else if (p->adj_elem) {
      p->adj_elem = 0; // mark as not on skin
      --skin_count; // decrement cached count of skin elements
    }
  }
template<unsigned CORNERS>
size_t moab::AdjSides< CORNERS >::num_skin ( ) const [inline]

Definition at line 1307 of file Skinner.cpp.

{ return skin_count; }

Member Data Documentation

template<unsigned CORNERS>
std::vector<Side> moab::AdjSides< CORNERS >::data [private]

List of sides.

Definition at line 1292 of file Skinner.cpp.

template<unsigned CORNERS>
size_t moab::AdjSides< CORNERS >::skin_count [private]

Cached count of sides that are skin.

Definition at line 1293 of file Skinner.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines