ElemRestriction
LibCEED.ElemRestriction
— TypeElemRestriction
Wraps a CeedElemRestriction
object, representing the restriction from local vectors to elements. An ElemRestriction
object can be created using create_elem_restriction
or create_elem_restriction_strided
.
LibCEED.ElemRestrictionNone
— TypeElemRestrictionNone()
Returns the singleton object corresponding to libCEED's CEED_ELEMRESTRICTION_NONE
LibCEED.create_elem_restriction
— Functioncreate_elem_restriction(
ceed::Ceed,
nelem,
elemsize,
ncomp,
compstride,
lsize,
offsets::AbstractArray{CeedInt},
mtype::MemType=MEM_HOST,
cmode::CopyMode=COPY_VALUES,
)
Create a CeedElemRestriction
.
In the below notation, we are using 0-based indexing. libCEED expects the offset indices to be 0-based.
Arguments:
ceed
: TheCeed
objectnelem
: Number of elements described in theoffsets
arrayelemsize
: Size (number of "nodes") per elementncomp
: 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 indexoffsets[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 inputCeedVector
) 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 theoffsets
array, seeMemType
cmode
: Copy mode for theoffsets
array, seeCopyMode
Missing docstring for create_elem_restriction
. Check Documenter's build log for details.
LibCEED.create_elem_restriction_oriented
— Functioncreate_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
.
In the below notation, we are using 0-based indexing. libCEED expects the offset indices to be 0-based.
Arguments:
ceed
: TheCeed
objectnelem
: Number of elements described in theoffsets
arrayelemsize
: Size (number of "nodes") per elementncomp
: 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 indexoffsets[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 inputCeedVector
) 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 theoffsets
array, seeMemType
cmode
: Copy mode for theoffsets
array, seeCopyMode
LibCEED.create_elem_restriction_curl_oriented
— Functioncreate_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
.
In the below notation, we are using 0-based indexing. libCEED expects the offset indices to be 0-based.
Arguments:
ceed
: TheCeed
objectnelem
: Number of elements described in theoffsets
arrayelemsize
: Size (number of "nodes") per elementncomp
: 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 indexoffsets[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 inputCeedVector
) 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 theoffsets
array, seeMemType
cmode
: Copy mode for theoffsets
array, seeCopyMode
LibCEED.create_elem_restriction_strided
— Functioncreate_elem_restriction_strided(ceed::Ceed, nelem, elemsize, ncomp, lsize, strides)
Create a strided CeedElemRestriction
.
In the below notation, we are using 0-based indexing. libCEED expects the offset indices to be 0-based.
Arguments:
ceed
: TheCeed
objectnelem
: Number of elements described by the restrictionelemsize
: Size (number of "nodes") per elementncomp
: 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 indexi*strides[0] + j*strides[1] + k*strides[2]
.STRIDES_BACKEND
may be used with vectors created by a Ceed backend.
LibCEED.apply!
— Methodapply!(
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.
LibCEED.apply
— Methodapply(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}
.
LibCEED.create_evector
— Functioncreate_evector(r::ElemRestriction)
Return a new CeedVector
E-vector.
LibCEED.create_lvector
— Functioncreate_lvector(r::ElemRestriction)
Return a new CeedVector
L-vector.
LibCEED.create_vectors
— Functioncreate_vectors(r::ElemRestriction)
Return an (L-vector, E-vector) pair.
LibCEED.getcompstride
— Functiongetcompstride(r::ElemRestriction)
Get the L-vector component stride.
LibCEED.getnumelements
— Functiongetnumelements(r::ElemRestriction)
Get the total number of elements in the range of an ElemRestriction
.
LibCEED.getelementsize
— Functiongetelementsize(r::ElemRestriction)
Get the size of elements in the given ElemRestriction
.
LibCEED.getlvectorsize
— Functiongetlvectorsize(r::ElemRestriction)
Get the size of an L-vector for the given ElemRestriction
.
LibCEED.getnumcomponents
— Methodgetnumcomponents(r::ElemRestriction)
Get the number of components in the elements of an ElemRestriction
.
LibCEED.getmultiplicity!
— Functiongetmultiplicity!(r::ElemRestriction, v::AbstractCeedVector)
Get the multiplicity of nodes in an ElemRestriction
. The CeedVector
v
should be an L-vector (i.e. length(v) == getlvectorsize(r)
, see create_lvector
).
LibCEED.getmultiplicity
— Functiongetmultiplicity(r::ElemRestriction)
Convenience function to get the multiplicity of nodes in the ElemRestriction
, where the result is returned in a newly allocated Julia Vector{CeedScalar}
(see also getmultiplicity!
).