libMesh::PeriodicBoundaries Class Reference

#include <periodic_boundaries.h>

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

libMesh::PeriodicBoundaries::PeriodicBoundaries (  )  [inline]

Definition at line 55 of file periodic_boundaries.h.

00055 {}

libMesh::PeriodicBoundaries::~PeriodicBoundaries (  ) 

Definition at line 34 of file periodic_boundaries.C.

References end.

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


Member Function Documentation

const PeriodicBoundaryBase * libMesh::PeriodicBoundaries::boundary ( boundary_id_type  id  )  const

Definition at line 52 of file periodic_boundaries.C.

References end.

00053 {
00054   const_iterator i = this->find(id);
00055   if (i == this->end())
00056     return NULL;
00057   return i->second;
00058 }

PeriodicBoundaryBase * libMesh::PeriodicBoundaries::boundary ( boundary_id_type  id  ) 

Definition at line 42 of file periodic_boundaries.C.

References end.

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

00043 {
00044   iterator i = this->find(id);
00045   if (i == this->end())
00046     return NULL;
00047   return i->second;
00048 }

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(), and libMesh::PeriodicBoundaryBase::get_corresponding_pos().

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

00067 {
00068   // Find a point on that side (and only that side)
00069 
00070   Point p = e->build_side(side)->centroid();
00071 
00072   const PeriodicBoundaryBase *b = this->boundary(boundary_id);
00073   libmesh_assert (b);
00074   p = b->get_corresponding_pos(p);
00075 
00076   return point_locator.operator()(p);
00077 }


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

Site Created By: libMesh Developers
Last modified: February 05 2013 19:55:33 UTC

Hosted By:
SourceForge.net Logo