Skip to content

Commit 2cc09a6

Browse files
committed
Changes to address comments on pull request.
1 parent 51297cf commit 2cc09a6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Omega_h_adios2.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Omega_h_Type getOmegahDataType(const std::string &dataType)
2323
if (dataType == "double")
2424
return OMEGA_H_F64;
2525

26-
throw std::invalid_argument("Equivalent Omegah data type is not available for " + dataType);
26+
fail("Equivalent Omegah data type is not available for %s\n", dataType.c_str());
2727
}
2828

2929
template <typename T>
@@ -127,8 +127,9 @@ static void read_array(adios2::IO &io, adios2::Engine &reader,
127127

128128
static void write_down(adios2::IO &io, adios2::Engine &writer, Mesh* mesh, int d, std::string pref)
129129
{
130-
auto down = mesh->ask_down(d, d - 1);
131-
int ncomp = d+1; // only valid for 2D triangle, and 3D tetrahedron.
130+
assert (mesh->family() == OMEGA_H_SIMPLEX);
131+
auto down = mesh->ask_down(d, d-1);
132+
int ncomp = simplex_degree(d, d-1);
132133
std::string name = pref+"downward_adj/" + std::to_string(d) + "_to_" + std::to_string(d-1);
133134
write_array(io, writer, mesh, down.ab2b, ncomp, name);
134135
if (d > 1) {

src/Omega_h_adios2.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <Omega_h_mesh.hpp>
55
#include "Omega_h_filesystem.hpp" // filesystem
66
#include "Omega_h_library.hpp"
7+
#include "Omega_h_simplex.hpp"
78

89
namespace Omega_h {
910

0 commit comments

Comments
 (0)