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

◆ OrderWrapper() [1/2]

libMesh::OrderWrapper::OrderWrapper ( Order  order)
inline

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  {}

◆ OrderWrapper() [2/2]

libMesh::OrderWrapper::OrderWrapper ( int  order)
inline

Constructor.

Enables implicit conversion from an int to an OrderWrapper.

Definition at line 61 of file fe_type.h.

61  :
62  _order(order)
63  {}

Member Function Documentation

◆ get_order()

int libMesh::OrderWrapper::get_order ( ) const
inline

◆ operator Order()

libMesh::OrderWrapper::operator Order ( ) const
inline

Operator that enables implicit conversion to an Order enum.

Definition at line 69 of file fe_type.h.

70  {
71  return static_cast<Order>(_order);
72  }

References _order.

Member Data Documentation

◆ _order

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:
libMesh::OrderWrapper::_order
int _order
The approximation order of the element.
Definition: fe_type.h:87