collects all tensorial terms in expr.
  • A tensorial term is a single tensor or a product of tensors that cannot be expanded into a sum.
  • Expression of the form c_2 T_1+c_1 T_2 T_1+c_3 T_2 T_1+c_4 T_1 get collected to (c_2+c_4) T_1+(c_1+c_3) T_2 T_1, where the c_i's are constants and the T_i's are tensors.
  • The following options can be given:
CollectMethodDefaultwhat function to apply to the tensorial terms before collecting
SimplifyMethodSimplifywhat function to apply to the non-tensorial prefactors after collecting
RemoveTensorWrapperTruewhether to remove the TensorWrapper heads on the tensorial terms after collecting
VerboseFalsedisplay information while computing
  • Possible settings for CollectMethod include:
Defaultuse the function ToCanonical@ContractMetric@#& before collecting
fuse the pure function f before collecting
  • Possible settings for RemoveTensorWrapper include:
Falseleave the TensorWrapper heads after collecting
Trueremove the TensorWrapper heads after collecting
  • Possible settings for Verbose include:
Falsedon't display any information while computing
Truedisplay status information while computing