From 29df2fa331150e993c592eb75ae4c3ac093710b3 Mon Sep 17 00:00:00 2001 From: cascala Date: Sat, 14 Apr 2018 11:25:03 -0400 Subject: [PATCH 1/2] Upgraded Scala --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index b31e2e9..3a57ad7 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ name := "Galileo" version := "0.1.1" -scalaVersion := "2.11.1" +scalaVersion := "2.11.8" scalacOptions ++= Seq( "-deprecation", "-feature" ) From 1572b593521bc860fe08d7b7160fde0120772ecd Mon Sep 17 00:00:00 2001 From: cascala Date: Sat, 14 Apr 2018 11:26:05 -0400 Subject: [PATCH 2/2] Fixed case --- src/main/scala/tensor/Tensor.scala | 2 +- src/test/scala/tensor/CoordinateTransformation.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/tensor/Tensor.scala b/src/main/scala/tensor/Tensor.scala index c398a80..e4a8063 100644 --- a/src/main/scala/tensor/Tensor.scala +++ b/src/main/scala/tensor/Tensor.scala @@ -78,7 +78,7 @@ object Tensor { Tensor( indices, m ) } - def TransformationMatrix( unprimed:List[Expr], primed:List[Expr]):Tensor = { + def transformationMatrix( unprimed:List[Expr], primed:List[Expr]):Tensor = { require( primed.size == unprimed.size ) //var jacobian:List[Expr] = List() var jacobian = primed.map( primedE => unprimed.map( unprimedE => Derivative( unprimedE, primedE ).visit() ) ).flatten diff --git a/src/test/scala/tensor/CoordinateTransformation.scala b/src/test/scala/tensor/CoordinateTransformation.scala index 5ddd5c8..f322242 100644 --- a/src/test/scala/tensor/CoordinateTransformation.scala +++ b/src/test/scala/tensor/CoordinateTransformation.scala @@ -18,7 +18,7 @@ class CoordinateTransformationTest extends FunSuite { val z = Product( r, CosF1( omega ) ) // Transformation matrix - val Lambda = Tensor.TransformationMatrix( + val Lambda = Tensor.transformationMatrix( List( x, y, z ), // old coords, unprimed List( r, omega, phi ) // new coords, primed )