VectorTools::interpolate (dofh,
LinearFunction<dim>(),
interpolated);
- interpolated.compress();
double norm = interpolated.l2_norm();
if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
int main(int argc, char *argv[])
{
- PetscInitialize(&argc,&argv,0,0);
-
+ Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv);
+
if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
{
std::ofstream logfile(output_file_for_mpi("petsc_01").c_str());
}
else
test();
-
- PetscFinalize();
}
v(myid*2)=myid*2.0;
v(myid*2+1)=myid*2.0+1.0;
- v.compress();
+ v.compress(VectorOperation::insert);
v*=2.0;
if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
v(myid*2)=myid*2.0;
v(myid*2+1)=myid*2.0+1.0;
- v.compress();
+ v.compress(VectorOperation::insert);
// assignment with transfer to ghost
v_tmp = v;
v(myid*2)=1.0;
v(myid*2+1)=1.0;
- v.compress();
+ v.compress(VectorOperation::insert);
v_tmp.reinit(v,false,true);
v(myid*2)=myid*2;
v(myid*2+1)=myid*2+1;
- v.compress();
+ v.compress(VectorOperation::insert);
v_tmp.reinit(v,false,true);
x(myid*2+1)=myid*2.0+1.0;
// transfer to ghosted vector v and check
- x.compress();
+ x.compress(VectorOperation::insert);
v=x;
Assert(v(myid*2) == myid*2.0, ExcInternalError());
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams