Skip to content

Commit

Permalink
TensorTools.m: Remove components generated by symmetries of antisymme…
Browse files Browse the repository at this point in the history
…tric tensors
  • Loading branch information
ianhinder committed Aug 11, 2012
1 parent 479985d commit 4707e0c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tools/CodeGen/TensorTools.m
Expand Up @@ -1172,7 +1172,7 @@
RemoveDuplicates[Map[#[[1]] &, m]];

removeDuplicatesFromMap[m_] :=
Map[# -> (# /. m) &, extractMapDomain[m]];
Map[# -> (# /. m) &, removeSymmetryCopies@extractMapDomain[m]];


abstractToExplicitMap[m_] :=
Expand All @@ -1181,8 +1181,11 @@
domain = extractMapDomain[explicitMap1];
Map[# -> (# /. explicitMap1) &, domain]];

removeSymmetryCopies[l_List] :=
DeleteCases[l, Times[-1,_Symbol]|0];

explicitVariableList[l_] :=
RemoveDuplicates[Flatten[Map[MakeExplicit, l], 1]];
removeSymmetryCopies@RemoveDuplicates[Flatten[Map[MakeExplicit, l], 1]];

(* --------------------------------------------------------------------------
Checking tensor expressions for consistency
Expand Down

0 comments on commit 4707e0c

Please sign in to comment.