libMesh::OrderWrapper Class Reference

#include <fe_type.h>

Public Member Functions

 OrderWrapper (Order order)
 
 OrderWrapper (int order)
 
 operator Order () const
 
int get_order () const
 

Private Attributes

int _order
 

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 46 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 54 of file fe_type.h.

54  :
55  _order(static_cast<int>(order))
56  {}

◆ OrderWrapper() [2/2]

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

Constructor. Enables implicit conversion from an int to an OrderWrapper.

Definition at line 62 of file fe_type.h.

62  :
63  _order(order)
64  {}

Member Function Documentation

◆ get_order()

◆ operator Order()

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

Operator that enables implicit conversion to an Order enum.

Definition at line 70 of file fe_type.h.

References _order.

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

Member Data Documentation

◆ _order

int libMesh::OrderWrapper::_order
private

The approximation order of the element.

Definition at line 88 of file fe_type.h.

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


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