diff options
Diffstat (limited to 'Tools/CodeGen/KrancThorn.m')
-rw-r--r-- | Tools/CodeGen/KrancThorn.m | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/Tools/CodeGen/KrancThorn.m b/Tools/CodeGen/KrancThorn.m index 230dc5b..e678470 100644 --- a/Tools/CodeGen/KrancThorn.m +++ b/Tools/CodeGen/KrancThorn.m @@ -101,12 +101,15 @@ replaceDots[x_] := CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts___] := Module[{calcs, declaredGroups, implementation, inheritedImplementations, includeFiles, evolutionTimelevels, - realParams, intParams, keywordParams, inheritedRealParams, inheritedIntParams, - inheritedKeywordParams, extendedRealParams, extendedIntParams, - extendedKeywordParams, partialDerivs, coordGroup, evolvedGroups, - nonevolvedGroups, interface, evolvedGroupDefinitions, - rhsGroupDefinitions, thornspec, allParams, boundarySources, - reflectionSymmetries, realParamDefs, intParamDefs, pDefs}, + realParams, intParams, keywordParams, + inheritedRealParams, inheritedIntParams, inheritedKeywordParams, + extendedRealParams, extendedIntParams, extendedKeywordParams, + configuration, + partialDerivs, coordGroup, evolvedGroups, nonevolvedGroups, + interface, evolvedGroupDefinitions, rhsGroupDefinitions, thornspec, + allParams, boundarySources, reflectionSymmetries, + realParamDefs, intParamDefs, + pDefs}, (* Return[];*) @@ -177,6 +180,10 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts___] := nonevolvedGroupsWithRHS = Join[nonevolvedGroups, Map[groupName, rhsGroupDefinitions]]; + (* Construct the configuration file *) + InfoMessage[Terse, "Creating configuration file"]; + configuration = createKrancConfiguration[]; + (* Construct the interface file *) InfoMessage[Terse, "Creating interface file"]; interface = createKrancInterface[nonevolvedGroupsWithRHS, @@ -240,13 +247,14 @@ CreateKrancThorn[groupsOrig_, parentDirectory_, thornName_, opts___] := Map[lookup[#, Filename] &, boundarySources]]]; (* Put all the above together and generate the Cactus thorn *) - thornspec = {Name -> thornName, - Directory -> parentDirectory, - Interface -> interface, - Schedule -> schedule, - Param -> param, - Makefile -> make, - Sources -> Join[{ + thornspec = {Name -> thornName, + Directory -> parentDirectory, + Configuration -> configuration, + Interface -> interface, + Schedule -> schedule, + Param -> param, + Makefile -> make, + Sources -> Join[{ {Filename -> "Startup.c", Contents -> startup}, {Filename -> "RegisterMoL.c", Contents -> molregister}, {Filename -> "RegisterSymmetries.c", Contents -> symregister}, @@ -326,6 +334,13 @@ nonevolvedTimelevels[group_] := If[ tls === False, 1, tls]]; +createKrancConfiguration[] := + Module[{configuration}, + configuration = CreateConfiguration[]; + Return[configuration]; + ]; + + createKrancInterface[nonevolvedGroups_, evolvedGroups_, groups_, evolutionTimelevels_, implementation_, inheritedImplementations_, includeFiles_] := |