aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen
diff options
context:
space:
mode:
authorIan Hinder <ian@vaio.(none)>2008-02-01 20:51:31 -0500
committerIan Hinder <ian@vaio.(none)>2008-02-01 20:51:31 -0500
commitec14135b138c6f5c4b1652d76ce2b8056c290f05 (patch)
treee45edd948240575e2584d7f6c5635302044647ff /Tools/CodeGen
parentb136c8d05181a89d5d2908d6fa2cd0b31d739254 (diff)
Erik's cosmetic changes
Diffstat (limited to 'Tools/CodeGen')
-rw-r--r--Tools/CodeGen/Differencing.m8
1 files changed, 3 insertions, 5 deletions
diff --git a/Tools/CodeGen/Differencing.m b/Tools/CodeGen/Differencing.m
index 31d7d67..9032234 100644
--- a/Tools/CodeGen/Differencing.m
+++ b/Tools/CodeGen/Differencing.m
@@ -27,11 +27,11 @@ need to supply examples for the fourth order differencing operators
for people to use easily.
In a calculation, the user uses expressions like PD[phi,1,2]. Kranc
-generates macro definitions for each derivative; i.e. in this case it
+generates macro definitions for each derivative; i.e., in this case it
would create a macro definition for PD12(u,i,j,k). At the start of a
calculation loop, variables are created to store the results of
precomputing each of the derivatives needed in that loop.
-e.g. PD12phi = PD12(phi,i,j,k). Kranc then replaces PD[phi,1,2] with
+E.g. PD12phi = PD12(phi,i,j,k). Kranc then replaces PD[phi,1,2] with
PD12phi in the calculation.
*)
@@ -54,7 +54,7 @@ should be differenced as a result of this derivative operator. Note
that the grid function itself is omitted from the definition. For
example,
- PD[i_] -> 1/2(shift[i_] + 1/shift[i])
+ PD[i_] -> 1/2(shift[i] + 1/shift[i])
ComponentDerivativeOperator
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -324,8 +324,6 @@ ComponentDerivativeOperatorMacroDefinition[componentDerivOp:(name_[inds___] -> e
Print[FullForm[rhs5]];
Print[""];*)
-(* rhs4 = rhs4 //. (x_ a_ - x_ b_) -> x(a-b);*)
-
rhs6 = CFormHideStrings[ReplacePowers[rhs5 /. spacings]];
{pDefs, FlattenBlock[{"#define ", macroName, "(u,i,j,k) ", "(", rhs6, ")"}]}];