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

Constructor & Destructor Documentation

◆ OrderWrapper() [1/2]

libMesh::OrderWrapper::OrderWrapper ( Order  order)

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  {}
int _order
The approximation order of the element.
Definition: fe_type.h:88

◆ OrderWrapper() [2/2]

libMesh::OrderWrapper::OrderWrapper ( int  order)

Constructor.

Enables implicit conversion from an int to an OrderWrapper.

Definition at line 62 of file fe_type.h.

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

Member Function Documentation

◆ get_order()

int libMesh::OrderWrapper::get_order ( ) const

Explicitly request the order as an int.

Definition at line 78 of file fe_type.h.

References _order.

Referenced by libMesh::FEType::default_quadrature_order(), libMesh::Variable::n_components(), libMesh::operator<(), libMesh::operator<<(), libMesh::operator==(), and libMesh::OrderWrapperOperators().

79  {
80  return _order;
81  }
int _order
The approximation order of the element.
Definition: fe_type.h:88

◆ operator Order()

libMesh::OrderWrapper::operator Order ( ) const

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  }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
int _order
The approximation order of the element.
Definition: fe_type.h:88

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: