We'll be taking GitLab down for maintenance around 22 in the evening on the 15th of September, so this Sunday. Let us know (tt.mpi-cbg.de) if you experience any issues with it after the maintenance period.

Commit 151921ec authored by incardon's avatar incardon
parents 782f69ec 0c3cdf5a
......@@ -143,7 +143,7 @@ public:
invert_assign(t...);
}
__device__ __host__ inline grid_key_dx<dim,index_type> move(int i, int m)
__device__ __host__ inline grid_key_dx<dim,index_type> move(int i, int m) const
{
grid_key_dx<dim,index_type> tmp = *this;
......@@ -336,6 +336,33 @@ public:
return !this->operator==(key_t);
}
/*! \brief Check order of two keys
*
* \param key_t key to check
*
* \return true if this is lexicographically less than other key
*
*/
bool operator<(const grid_key_dx<dim> & key_t) const
{
// Check the two key index by index
for (long int i = dim-1 ; i >= 0; --i)
{
if (k[i] < key_t.k[i])
{
return true;
}
else if (k[i] > key_t.k[i])
{
return false;
}
}
// identical key
return false;
}
/*! \brief set the Key from a list of numbers
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment