Skip to content

Commit

Permalink
Generate more compatible C++ code for DGFE class
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Dec 24, 2011
1 parent 588c5e6 commit 698369e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Tools/CodeGen/CalculationFunction.m
Expand Up @@ -580,7 +580,8 @@ pathalogical enough (e.g. {s1 -> s2, s2 -> s1} would not be
"public:",
" typedef hrscc::CLaw<DGFE_"<>name<>"> claw;",
" typedef hrscc::traits<DGFE_"<>name<>">::state_t state_t;",
" static int const nvars = state_t::nvars;",
" typedef hrscc::traits<DGFE_"<>name<>"> variables_t;",
" static int const nvars = variables_t::nvars;",
" ",
" DGFE_"<>name<>"();",
" ",
Expand Down Expand Up @@ -612,7 +613,7 @@ pathalogical enough (e.g. {s1 -> s2, s2 -> s1} would not be
" assert(0);",
" }",
" ",
Map[" observer.flux[dir][state_t::i"<>ToString[#]<>"] = - flux"<>ToString[#]<>"L;" &, vars],
Map[" observer.flux[dir][variables_t::i"<>ToString[#]<>"] = - flux"<>ToString[#]<>"L;" &, vars],
" }",
" ",
" template<hrscc::policy::direction_t dir>",
Expand Down Expand Up @@ -654,10 +655,10 @@ pathalogical enough (e.g. {s1 -> s2, s2 -> s1} would not be
"{",
" using namespace hrscc;",
" ",
Map[" CLaw<DGFE_"<>name<>">::conserved_idx[state_t::i"<>ToString[#]<>"] = varindex(CCTK_THORNSTRING \"::"<>ToString[#]<>"\");" &, vars],
Map[" CLaw<DGFE_"<>name<>">::primitive_idx[state_t::i"<>ToString[#]<>"] = varindex(CCTK_THORNSTRING \"::"<>ToString[#]<>"\");" &, vars],
Map[" CLaw<DGFE_"<>name<>">::conserved_idx[variables_t::i"<>ToString[#]<>"] = varindex(CCTK_THORNSTRING \"::"<>ToString[#]<>"\");" &, vars],
Map[" CLaw<DGFE_"<>name<>">::primitive_idx[variables_t::i"<>ToString[#]<>"] = varindex(CCTK_THORNSTRING \"::"<>ToString[#]<>"\");" &, vars],
" ",
Map[" CLaw<DGFE_"<>name<>">::rhs_idx[state_t::i"<>ToString[#]<>"] = varindex(CCTK_THORNSTRING \"::"<>ToString[#]<>"rhs\");" &, vars],
Map[" CLaw<DGFE_"<>name<>">::rhs_idx[variables_t::i"<>ToString[#]<>"] = varindex(CCTK_THORNSTRING \"::"<>ToString[#]<>"rhs\");" &, vars],
"}",
"",
"",
Expand Down

0 comments on commit 698369e

Please sign in to comment.