142#if (PETSC_VERSION_MAJOR == 3 && PETSC_VERSION_MINOR >= 3)
144 VecCreateMPIWithArray(PETSC_COMM_WORLD, 1, hi-lo, this->
GetSize(), &
mpData[lo], &distributed_vec);
146 VecCreateMPIWithArray(PETSC_COMM_WORLD, hi-lo, this->
GetSize(), &
mpData[lo], &distributed_vec);
148#if (PETSC_VERSION_MAJOR == 3)
149 VecSetOption(distributed_vec, VEC_IGNORE_OFF_PROC_ENTRIES, PETSC_TRUE);
151 VecSetOption(distributed_vec, VEC_IGNORE_OFF_PROC_ENTRIES);
164 VecGetSize(vec, &isize);
165 unsigned size = isize;
179#if ((PETSC_VERSION_MAJOR == 3) || (PETSC_VERSION_MAJOR == 2 && PETSC_VERSION_MINOR == 3 && PETSC_VERSION_SUBMINOR == 3))
190 double* p_replicated;
192 for (
unsigned i=0; i<size; i++)
194 mpData[i] = p_replicated[i];