Table of Contents

CollectNonScalars


Description

Examples


Collect same tensorial parts:

//by default, B_m will not be factored out
def t = 'A_i*A^i*B_m + B_m'.t
println t
   > A_i*A^i*B_m + B_m
//now will
println CollectNonScalars >> t
   > (A_i*A^i + 1)*B_m


Another example:

setSymmetric 'R_mn'
println CollectNonScalars >> 'A_t*A^t*R_mn - B_t*B^t*R_nm'.t
   > (A_{t}*A^{t}-B_{t}*B^{t})*R_{mn}


See also