diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-12 11:13:25 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-12 11:13:25 +0200 |
commit | e0ff723ad9bcce46cd547982410427e83e93c7ec (patch) | |
tree | d03617856727e27af6683ead65a277cc6e7d4d38 | |
parent | 9df401694aea2bd64a7fd5e5beca2f52f3fdacf9 (diff) |
KrancThorn.m: Localise some variables in MoL
-rw-r--r-- | Tools/CodeGen/KrancThorn.m | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m index 68bafcc..61cbd24 100644 --- a/Tools/CodeGen/KrancThorn.m +++ b/Tools/CodeGen/KrancThorn.m @@ -68,9 +68,9 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ parameters, configuration, partialDerivs, coordGroup, evolvedGroups, rhsGroups, nonevolvedGroups, - interface, evolvedGroupDefinitions, rhsGroupDefinitions, thornspec, + interface, evolvedGroupDefinitions, thornspec, evolvedODEGroups, nonevolvedODEGroups, - evolvedODEGroupDefinitions, rhsODEGroupDefinitions, rhsODEGroups, + evolvedODEGroupDefinitions, rhsODEGroups, boundarySources, reflectionSymmetries, pDefs, consCalcs, consCalcsIn, consGroups, cakernel, hostCals, deviceCalcs, incFilenames, sources = {}}, @@ -224,18 +224,18 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts:OptionsPattern[ (* Replace the dots in the calculation *) calcs = MoLReplaceDots[calcs]; - (* Add the RHS groups *) - rhsGroupDefinitions = MoLRHSGroupDefinitions[groups, evolvedGroups]; - groups = Join[groups, rhsGroupDefinitions]; + Module[ + {rhsGroupDefinitions = MoLRHSGroupDefinitions[groups, evolvedGroups], + rhsODEGroupDefinitions = MoLRHSODEGroupDefinitions[groups, evolvedODEGroups]}, - rhsODEGroupDefinitions = MoLRHSODEGroupDefinitions[groups, evolvedODEGroups]; - groups = Join[groups, rhsODEGroupDefinitions]; + (* Add the RHS groups *) + groups = Join[groups, rhsGroupDefinitions, rhsODEGroupDefinitions]; - (* Add the groups into the calcs *) - calcs = Map[Join[#, {Groups -> groups}] &, calcs]; + (* Add the groups into the calcs *) + calcs = Map[Join[#, {Groups -> groups}] &, calcs]; - rhsGroups = Map[groupName, rhsGroupDefinitions]; - rhsODEGroups = Map[groupName, rhsODEGroupDefinitions]; + rhsGroups = Map[groupName, rhsGroupDefinitions]; + rhsODEGroups = Map[groupName, rhsODEGroupDefinitions]]; declaredGroups = Join[declaredGroups, rhsGroups, odeGroups, rhsODEGroups]; |