:orphan: # PetscDTGradedOrderToIndex convert a tuple into an index in a graded order, the inverse of `PetscDTIndexToGradedOrder()`. ## Synopsis ``` #include "petscdt.h" PetscErrorCode PetscDTGradedOrderToIndex(PetscInt len, const PetscInt degtup[], PetscInt *index) ``` ## Input Parameters - ***len -*** the length of the degree tuple - ***degtup -*** tuple with this length ## Output Parameter - ***index -*** index in graded order: >= 0 ## Note For two tuples x and y with the same degree sum, partial degree sums over the final elements of the tuples acts as a tiebreaker. For example, (2, 1, 1) and (1, 2, 1) have the same degree sum, but the degree sum over the last two elements is smaller for the former, so (2, 1, 1) < (1, 2, 1). ## See Also `PetscDTIndexToGradedOrder()` ## Level Beginner ## Location src/dm/dt/interface/dt.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/dt/interface/dt.c) [Index of all DT routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)