From 6863abb6e75d2d3df704f41fb2783e8c11775a8a Mon Sep 17 00:00:00 2001 From: Cyrus Harrison Date: Fri, 16 Oct 2020 09:07:23 -0700 Subject: [PATCH] mesh bp fix struct topo optional origin names (#627) * use i,j,k for optional struct ele origin, instead of i0,j0,k0 * update changelog --- CHANGELOG.md | 1 + src/docs/sphinx/blueprint_mesh.rst | 6 +++--- src/libs/blueprint/conduit_blueprint_mesh_examples.cpp | 4 ++-- src/libs/relay/python/py_src/__init__.py | 3 --- src/tests/relay/adios_test_utils.hpp | 6 +++--- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15f0d52d8..a281786d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,6 +79,7 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s #### Blueprint - Refactored the Polygonal and Polyhedral mesh blueprint specification to leverage one-to-many concepts and to allow more zero-copy use cases. - The `conduit_blueprint_mpi` library now depends on `conduit_relay_mpi`. +- The optional Mesh Blueprint structured topology logical element origin is now specified using `{i,j,k}` instead of `{i0,j0,k0}`. ## [0.5.1] - Released 2020-01-18 diff --git a/src/docs/sphinx/blueprint_mesh.rst b/src/docs/sphinx/blueprint_mesh.rst index 9659b728f..ac12f5eb6 100644 --- a/src/docs/sphinx/blueprint_mesh.rst +++ b/src/docs/sphinx/blueprint_mesh.rst @@ -196,20 +196,20 @@ The mesh blueprint protocol accepts four implicit ways to define a topology on a * topologies/topo/coordset: "coords" * topologies/topo/type: “uniform” - * topologies/topo/elements/origin/{i0,j0,k0} (optional, default = {0,0,0}) + * topologies/topo/elements/origin/{i,j,k} (optional, default = {0,0,0}) * **rectilinear**: An implicit topology that defines a grid of elements on top of a *rectilinear* coordinate set. * topologies/topo/coordset: "coords" * topologies/topo/type: “rectilinear” - * topologies/topo/elements/origin/{i0,j0,k0} (optional, default = {0,0,0}) + * topologies/topo/elements/origin/{i,j,k} (optional, default = {0,0,0}) .. .. attention:: .. (can we collapse uniform + rectilinear?) .. * topologies/topo/type: “structured” .. * topologies/topo/elements/dims: "implicit" -.. * topologies/topo/elements/origin/{i0,j0,k0} (optional, default = {0,0,0}) +.. * topologies/topo/elements/origin/{i,j,k} (optional, default = {0,0,0}) .. * topologies/coordset: "coords" diff --git a/src/libs/blueprint/conduit_blueprint_mesh_examples.cpp b/src/libs/blueprint/conduit_blueprint_mesh_examples.cpp index ef117b45a..253c2a042 100644 --- a/src/libs/blueprint/conduit_blueprint_mesh_examples.cpp +++ b/src/libs/blueprint/conduit_blueprint_mesh_examples.cpp @@ -2860,8 +2860,8 @@ adjset_uniform(Node &res) domain_coords["origin/y"].set_float64(0.5*(i%2)); Node &domain_topo = domain_node["topologies/topo"]; - domain_topo["elements/origin/i0"].set_int32(20*(i/2)); - domain_topo["elements/origin/j0"].set_int32(20*(i%2)); + domain_topo["elements/origin/i"].set_int32(20*(i/2)); + domain_topo["elements/origin/j"].set_int32(20*(i%2)); domain_topo["type"].set_string("uniform"); domain_topo["coordset"].set_string("coords"); diff --git a/src/libs/relay/python/py_src/__init__.py b/src/libs/relay/python/py_src/__init__.py index 98f884886..850f3ed98 100644 --- a/src/libs/relay/python/py_src/__init__.py +++ b/src/libs/relay/python/py_src/__init__.py @@ -17,6 +17,3 @@ except: pass - - - diff --git a/src/tests/relay/adios_test_utils.hpp b/src/tests/relay/adios_test_utils.hpp index 6131d9694..66cf4356e 100644 --- a/src/tests/relay/adios_test_utils.hpp +++ b/src/tests/relay/adios_test_utils.hpp @@ -218,9 +218,9 @@ void add_rectilinear_mesh(Node &n, conduit::float64 origin[3], conduit::float64 n["coordsets/coords/values/z"] = coords[2]; n["topologies/mesh/coordset"] = "coords"; n["topologies/mesh/type"] = "rectilinear"; - n["topologies/mesh/elements/origin/i0"] = origin[0]; - n["topologies/mesh/elements/origin/j0"] = origin[1]; - n["topologies/mesh/elements/origin/k0"] = origin[2]; + n["topologies/mesh/elements/origin/i"] = origin[0]; + n["topologies/mesh/elements/origin/j"] = origin[1]; + n["topologies/mesh/elements/origin/k"] = origin[2]; n["fields/radius/association"] = "vertex"; n["fields/radius/type"] = "scalar";