12namespace Ikarus::Impl {
30consteval auto createfreeVoigtIndices(
const std::array<MatrixIndexPair, size>& fixed) {
31 std::array<size_t, 6 - size> res{};
32 std::array<size_t, size> voigtFixedIndices;
33 std::ranges::transform(fixed, voigtFixedIndices.begin(), [](
auto pair) { return toVoigt(pair.row, pair.col); });
34 std::ranges::sort(voigtFixedIndices);
35 std::ranges::set_difference(std::ranges::iota_view(
size_t(0),
size_t(6)), voigtFixedIndices, res.begin());
36 std::ranges::sort(res);
47consteval auto createFixedVoigtIndices(
const std::array<MatrixIndexPair, size>& fixed) {
48 std::array<size_t, size> fixedIndices;
49 std::ranges::transform(fixed, fixedIndices.begin(), [](
auto pair) { return toVoigt(pair.row, pair.col); });
50 std::ranges::sort(fixedIndices);
61constexpr size_t countDiagonalIndices(
const std::array<MatrixIndexPair, size>& fixed) {
63 for (
auto v : fixed) {
76template <
typename Derived>
77decltype(
auto) maybeFromVoigt(
const Eigen::MatrixBase<Derived>& E) {
78 if constexpr (Concepts::EigenVector<Derived>) {
auto fromVoigt(const Eigen::Matrix< ST, size, 1, Options, maxSize, 1 > &EVoigt, bool isStrain=true)
Converts a vector given in Voigt notation to a matrix.
Definition: tensorutils.hh:271