matrix.add(1,1,1.3);
- matrix.compress();
+ matrix.compress(VectorOperation::add);
if (myid==0)
{
class Vector
{
public:
+
+ Vector()
+ {}
- Vector(const IndexSet local, const MPI_Comm &comm=MPI_COMM_WORLD)
+ Vector(const IndexSet local, const MPI_Comm &comm)
{}
- Vector(const IndexSet &local, const IndexSet &ghost, const MPI_Comm &comm=MPI_COMM_WORLD)
+ Vector(const IndexSet &local, const IndexSet &ghost, const MPI_Comm &comm)
{}
- void reinit(const IndexSet local, const MPI_Comm &comm=MPI_COMM_WORLD)
+ void reinit(const IndexSet local, const MPI_Comm &comm)
{}
- void reinit(const IndexSet local, const IndexSet &ghost, const MPI_Comm &comm=MPI_COMM_WORLD)
+ void reinit(const IndexSet local, const IndexSet &ghost, const MPI_Comm &comm)
{}
void compress(VectorOperation::values op)
{
- //implicit communicator:
- typename LA::MPI::Vector v1(local_active);
- Assert(!v1.has_ghost_elements(), ExcInternalError());
- Assert(v1.size()==numproc*2, ExcInternalError());
-
- v1.reinit(something);
- Assert(!v1.has_ghost_elements(), ExcInternalError());
- Assert(v1.size()==100, ExcInternalError());
-
- v1.reinit(local_active, local_relevant);
- Assert(v1.has_ghost_elements(), ExcInternalError());
- Assert(v1.size()==numproc*2, ExcInternalError());
+ typename LA::MPI::Vector v1;
v1.reinit(something, MPI_COMM_WORLD);
Assert(!v1.has_ghost_elements(), ExcInternalError());
Assert(v1.size()==100, ExcInternalError());
- typename LA::MPI::Vector v2(local_active, local_relevant);
+ typename LA::MPI::Vector v2(local_active, local_relevant, MPI_COMM_WORLD);
Assert(v2.has_ghost_elements(), ExcInternalError());
Assert(v2.size()==numproc*2, ExcInternalError());
local_active.add_range(myid*2,myid*2+2);
IndexSet local_relevant(numproc*2);
local_relevant.add_range(1,2);
-
- {
- //implicit communicator:
- typename LA::MPI::Vector v1(local_active);
- typename LA::MPI::Vector v2(local_active, local_relevant);
- Assert(!v1.has_ghost_elements(), ExcInternalError());
- Assert(v2.has_ghost_elements(), ExcInternalError());
- }
typename LA::MPI::Vector vb(local_active, MPI_COMM_WORLD);
typename LA::MPI::Vector v(local_active, local_relevant, MPI_COMM_WORLD);
IndexSet local_relevant(numproc*2);
local_relevant.add_range(1,2);
- typename LA::MPI::Vector vb(local_active);
- typename LA::MPI::Vector v(local_active, local_relevant);
- typename LA::MPI::Vector v2(local_active, local_relevant);
+ typename LA::MPI::Vector vb(local_active, MPI_COMM_WORLD);
+ typename LA::MPI::Vector v(local_active, local_relevant, MPI_COMM_WORLD);
+ typename LA::MPI::Vector v2(local_active, local_relevant, MPI_COMM_WORLD);
vb = 1.0;
v2 = vb;
IndexSet local_relevant(numproc*2);
local_relevant.add_range(1,2);
- typename LA::MPI::Vector vb(local_active);
- typename LA::MPI::Vector v(local_active, local_relevant);
+ typename LA::MPI::Vector vb(local_active, MPI_COMM_WORLD);
+ typename LA::MPI::Vector v(local_active, local_relevant, MPI_COMM_WORLD);
vb = 1.0;