Added Box::equal() comparison function.

This commit is contained in:
Joakim Hove
2014-05-27 18:30:36 +02:00
committed by Andreas Lauser
parent 74f66a5f3c
commit 2a5ec9aac9
3 changed files with 39 additions and 1 deletions

View File

@@ -130,7 +130,26 @@ namespace Opm {
}
}
bool Box::equal(const Box& other) const {
if (size() != other.size())
return false;
{
for (size_t idim = 0; idim < 3; idim++) {
if (m_dims[idim] != other.m_dims[idim])
return false;
if (m_stride[idim] != other.m_stride[idim])
return false;
if (m_offset[idim] != other.m_offset[idim])
return false;
}
}
return true;
}
}