From 9a78836d2238fe11fa637447f236ff45b6fc0e04 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 1 Oct 2019 10:31:29 -0500 Subject: [PATCH] Make sure Shannon entropy mesh without dimension can be assigned --- src/mesh.cpp | 3 ++- src/settings.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesh.cpp b/src/mesh.cpp index ac02b679e..acd80c7ba 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -155,7 +155,8 @@ RegularMesh::RegularMesh(pugi::xml_node node) fatal_error("Must specify either and on a mesh."); } - if (shape_.dimension() > 0) { + // TODO: Change to zero when xtensor is updated + if (shape_.size() > 1) { if (shape_.size() != lower_left_.size()) { fatal_error("Number of entries on must be the same " "as the number of entries on ."); diff --git a/src/settings.cpp b/src/settings.cpp index 1c9d1161a..796a2862a 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -512,7 +512,8 @@ void read_settings_xml() if (!m) fatal_error("Only regular meshes can be used as an entropy mesh"); simulation::entropy_mesh = m; - if (m->shape_.dimension() == 0) { + // TODO: Change to zero when xtensor is updated + if (m->shape_.size() == 1) { // If the user did not specify how many mesh cells are to be used in // each direction, we automatically determine an appropriate number of // cells