$extrastylesheet
#include <periodic_boundaries.h>

Public Member Functions | |
| PeriodicBoundaryBase * | boundary (boundary_id_type id) |
| const PeriodicBoundaryBase * | boundary (boundary_id_type id) const |
| PeriodicBoundaries () | |
| ~PeriodicBoundaries () | |
| const Elem * | neighbor (boundary_id_type boundary_id, const PointLocatorBase &point_locator, const Elem *e, unsigned int side) const |
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.
| libMesh::PeriodicBoundaries::PeriodicBoundaries | ( | ) | [inline] |
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;
}
Definition at line 42 of file periodic_boundaries.C.
References end.
Referenced by libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), neighbor(), and libMesh::Elem::topological_neighbor().
{
iterator i = this->find(id);
if (i == this->end())
return NULL;
return i->second;
}
| const PeriodicBoundaryBase * libMesh::PeriodicBoundaries::boundary | ( | boundary_id_type | id | ) | const |
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);
}