<h3>Specific improvements</h3>
<ol>
+<li> Changed: To support Trilinos version 10.12.x we need to cache the
+result of has_ghost_elements() in parallel vectors at construction time
+of the vector. Starting from 10.12 Trilinos will communicate in this
+call, which therefore only works if called from all CPUs.
+<br>
+(Timo Heister, 2012/08/22)
+
<li> New: The copy constructor of FullMatrix from IdentityMatrix
used to be explicit, but that didn't appear to be necessary in hindsight.
Consequently, it is now a regular copy constructor.
if (vector.get() != 0 && vector->Map().SameAs(parallel_partitioner))
vector.reset (new Epetra_FEVector(parallel_partitioner));
+ has_ghosts = vector->Map().UniqueGIDs()==false;
+
const int size = parallel_partitioner.NumMyElements();
// Need to copy out values, since the
/**
* Return if the vector contains ghost
- * elements.
+ * elements. This answer is true if there
+ * are ghost elements on at least one
+ * process.
*/
bool has_ghost_elements() const;
*/
bool compressed;
+ /**
+ * Whether this vector has ghost elements. This is true
+ * on all processors even if only one of them has any
+ * ghost elements.
+ */
+ bool has_ghosts;
+
/**
* An Epetra distibuted vector
* type. Requires an existing
bool
VectorBase::has_ghost_elements() const
{
- return vector->Map().UniqueGIDs()==false;
+ return has_ghosts;
}
{
last_action = Zero;
vector.reset (new Epetra_FEVector(*v.vector));
+ has_ghosts = v.has_ghosts;
}
Assert (ierr == 0, ExcTrilinosError(ierr));
}
+ has_ghosts = vector->Map().UniqueGIDs()==false;
last_action = Zero;
}
if (vector->Map().SameAs(v.vector->Map()) == false)
{
vector.reset (new Epetra_FEVector(v.vector->Map()));
+ has_ghosts = v.has_ghosts;
last_action = Zero;
}
else if (fast == false)
{
vector.reset (new Epetra_FEVector(*v.vector));
last_action = Zero;
+ has_ghosts = v.has_ghosts;
}
return *this;
:
last_action (Zero),
compressed (true),
+ has_ghosts (false),
#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
vector(new Epetra_FEVector(
Epetra_Map(0,0,Epetra_MpiComm(MPI_COMM_SELF))))
Subscriptor(),
last_action (Zero),
compressed (true),
+ has_ghosts (v.has_ghosts),
vector(new Epetra_FEVector(*v.vector))
{}
Epetra_Map map (0, 0, Epetra_SerialComm());
#endif
+ has_ghosts = false;
vector.reset (new Epetra_FEVector(map));
last_action = Zero;
}
{
last_action = Zero;
vector.reset (new Epetra_FEVector(*v.vector));
+ has_ghosts = v.has_ghosts;
}
else
{