]> git.unchartedbackwaters.co.uk Git - francis/ofc.git/commitdiff
Update generation for latest ONETEP version (untested).
authorFrancis Russell <francis@unchartedbackwaters.co.uk>
Thu, 31 May 2012 23:22:44 +0000 (00:22 +0100)
committerFrancis Russell <francis@unchartedbackwaters.co.uk>
Thu, 31 May 2012 23:22:44 +0000 (00:22 +0100)
src/ofc/generators/onetep/OnetepFunctions.scala
src/ofc/generators/onetep/PPDFunctionSet.scala

index f8b3869f827da6ee84a3468bf0bcf6fbf8d15c20..268232ea5edac6d67953758df2cb7112f7d6b70f 100644 (file)
@@ -2,11 +2,14 @@ package ofc.generators.onetep
 import ofc.codegen._
 
 object OnetepFunctions {
-  val basis_copy_function_to_fftbox = new FortranSubroutineSignature("basis_copy_function_to_fftbox", 
-    Seq(("fa_fftbox", new ArrayType[FloatType](3)),
-        ("fa_start1", new IntType),
-        ("fa_start2", new IntType),
-        ("fa_start3", new IntType),
+  val basis_copy_function_to_box = new FortranSubroutineSignature("basis_copy_function_to_box", 
+    Seq(("fa_box", new ArrayType[FloatType](3)),
+        ("box_n1", new IntType),
+        ("box_n2", new IntType),
+        ("box_n3", new IntType),
+        ("offset1", new IntType),
+        ("offset2", new IntType),
+        ("offset3", new IntType),
         ("fa_tightbox", OnetepTypes.TightBox),
         ("fa_on_grid", new ArrayType[FloatType](1)),
         ("fa_sphere", OnetepTypes.Sphere)))
index c1456ffb05749bfcb735e3013ea03e0cb7a95ab1..61fe3a98ef79e152bc38e657f9fdb7e4ca3f12fd 100644 (file)
@@ -136,12 +136,13 @@ class PPDFunctionSet(val basis: Expression[StructType], val data: Expression[Arr
 
       var basisCopyParams : Seq[Expression[_]] = Nil
       basisCopyParams :+= (fftbox: Expression[ArrayType[FloatType]])
+      basisCopyParams ++= fftboxSize
       basisCopyParams ++= fftboxOffset.map(new VarRef[IntType](_))
       basisCopyParams :+= tightbox
       basisCopyParams :+= (parent.data: Expression[ArrayType[FloatType]])
       basisCopyParams :+= sphere
 
-      context += new FunctionCallStatement(new FunctionCall(OnetepFunctions.basis_copy_function_to_fftbox, basisCopyParams))
+      context += new FunctionCallStatement(new FunctionCall(OnetepFunctions.basis_copy_function_to_box, basisCopyParams))
 
       for (dim <- 0 to 2) yield {
         import OnetepTypes._