i != copy_indices[level].end(); ++i)
dst_level(i->second) = src(i->first);
- for (IT i= copy_indices_to_me[level].begin();
- i != copy_indices_to_me[level].end(); ++i)
- dst_level(i->second) = src(i->first);
+ // for (IT i= copy_indices_to_me[level].begin();
+ // i != copy_indices_to_me[level].end(); ++i)
+ // dst_level(i->second) = src(i->first);
dst_level.compress(VectorOperation::insert);
typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
// First copy all indices local to this process
- for (IT i= copy_indices[level].begin();
- i != copy_indices[level].end(); ++i)
- dst(i->first) = src[level](i->second);
-
+ if (constraints==0)
+ for (IT i= copy_indices[level].begin();
+ i != copy_indices[level].end(); ++i)
+ dst(i->first) = src[level](i->second);
+ else
+ for (IT i= copy_indices[level].begin();
+ i != copy_indices[level].end(); ++i)
+ constraints->distribute_local_to_global(i->first, src[level](i->second), dst);
+
// Do the same for the indices where the level index is local,
// but the global index is not
- for (IT i= copy_indices_from_me[level].begin();
- i != copy_indices_from_me[level].end(); ++i)
- dst(i->first) = src[level](i->second);
+ if (constraints==0)
+ for (IT i= copy_indices_from_me[level].begin();
+ i != copy_indices_from_me[level].end(); ++i)
+ dst(i->first) = src[level](i->second);
+ else
+ for (IT i= copy_indices_from_me[level].begin();
+ i != copy_indices_from_me[level].end(); ++i)
+ constraints->distribute_local_to_global(i->first, src[level](i->second), dst);
}
}
for (unsigned int level=0; level<mg_dof_handler.get_tria().n_global_levels(); ++level)
{
typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
- for (IT i= copy_indices[level].begin();
- i != copy_indices[level].end(); ++i)
- dst(i->first) += src[level](i->second);
-
+ if (constraints==0)
+ for (IT i= copy_indices[level].begin();
+ i != copy_indices[level].end(); ++i)
+ dst(i->first) += src[level](i->second);
+ else
+ for (IT i= copy_indices[level].begin();
+ i != copy_indices[level].end(); ++i)
+ constraints->distribute_local_to_global(i->first, src[level](i->second), dst);
+
// Do the same for the indices where the level index is local,
// but the global index is not
- for (IT i= copy_indices_from_me[level].begin();
- i != copy_indices_from_me[level].end(); ++i)
- dst(i->first) += src[level](i->second);
+ if (constraints==0)
+ for (IT i= copy_indices_from_me[level].begin();
+ i != copy_indices_from_me[level].end(); ++i)
+ dst(i->first) += src[level](i->second);
+ else
+ for (IT i= copy_indices_from_me[level].begin();
+ i != copy_indices_from_me[level].end(); ++i)
+ constraints->distribute_local_to_global(i->first, src[level](i->second), dst);
}
}