libMesh::PeriodicBoundary Class Reference

#include <periodic_boundary.h>

Inheritance diagram for libMesh::PeriodicBoundary:

Public Types

enum  TransformationType { FORWARD =0, INVERSE =1 }

Public Member Functions

 PeriodicBoundary ()
virtual ~PeriodicBoundary ()
 PeriodicBoundary (const PeriodicBoundary &o, TransformationType t=FORWARD)
 PeriodicBoundary (const RealVectorValue &vector)
virtual Point get_corresponding_pos (const Point &pt) const
virtual AutoPtr
< PeriodicBoundaryBase
clone (TransformationType t=FORWARD) const
void set_variable (unsigned int var)
void merge (const PeriodicBoundaryBase &pb)
bool is_my_variable (unsigned int var_num) const

Public Attributes

boundary_id_type myboundary
boundary_id_type pairedboundary

Protected Attributes

RealVectorValue translation_vector
std::set< unsigned int > variables

Detailed Description

The definition of a periodic boundary.

Definition at line 40 of file periodic_boundary.h.

Member Enumeration Documentation


Definition at line 46 of file periodic_boundary_base.h.

47  { FORWARD=0,
48  INVERSE=1 };

Constructor & Destructor Documentation

libMesh::PeriodicBoundary::PeriodicBoundary ( )


Definition at line 32 of file periodic_boundary.C.

Referenced by clone().

32  :
35 {
36 }
virtual libMesh::PeriodicBoundary::~PeriodicBoundary ( )


Definition at line 51 of file periodic_boundary.h.

51 {}
libMesh::PeriodicBoundary::PeriodicBoundary ( const PeriodicBoundary o,
TransformationType  t = FORWARD 

Copy constructor, with option for the copy to represent an inverse transformation.

Definition at line 41 of file periodic_boundary.C.

References libMesh::PeriodicBoundaryBase::INVERSE, libMesh::PeriodicBoundaryBase::myboundary, libMesh::PeriodicBoundaryBase::pairedboundary, swap(), and translation_vector.

41  :
43  translation_vector(o.translation_vector)
44 {
45  if (t == INVERSE)
46  {
48  translation_vector *= -1.0;
49  }
50 }
libMesh::PeriodicBoundary::PeriodicBoundary ( const RealVectorValue vector)

Constructor taking a reference to the translation vector.

Definition at line 54 of file periodic_boundary.C.

54  :
56  translation_vector(vector)
57 {
58 }

Member Function Documentation

AutoPtr< PeriodicBoundaryBase > libMesh::PeriodicBoundary::clone ( TransformationType  t = FORWARD) const

If we want the DofMap to be able to make copies of references and store them in the underlying map, this class must be clone'able, i.e. have a kind of virtual construction mechanism.

Implements libMesh::PeriodicBoundaryBase.

Definition at line 69 of file periodic_boundary.C.

References PeriodicBoundary().

70 {
71  return AutoPtr<PeriodicBoundaryBase>(new PeriodicBoundary(*this, t));
72 }
Point libMesh::PeriodicBoundary::get_corresponding_pos ( const Point pt) const

This function should be overloaded by derived classes to define how one finds corresponding nodes on the periodic boundary pair.

Implements libMesh::PeriodicBoundaryBase.

Definition at line 62 of file periodic_boundary.C.

References translation_vector.

63 {
64  return pt + translation_vector;
65 }
bool libMesh::PeriodicBoundaryBase::is_my_variable ( unsigned int  var_num) const

Definition at line 63 of file periodic_boundary_base.C.

References libMesh::PeriodicBoundaryBase::variables.

Referenced by libMesh::FEGenericBase< T >::compute_periodic_constraints().

64 {
65  bool a = variables.empty() || (!variables.empty() && variables.find(var_num) != variables.end());
66  return a;
67 }
void libMesh::PeriodicBoundaryBase::merge ( const PeriodicBoundaryBase pb)

Definition at line 56 of file periodic_boundary_base.C.

References libMesh::PeriodicBoundaryBase::variables.

Referenced by libMesh::DofMap::add_periodic_boundary().

57 {
58  variables.insert(pb.variables.begin(), pb.variables.end());
59 }
void libMesh::PeriodicBoundaryBase::set_variable ( unsigned int  var)

Definition at line 49 of file periodic_boundary_base.C.

References libMesh::PeriodicBoundaryBase::variables.

50 {
51  variables.insert(var);
52 }

Member Data Documentation

boundary_id_type libMesh::PeriodicBoundaryBase::myboundary

The boundary ID of this boundary and its counterpart

Definition at line 53 of file periodic_boundary_base.h.

Referenced by libMesh::DofMap::add_periodic_boundary(), and PeriodicBoundary().

RealVectorValue libMesh::PeriodicBoundary::translation_vector

Definition at line 83 of file periodic_boundary.h.

Referenced by get_corresponding_pos(), and PeriodicBoundary().

std::set<unsigned int> libMesh::PeriodicBoundaryBase::variables

Set of variables for this periodic boundary, empty means all variables possible

Definition at line 101 of file periodic_boundary_base.h.

Referenced by libMesh::PeriodicBoundaryBase::is_my_variable(), libMesh::PeriodicBoundaryBase::merge(), and libMesh::PeriodicBoundaryBase::set_variable().

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

Site Created By: libMesh Developers
Last modified: February 07 2014 16:58:01 UTC

Hosted By: Logo