diff --git a/src/scheme/BoundaryConditionDescriptor.hpp b/src/scheme/BoundaryConditionDescriptor.hpp
index f6027b246691797833f8bc78f5f48ac09ae77ecb..b84eb2efaf1124af81fe4eb444a6cb24ef390ff6 100644
--- a/src/scheme/BoundaryConditionDescriptor.hpp
+++ b/src/scheme/BoundaryConditionDescriptor.hpp
@@ -23,6 +23,11 @@ class BoundaryDescriptor
     return bd._write(os);
   }
 
+  virtual bool operator==(const RefId& ref_id) const =0;
+  friend bool operator==(const RefId& ref_id, const BoundaryDescriptor& bcd)
+  {
+    return bcd == ref_id;
+  }
   virtual Type type() const = 0;
   BoundaryDescriptor(const BoundaryDescriptor&) = default;
   BoundaryDescriptor() = default;
@@ -42,6 +47,11 @@ class NamedBoundaryDescriptor
   }
 
  public:
+  bool operator==(const RefId& ref_id) const final
+  {
+    return m_name == ref_id.tagName();
+  }
+
   Type type() const final
   {
     return Type::named;
@@ -60,7 +70,7 @@ class NumberedBoundaryDescriptor
     : public BoundaryDescriptor
 {
  private:
-  int m_number;
+  unsigned int m_number;
 
   std::ostream& _write(std::ostream& os) const final
   {
@@ -68,6 +78,11 @@ class NumberedBoundaryDescriptor
     return os;
   }
 
+  bool operator==(const RefId& ref_id) const final
+  {
+    return m_number == ref_id.tagNumber();
+  }
+
  public:
   Type type() const final
   {
@@ -75,7 +90,7 @@ class NumberedBoundaryDescriptor
   }
 
   NumberedBoundaryDescriptor(const NumberedBoundaryDescriptor&) = default;
-  NumberedBoundaryDescriptor(const int& number)
+  NumberedBoundaryDescriptor(const unsigned int& number)
       : m_number(number)
   {
     ;