std::cerr<<"ERROR: global indices of local entities are not contiguous (local index "<<local_idx<<" is after a ghost entity has been found)"<<std::endl;
throwstd::runtime_error("encountered local entity while iterating over ghost entities - the mesh is probably inconsistent or there is a bug in the DistributedMeshSynchronizer");
throwstd::runtime_error("ghost indices are not sorted - the mesh is probably inconsistent or there is a bug in the DistributedMeshSynchronizer");
prev_global_idx=global_idx;
constintowner=getOwner(global_idx);
if(owner!=rank){
if(owner==rank)
throwstd::runtime_error("the owner of a ghost entity cannot be the local rank - the mesh is probably inconsistent or there is a bug in the DistributedMeshSynchronizer");
throwstd::runtime_error("The mesh is inconsistent - ghost entities of dimension "+std::to_string(DimensionTag::value)+" are not ordered after local entities.");
throwstd::runtime_error("The mesh is inconsistent - ghost entities of dimension "+std::to_string(DimensionTag::value)+" are not ordered after local entities.");