types::global_dof_index
size() const;
- /**
- * Return the number of locally owned indices,
- * i.e., local_range().second minus local_range().first.
- * The returned numbers need to add up to the total number of indices when
- * summed over all processes
- *
- * @deprecated Use the more clearly named function locally_owned_size()
- * instead.
- */
- DEAL_II_DEPRECATED
- unsigned int
- local_size() const;
-
/**
* Return the number of locally owned indices,
* i.e., local_range().second minus local_range().first.
- inline unsigned int
- Partitioner::local_size() const
- {
- return locally_owned_size();
- }
-
-
-
inline unsigned int
Partitioner::locally_owned_size() const
{
void
update_ghost_values() const;
- /**
- * This method zeros the entries on ghost dofs, but does not touch
- * locally owned DoFs.
- *
- * After calling this method, read access to ghost elements of the
- * vector is forbidden and an exception is thrown. Only write access to
- * ghost elements is allowed in this state.
- *
- * @deprecated Use zero_out_ghost_values() instead.
- */
- DEAL_II_DEPRECATED void
- zero_out_ghosts() const;
-
-
/**
* This method zeros the entries on ghost dofs, but does not touch
* locally owned DoFs.
- template <typename Number>
- void
- BlockVector<Number>::zero_out_ghosts() const
- {
- this->zero_out_ghost_values();
- }
-
-
-
template <typename Number>
void
BlockVector<Number>::zero_out_ghost_values() const
void
update_ghost_values_finish() const;
- /**
- * This method zeros the entries on ghost dofs, but does not touch
- * locally owned DoFs.
- *
- * After calling this method, read access to ghost elements of the
- * vector is forbidden and an exception is thrown. Only write access to
- * ghost elements is allowed in this state.
- *
- * @deprecated Use zero_out_ghost_values() instead.
- */
- DEAL_II_DEPRECATED void
- zero_out_ghosts() const;
-
/**
* This method zeros the entries on ghost dofs, but does not touch
* locally owned DoFs.
*/
/** @{ */
- /**
- * Return the local size of the vector, i.e., the number of indices
- * owned locally.
- *
- * @deprecated Use locally_owned_size() instead.
- */
- DEAL_II_DEPRECATED
- size_type
- local_size() const;
-
/**
* Return the local size of the vector, i.e., the number of indices
* owned locally.
- template <typename Number, typename MemorySpace>
- inline typename Vector<Number, MemorySpace>::size_type
- Vector<Number, MemorySpace>::local_size() const
- {
- return locally_owned_size();
- }
-
-
-
template <typename Number, typename MemorySpace>
inline typename Vector<Number, MemorySpace>::size_type
Vector<Number, MemorySpace>::locally_owned_size() const
- template <typename Number, typename MemorySpaceType>
- void
- Vector<Number, MemorySpaceType>::zero_out_ghosts() const
- {
- this->zero_out_ghost_values();
- }
-
-
-
template <typename Number, typename MemorySpaceType>
void
Vector<Number, MemorySpaceType>::zero_out_ghost_values() const
size_type
size() const;
- /**
- * Return the local dimension of the vector, i.e. the number of elements
- * stored on the present MPI process. For sequential vectors, this number
- * is the same as size(), but for parallel vectors it may be smaller.
- *
- * To figure out which elements exactly are stored locally, use
- * local_range() or locally_owned_elements().
- *
- * @deprecated use locally_owned_size() instead.
- */
- DEAL_II_DEPRECATED
- size_type
- local_size() const;
-
/**
* Return the local dimension of the vector, i.e. the number of elements
* stored on the present MPI process. For sequential vectors, this number
PetscScalar
add_and_dot(const PetscScalar a, const VectorBase &V, const VectorBase &W);
- /**
- * Return the value of the vector element with the largest negative value.
- *
- * @deprecated This function has been deprecated to improve compatibility
- * with other classes inheriting from VectorSpaceVector. If you need to
- * use this functionality then use the PETSc function VecMin instead.
- */
- DEAL_II_DEPRECATED
- real_type
- min() const;
-
- /**
- * Return the value of the vector element with the largest positive value.
- *
- * @deprecated This function has been deprecated to improve compatibility
- * with other classes inheriting from VectorSpaceVector. If you need to
- * use this functionality then use the PETSc function VecMax instead.
- */
- DEAL_II_DEPRECATED
- real_type
- max() const;
-
/**
* Return whether the vector contains only elements with value zero. This
* is a collective operation. This function is expensive, because
bool
all_zero() const;
- /**
- * Return @p true if the vector has no negative entries, i.e. all entries
- * are zero or positive. This function is used, for example, to check
- * whether refinement indicators are really all positive (or zero).
- *
- * @deprecated This function has been deprecated to improve compatibility
- * with other classes inheriting from VectorSpaceVector.
- */
- DEAL_II_DEPRECATED
- bool
- is_non_negative() const;
-
/**
* Multiply the entire vector by a fixed factor.
*/
size_type
size() const;
- /**
- * This function returns the number of elements stored. It is smaller or
- * equal to the dimension of the vector space that is modeled by an object
- * of this kind. This dimension is return by size().
- *
- * @deprecated use locally_owned_size() instead.
- */
- DEAL_II_DEPRECATED
- size_type
- n_elements() const;
-
/**
* Return the local size of the vector, i.e., the number of indices
* owned locally.
- template <typename Number>
- inline typename ReadWriteVector<Number>::size_type
- ReadWriteVector<Number>::n_elements() const
- {
- return stored_elements.n_elements();
- }
-
-
-
template <typename Number>
inline typename ReadWriteVector<Number>::size_type
ReadWriteVector<Number>::locally_owned_size() const
size_type
size() const;
- /**
- * Return the local dimension of the vector, i.e. the number of elements
- * stored on the present MPI process. For sequential vectors, this number
- * is the same as size(), but for parallel vectors it may be smaller.
- *
- * To figure out which elements exactly are stored locally, use
- * local_range().
- *
- * If the vector contains ghost elements, they are included in this
- * number.
- *
- * @deprecated This function is deprecated.
- */
- DEAL_II_DEPRECATED
- size_type
- local_size() const;
-
/**
* Return the local size of the vector, i.e., the number of indices
* owned locally.
* stored, the second the index of the one past the last one that is
* stored locally. If this is a sequential vector, then the result will be
* the pair <code>(0,N)</code>, otherwise it will be a pair
- * <code>(i,i+n)</code>, where <code>n=local_size()</code> and
- * <code>i</code> is the first element of the vector stored on this
- * processor, corresponding to the half open interval $[i,i+n)$
+ * <code>(i,i+n)</code>, where <code>n</code> is the number of elements
+ * stored on this processor and and <code>i</code> is the first element of
+ * the vector stored on this processor, corresponding to the half open
+ * interval $[i,i+n)$
*
* @note The description above is true most of the time, but not always.
* In particular, Trilinos vectors need not store contiguous ranges of
* corresponds to the one given by the global indices in case the vector
* is constructed from an IndexSet or other methods in deal.II (note that
* an Epetra_Map can contain elements in arbitrary orders, though).
- *
- * It holds that end() - begin() == local_size().
*/
iterator
begin();
- inline Vector::size_type
- Vector::local_size() const
- {
- return vector->Map().NumMyElements();
- }
-
-
-
inline Vector::size_type
Vector::locally_owned_size() const
{
- VectorBase::size_type
- VectorBase::local_size() const
- {
- PetscInt sz;
- const PetscErrorCode ierr = VecGetLocalSize(vector, &sz);
- AssertThrow(ierr == 0, ExcPETScError(ierr));
-
- return sz;
- }
-
-
-
std::pair<VectorBase::size_type, VectorBase::size_type>
VectorBase::local_range() const
{
- VectorBase::real_type
- VectorBase::min() const
- {
- PetscInt p;
- real_type d;
-
- const PetscErrorCode ierr = VecMin(vector, &p, &d);
- AssertThrow(ierr == 0, ExcPETScError(ierr));
-
- return d;
- }
-
-
- VectorBase::real_type
- VectorBase::max() const
- {
- PetscInt p;
- real_type d;
-
- const PetscErrorCode ierr = VecMax(vector, &p, &d);
- AssertThrow(ierr == 0, ExcPETScError(ierr));
-
- return d;
- }
-
-
-
bool
VectorBase::all_zero() const
{
- bool
- VectorBase::is_non_negative() const
- {
- // get a representation of the vector and
- // loop over all the elements
- const PetscScalar *start_ptr;
- PetscErrorCode ierr = VecGetArrayRead(vector, &start_ptr);
- AssertThrow(ierr == 0, ExcPETScError(ierr));
-
- const PetscScalar *ptr = start_ptr,
- *eptr = start_ptr + locally_owned_size();
- bool flag = true;
- while (ptr != eptr)
- {
- if (!internal::is_non_negative(*ptr))
- {
- flag = false;
- break;
- }
- ++ptr;
- }
-
- // restore the representation of the
- // vector
- ierr = VecRestoreArrayRead(vector, &start_ptr);
- AssertThrow(ierr == 0, ExcPETScError(ierr));
-
- return flag;
- }
-
-
-
VectorBase &
VectorBase::operator*=(const PetscScalar a)
{
{
// In case we call the solver with deal.II vectors, we create views of the
// vectors in Epetra format.
- AssertDimension(x.local_size(),
+ AssertDimension(x.locally_owned_size(),
A.trilinos_matrix().DomainMap().NumMyElements());
- AssertDimension(b.local_size(),
+ AssertDimension(b.locally_owned_size(),
A.trilinos_matrix().RangeMap().NumMyElements());
Epetra_Vector ep_x(View, A.trilinos_matrix().DomainMap(), x.begin());
const dealii::LinearAlgebra::distributed::Vector<double> &b,
const PreconditionBase &preconditioner)
{
- AssertDimension(x.local_size(), A.OperatorDomainMap().NumMyElements());
- AssertDimension(b.local_size(), A.OperatorRangeMap().NumMyElements());
+ AssertDimension(x.locally_owned_size(),
+ A.OperatorDomainMap().NumMyElements());
+ AssertDimension(b.locally_owned_size(),
+ A.OperatorRangeMap().NumMyElements());
Epetra_Vector ep_x(View, A.OperatorDomainMap(), x.begin());
Epetra_Vector ep_b(View,
dealii::LinearAlgebra::distributed::Vector<double> & x,
const dealii::LinearAlgebra::distributed::Vector<double> &b)
{
- AssertDimension(x.local_size(),
+ AssertDimension(x.locally_owned_size(),
A.trilinos_matrix().DomainMap().NumMyElements());
- AssertDimension(b.local_size(),
+ AssertDimension(b.locally_owned_size(),
A.trilinos_matrix().RangeMap().NumMyElements());
Epetra_Vector ep_x(View, A.trilinos_matrix().DomainMap(), x.begin());
Epetra_Vector ep_b(View,
Assert(local_index >= 0,
MPI::Vector::ExcAccessToNonLocalElement(
index,
- vector.local_size(),
+ vector.vector->Map().NumMyElements(),
vector.vector->Map().MinMyGID(),
vector.vector->Map().MaxMyGID()));
// vector. need to manually create an Epetra_Map.
size_type n_elements = 0, added_elements = 0, block_offset = 0;
for (size_type block = 0; block < v.n_blocks(); ++block)
- n_elements += v.block(block).local_size();
+ n_elements += v.block(block).vector->Map().NumMyElements();
std::vector<TrilinosWrappers::types::int_type> global_ids(n_elements, -1);
for (size_type block = 0; block < v.n_blocks(); ++block)
{
TrilinosWrappers::types::int_type *glob_elements =
TrilinosWrappers::my_global_elements(
v.block(block).trilinos_partitioner());
- for (size_type i = 0; i < v.block(block).local_size(); ++i)
+ size_type vector_size = v.block(block).vector->Map().NumMyElements();
+ for (size_type i = 0; i < vector_size; ++i)
global_ids[added_elements++] = glob_elements[i] + block_offset;
owned_elements.add_indices(v.block(block).owned_elements,
block_offset);
for (size_type block = 0; block < v.n_blocks(); ++block)
{
v.block(block).trilinos_vector().ExtractCopy(entries, 0);
- entries += v.block(block).local_size();
+ entries += v.block(block).vector->Map().NumMyElements();
}
if (import_data == true)
{
Assert(false,
ExcAccessToNonLocalElement(index,
- local_size(),
+ vector->Map().NumMyElements(),
vector->Map().MinMyGID(),
vector->Map().MaxMyGID()));
}
Vector::operator==(const Vector &v) const
{
Assert(size() == v.size(), ExcDimensionMismatch(size(), v.size()));
- if (local_size() != v.local_size())
+ if (vector->Map().NumMyElements() != v.vector->Map().NumMyElements())
return false;
- size_type i;
- for (i = 0; i < local_size(); ++i)
+ size_type vector_size = vector->Map().NumMyElements();
+ for (size_type i = 0; i < vector_size; ++i)
if ((*(v.vector))[0][i] != (*vector)[0][i])
return false;
// get a representation of the vector and
// loop over all the elements
TrilinosScalar * start_ptr = (*vector)[0];
- const TrilinosScalar *ptr = start_ptr, *eptr = start_ptr + local_size();
- unsigned int flag = 0;
+ const TrilinosScalar *ptr = start_ptr,
+ *eptr = start_ptr + vector->Map().NumMyElements();
+ unsigned int flag = 0;
while (ptr != eptr)
{
if (*ptr != 0)
// get a representation of the vector and
// loop over all the elements
TrilinosScalar * start_ptr = (*vector)[0];
- const TrilinosScalar *ptr = start_ptr, *eptr = start_ptr + local_size();
- unsigned int flag = 0;
+ const TrilinosScalar *ptr = start_ptr,
+ *eptr = start_ptr + vector->Map().NumMyElements();
+ unsigned int flag = 0;
while (ptr != eptr)
{
if (*ptr < 0.0)
else
out.setf(std::ios::fixed, std::ios::floatfield);
- if (size() != local_size())
+ size_type vector_size = vector->Map().NumMyElements();
+ if (size() != vector_size)
{
auto global_id = [&](const size_type index) {
return gid(vector->Map(), index);
};
- out << "size:" << size() << " local_size:" << local_size() << " :"
+ out << "size:" << size()
+ << " locally_owned_size:" << vector->Map().NumMyElements() << " :"
<< std::endl;
- for (size_type i = 0; i < local_size(); ++i)
+ for (size_type i = 0; i < vector_size; ++i)
out << "[" << global_id(i) << "]: " << (*(vector))[0][i]
<< std::endl;
}
// one index and the value per local
// entry.
return sizeof(*this) +
- this->local_size() *
+ this->vector->Map().NumMyElements() *
(sizeof(double) + sizeof(TrilinosWrappers::types::int_type));
}
LinearAlgebra::distributed::Vector<double> solution(
dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
const double old_value = 10.;
- for (unsigned int i = 0; i < solution.local_size(); ++i)
+ for (unsigned int i = 0; i < solution.locally_owned_size(); ++i)
solution.local_element(i) = old_value;
parallel::distributed::experimental::
unsigned int myid = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
if (myid == 0)
{
- for (unsigned int i = 0; i < new_solution.local_size(); ++i)
+ for (unsigned int i = 0; i < new_solution.locally_owned_size(); ++i)
AssertThrow(new_solution.local_element(i) == old_value,
ExcInternalError());
}
else if (myid == 1)
{
- for (unsigned int i = 0; i < new_solution.local_size(); ++i)
+ for (unsigned int i = 0; i < new_solution.locally_owned_size(); ++i)
AssertThrow(new_solution.local_element(i) == new_value,
ExcInternalError());
}
LinearAlgebra::distributed::Vector<double> solution(
dof_handler.locally_owned_dofs(), locally_relevant_dofs, MPI_COMM_WORLD);
const double old_value = 1.;
- for (unsigned int i = 0; i < solution.local_size(); ++i)
+ for (unsigned int i = 0; i < solution.locally_owned_size(); ++i)
solution.local_element(i) = old_value;
{
LinearAlgebra::distributed::Vector<double, MemorySpace::Default> v(
local_owned, local_relevant, MPI_COMM_WORLD);
- AssertDimension(static_cast<unsigned int>(actual_local_size), v.local_size());
+ AssertDimension(static_cast<unsigned int>(actual_local_size),
+ v.locally_owned_size());
LinearAlgebra::distributed::Vector<double, MemorySpace::Default> w(v), x(v),
y(v);
v0_rw.import_elements(v0, VectorOperation::insert);
LinearAlgebra::ReadWriteVector<double> v1_rw(local_owned1);
v1_rw.import_elements(v1, VectorOperation::insert);
- for (unsigned int i = 0; i < v0.local_size(); ++i)
+ for (unsigned int i = 0; i < v0.locally_owned_size(); ++i)
AssertThrow(v0_rw.local_element(i) == 1.,
ExcNonEqual(v0_rw.local_element(i), 1.));
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
AssertThrow(v1_rw.local_element(i) == 2.,
ExcNonEqual(v1_rw.local_element(i), 2.));
// now swap v1 and v0
v0.swap(v1);
- AssertDimension(v0.local_size(), local_size1);
- AssertDimension(v1.local_size(), actual_local_size0);
+ AssertDimension(v0.locally_owned_size(), local_size1);
+ AssertDimension(v1.locally_owned_size(), actual_local_size0);
AssertDimension(v0.size(), global_size1);
AssertDimension(v1.size(), global_size0);
v1_rw.import_elements(v0, VectorOperation::insert);
v2.swap(v0);
AssertDimension(v0.size(), 0);
AssertDimension(v2.size(), global_size1);
- AssertDimension(v2.local_size(), local_size1);
+ AssertDimension(v2.locally_owned_size(), local_size1);
v1_rw.import_elements(v2, VectorOperation::insert);
for (int i = my_start1; i < my_end1; ++i)
AssertThrow(v1_rw(i) == 7., ExcNonEqual(v1_rw(i), 7.));
// set locally owned range of v2 manually
Kokkos::View<double *, MemorySpace::Default::kokkos_space> v2_view(
- v2.get_values(), v2.local_size());
+ v2.get_values(), v2.locally_owned_size());
Kokkos::deep_copy(v2_view, 1.);
// add entries to ghost values
is.add_range(10, 15);
LinearAlgebra::ReadWriteVector<double> double_vector(is);
LinearAlgebra::ReadWriteVector<float> float_vector(float_size);
- deallog << "double_size " << double_vector.n_elements() << std::endl;
- deallog << "float_size " << float_vector.n_elements() << std::endl;
+ deallog << "double_size " << double_vector.locally_owned_size() << std::endl;
+ deallog << "float_size " << float_vector.locally_owned_size() << std::endl;
double_vector = 0.;
- for (unsigned int i = 0; i < double_vector.n_elements(); ++i)
+ for (unsigned int i = 0; i < double_vector.locally_owned_size(); ++i)
double_vector.local_element(i) += i;
- for (unsigned int i = 0; i < float_vector.n_elements(); ++i)
+ for (unsigned int i = 0; i < float_vector.locally_owned_size(); ++i)
float_vector[i] = i;
double_vector.print(deallog.get_file_stream());
LinearAlgebra::ReadWriteVector<double> double_vector2(double_vector);
double_vector2.print(deallog.get_file_stream());
- for (unsigned int i = 0; i < double_vector.n_elements(); ++i)
+ for (unsigned int i = 0; i < double_vector.locally_owned_size(); ++i)
double_vector2.local_element(i) += i;
double_vector = double_vector2;
double_vector.print(deallog.get_file_stream());
is.add_range(1, 3);
is.add_index(7);
LinearAlgebra::ReadWriteVector<double> vec(is);
- deallog << "size: " << vec.n_elements() << std::endl;
+ deallog << "size: " << vec.locally_owned_size() << std::endl;
vec = 0.;
- for (unsigned int i = 0; i < vec.n_elements(); ++i)
+ for (unsigned int i = 0; i < vec.locally_owned_size(); ++i)
vec.local_element(i) += i;
vec.print(deallog.get_file_stream());
fe_eval.distribute_local_to_global(inv_mass_matrix);
}
inv_mass_matrix.compress(VectorOperation::add);
- for (unsigned int k = 0; k < inv_mass_matrix.local_size(); ++k)
+ for (unsigned int k = 0; k < inv_mass_matrix.locally_owned_size(); ++k)
if (inv_mass_matrix.local_element(k) > 1e-15)
{
inv_mass_matrix.local_element(k) =
matrix_free->initialize_dof_vector(dst3);
matrix_free->initialize_dof_vector(dst4);
- for (unsigned int i = 0; i < src.local_size(); ++i)
+ for (unsigned int i = 0; i < src.locally_owned_size(); ++i)
src.local_element(i) = random_value<NumberType>();
MatrixFreeOperators::MassOperator<
{
Vector<double> solution_gather0(sol.size());
double * sol_gather_ptr = solution_gather0.begin();
- for (unsigned int i = 0; i < sol.local_size(); ++i)
+ for (unsigned int i = 0; i < sol.locally_owned_size(); ++i)
*sol_gather_ptr++ = sol.local_element(i);
for (unsigned int i = 1;
i < Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
}
else
MPI_Send(sol.begin(),
- sol.local_size(),
+ sol.locally_owned_size(),
MPI_DOUBLE,
0,
Utilities::MPI::this_mpi_process(MPI_COMM_WORLD),
deallog << "main partitioner: size="
<< matrix_free.get_dof_info().vector_partitioner->size()
- << " local_size="
- << matrix_free.get_dof_info().vector_partitioner->local_size()
+ << " locally_owned_size="
+ << matrix_free.get_dof_info().vector_partitioner->locally_owned_size()
<< " n_ghosts="
<< matrix_free.get_dof_info().vector_partitioner->n_ghost_indices()
<< std::endl;
for (auto &p : matrix_free.get_dof_info().vector_exchanger_face_variants)
deallog << "partitioner: size=" << p->size()
- << " local_size=" << p->locally_owned_size()
+ << " locally_owned_size=" << p->locally_owned_size()
<< " n_ghosts=" << p->n_ghost_indices() << std::endl;
}
-DEAL:0::main partitioner: size=2506 local_size=2506 n_ghosts=0
-DEAL:0::partitioner: size=2506 local_size=2506 n_ghosts=0
-DEAL:0::partitioner: size=2506 local_size=2506 n_ghosts=0
-DEAL:0::partitioner: size=2506 local_size=2506 n_ghosts=0
-DEAL:0::partitioner: size=2506 local_size=2506 n_ghosts=0
-DEAL:0::partitioner: size=2506 local_size=2506 n_ghosts=0
+DEAL:0::main partitioner: size=2506 locally_owned_size=2506 n_ghosts=0
+DEAL:0::partitioner: size=2506 locally_owned_size=2506 n_ghosts=0
+DEAL:0::partitioner: size=2506 locally_owned_size=2506 n_ghosts=0
+DEAL:0::partitioner: size=2506 locally_owned_size=2506 n_ghosts=0
+DEAL:0::partitioner: size=2506 locally_owned_size=2506 n_ghosts=0
+DEAL:0::partitioner: size=2506 locally_owned_size=2506 n_ghosts=0
-DEAL:0::main partitioner: size=2506 local_size=1492 n_ghosts=273
-DEAL:0::partitioner: size=2506 local_size=1492 n_ghosts=0
-DEAL:0::partitioner: size=2506 local_size=1492 n_ghosts=273
-DEAL:0::partitioner: size=2506 local_size=1492 n_ghosts=273
-DEAL:0::partitioner: size=2506 local_size=1492 n_ghosts=0
-DEAL:0::partitioner: size=2506 local_size=1492 n_ghosts=0
+DEAL:0::main partitioner: size=2506 locally_owned_size=1492 n_ghosts=273
+DEAL:0::partitioner: size=2506 locally_owned_size=1492 n_ghosts=0
+DEAL:0::partitioner: size=2506 locally_owned_size=1492 n_ghosts=273
+DEAL:0::partitioner: size=2506 locally_owned_size=1492 n_ghosts=273
+DEAL:0::partitioner: size=2506 locally_owned_size=1492 n_ghosts=0
+DEAL:0::partitioner: size=2506 locally_owned_size=1492 n_ghosts=0
-DEAL:1::main partitioner: size=2506 local_size=1014 n_ghosts=442
-DEAL:1::partitioner: size=2506 local_size=1014 n_ghosts=169
-DEAL:1::partitioner: size=2506 local_size=1014 n_ghosts=442
-DEAL:1::partitioner: size=2506 local_size=1014 n_ghosts=442
-DEAL:1::partitioner: size=2506 local_size=1014 n_ghosts=0
-DEAL:1::partitioner: size=2506 local_size=1014 n_ghosts=0
+DEAL:1::main partitioner: size=2506 locally_owned_size=1014 n_ghosts=442
+DEAL:1::partitioner: size=2506 locally_owned_size=1014 n_ghosts=169
+DEAL:1::partitioner: size=2506 locally_owned_size=1014 n_ghosts=442
+DEAL:1::partitioner: size=2506 locally_owned_size=1014 n_ghosts=442
+DEAL:1::partitioner: size=2506 locally_owned_size=1014 n_ghosts=0
+DEAL:1::partitioner: size=2506 locally_owned_size=1014 n_ghosts=0
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
LinearAlgebra::distributed::Vector<double> in, ref, test;
matrix_free.initialize_dof_vector(in);
- for (unsigned int i = 0; i < in.get_partitioner()->local_size(); ++i)
+ for (unsigned int i = 0; i < in.get_partitioner()->locally_owned_size(); ++i)
in.local_element(i) = in.get_partitioner()->local_to_global(i);
matrix_free.initialize_dof_vector(ref);
matrix_free.initialize_dof_vector(test);
LinearAlgebra::distributed::Vector<double> in, test;
matrix_free.initialize_dof_vector(in);
- for (unsigned int i = 0; i < in.get_partitioner()->local_size(); ++i)
+ for (unsigned int i = 0; i < in.get_partitioner()->locally_owned_size(); ++i)
in.local_element(i) = in.get_partitioner()->local_to_global(i);
matrix_free.initialize_dof_vector(test);
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
sparse_matrix.compress(VectorOperation::add);
// Check the diagonal:
- for (unsigned int i = 0; i < ref.local_size(); ++i)
+ for (unsigned int i = 0; i < ref.locally_owned_size(); ++i)
{
const auto glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf.compute_lumped_diagonal();
out = mf.get_matrix_lumped_diagonal_inverse()->get_vector();
sparse_matrix.vmult(ref, in);
- for (unsigned int i = 0; i < ref.local_size(); ++i)
+ for (unsigned int i = 0; i < ref.locally_owned_size(); ++i)
{
const auto glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
sparse_matrix.compress(VectorOperation::add);
// Check the diagonal:
- for (unsigned int i = 0; i < ref.local_size(); ++i)
+ for (unsigned int i = 0; i < ref.locally_owned_size(); ++i)
{
const auto glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf.compute_lumped_diagonal();
out = mf.get_matrix_lumped_diagonal_inverse()->get_vector();
sparse_matrix.vmult(ref, in);
- for (unsigned int i = 0; i < ref.local_size(); ++i)
+ for (unsigned int i = 0; i < ref.locally_owned_size(); ++i)
{
const auto glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
LinearAlgebra::distributed::Vector<number> in, out, ref;
mf_data_0->initialize_dof_vector(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
in.local_element(i) = random_value<double>();
mf_c0.initialize_dof_vector(out);
mf_data.initialize_dof_vector(out_dev);
LinearAlgebra::ReadWriteVector<Number> rw_in(owned_set);
- for (unsigned int i = 0; i < in_dev.local_size(); ++i)
+ for (unsigned int i = 0; i < in_dev.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf_data.initialize_dof_vector(in_dev);
mf_data.initialize_dof_vector(out_dev);
LinearAlgebra::ReadWriteVector<Number> rw_in(owned_set);
- for (unsigned int i = 0; i < in_dev.local_size(); ++i)
+ for (unsigned int i = 0; i < in_dev.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
owned_set, MPI_COMM_WORLD);
LinearAlgebra::ReadWriteVector<Number> rw_in(owned_set);
- for (unsigned int i = 0; i < in_dev.local_size(); ++i)
+ for (unsigned int i = 0; i < in_dev.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf_data.initialize_dof_vector(out_dev);
LinearAlgebra::ReadWriteVector<Number> rw_in(owned_set);
- for (unsigned int i = 0; i < in_dev.local_size(); ++i)
+ for (unsigned int i = 0; i < in_dev.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf_data.initialize_dof_vector(out_dev);
LinearAlgebra::ReadWriteVector<Number> rw_in(owned_set);
- for (unsigned int i = 0; i < in_dev.local_size(); ++i)
+ for (unsigned int i = 0; i < in_dev.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
MappingQ<dim> mapping(fe_degree);
CUDAWrappers::MatrixFree<dim, Number> mf_data;
- const QGauss<1> quad(fe_degree + 1);
+ const QGauss<1> uad(fe_degree + 1);
typename CUDAWrappers::MatrixFree<dim, Number>::AdditionalData
additional_data;
additional_data.mapping_update_flags = update_values | update_gradients |
update_JxW_values |
update_quadrature_points;
- mf_data.reinit(mapping, dof, constraints, quad, additional_data);
+ mf_data.reinit(mapping, dof, constraints, uad, additional_data);
const unsigned int coef_size =
tria.n_locally_owned_active_cells() * std::pow(fe_degree + 1, dim);
owned_set, MPI_COMM_WORLD);
LinearAlgebra::ReadWriteVector<Number> rw_in(owned_set);
- for (unsigned int i = 0; i < in_dev.local_size(); ++i)
+ for (unsigned int i = 0; i < in_dev.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
}
mf_data.initialize_dof_vector(ref);
- for (unsigned int i = 0; i < in[0].local_size(); ++i)
+ for (unsigned int i = 0; i < in[0].locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf_data.initialize_dof_vector(ref);
- for (unsigned int i = 0; i < in.block(0).local_size(); ++i)
+ for (unsigned int i = 0; i < in.block(0).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
out.reinit(in);
ref.reinit(in);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
out.collect_sizes();
mf_data.initialize_dof_vector(ref);
- for (unsigned int i = 0; i < in.block(0).local_size(); ++i)
+ for (unsigned int i = 0; i < in.block(0).locally_owned_size(); ++i)
{
if (constraints.is_constrained(
dof.locally_owned_dofs().index_within_set(i)))
out.collect_sizes();
mf_data.initialize_dof_vector(ref);
- for (unsigned int i = 0; i < in.block(0).local_size(); ++i)
+ for (unsigned int i = 0; i < in.block(0).locally_owned_size(); ++i)
{
if (constraints.is_constrained(
dof.locally_owned_dofs().index_within_set(i)))
}
mf_data.initialize_dof_vector(ref);
- for (unsigned int i = 0; i < in[0].local_size(); ++i)
+ for (unsigned int i = 0; i < in[0].locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
}
mf_data.initialize_dof_vector(ref);
- for (unsigned int i = 0; i < in[0].local_size(); ++i)
+ for (unsigned int i = 0; i < in[0].locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
// matrix-vector product for reference
for (unsigned int block = 0; block < n_blocks; ++block)
{
- for (unsigned int i = 0; i < in.block(block).local_size(); ++i)
+ for (unsigned int i = 0; i < in.block(block).locally_owned_size();
+ ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in_orig.local_size(); ++i)
+ for (unsigned int i = 0; i < in_orig.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in_orig.local_element(i) = entry;
mf2(mf_data);
mf2.vmult(out, in);
- for (unsigned int i = 0; i < out.local_size(); ++i)
+ for (unsigned int i = 0; i < out.locally_owned_size(); ++i)
out(renumbering[i]) -= out_orig.local_element(i);
double diff_norm = out.linfty_norm() / out_orig.linfty_norm();
// test again, now doing matrix-vector product twice
mf2.vmult(out, in);
mf2.vmult(out, in);
- for (unsigned int i = 0; i < out.local_size(); ++i)
+ for (unsigned int i = 0; i < out.locally_owned_size(); ++i)
out(renumbering[i]) -= out_orig.local_element(i);
diff_norm = out.linfty_norm() / out_orig.linfty_norm();
deallog << diff_norm << std::endl;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
mf_data.reinit(MappingQ1<mydim>{}, dof, constraints, quad, data);
mf_data.initialize_dof_vector(in2);
mf_data.initialize_dof_vector(out2);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
in2(renumbering[i]) = in.local_element(i);
}
mf.vmult(out2, in2);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
out2(renumbering[i]) -= out.local_element(i);
double diff_norm = out2.linfty_norm() / out.linfty_norm();
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in_orig.local_size(); ++i)
+ for (unsigned int i = 0; i < in_orig.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in_orig.local_element(i) = entry;
mf2(mf_data);
mf2.vmult(out, in);
- for (unsigned int i = 0; i < out.local_size(); ++i)
+ for (unsigned int i = 0; i < out.locally_owned_size(); ++i)
out(renumbering[i]) -= out_orig.local_element(i);
double diff_norm = out.linfty_norm() / out_orig.linfty_norm();
// test again, now doing matrix-vector product twice
mf2.vmult(out, in);
mf2.vmult(out, in);
- for (unsigned int i = 0; i < out.local_size(); ++i)
+ for (unsigned int i = 0; i < out.locally_owned_size(); ++i)
out(renumbering[i]) -= out_orig.local_element(i);
diff_norm = out.linfty_norm() / out_orig.linfty_norm();
deallog << diff_norm << std::endl;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in_orig.local_size(); ++i)
+ for (unsigned int i = 0; i < in_orig.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in_orig.local_element(i) = entry;
mf2(mf_data);
mf2.vmult(out, in);
- for (unsigned int i = 0; i < out.local_size(); ++i)
+ for (unsigned int i = 0; i < out.locally_owned_size(); ++i)
out(renumbering[i]) -= out_orig.local_element(i);
double diff_norm = out.linfty_norm() / out_orig.linfty_norm();
// test again, now doing matrix-vector product twice
mf2.vmult(out, in);
mf2.vmult(out, in);
- for (unsigned int i = 0; i < out.local_size(); ++i)
+ for (unsigned int i = 0; i < out.locally_owned_size(); ++i)
out(renumbering[i]) -= out_orig.local_element(i);
diff_norm = out.linfty_norm() / out_orig.linfty_norm();
deallog << diff_norm << std::endl;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.block(0).local_size(); ++i)
+ for (unsigned int i = 0; i < in.block(0).locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.block(0).local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
// Set random seed for reproducibility
Testing::srand(42);
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
{
const double entry = Testing::rand() / (double)RAND_MAX;
in.local_element(i) = entry;
inverse_diagonal_entries,
dummy);
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
inverse_diagonal_entries,
dummy);
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
inverse_diagonal_entries,
dummy);
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
inverse_diagonal_entries,
dummy);
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
.local_element(edge_constrained_indices[i]) =
edge_constrained_values[i].first;
}
- for (; c < dst.local_size(); ++c)
+ for (; c < dst.locally_owned_size(); ++c)
dst.local_element(c) = 0.;
}
src_cpy.local_element(c) = 0.;
++c;
}
- for (; c < src_cpy.local_size(); ++c)
+ for (; c < src_cpy.locally_owned_size(); ++c)
src_cpy.local_element(c) = 0.;
data.cell_loop(&LaplaceOperator::local_apply, this, dst, src_cpy);
}
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
fine_matrix.initialize_dof_vector(sol);
// set constant rhs vector
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
if (!hanging_node_constraints.is_constrained(
in.get_partitioner()->local_to_global(i)))
in.local_element(i) = 1.;
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
if (!hanging_node_constraints.is_constrained(
in.get_partitioner()->local_to_global(i)))
in.local_element(i) = 1.;
.local_element(edge_constrained_indices[i]) =
edge_constrained_values[i].first;
}
- for (; c < dst.local_size(); ++c)
+ for (; c < dst.locally_owned_size(); ++c)
dst.local_element(c) = 0.;
}
src_cpy.local_element(c) = 0.;
++c;
}
- for (; c < src_cpy.local_size(); ++c)
+ for (; c < src_cpy.locally_owned_size(); ++c)
src_cpy.local_element(c) = 0.;
data.cell_loop(&LaplaceOperator::local_apply, this, dst, src_cpy);
}
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
fine_matrix.initialize_dof_vector(sol);
// set constant rhs vector
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
if (!hanging_node_constraints.is_constrained(
in.get_partitioner()->local_to_global(i)))
in.local_element(i) = 1.;
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
if (!hanging_node_constraints.is_constrained(
in.get_partitioner()->local_to_global(i)))
in.local_element(i) = 1.;
.local_element(edge_constrained_indices[i]) =
edge_constrained_values[i].first;
}
- for (; c < dst.local_size(); ++c)
+ for (; c < dst.locally_owned_size(); ++c)
dst.local_element(c) = 0.;
}
src_cpy.local_element(c) = 0.;
++c;
}
- for (; c < src_cpy.local_size(); ++c)
+ for (; c < src_cpy.locally_owned_size(); ++c)
src_cpy.local_element(c) = 0.;
data.cell_loop(&LaplaceOperator::local_apply, this, dst, src_cpy);
}
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
fine_matrix.initialize_dof_vector(sol);
// set constant rhs vector
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
if (!hanging_node_constraints.is_constrained(
in.get_partitioner()->local_to_global(i)))
in.local_element(i) = 1.;
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
- for (unsigned int i = 0; i < in.block(0).local_size(); ++i)
+ for (unsigned int i = 0; i < in.block(0).locally_owned_size(); ++i)
if (!hanging_node_constraints.is_constrained(
in.block(0).get_partitioner()->local_to_global(i)))
in.block(0).local_element(i) = 1.;
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
if (!hanging_node_constraints.is_constrained(
in.get_partitioner()->local_to_global(i)))
in.local_element(i) = 1.;
hanging_node_constraints);
hanging_node_constraints.close();
- for (unsigned int i = 0; i < in.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < in.block(b).locally_owned_size(); ++i)
if (!hanging_node_constraints.is_constrained(
in.block(b).get_partitioner()->local_to_global(i)))
in.block(b).local_element(i) = 1.;
this->data->get_dof_info(0).vector_partitioner.get())
return;
- Assert(vec.get_partitioner()->local_size() ==
- this->data->get_dof_info(0).vector_partitioner->local_size(),
- ExcMessage("The vector passed to the vmult() function does not have "
- "the correct size for compatibility with MatrixFree."));
+ Assert(
+ vec.get_partitioner()->locally_owned_size() ==
+ this->data->get_dof_info(0).vector_partitioner->locally_owned_size(),
+ ExcMessage("The vector passed to the vmult() function does not have "
+ "the correct size for compatibility with MatrixFree."));
LinearAlgebra::distributed::Vector<Number> copy_vec(vec);
this->data->initialize_dof_vector(
const_cast<LinearAlgebra::distributed::Vector<Number> &>(vec), 0);
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
- for (unsigned int i = 0; i < in.local_size(); ++i)
+ for (unsigned int i = 0; i < in.locally_owned_size(); ++i)
if (!hanging_node_constraints.is_constrained(
in.get_partitioner()->local_to_global(i)))
in.local_element(i) = 1.;
inverse_diagonal_entries,
dummy);
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
inverse_diagonal_entries,
dummy);
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
inverse_diagonal_entries,
dummy);
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
inverse_diagonal_entries,
dummy);
- for (unsigned int i = 0; i < inverse_diagonal_entries.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal_entries.locally_owned_size();
+ ++i)
if (std::abs(inverse_diagonal_entries.local_element(i)) > 1e-10)
inverse_diagonal_entries.local_element(i) =
1. / inverse_diagonal_entries.local_element(i);
mf_data.initialize_dof_vector(vec2);
mf_data.initialize_dof_vector(vec3);
- for (unsigned int i = 0; i < vec1.local_size(); ++i)
+ for (unsigned int i = 0; i < vec1.locally_owned_size(); ++i)
{
// Multiply by 0.01 to make float error with roundoff less than the
// numdiff absolute tolerance
mf_data.initialize_dof_vector(vec2);
mf_data.initialize_dof_vector(vec3);
- for (unsigned int i = 0; i < vec1.local_size(); ++i)
+ for (unsigned int i = 0; i < vec1.locally_owned_size(); ++i)
{
if (constraints.is_constrained(
vec1.get_partitioner()->local_to_global(i)))
mf_data.initialize_dof_vector(vec2);
mf_data.initialize_dof_vector(vec3);
- for (unsigned int i = 0; i < vec1.local_size(); ++i)
+ for (unsigned int i = 0; i < vec1.locally_owned_size(); ++i)
{
// Multiply by 0.01 to make float error with roundoff less than the
// numdiff absolute tolerance
mf_data.initialize_dof_vector(vec2);
mf_data.initialize_dof_vector(vec3);
- for (unsigned int i = 0; i < vec1.local_size(); ++i)
+ for (unsigned int i = 0; i < vec1.locally_owned_size(); ++i)
{
// Multiply by 0.01 to make float error with roundoff less than the
// numdiff absolute tolerance
mf_data.initialize_dof_vector(vec2, 1);
mf_data.initialize_dof_vector(vec3, 1);
- for (unsigned int i = 0; i < vec1.local_size(); ++i)
+ for (unsigned int i = 0; i < vec1.locally_owned_size(); ++i)
{
// Multiply by 0.01 to make float error with roundoff less than the
// numdiff absolute tolerance
mf_data.initialize_dof_vector(vec2);
mf_data.initialize_dof_vector(vec3);
- for (unsigned int i = 0; i < vec1.local_size(); ++i)
+ for (unsigned int i = 0; i < vec1.locally_owned_size(); ++i)
{
// Multiply by 0.01 to make float error with roundoff less than the
// numdiff absolute tolerance
mf_data.initialize_dof_vector(vec2);
mf_data.initialize_dof_vector(vec3);
- for (unsigned int i = 0; i < vec1.local_size(); ++i)
+ for (unsigned int i = 0; i < vec1.locally_owned_size(); ++i)
{
// Multiply by 0.01 to make float error with roundoff less than the
// numdiff absolute tolerance
mf_data.initialize_dof_vector(vec1);
mf_data.initialize_dof_vector(vec2);
- for (unsigned int i = 0; i < vec1.local_size(); ++i)
+ for (unsigned int i = 0; i < vec1.locally_owned_size(); ++i)
{
// Multiply by 0.01 to make float error with roundoff less than the
// numdiff absolute tolerance
this->set_constrained_entries_to_one(inverse_diagonal);
- for (unsigned int i = 0; i < inverse_diagonal.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal.locally_owned_size(); ++i)
{
Assert(inverse_diagonal.local_element(i) > 0.,
ExcMessage("No diagonal entry in a positive definite operator "
}
inv_mass_matrix.compress(VectorOperation::add);
- for (unsigned int k = 0; k < inv_mass_matrix.local_size(); ++k)
+ for (unsigned int k = 0; k < inv_mass_matrix.locally_owned_size(); ++k)
if (inv_mass_matrix.local_element(k) > 1e-15)
inv_mass_matrix.local_element(k) =
1. / inv_mass_matrix.local_element(k);
}
inv_mass_matrix.compress(VectorOperation::add);
- for (unsigned int k = 0; k < inv_mass_matrix.local_size(); ++k)
+ for (unsigned int k = 0; k < inv_mass_matrix.locally_owned_size(); ++k)
if (inv_mass_matrix.local_element(k) > 1e-15)
inv_mass_matrix.local_element(k) =
1. / inv_mass_matrix.local_element(k);
}
inv_mass_matrix.compress(VectorOperation::add);
- for (unsigned int k = 0; k < inv_mass_matrix.local_size(); ++k)
+ for (unsigned int k = 0; k < inv_mass_matrix.locally_owned_size(); ++k)
if (inv_mass_matrix.local_element(k) > 1e-15)
inv_mass_matrix.local_element(k) =
1. / inv_mass_matrix.local_element(k);
this->set_constrained_entries_to_one(diagonal);
inverse_diagonal = diagonal;
- const unsigned int local_size = inverse_diagonal.local_size();
+ const unsigned int local_size = inverse_diagonal.locally_owned_size();
for (unsigned int i = 0; i < local_size; ++i)
{
Assert(inverse_diagonal.local_element(i) > 0.,
this->set_constrained_entries_to_one(inverse_diagonal);
- for (unsigned int i = 0; i < inverse_diagonal.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal.locally_owned_size(); ++i)
{
Assert(inverse_diagonal.local_element(i) > 0.,
ExcMessage("No diagonal entry in a positive definite operator "
mf_data->initialize_dof_vector(left.block(b));
mf_data->initialize_dof_vector(right.block(b));
- for (unsigned int i = 0; i < right.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < right.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
for (unsigned int b = 0; b < left2.n_blocks(); ++b)
{
mf_data->initialize_dof_vector(left2.block(b));
- for (unsigned int i = 0; i < left2.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < left2.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf_data->initialize_dof_vector(left.block(b));
mf_data->initialize_dof_vector(right.block(b));
- for (unsigned int i = 0; i < right.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < right.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
for (unsigned int b = 0; b < left2.n_blocks(); ++b)
{
mf_data->initialize_dof_vector(left2.block(b));
- for (unsigned int i = 0; i < left2.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < left2.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf_data->initialize_dof_vector(right.block(b));
left.block(b) = 0.;
right.block(b) = 0.;
- for (unsigned int i = 0; i < right.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < right.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
left.block(b) = 0.;
left2.block(b) = 0.;
right.block(b) = 0.;
- for (unsigned int i = 0; i < right.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < right.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
left.block(b) = 0.;
left2.block(b) = 0.;
right.block(b) = 0.;
- for (unsigned int i = 0; i < right.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < right.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf_data->initialize_dof_vector(right.block(b));
left.block(b) = 0.;
right.block(b) = 0.;
- for (unsigned int i = 0; i < right.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < right.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf_data->initialize_dof_vector(right.block(b));
left.block(b) = 0.;
right.block(b) = 0.;
- for (unsigned int i = 0; i < right.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < right.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
mf_data->initialize_dof_vector(left2.block(b));
left.block(b) = 0.;
left2.block(b) = 0.;
- for (unsigned int i = 0; i < left.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < left.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
{
mf_data->initialize_dof_vector(right.block(b));
right.block(b) = 0.;
- for (unsigned int i = 0; i < right.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < right.block(b).locally_owned_size(); ++i)
{
const unsigned int glob_index = owned_set.nth_index_in_set(i);
if (constraints.is_constrained(glob_index))
LinearAlgebra::distributed::Vector<double> v(local_owned,
local_relevant,
MPI_COMM_WORLD);
- AssertDimension(static_cast<unsigned int>(actual_local_size), v.local_size());
+ AssertDimension(static_cast<unsigned int>(actual_local_size),
+ v.locally_owned_size());
LinearAlgebra::distributed::Vector<double> w(v), x(v), y(v);
// set local elements
v0 = 1;
v1 = 2;
// check assignment in initial state
- for (unsigned int i = 0; i < v0.local_size(); ++i)
+ for (unsigned int i = 0; i < v0.locally_owned_size(); ++i)
AssertThrow(v0.local_element(i) == 1.,
ExcNonEqual(v0.local_element(i), 1.));
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
AssertThrow(v1.local_element(i) == 2.,
ExcNonEqual(v1.local_element(i), 2.));
// now swap v1 and v0
v0.swap(v1);
- AssertDimension(v0.local_size(), local_size1);
- AssertDimension(v1.local_size(), actual_local_size0);
+ AssertDimension(v0.locally_owned_size(), local_size1);
+ AssertDimension(v1.locally_owned_size(), actual_local_size0);
AssertDimension(v0.size(), global_size1);
AssertDimension(v1.size(), global_size0);
for (unsigned int i = 0; i < local_size1; ++i)
v2.swap(v0);
AssertDimension(v0.size(), 0);
AssertDimension(v2.size(), global_size1);
- AssertDimension(v2.local_size(), local_size1);
+ AssertDimension(v2.locally_owned_size(), local_size1);
for (int i = my_start1; i < my_end1; ++i)
AssertThrow(v2(i) == 7., ExcNonEqual(v2(i), 7.));
if (myid == 0)
v2.reinit(v, true);
// set locally owned range of v2 manually
- for (unsigned int i = 0; i < v2.local_size(); ++i)
+ for (unsigned int i = 0; i < v2.locally_owned_size(); ++i)
v2.local_element(i) = 1.;
// add entries to ghost values
// set first vector to 1
VectorTools::interpolate(dof2, Functions::ConstantFunction<dim>(1.), v2);
- for (unsigned int i = 0; i < v2.local_size(); ++i)
+ for (unsigned int i = 0; i < v2.locally_owned_size(); ++i)
Assert(v2.local_element(i) == 1., ExcInternalError());
v2.update_ghost_values();
FETools::back_interpolate(dof2, c2, v2, dof1, c1, v2_interpolated);
- for (unsigned int i = 0; i < v2_interpolated.local_size(); ++i)
+ for (unsigned int i = 0; i < v2_interpolated.locally_owned_size(); ++i)
Assert(v2_interpolated.local_element(i) == 1., ExcInternalError());
}
// set first vector to 1
VectorTools::interpolate(dof1, Functions::ConstantFunction<dim>(1.), v1);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
Assert(v1.local_element(i) == 1., ExcInternalError());
v1.update_ghost_values();
FETools::interpolate(dof1, v1, dof2, v2);
- for (unsigned int i = 0; i < v2.local_size(); ++i)
+ for (unsigned int i = 0; i < v2.locally_owned_size(); ++i)
Assert(v2.local_element(i) == 1., ExcInternalError());
v2.update_ghost_values();
// create a vector that consists of elements indexed from 0 to n
PETScWrappers::MPI::Vector vec(MPI_COMM_WORLD, 100 * n_processes, 100);
- AssertThrow(vec.local_size() == 100, ExcInternalError());
+ AssertThrow(vec.locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.local_range().first == 100 * myid, ExcInternalError());
AssertThrow(vec.local_range().second == 100 * myid + 100, ExcInternalError());
for (unsigned int i = vec.local_range().first; i < vec.local_range().second;
vec.block(0).reinit(MPI_COMM_WORLD, 100 * n_processes, 100);
vec.block(1).reinit(MPI_COMM_WORLD, 100 * n_processes, 100);
vec.collect_sizes();
- AssertThrow(vec.block(0).local_size() == 100, ExcInternalError());
+ AssertThrow(vec.block(0).locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.block(0).local_range().first == 100 * myid,
ExcInternalError());
AssertThrow(vec.block(0).local_range().second == 100 * myid + 100,
ExcInternalError());
- AssertThrow(vec.block(1).local_size() == 100, ExcInternalError());
+ AssertThrow(vec.block(1).locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.block(1).local_range().first == 100 * myid,
ExcInternalError());
AssertThrow(vec.block(1).local_range().second == 100 * myid + 100,
// create a vector that consists of elements indexed from 0 to n
PETScWrappers::MPI::Vector vec(MPI_COMM_WORLD, 100 * n_processes, 100);
- AssertThrow(vec.local_size() == 100, ExcInternalError());
+ AssertThrow(vec.locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.local_range().first == 100 * myid, ExcInternalError());
AssertThrow(vec.local_range().second == 100 * myid + 100, ExcInternalError());
for (unsigned int i = vec.local_range().first; i < vec.local_range().second;
vec.block(0).reinit(MPI_COMM_WORLD, 100 * n_processes, 100);
vec.block(1).reinit(MPI_COMM_WORLD, 100 * n_processes, 100);
vec.collect_sizes();
- AssertThrow(vec.block(0).local_size() == 100, ExcInternalError());
+ AssertThrow(vec.block(0).locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.block(0).local_range().first == 100 * myid,
ExcInternalError());
AssertThrow(vec.block(0).local_range().second == 100 * myid + 100,
ExcInternalError());
- AssertThrow(vec.block(1).local_size() == 100, ExcInternalError());
+ AssertThrow(vec.block(1).locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.block(1).local_range().first == 100 * myid,
ExcInternalError());
AssertThrow(vec.block(1).local_range().second == 100 * myid + 100,
is.add_range(100 * myid, 100 * myid + 100);
vec.reinit(is, MPI_COMM_WORLD);
}
- AssertThrow(vec.local_size() == 100, ExcInternalError());
+ AssertThrow(vec.locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.local_range().first == 100 * myid, ExcInternalError());
AssertThrow(vec.local_range().second == 100 * myid + 100, ExcInternalError());
for (unsigned int i = vec.local_range().first; i < vec.local_range().second;
vec.block(1).reinit(is, MPI_COMM_WORLD);
}
vec.collect_sizes();
- AssertThrow(vec.block(0).local_size() == 100, ExcInternalError());
+ AssertThrow(vec.block(0).locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.block(0).local_range().first == 100 * myid,
ExcInternalError());
AssertThrow(vec.block(0).local_range().second == 100 * myid + 100,
ExcInternalError());
- AssertThrow(vec.block(1).local_size() == 100, ExcInternalError());
+ AssertThrow(vec.block(1).locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.block(1).local_range().first == 100 * myid,
ExcInternalError());
AssertThrow(vec.block(1).local_range().second == 100 * myid + 100,
is.add_range(100 * myid, 100 * myid + 100);
vec.reinit(is, MPI_COMM_WORLD);
}
- AssertThrow(vec.local_size() == 100, ExcInternalError());
+ AssertThrow(vec.locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.local_range().first == 100 * myid, ExcInternalError());
AssertThrow(vec.local_range().second == 100 * myid + 100, ExcInternalError());
for (unsigned int i = vec.local_range().first; i < vec.local_range().second;
is.add_range(100 * myid, 100 * myid + 100);
vec.reinit(is, MPI_COMM_WORLD);
}
- AssertThrow(vec.local_size() == 100, ExcInternalError());
+ AssertThrow(vec.locally_owned_size() == 100, ExcInternalError());
AssertThrow(vec.local_range().first == 100 * myid, ExcInternalError());
AssertThrow(vec.local_range().second == 100 * myid + 100, ExcInternalError());
for (unsigned int i = vec.local_range().first; i < vec.local_range().second;
// set values:
for (unsigned int b = 0; b < nb; ++b)
- for (unsigned int i = 0; i < lbv[l].block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < lbv[l].block(b).locally_owned_size();
+ ++i)
lbv[l].block(b).local_element(i) = random_value<Number>();
lbv[l].compress(VectorOperation::insert);
MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> lbv2(
0, tr.n_global_levels() - 1);
for (unsigned int b = 0; b < nb; ++b)
- for (unsigned int i = 0; i < bv.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < bv.block(b).locally_owned_size(); ++i)
bv.block(b).local_element(i) = random_value<Number>();
transfer.copy_to_mg(mgdof, lbv2, bv);
// set values:
for (unsigned int b = 0; b < nb; ++b)
- for (unsigned int i = 0; i < lbv[l].block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < lbv[l].block(b).locally_owned_size();
+ ++i)
lbv[l].block(b).local_element(i) = random_value<double>();
lbv[l].compress(VectorOperation::insert);
MGLevelObject<LinearAlgebra::distributed::BlockVector<Number>> lbv2(
0, tr.n_global_levels() - 1);
for (unsigned int b = 0; b < nb; ++b)
- for (unsigned int i = 0; i < bv.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < bv.block(b).locally_owned_size(); ++i)
bv.block(b).local_element(i) = random_value<double>();
transfer.copy_to_mg(mgdof_ptr, lbv2, bv);
v1.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.prolongate(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.restrict_and_add(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.prolongate(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.restrict_and_add(level, v2, v1);
v3.block(b).reinit(mgdof.locally_owned_mg_dofs(level),
MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < v1.block(b).locally_owned_size();
+ ++i)
v1.block(b).local_element(i) = random_value<double>();
transfer_ref.prolongate(level, v2.block(b), v1.block(b));
v3.block(b).reinit(mgdof.locally_owned_mg_dofs(level - 1),
MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < v1.block(b).locally_owned_size();
+ ++i)
v1.block(b).local_element(i) = random_value<double>();
transfer_ref.restrict_and_add(level, v2.block(b), v1.block(b));
v3.block(b).reinit(mgdof_ptr[b]->locally_owned_mg_dofs(level),
MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < v1.block(b).locally_owned_size();
+ ++i)
v1.block(b).local_element(i) = random_value<double>();
transfer_ref[b].prolongate(level, v2.block(b), v1.block(b));
v3.block(b).reinit(mgdof_ptr[b]->locally_owned_mg_dofs(level - 1),
MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.block(b).local_size(); ++i)
+ for (unsigned int i = 0; i < v1.block(b).locally_owned_size();
+ ++i)
v1.block(b).local_element(i) = random_value<double>();
transfer_ref[b].restrict_and_add(level, v2.block(b), v1.block(b));
v1.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.prolongate(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.restrict_and_add(level, v2, v1);
relevant_set,
MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.prolongate(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.restrict_and_add(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.prolongate(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.restrict_and_add(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.prolongate(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.restrict_and_add(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.prolongate(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.restrict_and_add(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.prolongate(level, v2, v1);
v1.reinit(mgdof.locally_owned_mg_dofs(level), MPI_COMM_WORLD);
v2.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
v3.reinit(mgdof.locally_owned_mg_dofs(level - 1), MPI_COMM_WORLD);
- for (unsigned int i = 0; i < v1.local_size(); ++i)
+ for (unsigned int i = 0; i < v1.locally_owned_size(); ++i)
v1.local_element(i) = random_value<double>();
v1_cpy = v1;
transfer.restrict_and_add(level, v2, v1);
dummy);
this->set_constrained_entries_to_one(diagonal);
- inverse_diagonal = diagonal;
- const unsigned int local_size = inverse_diagonal.local_size();
- for (unsigned int i = 0; i < local_size; ++i)
+ inverse_diagonal = diagonal;
+ const unsigned int locally_owned_size =
+ inverse_diagonal.locally_owned_size();
+ for (unsigned int i = 0; i < locally_owned_size; ++i)
{
Assert(inverse_diagonal.local_element(i) > 0.,
ExcMessage("No diagonal entry in a positive definite operator "
this->set_constrained_entries_to_one(inverse_diagonal);
- for (unsigned int i = 0; i < inverse_diagonal.local_size(); ++i)
+ for (unsigned int i = 0; i < inverse_diagonal.locally_owned_size(); ++i)
{
Assert(inverse_diagonal.local_element(i) > 0.,
ExcMessage("No diagonal entry in a positive definite operator "
void
ParticleTracking<dim>::interpolate_function_to_field()
{
- velocity_field.zero_out_ghosts();
+ velocity_field.zero_out_ghost_values();
VectorTools::interpolate(mapping, fluid_dh, velocity, velocity_field);
velocity_field.update_ghost_values();
}
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2004 - 2018 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE.md at
-// the top level directory of deal.II.
-//
-// ---------------------------------------------------------------------
-
-
-
-// check PETScWrappers::MPI::Vector::is_non_zero
-
-#include <deal.II/lac/petsc_vector.h>
-
-#include <iostream>
-#include <vector>
-
-#include "../tests.h"
-
-
-void
-test(PETScWrappers::MPI::Vector &v)
-{
- // set only certain elements of the
- // vector. they are all positive
- std::vector<bool> pattern(v.size(), false);
- for (unsigned int i = 0; i < v.size(); i += 1 + i)
- {
- v(i) += i;
- pattern[i] = true;
- }
-
- v.compress(VectorOperation::add);
-
- // check that the vector is really
- // non-negative
- AssertThrow(v.is_non_negative() == true, ExcInternalError());
-
- // then set a single element to a negative
- // value and check again
- v(v.size() / 2) = -1;
- AssertThrow(v.is_non_negative() == false, ExcInternalError());
-
- deallog << "OK" << std::endl;
-}
-
-
-
-int
-main(int argc, char **argv)
-{
- initlog();
-
- try
- {
- Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- {
- IndexSet indices(100);
- indices.add_range(0, 100);
- PETScWrappers::MPI::Vector v(indices, MPI_COMM_WORLD);
- test(v);
- }
- }
- catch (const std::exception &exc)
- {
- std::cerr << std::endl
- << std::endl
- << "----------------------------------------------------"
- << std::endl;
- std::cerr << "Exception on processing: " << std::endl
- << exc.what() << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
-
- return 1;
- }
- catch (...)
- {
- std::cerr << std::endl
- << std::endl
- << "----------------------------------------------------"
- << std::endl;
- std::cerr << "Unknown exception!" << std::endl
- << "Aborting!" << std::endl
- << "----------------------------------------------------"
- << std::endl;
- return 1;
- };
-}
+++ /dev/null
-
-DEAL::OK
data_out.write_vtu_with_pvtu_record(
"./", "example-1", counter, MPI_COMM_WORLD, 1, 1);
- result.zero_out_ghosts();
+ result.zero_out_ghost_values();
}
template <int dim>
Utilities::MPI::RemotePointEvaluation<dim> evaluation_cache;
const auto evaluation_point_results = VectorTools::point_values<1>(
mapping_1, dof_handler_1, vector_1, evaluation_points, evaluation_cache);
- vector_1.zero_out_ghosts();
+ vector_1.zero_out_ghost_values();
LinearAlgebra::distributed::Vector<double> vector_2(
create_partitioner(dof_handler_2));
data_out.write_vtu_with_pvtu_record(
"./", "example-2", counter, MPI_COMM_WORLD, 1, 1);
- result.zero_out_ghosts();
+ result.zero_out_ghost_values();
}
template <int dim>
solution_other,
evaluation_points,
evaluation_cache);
- solution_other.zero_out_ghosts();
+ solution_other.zero_out_ghost_values();
for (unsigned int i = 0; i < evaluation_points.size(); ++i)
{
if (global_ids[i] == numbers::invalid_size_type)
data_out.write_vtu_with_pvtu_record(
"./", "example-3", counter, MPI_COMM_WORLD, 1, 1);
- result.zero_out_ghosts();
+ result.zero_out_ghost_values();
}
void
Utilities::MPI::RemotePointEvaluation<dim> evaluation_cache;
const auto evaluation_point_results = VectorTools::point_values<1>(
mapping_1, dof_handler_1, vector_1, evaluation_points, evaluation_cache);
- vector_1.zero_out_ghosts();
+ vector_1.zero_out_ghost_values();
LinearAlgebra::distributed::Vector<double> vector_2(
create_partitioner(dof_handler_2));
data_out.write_vtu_with_pvtu_record(
"./", "example-1", counter, MPI_COMM_WORLD, 1, 1);
- result.zero_out_ghosts();
+ result.zero_out_ghost_values();
}
template <int dim>
const auto evaluation_point_gradient_results =
VectorTools::point_gradients<1>(
mapping_1, dof_handler_1, vector_1, evaluation_points, evaluation_cache);
- vector_1.zero_out_ghosts();
+ vector_1.zero_out_ghost_values();
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
for (unsigned int i = 0; i <= n_intervals; ++i)
data_out.write_vtu_with_pvtu_record(
"./", "example-1", counter, MPI_COMM_WORLD, 1, 1);
- result.zero_out_ghosts();
+ result.zero_out_ghost_values();
}
template <int dim>
Utilities::MPI::RemotePointEvaluation<dim> evaluation_cache;
const auto evaluation_point_results = VectorTools::point_values<1>(
mapping_1, dof_handler_1, vector_1, evaluation_points, evaluation_cache);
- vector_1.zero_out_ghosts();
+ vector_1.zero_out_ghost_values();
// fill a global (slice) vector
LinearAlgebra::distributed::Vector<double> vector_2(
FEEvaluation<dim, degree, degree + 1, dim + 2, Number> phi(data, 0, 1);
MatrixFreeOperators::CellwiseInverseMassMatrix<dim, degree, dim + 2, Number>
inverse(phi);
- solution.zero_out_ghosts();
+ solution.zero_out_ghost_values();
for (unsigned int cell = 0; cell < data.n_cell_batches(); ++cell)
{
phi.reinit(cell);
void
ParticleTracking<dim>::interpolate_function_to_field()
{
- velocity_field.zero_out_ghosts();
+ velocity_field.zero_out_ghost_values();
VectorTools::interpolate(mapping, fluid_dh, velocity, velocity_field);
velocity_field.update_ghost_values();
}
DEAL:0::Locally owned indices
{[0,4], [10,14]}
DEAL:0::Parallel vector
-C0:size:10 local_size:5 :
+C0:size:10 locally_owned_size:5 :
[0]: 0.000e+00
[1]: 1.000e+01
[2]: 2.000e+01
[3]: 3.000e+01
[4]: 4.000e+01
-C1:size:10 local_size:5 :
+C1:size:10 locally_owned_size:5 :
[0]: 1.000e+02
[1]: 1.100e+02
[2]: 1.200e+02
DEAL:1::Locally owned indices
{[5,9], [15,19]}
DEAL:1::Parallel vector
-C0:size:10 local_size:5 :
+C0:size:10 locally_owned_size:5 :
[5]: 5.000e+01
[6]: 6.000e+01
[7]: 7.000e+01
[8]: 8.000e+01
[9]: 9.000e+01
-C1:size:10 local_size:5 :
+C1:size:10 locally_owned_size:5 :
[5]: 1.500e+02
[6]: 1.600e+02
[7]: 1.700e+02
DEAL:0::owned IndexSet: {[0,3]}
DEAL:0::ghosted IndexSet: {[2,5]}
DEAL:0::trilinos vec:
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[0]: 0.000e+00
[1]: 1.000e+00
[2]: 2.000e+00
[3]: 3.000e+00
DEAL:0::trilinos vec ghosted:
-size:8 local_size:6 :
+size:8 locally_owned_size:6 :
[0]: 0.000e+00
[1]: 1.000e+00
[2]: 2.000e+00
DEAL:1::owned IndexSet: {[4,7]}
DEAL:1::ghosted IndexSet: {[2,5]}
DEAL:1::trilinos vec:
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[4]: 4.000e+00
[5]: 5.000e+00
[6]: 6.000e+00
[7]: 7.000e+00
DEAL:1::trilinos vec ghosted:
-size:8 local_size:6 :
+size:8 locally_owned_size:6 :
[2]: 2.000e+00
[3]: 3.000e+00
[4]: 4.000e+00
DEAL:0::IS: {[0,3]}
DEAL:0::IS_ghosted: {[2,5]}
DEAL:0::trilinos vec:
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[0]: 0.000e+00
[1]: 1.000e+00
[2]: 2.000e+00
[3]: 3.000e+00
DEAL:0::trilinos vec ghosted:
-size:8 local_size:6 :
+size:8 locally_owned_size:6 :
[0]: 0.000e+00
[1]: 1.000e+00
[2]: 2.000e+00
DEAL:0::ghosted IS: {[0,5]}
DEAL:0::tril_vector_ghosted.owned_elements() {[0,3]}
DEAL:0::import of ghosted vector should fail:
-DEAL:0::ExcMessage("Import() from TrilinosWrappers::MPI::Vector with ghost entries is not supported!")
+DEAL:0::ExcMessage( "Import() from TrilinosWrappers::MPI::Vector with ghost entries is not supported!")
DEAL:0::import of distributed vector should work:
DEAL:0::RWVector contents:
IndexSet: {[0,5]}
DEAL:1::IS: {[4,7]}
DEAL:1::IS_ghosted: {[2,5]}
DEAL:1::trilinos vec:
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[4]: 4.000e+00
[5]: 5.000e+00
[6]: 6.000e+00
[7]: 7.000e+00
DEAL:1::trilinos vec ghosted:
-size:8 local_size:6 :
+size:8 locally_owned_size:6 :
[2]: 2.000e+00
[3]: 3.000e+00
[4]: 4.000e+00
DEAL:1::ghosted IS: {[2,7]}
DEAL:1::tril_vector_ghosted.owned_elements() {[4,7]}
DEAL:1::import of ghosted vector should fail:
-DEAL:1::ExcMessage("Import() from TrilinosWrappers::MPI::Vector with ghost entries is not supported!")
+DEAL:1::ExcMessage( "Import() from TrilinosWrappers::MPI::Vector with ghost entries is not supported!")
DEAL:1::import of distributed vector should work:
DEAL:1::RWVector contents:
IndexSet: {[2,7]}
DEAL:0::is: {[0,3]}
DEAL:0::is_ghosted: {[2,5]}
DEAL:0::trilinos vec:
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[0]: 0.000e+00
[1]: 1.000e+00
[2]: 2.000e+00
[3]: 3.000e+00
DEAL:0::trilinos vec ghosted:
-size:8 local_size:6 :
+size:8 locally_owned_size:6 :
[0]: 0.000e+00
[1]: 1.000e+00
[2]: 2.000e+00
DEAL:1::is: {[4,7]}
DEAL:1::is_ghosted: {[2,5]}
DEAL:1::trilinos vec:
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[4]: 4.000e+00
[5]: 5.000e+00
[6]: 6.000e+00
[7]: 7.000e+00
DEAL:1::trilinos vec ghosted:
-size:8 local_size:6 :
+size:8 locally_owned_size:6 :
[2]: 2.000e+00
[3]: 3.000e+00
[4]: 4.000e+00
[2]: 2.000e+00
[3]: 3.000e+00
DEAL:0::trilinos vec:
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[0]: 0.000e+00
[1]: 1.000e+00
[2]: 2.000e+00
[3]: 3.000e+00
DEAL:0::trilinos vec (2x):
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[0]: 0.000e+00
[1]: 2.000e+00
[2]: 4.000e+00
[3]: 6.000e+00
DEAL:0::trilinos vec (1x):
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[0]: 0.000e+00
[1]: 1.000e+00
[2]: 2.000e+00
[6]: 6.000e+00
[7]: 7.000e+00
DEAL:1::trilinos vec:
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[4]: 4.000e+00
[5]: 5.000e+00
[6]: 6.000e+00
[7]: 7.000e+00
DEAL:1::trilinos vec (2x):
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[4]: 8.000e+00
[5]: 1.000e+01
[6]: 1.200e+01
[7]: 1.400e+01
DEAL:1::trilinos vec (1x):
-size:8 local_size:4 :
+size:8 locally_owned_size:4 :
[4]: 4.000e+00
[5]: 5.000e+00
[6]: 6.000e+00