ElemRestriction

LibCEED.create_elem_restrictionFunction
create_elem_restriction(
    ceed::Ceed,
    nelem,
    elemsize,
    ncomp,
    compstride,
    lsize,
    offsets::AbstractArray{CeedInt},
    mtype::MemType=MEM_HOST,
    cmode::CopyMode=COPY_VALUES,
)

Create a CeedElemRestriction.

Zero-based indexing

In the below notation, we are using 0-based indexing. libCEED expects the offset indices to be 0-based.

Arguments:

  • ceed: The Ceed object
  • nelem: Number of elements described in the offsets array
  • elemsize: Size (number of "nodes") per element
  • ncomp: Number of field components per interpolation node (1 for scalar fields)
  • compstride: Stride between components for the same L-vector "node". Data for node $i$, component $j$, element $k$ can be found in the L-vector at index offsets[i + k*elemsize] + j*compstride.
  • lsize: The size of the L-vector. This vector may be larger than the elements and fields given by this restriction.
  • offsets: Array of shape (elemsize, nelem). Column $i$ holds the ordered list of the offsets (into the input CeedVector) for the unknowns corresponding to element $i$, where $0 \leq i < \textit{nelem}$. All offsets must be in the range $[0, \textit{lsize} - 1]$.
  • mtype: Memory type of the offsets array, see MemType
  • cmode: Copy mode for the offsets array, see CopyMode
source
Missing docstring.

Missing docstring for create_elem_restriction. Check Documenter's build log for details.

LibCEED.create_elem_restriction_orientedFunction
create_elem_restriction_oriented(
    ceed::Ceed,
    nelem,
    elemsize,
    ncomp,
    compstride,
    lsize,
    offsets::AbstractArray{CeedInt},
    orients::AbstractArray{Bool},
    mtype::MemType=MEM_HOST,
    cmode::CopyMode=COPY_VALUES,
)

Create an oriented CeedElemRestriction.

Zero-based indexing

In the below notation, we are using 0-based indexing. libCEED expects the offset indices to be 0-based.

Arguments:

  • ceed: The Ceed object
  • nelem: Number of elements described in the offsets array
  • elemsize: Size (number of "nodes") per element
  • ncomp: Number of field components per interpolation node (1 for scalar fields)
  • compstride: Stride between components for the same L-vector "node". Data for node $i$, component $j$, element $k$ can be found in the L-vector at index offsets[i + k*elemsize] + j*compstride.
  • lsize: The size of the L-vector. This vector may be larger than the elements and fields given by this restriction.
  • offsets: Array of shape (elemsize, nelem). Column $i$ holds the ordered list of the offsets (into the input CeedVector) for the unknowns corresponding to element $i$, where $0 \leq i < \textit{nelem}$. All offsets must be in the range $[0, \textit{lsize} - 1]$.
  • orients: Array of shape (elemsize, nelem) with bool false for positively oriented and true to flip the orientation.
  • mtype: Memory type of the offsets array, see MemType
  • cmode: Copy mode for the offsets array, see CopyMode
source
LibCEED.create_elem_restriction_curl_orientedFunction
create_elem_restriction_curl_oriented(
    ceed::Ceed,
    nelem,
    elemsize,
    ncomp,
    compstride,
    lsize,
    offsets::AbstractArray{CeedInt},
    curlorients::AbstractArray{CeedInt},
    mtype::MemType=MEM_HOST,
    cmode::CopyMode=COPY_VALUES,
)

Create an curl-oriented CeedElemRestriction.

Zero-based indexing

In the below notation, we are using 0-based indexing. libCEED expects the offset indices to be 0-based.

Arguments:

  • ceed: The Ceed object
  • nelem: Number of elements described in the offsets array
  • elemsize: Size (number of "nodes") per element
  • ncomp: Number of field components per interpolation node (1 for scalar fields)
  • compstride: Stride between components for the same L-vector "node". Data for node $i$, component $j$, element $k$ can be found in the L-vector at index offsets[i + k*elemsize] + j*compstride.
  • lsize: The size of the L-vector. This vector may be larger than the elements and fields given by this restriction.
  • offsets: Array of shape (elemsize, nelem). Column $i$ holds the ordered list of the offsets (into the input CeedVector) for the unknowns corresponding to element $i$, where $0 \leq i < \textit{nelem}$. All offsets must be in the range $[0, \textit{lsize} - 1]$.
  • curlorients: Array of shape (3 * elemsize, nelem) representing a row-major tridiagonal matrix (curlorients[0, i] = curlorients[3 * elemsize - 1, i] = 0, where $0 \leq i < \textit{nelem}$) which is applied to the element unknowns upon restriction.
  • mtype: Memory type of the offsets array, see MemType
  • cmode: Copy mode for the offsets array, see CopyMode
source
LibCEED.create_elem_restriction_stridedFunction
create_elem_restriction_strided(ceed::Ceed, nelem, elemsize, ncomp, lsize, strides)

Create a strided CeedElemRestriction.

Zero-based indexing

In the below notation, we are using 0-based indexing. libCEED expects the offset indices to be 0-based.

Arguments:

  • ceed: The Ceed object
  • nelem: Number of elements described by the restriction
  • elemsize: Size (number of "nodes") per element
  • ncomp: Number of field components per interpolation node (1 for scalar fields)
  • lsize: The size of the L-vector. This vector may be larger than the elements and fields given by this restriction.
  • strides: Array for strides between [nodes, components, elements]. Data for node $i$, component $j$, element $k$ can be found in the L-vector at index i*strides[0] + j*strides[1] + k*strides[2]. STRIDES_BACKEND may be used with vectors created by a Ceed backend.
source
LibCEED.apply!Method
apply!(
    r::ElemRestriction,
    u::CeedVector,
    ru::CeedVector;
    tmode=NOTRANSPOSE,
    request=RequestImmediate(),
)

Use the ElemRestriction to convert from L-vector to an E-vector (or apply the tranpose operation). The input CeedVector is u and the result stored in ru.

If tmode is TRANSPOSE, then the result is added to ru. If tmode is NOTRANSPOSE, then ru is overwritten with the result.

source
LibCEED.applyMethod
apply(r::ElemRestriction, u::AbstractVector; tmode=NOTRANSPOSE)

Use the ElemRestriction to convert from L-vector to an E-vector (or apply the tranpose operation). The input is given by u, and the result is returned as an array of type Vector{CeedScalar}.

source