From ec14135b138c6f5c4b1652d76ce2b8056c290f05 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Fri, 1 Feb 2008 20:51:31 -0500 Subject: Erik's cosmetic changes --- Tools/CodeGen/Differencing.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Tools/CodeGen') 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, ")"}]}]; -- cgit v1.2.3