degawa / dictos

Symbolic discretization tools for finite difference method on regular and staggered grid
MIT License
1 stars 0 forks source link

sorting based on subscript #74

Closed degawa closed 2 years ago

degawa commented 2 years ago
  1. get numerator and denominator
  2. get each term of numerator
  3. get subscript between { and }
  4. convert to float
  5. sort using numpy.argsort()
  6. rearrange numerator
  7. compute sum of numerator using sympy.Add with evaluate=False
  8. compute sympy.Mul(sum_of_numerator, 1/denominator)