libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::OrderWrapper Class Reference

This provides a shim class that wraps the Order enum. More...

#include <fe_type.h>

Public Member Functions

 OrderWrapper (Order order)
 Constructor. More...
 
 OrderWrapper (int order)
 Constructor. More...
 
 operator Order () const
 Operator that enables implicit conversion to an Order enum. More...
 
int get_order () const
 Explicitly request the order as an int. More...
 

Private Attributes

int _order
 The approximation order of the element. More...
 

Detailed Description

This provides a shim class that wraps the Order enum.

The purpose of this is to store the order as an int instead of an enum (to enable higher orders) while retaining backwards compatibility.

Definition at line 45 of file fe_type.h.

Constructor & Destructor Documentation

libMesh::OrderWrapper::OrderWrapper ( Order  order)

Constructor.

Enables implicit conversion from an Order enum to an OrderWrapper.

Definition at line 53 of file fe_type.h.

53  :
54  _order(static_cast<int>(order))
55  {}
int _order
The approximation order of the element.
Definition: fe_type.h:87
libMesh::OrderWrapper::OrderWrapper ( int  order)

Constructor.

Enables implicit conversion from an int to an OrderWrapper.

Definition at line 61 of file fe_type.h.

61  :
62  _order(order)
63  {}
int _order
The approximation order of the element.
Definition: fe_type.h:87

Member Function Documentation

int libMesh::OrderWrapper::get_order ( ) const
libMesh::OrderWrapper::operator Order ( ) const

Operator that enables implicit conversion to an Order enum.

Definition at line 69 of file fe_type.h.

References _order.

70  {
71  return static_cast<Order>(_order);
72  }
int _order
The approximation order of the element.
Definition: fe_type.h:87
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32

Member Data Documentation

int libMesh::OrderWrapper::_order
private

The approximation order of the element.

Definition at line 87 of file fe_type.h.

Referenced by get_order(), and operator Order().


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