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 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)); 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