From eeb96895d9f5bb7d2236a4bcaa3a9bfa20b41ab4 Mon Sep 17 00:00:00 2001 From: Ben Dudson Date: Sat, 27 Oct 2018 23:22:19 +0100 Subject: [PATCH 1/3] Changing README example to use cross rather than ^ Deprecated method for cross products now removed, but used in example on front page README. Now changed. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8d4271d5ea..2454dce8e9 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ can be written simply as: ```cpp ddt(rho) = -V_dot_Grad(v, rho) - rho*Div(v); ddt(p) = -V_dot_Grad(v, p) - g*p*Div(v); -ddt(v) = -V_dot_Grad(v, v) + ((Curl(B)^B) - Grad(p))/rho; -ddt(B) = Curl(v^B); +ddt(v) = -V_dot_Grad(v, v) + (cross(Curl(B),B) - Grad(p))/rho; +ddt(B) = Curl(cross(v,B)); ``` The full code for this example can be found in the [orszag-tang From a2679d194908cfff0dc6b9fc44c7683f9d1e6f5b Mon Sep 17 00:00:00 2001 From: John Omotani Date: Tue, 13 Nov 2018 12:57:18 +0000 Subject: [PATCH 2/3] Set location of result in DC() --- src/field/field3d.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/field/field3d.cxx b/src/field/field3d.cxx index 1143eb9fdc..ae1997417a 100644 --- a/src/field/field3d.cxx +++ b/src/field/field3d.cxx @@ -1234,6 +1234,7 @@ Field2D DC(const Field3D &f, REGION rgn) { Mesh *localmesh = f.getMesh(); Field2D result(localmesh); result.allocate(); + result.setLocation(f.getLocation()); const Region ®ion = localmesh->getRegion2D(REGION_STRING(rgn)); From ca2afe22c48121662021992c0a9178f73427abaa Mon Sep 17 00:00:00 2001 From: John Omotani Date: Tue, 13 Nov 2018 13:49:44 +0000 Subject: [PATCH 3/3] Set location in LaplaceCyclic::solve(Field3D,Field3D) --- src/invert/laplace/impls/cyclic/cyclic_laplace.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/invert/laplace/impls/cyclic/cyclic_laplace.cxx b/src/invert/laplace/impls/cyclic/cyclic_laplace.cxx index 223617de3c..a802b4beef 100644 --- a/src/invert/laplace/impls/cyclic/cyclic_laplace.cxx +++ b/src/invert/laplace/impls/cyclic/cyclic_laplace.cxx @@ -256,8 +256,9 @@ const Field3D LaplaceCyclic::solve(const Field3D &rhs, const Field3D &x0) { Mesh *mesh = rhs.getMesh(); Field3D x(mesh); // Result x.allocate(); + x.setLocation(location); - Coordinates *coord = mesh->getCoordinates(); + Coordinates *coord = mesh->getCoordinates(location); // Get the width of the boundary