+ file +
+ Index.hIndex types and convenience functions for working with indices.
+ +Namespaces
+-
+
- namespace symtensor + +
diff --git a/Index_8h.html b/Index_8h.html new file mode 100644 index 0000000..4a6cfbc --- /dev/null +++ b/Index_8h.html @@ -0,0 +1,132 @@ + + +
+ +Index types and convenience functions for working with indices.
+ +Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
Use ↓ + / ↑ to navigate through the list, + Enter to go. + Tab autocompletes common prefix, you can + copy a link to the result using ⌘ + L while ⌘ + M produces a Markdown link.
+Provides the base multipole template.
+ +Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
Use ↓ + / ↑ to navigate through the list, + Enter to go. + Tab autocompletes common prefix, you can + copy a link to the result using ⌘ + L while ⌘ + M produces a Markdown link.
+Tensor access by rank.
+Template parameters | |
---|---|
R | +Rank of the tensor to retrieve | +
Returns | +reference to the tensor with the requested rank | +
Tensor access by rank.
+Template parameters | |
---|---|
R | +Rank of the tensor to retrieve | +
Returns | +reference to the tensor with the requested rank | +
Element-wise addition of a scalar.
+Parameters | |
---|---|
scalar | +value to add to each tensor of the multipole | +
Returns | +the modified multipole | +
Element-wise subtraction of a scalar.
+Parameters | |
---|---|
scalar | +value to subtract from each tensor of the multipole | +
Returns | +the modified multipole | +
Element-wise multiplication by a scalar.
+Parameters | |
---|---|
scalar | +value to multiply each tensor of the multipole by. | +
Returns | +the modified multipole | +
Element-wise division by a scalar.
+Parameters | |
---|---|
scalar | +value to divide each element of the multipole by. | +
Returns | +the modified multipole | +
Element-wise addition of a scalar.
+Parameters | |
---|---|
scalar | +value to add to each tensor of the multipole | +
Returns | +the modified multipole | +
Element-wise subtraction of a scalar.
+Parameters | |
---|---|
scalar | +value to subtract from each tensor of the multipole | +
Returns | +the modified multipole | +
Element-wise multiplication by a scalar.
+Parameters | |
---|---|
scalar | +value to multiply each tensor of the multipole by. | +
Returns | +the modified multipole | +
Element-wise division by a scalar.
+Parameters | |
---|---|
scalar | +value to divide each element of the multipole by. | +
Returns | +the modified multipole | +
Element-wise addition with another multipole.
+Parameters | |
---|---|
other | +multipole to add with this multipole | +
Returns | +the modified multipole | +
Element-wise subtraction by another multipole.
+Parameters | |
---|---|
other | +multipole to subtract from this multipole | +
Returns | +the modified multipole | +
Element-wise multiplication by another multipole.
+Parameters | |
---|---|
other | +multipole to multiply with this multipole | +
Returns | +the modified multipole | +
Element-wise division by another multipole.
+Parameters | |
---|---|
other | +multipole to divide this multipole by | +
Returns | +the modified multipole | +
Element-wise addition with another multipole.
+Parameters | |
---|---|
other | +multipole to add with this multipole | +
Returns | +the modified multipole | +
Element-wise subtraction by another multipole.
+Parameters | |
---|---|
other | +multipole to subtract from this multipole | +
Returns | +the modified multipole | +
Element-wise multiplication by another multipole.
+Parameters | |
---|---|
other | +multipole to multiply with this multipole | +
Returns | +the modified multipole | +
Element-wise division by another multipole.
+Parameters | |
---|---|
other | +multipole to divide this multipole by | +
Returns | +the modified multipole | +
Comparison with another multipole.
+Parameters | |
---|---|
other | +multipole to compare with | +
Returns | +true if all elements of the multipoles are equivalent, false otherwise | +
direct access to the tuple of tensors which comprises the multipole
+Returns | +reference to the std::tuple of tensors. | +
---|
element access for use with structured bindings
+Template parameters | |
---|---|
I | +index of the element to retrieve (not necessarily the same as Rank) | +
Returns | +reference to the tensor | +
element access for use with structured bindings
+Template parameters | |
---|---|
I | +index of the element to retrieve (not necessarily the same as Rank) | +
Returns | +reference to the tensor | +
element access for use with structured bindings
+Template parameters | |
---|---|
I | +index of the element to retrieve (not necessarily the same as Rank) | +
Returns | +reference to the tensor | +
In order to create a new type which behaves like a multipole, you can derive from this class so that operators will function correctly.
+Element-wise addition with another multipole.
+Parameters | |
---|---|
other | +multipole to add with this multipole | +
Returns | +the modified multipole | +
Element-wise subtraction by another multipole.
+Parameters | |
---|---|
other | +multipole to subtract from this multipole | +
Returns | +the modified multipole | +
Element-wise multiplication by another multipole.
+Parameters | |
---|---|
other | +multipole to multiply with this multipole | +
Returns | +the modified multipole | +
Element-wise division by another multipole.
+Parameters | |
---|---|
other | +multipole to divide this multipole by | +
Returns | +the modified multipole | +
Element-wise addition with another multipole.
+Parameters | |
---|---|
other | +multipole to add with this multipole | +
Returns | +the modified multipole | +
Element-wise subtraction by another multipole.
+Parameters | |
---|---|
other | +multipole to subtract from this multipole | +
Returns | +the modified multipole | +
Element-wise multiplication by another multipole.
+Parameters | |
---|---|
other | +multipole to multiply with this multipole | +
Returns | +the modified multipole | +
Element-wise division by another multipole.
+Parameters | |
---|---|
other | +multipole to divide this multipole by | +
Returns | +the modified multipole | +
Comparison with another multipole.
+Parameters | |
---|---|
other | +multipole to compare with | +
Returns | +true if all elements of the multipoles are equivalent, false otherwise | +
direct access to the tuple of tensors which comprises the multipole
+Returns | +reference to the std::tuple of tensors. | +
---|
element access for use with structured bindings
+Template parameters | |
---|---|
I | +index of the element to retrieve (not necessarily the same as Rank) | +
Returns | +reference to the tensor | +
element access for use with structured bindings
+Template parameters | |
---|---|
I | +index of the element to retrieve (not necessarily the same as Rank) | +
Returns | +reference to the tensor | +
element access for use with structured bindings
+Template parameters | |
---|---|
I | +index of the element to retrieve (not necessarily the same as Rank) | +
Returns | +reference to the tensor | +
Helper class for defining a multipole based on an std::tuple of tensors.
+Template parameters | |
---|---|
Implementation | +CRTP subclass | +
Tuple | +the std::tuple of tensors. This is typically produced using TensorSequence | +
Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
Use ↓ + / ↑ to navigate through the list, + Enter to go. + Tab autocompletes common prefix, you can + copy a link to the result using ⌘ + L while ⌘ + M produces a Markdown link.
+Enum-class index type for a given dimension.
+For 2d, this contains elements X, Y
, for 3d X, Y, Z
, for 4d W, X, Y, Z
.
2d quadrupole with floating point elements
+3d quadrupole with floating point elements
+2d octupole with floating point elements
+3d octupole with floating point elements
+Produces an std::tuple of tensors based on a "prefix" and a desired order.
+Template parameters | |
---|---|
Order | +rank of the highest tensor of the sequence, which appears last in the std::tuple | +
PrefixTensors | +at least one low-order tensor which will be used to define higher order tensors. The last tensor of PrefixTensors is used to produce higher order tensors through repeated use of NextHigherRank. | +
The prefix determines the types of the tensors which make up the sequence. For example, the following TensorSequence<3, SymmetricTensor3f<1>>
produces the type:
std::tuple< + SymmetricTensor3f<1>, + SymmetricTensor3f<2>, + SymmetricTensor3f<3> +>
The prefix may also contain types which are not symmetric tensors, so long as the final type of the prefix implements SymmetricTensorBase. For example, TensorSequence<3, float, glm::vec3, SymmetricTensor3f<2>>
uses a float
scalar component and a vector from GLM, this produces the type:
std::tuple< + float, + glm::vec3, + SymmetricTensor3f<2>, + SymmetricTensor3f<3> +>+
All properties of the symmetric tensor ST are preserved aside from the rank. The type of NextHigherRank<SymmetricTensor3f<3>>
is equivalent to SymmetricTensor3f<4>
.
Determines the number of indices in a square tensor of rank R and size D.
+Parameters | |
---|---|
D | +size of the tensor along all axes | +
R | +rank of the tensor | +
Returns | +the number of values the the tensor | +
Equivalent to .
+Determines the number of unique values in a symmetric tensor of rank R and size D.
+Parameters | |
---|---|
D | +size of the symmetric tensor along all axes | +
R | +rank of the symmetric tensor | +
Returns | +the number of unique values in the symmetric tensor (indices xxy, xyx, and yxx are not counted separately). | +
Equivalent to Pascal's triangle evaluated at D-1, R.
+converts a flat index to an equivalent multi-dimensional index.
+Template parameters | |
---|---|
R | +Rank of the tensor | +
I | +Index type | +
Parameters | |
flatIndex | +1-dimensional index, in the range [0, N) where N can be found using numUniqueValuesInSymmetricTensor |
+
D | +size of the tensor | +
Returns | +std::array of indices, with type I and size R | +
The index is in "canonical" form. For a symmetric tensor, this means the following mapping:
Converts a multi-dimensional index in a symmetric tensor into a flat index.
+Template parameters | |
---|---|
R | +Rank of the tensor | +
I | +Index type | +
Parameters | |
dimensionalIndices | +array of R Index types which specifies a value in the tensor | +
D | +size of the tensor | +
lowestIndex | +(implementation detail) | +
Returns | +the corresponding index in a flat array with no redundant values | +
First puts the index in "canonical" form, where indices are sorted as follows:
Next, converts the indices to a flat index using the reverse process of dimensionalIndices()
tuple-element specialization to enable the use of structured bindings with multipoles
+Template parameters | |
---|---|
I | +index of the element to retrieve the type of | +
T | +multipole type. must be derived from a specialization of MultipoleBase, enforced by a concept | +
Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
Use ↓ + / ↑ to navigate through the list, + Enter to go. + Tab autocompletes common prefix, you can + copy a link to the result using ⌘ + L while ⌘ + M produces a Markdown link.
+tuple-size specialization to enable the use of structured bindings with multipoles
+Template parameters | |
---|---|
T | +multipole type. must be derived from a specialization of MultipoleBase, enforced by a concept | +
Search for symbols, directories, files, pages or
+ modules. You can omit any prefix from the symbol or file path; adding a
+ :
or /
suffix lists all members of given symbol or
+ directory.
Use ↓ + / ↑ to navigate through the list, + Enter to go. + Tab autocompletes common prefix, you can + copy a link to the result using ⌘ + L while ⌘ + M produces a Markdown link.
+