diff options
author | ianhin <ianhin> | 2006-05-16 16:11:08 +0000 |
---|---|---|
committer | ianhin <ianhin> | 2006-05-16 16:11:08 +0000 |
commit | f5c4bf1fec5efcf490ddc68dbc1553fe6c3ddf98 (patch) | |
tree | 57213a2481d82b3ba652e8dac4f0cc49be05c0c9 /Tools/CodeGen | |
parent | 7f7dd07008df2bfa3631d48b53bf4046d1041e21 (diff) |
Changed several scheduled functions to return void at Erik's
suggestion.
Removed spurious output.
CreateMoLRegistration source now requires that the group names should
be passed in with an implementation prefix. This is what is currently
done, so the change should be harmless.
Diffstat (limited to 'Tools/CodeGen')
-rw-r--r-- | Tools/CodeGen/Thorn.m | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Tools/CodeGen/Thorn.m b/Tools/CodeGen/Thorn.m index df05b00..4851db5 100644 --- a/Tools/CodeGen/Thorn.m +++ b/Tools/CodeGen/Thorn.m @@ -530,7 +530,7 @@ CreateSymmetriesRegistrationSource[thornName_, implementationName_, GFs_, reflec lang = CodeGen`SOURCELANGUAGE; CodeGen`SOURCELANGUAGE = "C"; - Print["reflectionSymmetries == ", reflectionSymmetries]; + spec = Table[{FullName -> implementationName <> "::" <> ToString@GFs[[j]], Sym -> If[reflectionSymmetries === False, calcSymmetry[GFs[[j]]], @@ -587,20 +587,22 @@ CreateMoLRegistrationSource[spec_, debug_] := Map[IncludeFile, {"cctk.h", "cctk_Arguments.h", "cctk_Parameters.h"}], - DefineCCTKFunction[lookup[spec,ThornName] <> "_RegisterVars", "CCTK_INT", + DefineCCTKFunction[lookup[spec,ThornName] <> "_RegisterVars", "void", {DefineVariable["ierr", "CCTK_INT", "0"], CommentedBlock["Register all the evolved grid functions with MoL", (* FIXME: We should clarify exactly what should happen with the implementation names here *) +(* OK. I think that the group name should be passed in qualified, as that is all that we can do. *) + Map[{"ierr += MoLRegisterEvolved(CCTK_VarIndex(\"", #, "\"), CCTK_VarIndex(\"", - lookup[spec,BaseImplementation], "::", unqualifiedGroupName[#], "rhs\"));\n"} &, + #, "rhs\"));\n"} &, lookup[spec, EvolvedGFs]]], CommentedBlock["Register all the primitive grid functions with MoL", Map[{"ierr += MoLRegisterConstrained(CCTK_VarIndex(\"", - lookup[spec,BaseImplementation], "::", unqualifiedGroupName[#], "\"));\n"} &, + #, "\"));\n"} &, lookup[spec, PrimitiveGFs]]], "return ierr;\n"}]}; @@ -847,12 +849,12 @@ CreateMoLBoundariesSource[spec_] := cleanCPP@DefineCCTKFunction[lookup[spec,ThornName] <> "_CheckBoundaries", - "CCTK_INT", + "void", {"return 0;\n"}], cleanCPP@DefineCCTKFunction[lookup[spec,ThornName] <> "_ApplyBoundConds", - "CCTK_INT", + "void", {DefineVariable["ierr", "CCTK_INT", "0"], Map[symmetryBCGroup, groups], |