$extrastylesheet
libMesh::PeriodicBoundaries Class Reference

#include <periodic_boundaries.h>

Inheritance diagram for libMesh::PeriodicBoundaries:

List of all members.

Public Member Functions

PeriodicBoundaryBaseboundary (boundary_id_type id)
const PeriodicBoundaryBaseboundary (boundary_id_type id) const
 PeriodicBoundaries ()
 ~PeriodicBoundaries ()
const Elemneighbor (boundary_id_type boundary_id, const PointLocatorBase &point_locator, const Elem *e, unsigned int side) const

Detailed Description

We're using a class instead of a typedef to allow forward declarations and future flexibility. Note that std::map has no virtual destructor, so downcasting here would be dangerous.

Definition at line 48 of file periodic_boundaries.h.


Constructor & Destructor Documentation

Definition at line 55 of file periodic_boundaries.h.

{}

Definition at line 34 of file periodic_boundaries.C.

References end.

{
  for (std::map<boundary_id_type, PeriodicBoundaryBase*>::iterator it = begin(); it != end(); ++it)
    delete it->second;
}

Member Function Documentation

Definition at line 52 of file periodic_boundaries.C.

References end.

{
  const_iterator i = this->find(id);
  if (i == this->end())
    return NULL;
  return i->second;
}
const Elem * libMesh::PeriodicBoundaries::neighbor ( boundary_id_type  boundary_id,
const PointLocatorBase point_locator,
const Elem e,
unsigned int  side 
) const

Definition at line 63 of file periodic_boundaries.C.

References boundary(), libMesh::Elem::build_side(), libMesh::PeriodicBoundaryBase::get_corresponding_pos(), and libMesh::libmesh_assert().

Referenced by libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), and libMesh::Elem::topological_neighbor().

{
  // Find a point on that side (and only that side)

  Point p = e->build_side(side)->centroid();

  const PeriodicBoundaryBase *b = this->boundary(boundary_id);
  libmesh_assert (b);
  p = b->get_corresponding_pos(p);

  return point_locator.operator()(p);
}

The documentation for this class was generated from the following files: