Skip to content

Commit

Permalink
Better error message when MatchingPartitioner is not initialised with…
Browse files Browse the repository at this point in the history
… Mesh/FunctionSpace to match
  • Loading branch information
wdeconinck committed Oct 20, 2023
1 parent 22f02c0 commit 752d82f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include "atlas/grid/detail/partitioner/MatchingFunctionSpacePartitioner.h"

#include <sstream>

#include "atlas/functionspace/FunctionSpace.h"
#include "atlas/runtime/Exception.h"

Expand All @@ -19,7 +21,7 @@ namespace detail {
namespace partitioner {

MatchingFunctionSpacePartitioner::MatchingFunctionSpacePartitioner(): Partitioner() {
ATLAS_NOTIMPLEMENTED;
ATLAS_THROW_EXCEPTION("Error: A MatchingFunctionPartitioner needs to be initialised with a FunctionSpace");
}

// MatchingFunctionSpacePartitioner::MatchingFunctionSpacePartitioner(const idx_t nb_partitions):
Expand Down
5 changes: 4 additions & 1 deletion src/atlas/grid/detail/partitioner/MatchingMeshPartitioner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/

#include "atlas/grid/detail/partitioner/MatchingMeshPartitioner.h"

#include <sstream>

#include "atlas/runtime/Exception.h"

namespace atlas {
Expand All @@ -17,7 +20,7 @@ namespace detail {
namespace partitioner {

MatchingMeshPartitioner::MatchingMeshPartitioner(): Partitioner() {
ATLAS_NOTIMPLEMENTED;
ATLAS_THROW_EXCEPTION("Error: A MatchingMeshPartitioner needs to be initialised with a Mesh");
}

// MatchingMeshPartitioner::MatchingMeshPartitioner(const idx_t nb_partitions): Partitioner(nb_partitions) {
Expand Down

0 comments on commit 752d82f

Please sign in to comment.