libMesh::PeriodicBoundaryBase Class Referenceabstract

#include <periodic_boundary_base.h>

Inheritance diagram for libMesh::PeriodicBoundaryBase:

Public Types

enum  TransformationType { FORWARD =0, INVERSE =1 }
 

Public Member Functions

 PeriodicBoundaryBase ()
 
 PeriodicBoundaryBase (const PeriodicBoundaryBase &other)
 
virtual ~PeriodicBoundaryBase ()
 
virtual Point get_corresponding_pos (const Point &pt) const =0
 
virtual AutoPtr
< PeriodicBoundaryBase
clone (TransformationType t=FORWARD) const =0
 
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

std::set< unsigned int > variables
 

Detailed Description

The base class for defining periodic boundaries.

Definition at line 43 of file periodic_boundary_base.h.

Member Enumeration Documentation

Enumerator
FORWARD 
INVERSE 

Definition at line 46 of file periodic_boundary_base.h.

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

Constructor & Destructor Documentation

libMesh::PeriodicBoundaryBase::PeriodicBoundaryBase ( )

Constructor

Definition at line 32 of file periodic_boundary_base.C.

libMesh::PeriodicBoundaryBase::PeriodicBoundaryBase ( const PeriodicBoundaryBase other)

Copy constructor

Definition at line 40 of file periodic_boundary_base.C.

40  :
41  myboundary(o.myboundary),
42  pairedboundary(o.pairedboundary),
43  variables(o.variables)
44 {
45 }
virtual libMesh::PeriodicBoundaryBase::~PeriodicBoundaryBase ( )
inlinevirtual

Destructor

Definition at line 68 of file periodic_boundary_base.h.

68 {}

Member Function Documentation

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

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. The user can also pass a flag to enable an 'inverse transformation' to be cloned from a forward transformation. Note that not every transformation needs to provide an automatic way to clone an inverse: you can simply add a pair of PeriodicBoundaryBase objects using the appropriate DofMap interface instead. The simplest way to implement a clone function like this is in terms of a copy constructor, see periodic_boundary.h.

Implemented in libMesh::PeriodicBoundary.

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

virtual Point libMesh::PeriodicBoundaryBase::get_corresponding_pos ( const Point pt) const
pure virtual

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

Implemented in libMesh::PeriodicBoundary.

Referenced by libMesh::FEGenericBase< T >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), and libMesh::PeriodicBoundaries::neighbor().

bool libMesh::PeriodicBoundaryBase::is_my_variable ( unsigned int  var_num) const

Definition at line 63 of file periodic_boundary_base.C.

References 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 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 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 libMesh::PeriodicBoundary::PeriodicBoundary().

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

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

Definition at line 101 of file periodic_boundary_base.h.

Referenced by is_my_variable(), merge(), and 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:
SourceForge.net Logo