diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-06 11:11:17 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-06 11:11:17 +0200 |
commit | a25282c380e41d87abf4bd5c3bf8f7403d94f499 (patch) | |
tree | 6932bdb4448211326ba722255464637c080b0760 /Tools/CodeGen/CalculationFunction.m | |
parent | 52927f4fa0f3968a49a8714cbb46d7d93e1dd26b (diff) |
CalculationFunction.m: Remove Fortran from assignVariableFromExpression
Diffstat (limited to 'Tools/CodeGen/CalculationFunction.m')
-rw-r--r-- | Tools/CodeGen/CalculationFunction.m | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/Tools/CodeGen/CalculationFunction.m b/Tools/CodeGen/CalculationFunction.m index de5a656..6e14f9f 100644 --- a/Tools/CodeGen/CalculationFunction.m +++ b/Tools/CodeGen/CalculationFunction.m @@ -272,19 +272,8 @@ assignVariableFromExpression[dest_, expr_, declare_, vectorise_, noSimplify:Bool type = If[StringMatchQ[ToString[dest], "dir*"], "ptrdiff_t", DataType[]]; cleanExpr = ReplacePowers[expr, vectorise, noSimplify]; - If[SOURCELANGUAGE == "C", - code = If[declare, type <> " CCTK_ATTRIBUTE_UNUSED ", ""] <> ToString[dest] <> " = " <> - ToString[cleanExpr, CForm, PageWidth -> Infinity] <> ";\n", - code = ToString@dest <> ".eq." <> ToString[cleanExpr, FortranForm, PageWidth -> 120] - <> "\n"]; - - If[SOURCELANGUAGE != "C", - code = StringReplace[code, "\n " -> " &\n"]; - code = StringReplace[code, " - " -> " & "]; - code = StringReplace[code, ".eq." -> " = "]; - code = StringReplace[code, "= " -> "="]; - code = StringReplace[code, "\\" -> ""]; - code = StringReplace[code, "(index)" -> "(i,j,k)"]]; + code = If[declare, type <> " CCTK_ATTRIBUTE_UNUSED ", ""] <> ToString[dest] <> " = " <> + ToString[cleanExpr, CForm, PageWidth -> Infinity] <> ";\n"; code = lineBreak[code, 70] <> "\n"; code = StringReplace[code, "normal1" -> "normal[0]"]; |