From 46540ff11edf9b5b6b0df44a9df2790e0a48eb7a Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 4 Apr 2013 10:06:05 -0400 Subject: New function AddGroupTag. Use it to set Prolongation=None for RHS variables. --- Tools/CodeGen/KrancGroups.m | 12 ++++++++++-- 1 file 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_] := -- cgit v1.2.3