diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-04-04 10:06:05 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-04-04 10:19:58 -0400 |
commit | 46540ff11edf9b5b6b0df44a9df2790e0a48eb7a (patch) | |
tree | ad8c6ad20a261da993240ce43d6c9b3513fd6e2f /Tools/CodeGen | |
parent | 97da995ca325cff196e2a5d297f181f99c768f20 (diff) |
New function AddGroupTag. Use it to set Prolongation=None for RHS variables.
Diffstat (limited to 'Tools/CodeGen')
-rw-r--r-- | Tools/CodeGen/KrancGroups.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Tools/CodeGen/KrancGroups.m b/Tools/CodeGen/KrancGroups.m index 13d53d2..3866c42 100644 --- a/Tools/CodeGen/KrancGroups.m +++ b/Tools/CodeGen/KrancGroups.m @@ -48,6 +48,7 @@ SetGroupVariables; VerifyGroup; VerifyGroupName; SetGroupName; +AddGroupTag; AddGroupExtra; GroupTimelevels; allGroupVariables; @@ -121,12 +122,18 @@ GroupTags[g_] := extras = Drop[g, 2]; lookupDefault[extras, Tags, {}]]; +AddGroupTag[g_, t_] := + Module[{extras, tags}, + extras = Drop[g, 2]; + tags = lookupDefault[extras, Tags, {}]; + tags = Join[tags, {t}]; + Join[DeleteCases[g, Tags->_], {Tags -> tags}]]; + SetGroupName[g_, n_] := Join[{n}, Drop[g, 1]]; SetGroupVariables[g_, vars_] := - Module[{}, - Join[{groupName[g], vars}, Drop[g, 2]]]; + Join[{groupName[g], vars}, Drop[g, 2]]; (*********************************************************************) (* The following functions DO NOT KNOW about the internal form of a Group @@ -167,6 +174,7 @@ evolvedGroupToRHSGroup[name_, groups_] := group = SetGroupName[group, addrhs[name]]; group = SetGroupVariables[group, newVars]; + group = AddGroupTag[group, "Prolongation" -> "None"]; Return[group]]; variablesFromGroups[groupNames_, groups_] := |