CollectTensors[expr] 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 get collected to , where the 's are constants and the 's are tensors.

- The following options can be given:

CollectMethod | Default | what function to apply to the tensorial terms before collecting | |

SimplifyMethod | Simplify | what function to apply to the non-tensorial prefactors after collecting | |

RemoveTensorWrapper | True | whether to remove the TensorWrapper heads on the tensorial terms after collecting | |

Verbose | False | display information while computing |

- Possible settings for CollectMethod include:

Default | use the function ToCanonical@ContractMetric@#& before collecting | |

f | use the pure function f before collecting |

- Possible settings for RemoveTensorWrapper include:

False | leave the TensorWrapper heads after collecting | |

True | remove the TensorWrapper heads after collecting |

- Possible settings for Verbose include: