From 9bd6bd756e078a9e54f33e079300a6e03db677e7 Mon Sep 17 00:00:00 2001 From: Bruce Perry Date: Tue, 17 Dec 2024 13:25:21 -0700 Subject: [PATCH] blackboxfunc table: table must have at least two points in each direction --- Source/Utility/BlackBoxFunction/Table.H | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Utility/BlackBoxFunction/Table.H b/Source/Utility/BlackBoxFunction/Table.H index b9f6c62fc..82cd8f5ce 100644 --- a/Source/Utility/BlackBoxFunction/Table.H +++ b/Source/Utility/BlackBoxFunction/Table.H @@ -104,6 +104,10 @@ struct InitParm int Ngridtot = 0; for (int ii = 0; ii < m_h_tf_data.Ndim; ii++) { Ngridtot += m_h_tf_data.dimLengths[ii]; + if (m_h_tf_data.dimLengths[ii] < 2) { + amrex::Abort("TabulatedFunction: Each dimension must have at least two " + "grid points."); + } } m_h_tf_data.grids = static_cast( amrex::The_Pinned_Arena()->alloc(Ngridtot * real_size));