SpECTRE  v2024.09.29
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
HypercubeElement< ElementDim, HypercubeDim > Struct Template Reference

An element of dimension ElementDim on the boundary of a hypercube of dimension HypercubeDim More...

#include <Hypercube.hpp>

Public Member Functions

 HypercubeElement (std::array< size_t, ElementDim > dimensions_in_parent, std::array< Side, HypercubeDim - ElementDim > index)
 
template<size_t LocalElementDim = ElementDim, Requires< LocalElementDim==0 > = nullptr>
 HypercubeElement (std::array< Side, HypercubeDim > index)
 
template<typename... Indices, size_t LocalElementDim = ElementDim, size_t LocalHypercubeDim = HypercubeDim, Requires<(LocalElementDim==0 and LocalHypercubeDim > 0 and sizeof...(Indices)==LocalHypercubeDim)> = nullptr>
 HypercubeElement (Indices... indices)
 
template<size_t LocalElementDim = ElementDim, Requires< LocalElementDim==1 > = nullptr>
 HypercubeElement (size_t dim_in_parent, std::array< Side, HypercubeDim - 1 > index)
 
bool operator== (const HypercubeElement &rhs) const
 
bool operator!= (const HypercubeElement &rhs) const
 
const std::array< size_t, ElementDim > & dimensions_in_parent () const
 The parent hypercube's dimensions that this element shares.
 
template<size_t LocalElementDim = ElementDim, Requires< LocalElementDim==1 > = nullptr>
size_t dimension_in_parent () const
 The parent hypercube's dimensions that this element shares.
 
const std::array< Side, HypercubeDim - ElementDim > & index () const
 Whether this element is located on the lower or upper side in those dimensions that it does not share with its parent hypercube.
 
const Sideside_in_parent_dimension (size_t d) const
 Whether this element is located on the lower or upper side in those dimensions that it does not share with its parent hypercube.
 
template<size_t NumIndices = HypercubeDim - ElementDim, Requires< NumIndices==1 > = nullptr>
const Sideside () const
 Whether this element is located on the lower or upper side in those dimensions that it does not share with its parent hypercube.
 

Detailed Description

template<size_t ElementDim, size_t HypercubeDim>
struct HypercubeElement< ElementDim, HypercubeDim >

An element of dimension ElementDim on the boundary of a hypercube of dimension HypercubeDim

A hypercube of dimension n (HypercubeDim) is composed of 2nk(nk) elements of dimension kn (ElementDim). For example, a 3D cube has 8 vertices ( k=0), 12 edges ( k=1), 6 faces ( k=2) and 1 cell ( k=3). Each element is identified by the k dimensions it shares with the parent hypercube and nk indices that specify whether it is located on the lower or upper side of the parent hypercube's remaining dimensions.


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