void reset_values ();
/**
- * Set the dimensions of this object to the sizes given in the argument, and
- * newly allocate the required memory. If <tt>fast</tt> is set to
- * <tt>false</tt>, previous content is deleted, otherwise the memory is not
- * touched.
+ * Set the dimensions of this object to the sizes given in the
+ * argument, and newly allocate the required memory. If
+ * <tt>omit_default_initialization</tt> is set to <tt>false</tt>,
+ * all elements of the table are set to a default constructed object
+ * for the element type. Otherwise the memory is left in an
+ * uninitialized or otherwise undefined state.
*/
void reinit (const TableIndices<N> &new_size,
- const bool fast = false);
+ const bool omit_default_initialization = false);
/**
* Size of the table in direction <tt>i</tt>.
*/
void reinit (const unsigned int size1,
const unsigned int size2,
- const bool fast = false);
+ const bool omit_default_initialization = false);
using TableBase<2,T>::reinit;
*/
void reinit (const unsigned int size1,
const unsigned int size2,
- const bool fast = false);
+ const bool omit_default_initialization = false);
/**
* Direct access to one element of the table by specifying all indices at
inline
void
TableBase<N,T>::reinit (const TableIndices<N> &new_sizes,
- const bool fast)
+ const bool omit_default_initialization)
{
table_size = new_sizes;
}
// if new size is nonzero: if necessary allocate additional memory, and if
- // not fast resize, zero out all values)
+ // not fast resize, zero out all values/default initialize them)
values.resize_fast (new_size);
- if (!fast)
+ if (!omit_default_initialization)
values.fill(T());
}
void
Table<2,T>::reinit (const unsigned int size1,
const unsigned int size2,
- const bool fast)
+ const bool omit_default_initialization)
{
- this->TableBase<2,T>::reinit (TableIndices<2> (size1, size2),fast);
+ this->TableBase<2,T>::reinit (TableIndices<2> (size1, size2),omit_default_initialization);
}
void
TransposeTable<T>::reinit (const unsigned int size1,
const unsigned int size2,
- const bool fast)
+ const bool omit_default_initialization)
{
- this->TableBase<2,T>::reinit (TableIndices<2> (size2, size1),fast);
+ this->TableBase<2,T>::reinit (TableIndices<2> (size2, size1), omit_default_initialization);
}
populate_linear_operator_functions(
dealii::BlockLinearOperator<Range, Domain> &op)
{
- op.reinit_range_vector = [=](Range &v, bool fast)
+ op.reinit_range_vector = [=](Range &v, bool omit_zeroing_entries)
{
const unsigned int m = op.n_block_rows();
// And reinitialize every individual block with reinit_range_vectors:
for (unsigned int i = 0; i < m; ++i)
- op.block(i, 0).reinit_range_vector(v.block(i), fast);
+ op.block(i, 0).reinit_range_vector(v.block(i), omit_zeroing_entries);
v.collect_sizes();
};
- op.reinit_domain_vector = [=](Domain &v, bool fast)
+ op.reinit_domain_vector = [=](Domain &v, bool omit_zeroing_entries)
{
const unsigned int n = op.n_block_cols();
// And reinitialize every individual block with reinit_domain_vectors:
for (unsigned int i = 0; i < n; ++i)
- op.block(0, i).reinit_domain_vector(v.block(i), fast);
+ op.block(0, i).reinit_domain_vector(v.block(i), omit_zeroing_entries);
v.collect_sizes();
};
for (unsigned int i = 1; i < m; ++i)
{
- diagonal_inverse.block(i, i).reinit_range_vector(*tmp, /*bool fast=*/ true);
+ diagonal_inverse.block(i, i).reinit_range_vector(*tmp, /*bool omit_zeroing_entries=*/ true);
*tmp = u.block(i);
*tmp *= -1.;
for (unsigned int j = 0; j < i; ++j)
for (int i = m - 2; i >= 0; --i)
{
- diagonal_inverse.block(i, i).reinit_range_vector(*tmp, /*bool fast=*/ true);
+ diagonal_inverse.block(i, i).reinit_range_vector(*tmp, /*bool omit_zeroing_entries=*/ true);
*tmp = u.block(i);
*tmp *= -1.;
for (int j = i + 1; j < m; ++j)
* collect_sizes() to update the block system's knowledge of its individual
* block's sizes.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*/
void reinit (const unsigned int n_blocks,
const size_type block_size = 0,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinitialize the BlockVector such that it contains
* If the number of blocks is the same as before this function was called,
* all vectors remain the same and reinit() is called for each vector.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*
* Note that you must call this (or the other reinit() functions) function,
* rather than calling the reinit() functions of an individual block, to
* yield unpredictable results since they may be routed to the wrong block.
*/
void reinit (const std::vector<size_type> &block_sizes,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Reinitialize the BlockVector to reflect the structure found in
* If the number of blocks is the same as before this function was called,
* all vectors remain the same and reinit() is called for each vector.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*/
void reinit (const BlockIndices &block_indices,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Change the dimension to that of the vector <tt>V</tt>. The same applies
* as for the other reinit() function.
*
* The elements of <tt>V</tt> are not copied, i.e. this function is the
- * same as calling <tt>reinit (V.size(), fast)</tt>.
+ * same as calling <tt>reinit (V.size(), omit_zeroing_entries)</tt>.
*
* Note that you must call this (or the other reinit() functions) function,
* rather than calling the reinit() functions of an individual block, to
*/
template <typename Number2>
void reinit (const BlockVector<Number2> &V,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Multiply each element of this vector by the corresponding element of
static
void reinit_range_vector (const Matrix &matrix,
BlockVector<number> &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.get_row_indices(), fast);
+ v.reinit(matrix.get_row_indices(), omit_zeroing_entries);
}
template <typename Matrix>
static
void reinit_domain_vector(const Matrix &matrix,
BlockVector<number> &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.get_column_indices(), fast);
+ v.reinit(matrix.get_column_indices(), omit_zeroing_entries);
}
};
template <typename Number>
void BlockVector<Number>::reinit (const unsigned int n_blocks,
const size_type block_size,
- const bool fast)
+ const bool omit_zeroing_entries)
{
std::vector<size_type> block_sizes(n_blocks, block_size);
- reinit(block_sizes, fast);
+ reinit(block_sizes, omit_zeroing_entries);
}
template <typename Number>
void BlockVector<Number>::reinit (const std::vector<size_type> &block_sizes,
- const bool fast)
+ const bool omit_zeroing_entries)
{
this->block_indices.reinit (block_sizes);
if (this->components.size() != this->n_blocks())
this->components.resize(this->n_blocks());
for (size_type i=0; i<this->n_blocks(); ++i)
- this->components[i].reinit(block_sizes[i], fast);
+ this->components[i].reinit(block_sizes[i], omit_zeroing_entries);
}
template <typename Number>
void BlockVector<Number>::reinit (
const BlockIndices &n,
- const bool fast)
+ const bool omit_zeroing_entries)
{
this->block_indices = n;
if (this->components.size() != this->n_blocks())
this->components.resize(this->n_blocks());
for (size_type i=0; i<this->n_blocks(); ++i)
- this->components[i].reinit(n.block_size(i), fast);
+ this->components[i].reinit(n.block_size(i), omit_zeroing_entries);
}
template <typename Number>
template <typename Number2>
void BlockVector<Number>::reinit (const BlockVector<Number2> &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
this->block_indices = v.get_block_indices();
if (this->components.size() != this->n_blocks())
this->components.resize(this->n_blocks());
for (size_type i=0; i<this->n_blocks(); ++i)
- this->block(i).reinit(v.block(i), fast);
+ this->block(i).reinit(v.block(i), omit_zeroing_entries);
}
* initalization is done, i.e., if it is set to false the content of the
* vector is set to 0.
*/
- std::function<void(Range &v, bool fast)> reinit_range_vector;
+ std::function<void(Range &v, bool omit_zeroing_entries)> reinit_range_vector;
/**
* Initializes a vector of the Domain space to be directly usable as the
* initalization is done, i.e., if it is set to false the content of the
* vector is set to 0.
*/
- std::function<void(Domain &v, bool fast)> reinit_domain_vector;
+ std::function<void(Domain &v, bool omit_zeroing_entries)> reinit_domain_vector;
/**
* @name In-place vector space operations
static GrowingVectorMemory<Intermediate> vector_memory;
Intermediate *i = vector_memory.alloc();
- second_op.reinit_range_vector(*i, /*bool fast =*/ true);
+ second_op.reinit_range_vector(*i, /*bool omit_zeroing_entries =*/ true);
second_op.vmult(*i, u);
first_op.vmult(v, *i);
vector_memory.free(i);
static GrowingVectorMemory<Intermediate> vector_memory;
Intermediate *i = vector_memory.alloc();
- second_op.reinit_range_vector(*i, /*bool fast =*/ true);
+ second_op.reinit_range_vector(*i, /*bool omit_zeroing_entries =*/ true);
second_op.vmult(*i, u);
first_op.vmult_add(v, *i);
vector_memory.free(i);
static GrowingVectorMemory<Intermediate> vector_memory;
Intermediate *i = vector_memory.alloc();
- first_op.reinit_domain_vector(*i, /*bool fast =*/ true);
+ first_op.reinit_domain_vector(*i, /*bool omit_zeroing_entries =*/ true);
first_op.Tvmult(*i, u);
second_op.Tvmult(v, *i);
vector_memory.free(i);
static GrowingVectorMemory<Intermediate> vector_memory;
Intermediate *i = vector_memory.alloc();
- first_op.reinit_domain_vector(*i, /*bool fast =*/ true);
+ first_op.reinit_domain_vector(*i, /*bool omit_zeroing_entries =*/ true);
first_op.Tvmult(*i, u);
second_op.Tvmult_add(v, *i);
vector_memory.free(i);
return_op.vmult = [op, &solver, &preconditioner](Vector &v, const Vector &u)
{
- op.reinit_range_vector(v, /*bool fast =*/ false);
+ op.reinit_range_vector(v, /*bool omit_zeroing_entries =*/ false);
solver.solve(op, v, u, preconditioner);
};
static GrowingVectorMemory<typename Solver::vector_type> vector_memory;
Vector *v2 = vector_memory.alloc();
- op.reinit_range_vector(*v2, /*bool fast =*/ false);
+ op.reinit_range_vector(*v2, /*bool omit_zeroing_entries =*/ false);
solver.solve(op, *v2, u, preconditioner);
v += *v2;
vector_memory.free(v2);
return_op.Tvmult = [op, &solver, &preconditioner]( Vector &v, const
Vector &u)
{
- op.reinit_range_vector(v, /*bool fast =*/ false);
+ op.reinit_range_vector(v, /*bool omit_zeroing_entries =*/ false);
solver.solve(transpose_operator(op), v, u, preconditioner);
};
static GrowingVectorMemory<typename Solver::vector_type> vector_memory;
Vector *v2 = vector_memory.alloc();
- op.reinit_range_vector(*v2, /*bool fast =*/ false);
+ op.reinit_range_vector(*v2, /*bool omit_zeroing_entries =*/ false);
solver.solve(transpose_operator(op), *v2, u, preconditioner);
v += *v2;
vector_memory.free(v2);
*/
template <typename Matrix>
static
- void reinit_range_vector (const Matrix &matrix, Vector &v, bool fast)
+ void reinit_range_vector (const Matrix &matrix, Vector &v, bool omit_zeroing_entries)
{
- v.reinit(matrix.m(), fast);
+ v.reinit(matrix.m(), omit_zeroing_entries);
}
/**
*/
template <typename Matrix>
static
- void reinit_domain_vector (const Matrix &matrix, Vector &v, bool fast)
+ void reinit_domain_vector (const Matrix &matrix, Vector &v, bool omit_zeroing_entries)
{
- v.reinit(matrix.n(), fast);
+ v.reinit(matrix.n(), omit_zeroing_entries);
}
};
} /* namespace LinearOperator */
static GrowingVectorMemory<Range> vector_memory;
Range *i = vector_memory.alloc();
- i->reinit(v, /*bool fast =*/true);
+ i->reinit(v, /*bool omit_zeroing_entries =*/true);
function(*i, u);
// creation of a LinearOperator wrapper is respected - further a matrix
// or an operator_exemplar cannot usually be copied...
- return_op.reinit_range_vector = [&operator_exemplar](Range &v, bool fast)
+ return_op.reinit_range_vector = [&operator_exemplar](Range &v, bool omit_zeroing_entries)
{
- internal::LinearOperator::ReinitHelper<Range>::reinit_range_vector(operator_exemplar, v, fast);
+ internal::LinearOperator::ReinitHelper<Range>::reinit_range_vector(operator_exemplar, v, omit_zeroing_entries);
};
- return_op.reinit_domain_vector = [&operator_exemplar](Domain &v, bool fast)
+ return_op.reinit_domain_vector = [&operator_exemplar](Domain &v, bool omit_zeroing_entries)
{
- internal::LinearOperator::ReinitHelper<Domain>::reinit_domain_vector(operator_exemplar, v, fast);
+ internal::LinearOperator::ReinitHelper<Domain>::reinit_domain_vector(operator_exemplar, v, omit_zeroing_entries);
};
typename std::conditional<
v += u;
};
- reinit_vector = [&u](Range &v, bool fast)
+ reinit_vector = [&u](Range &v, bool omit_zeroing_entries)
{
- v.reinit(u, fast);
+ v.reinit(u, omit_zeroing_entries);
};
return *this;
{
Range result_vector;
- reinit_vector(result_vector, /*bool fast=*/ true);
+ reinit_vector(result_vector, /*bool omit_zeroing_entries=*/ true);
apply(result_vector);
return result_vector;
* whether a fast initialization is done, i.e., if it is set to false the
* content of the vector is set to 0.
*/
- std::function<void(Range &v, bool fast)> reinit_vector;
+ std::function<void(Range &v, bool omit_zeroing_entries)> reinit_vector;
};
// ensure to have valid PackagedOperation objects by catching op by value
// u is caught by reference
- return_comp.reinit_vector = [&u](Range &x, bool fast)
+ return_comp.reinit_vector = [&u](Range &x, bool omit_zeroing_entries)
{
- x.reinit(u, fast);
+ x.reinit(u, omit_zeroing_entries);
};
return_comp.apply = [&u, &v](Range &x)
// ensure to have valid PackagedOperation objects by catching op by value
// u is catched by reference
- return_comp.reinit_vector = [&u](Range &x, bool fast)
+ return_comp.reinit_vector = [&u](Range &x, bool omit_zeroing_entries)
{
- x.reinit(u, fast);
+ x.reinit(u, omit_zeroing_entries);
};
return_comp.apply = [&u, &v](Range &x)
static GrowingVectorMemory<Range> vector_memory;
Range *i = vector_memory.alloc();
- op.reinit_domain_vector(*i, /*bool fast =*/ true);
+ op.reinit_domain_vector(*i, /*bool omit_zeroing_entries =*/ true);
comp.apply(*i);
op.vmult(v, *i);
static GrowingVectorMemory<Range> vector_memory;
Range *i = vector_memory.alloc();
- op.reinit_range_vector(*i, /*bool fast =*/ true);
+ op.reinit_range_vector(*i, /*bool omit_zeroing_entries =*/ true);
comp.apply(*i);
op.vmult_add(v, *i);
static GrowingVectorMemory<Range> vector_memory;
Range *i = vector_memory.alloc();
- op.reinit_range_vector(*i, /*bool fast =*/ true);
+ op.reinit_range_vector(*i, /*bool omit_zeroing_entries =*/ true);
comp.apply(*i);
op.Tvmult(v, *i);
static GrowingVectorMemory<Range> vector_memory;
Range *i = vector_memory.alloc();
- op.reinit_range_vector(*i, /*bool fast =*/ true);
+ op.reinit_range_vector(*i, /*bool omit_zeroing_entries =*/ true);
comp.apply(*i);
op.Tvmult_add(v, *i);
* and call collect_sizes() to update the block system's knowledge of
* its individual block's sizes.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*/
void reinit (const size_type num_blocks,
const size_type block_size = 0,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinitialize the BlockVector such that it contains
* called, all vectors remain the same and reinit() is called for each
* vector.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*
* Note that you must call this (or the other reinit() functions)
* function, rather than calling the reinit() functions of an individual
* be routed to the wrong block.
*/
void reinit (const std::vector<size_type> &N,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Change the dimension to that of the vector <tt>V</tt>. The same
* applies as for the other reinit() function.
*
* The elements of <tt>V</tt> are not copied, i.e. this function is the
- * same as calling <tt>reinit (V.size(), fast)</tt>.
+ * same as calling <tt>reinit (V.size(), omit_zeroing_entries)</tt>.
*
* Note that you must call this (or the other reinit() functions)
* function, rather than calling the reinit() functions of an individual
*/
template <typename Number2>
void reinit (const BlockVector<Number2> &V,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* This function copies the data that has accumulated in the data buffer
inline
void BlockVector<Number>::reinit (const size_type n_bl,
const size_type bl_sz,
- const bool fast)
+ const bool omit_zeroing_entries)
{
std::vector<size_type> n(n_bl, bl_sz);
- reinit(n, fast);
+ reinit(n, omit_zeroing_entries);
}
template <typename Number>
inline
void BlockVector<Number>::reinit (const std::vector<size_type> &n,
- const bool fast)
+ const bool omit_zeroing_entries)
{
this->block_indices.reinit (n);
if (this->components.size() != this->n_blocks())
this->components.resize(this->n_blocks());
for (size_type i=0; i<this->n_blocks(); ++i)
- this->components[i].reinit(n[i], fast);
+ this->components[i].reinit(n[i], omit_zeroing_entries);
}
template <typename Number2>
inline
void BlockVector<Number>::reinit (const BlockVector<Number2> &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
this->block_indices = v.get_block_indices();
if (this->components.size() != this->n_blocks())
this->components.resize(this->n_blocks());
for (unsigned int i=0; i<this->n_blocks(); ++i)
- this->block(i).reinit(v.block(i), fast);
+ this->block(i).reinit(v.block(i), omit_zeroing_entries);
}
* parallel distribution.
*/
void reinit (const size_type size,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Uses the parallel layout of the input vector @p in_vector and
* allocates memory for this vector. Recommended initialization function
* when several vectors with the same layout should be created.
*
- * If the flag @p fast is set to false, the memory will be initialized
+ * If the flag @p omit_zeroing_entries is set to false, the memory will be initialized
* with zero, otherwise the memory will be untouched (and the user must
* make sure to fill it with reasonable data before using it).
*/
template <typename Number2>
void reinit(const Vector<Number2> &in_vector,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Initialize the vector. The local range is specified by @p
template <typename Number>
void
Vector<Number>::reinit (const size_type size,
- const bool fast)
+ const bool omit_zeroing_entries)
{
clear_mpi_requests();
// check whether we need to reallocate
partitioner.reset (new Utilities::MPI::Partitioner (size));
// set entries to zero if so requested
- if (fast == false)
+ if (omit_zeroing_entries == false)
this->operator = (Number());
vector_is_ghosted = false;
template <typename Number2>
void
Vector<Number>::reinit (const Vector<Number2> &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
clear_mpi_requests();
Assert (v.partitioner.get() != 0, ExcNotInitialized());
Assert (vector_view.size() == partitioner->local_size(),
ExcInternalError());
- if (fast == false)
+ if (omit_zeroing_entries == false)
this->operator= (Number());
if (import_data != 0)
* Reinitialize the BlockVector to contain <tt>num_blocks</tt> blocks of
* size <tt>block_size</tt> each.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*/
void reinit (const unsigned int num_blocks,
const size_type block_size,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinitialize the BlockVector such that it contains
* If the number of blocks is the same as before this function was called,
* all vectors remain the same and reinit() is called for each vector.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*
* Note that you must call this (or the other reinit() functions)
* function, rather than calling the reinit() functions of an individual
* the wrong block.
*/
void reinit (const std::vector<size_type> &N,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Change the dimension to that of the vector <tt>V</tt>. The same applies
* as for the other reinit() function.
*
* The elements of <tt>V</tt> are not copied, i.e. this function is the
- * same as calling <tt>reinit (V.size(), fast)</tt>.
+ * same as calling <tt>reinit (V.size(), omit_zeroing_entries)</tt>.
*
* Note that you must call this (or the other reinit() functions)
* function, rather than calling the reinit() functions of an individual
* the wrong block.
*/
void reinit (const BlockVector &V,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Change the number of blocks to <tt>num_blocks</tt>. The individual
void
BlockVector::reinit (const unsigned int n_bl,
const size_type bl_sz,
- const bool fast)
+ const bool omit_zeroing_entries)
{
std::vector<size_type> n(n_bl, bl_sz);
- reinit(n, fast);
+ reinit(n, omit_zeroing_entries);
}
inline
void
BlockVector::reinit (const std::vector<size_type> &n,
- const bool fast)
+ const bool omit_zeroing_entries)
{
block_indices.reinit (n);
if (this->components.size() != this->n_blocks())
this->components.resize(this->n_blocks());
for (unsigned int i=0; i<this->n_blocks(); ++i)
- this->components[i].reinit(n[i], fast);
+ this->components[i].reinit(n[i], omit_zeroing_entries);
}
inline
void
BlockVector::reinit (const BlockVector &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
block_indices = v.get_block_indices();
if (this->components.size() != this->n_blocks())
this->components.resize(this->n_blocks());
for (unsigned int i=0; i<this->n_blocks(); ++i)
- block(i).reinit(v.block(i), fast);
+ block(i).reinit(v.block(i), omit_zeroing_entries);
}
* @p communicator argument denotes which MPI channel each of these
* blocks shall communicate.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*/
void reinit (const unsigned int n_blocks,
const MPI_Comm &communicator,
const size_type block_size,
const size_type local_size,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinitialize the BlockVector such that it contains
* called, all vectors remain the same and reinit() is called for each
* vector.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*
* Note that you must call this (or the other reinit() functions)
* function, rather than calling the reinit() functions of an individual
void reinit (const std::vector<size_type> &block_sizes,
const MPI_Comm &communicator,
const std::vector<size_type> &local_sizes,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Change the dimension to that of the vector <tt>V</tt>. The same
* applies as for the other reinit() function.
*
* The elements of <tt>V</tt> are not copied, i.e. this function is the
- * same as calling <tt>reinit (V.size(), fast)</tt>.
+ * same as calling <tt>reinit (V.size(), omit_zeroing_entries)</tt>.
*
* Note that you must call this (or the other reinit() functions)
* function, rather than calling the reinit() functions of an individual
* be routed to the wrong block.
*/
void reinit (const BlockVector &V,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Reinitialize the BlockVector using IndexSets. See the constructor
const MPI_Comm &communicator,
const size_type block_size,
const size_type local_size,
- const bool fast)
+ const bool omit_zeroing_entries)
{
reinit(std::vector<size_type>(n_blocks, block_size),
communicator,
std::vector<size_type>(n_blocks, local_size),
- fast);
+ omit_zeroing_entries);
}
BlockVector::reinit (const std::vector<size_type> &block_sizes,
const MPI_Comm &communicator,
const std::vector<size_type> &local_sizes,
- const bool fast)
+ const bool omit_zeroing_entries)
{
this->block_indices.reinit (block_sizes);
if (this->components.size() != this->n_blocks())
for (unsigned int i=0; i<this->n_blocks(); ++i)
this->components[i].reinit(communicator, block_sizes[i],
- local_sizes[i], fast);
+ local_sizes[i], omit_zeroing_entries);
}
inline
void
BlockVector::reinit (const BlockVector &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
this->block_indices = v.get_block_indices();
if (this->components.size() != this->n_blocks())
this->components.resize(this->n_blocks());
for (unsigned int i=0; i<this->n_blocks(); ++i)
- block(i).reinit(v.block(i), fast);
+ block(i).reinit(v.block(i), omit_zeroing_entries);
}
inline
* @p communicator denotes the MPI communicator henceforth to be used
* for this vector.
*
- * If @p fast is false, the vector is filled by zeros. Otherwise, the
+ * If @p omit_zeroing_entries is false, the vector is filled by zeros. Otherwise, the
* elements are left an unspecified state.
*/
void reinit (const MPI_Comm &communicator,
const size_type N,
const size_type local_size,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Change the dimension to that of the vector @p v, and also take over
* The same applies as for the other @p reinit function.
*
* The elements of @p v are not copied, i.e. this function is the same
- * as calling <tt>reinit(v.size(), v.local_size(), fast)</tt>.
+ * as calling <tt>reinit(v.size(), v.local_size(), omit_zeroing_entries)</tt>.
*/
void reinit (const Vector &v,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinit as a vector without ghost elements. See the constructor with
* reduces memory consumption, or if for efficiency the same amount of
* memory is used for less data.
*
- * If @p fast is false, the vector is filled by zeros. Otherwise, the
+ * If @p omit_zeroing_entries is false, the vector is filled by zeros. Otherwise, the
* elements are left an unspecified state.
*/
void reinit (const size_type N,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Change the dimension to that of the vector @p v. The same applies as
* for the other reinit() function.
*
* The elements of @p v are not copied, i.e. this function is the same as
- * calling <tt>reinit (v.size(), fast)</tt>.
+ * calling <tt>reinit (v.size(), omit_zeroing_entries)</tt>.
*/
void reinit (const Vector &v,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
protected:
/**
* Sets the global size of the vector to @p size. The stored elements have
* their index in [0,size).
*
- * If the flag @p fast is set to false, the memory will be initialized
+ * If the flag @p omit_zeroing_entries is set to false, the memory will be initialized
* with zero, otherwise the memory will be untouched (and the user must
* make sure to fill it with reasonable data before using it).
*/
void reinit (const size_type size,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Uses the same IndexSet as the one of the input vector @p in_vector and
* allocates memory for this vector.
*
- * If the flag @p fast is set to false, the memory will be initialized
+ * If the flag @p omit_zeroing_entries is set to false, the memory will be initialized
* with zero, otherwise the memory will be untouched (and the user must
* make sure to fill it with reasonable data before using it).
*/
template <typename Number2>
void reinit(const ReadWriteVector<Number2> &in_vector,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Initializes the vector. The indices are specified by
* @p locally_stored_indices.
*
- * If the flag @p fast is set to false, the memory will be initialized
+ * If the flag @p omit_zeroing_entries is set to false, the memory will be initialized
* with zero, otherwise the memory will be untouched (and the user must
* make sure to fill it with reasonable data before using it).
* locally_stored_indices.
*/
void reinit (const IndexSet &locally_stored_indices,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Swap the contents of this vector and the other vector @p v. One could
template <typename Number>
void
ReadWriteVector<Number>::reinit (const size_type size,
- const bool fast)
+ const bool omit_zeroing_entries)
{
// check whether we need to reallocate
resize_val(size);
stored_elements = complete_index_set(size);
// set entries to zero if so requested
- if (fast == false)
+ if (omit_zeroing_entries == false)
this->operator = (Number());
}
template <typename Number2>
void
ReadWriteVector<Number>::reinit (const ReadWriteVector<Number2> &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
resize_val(v.n_elements());
stored_elements = v.get_stored_elements();
- if (fast == false)
+ if (omit_zeroing_entries == false)
this->operator= (Number());
}
template <typename Number>
void
ReadWriteVector<Number>::reinit (const IndexSet &locally_stored_indices,
- const bool fast)
+ const bool omit_zeroing_entries)
{
stored_elements = locally_stored_indices;
resize_val(stored_elements.n_elements());
// initialize to zero
- if (fast == false)
+ if (omit_zeroing_entries == false)
this->operator= (Number());
}
* on the same Epetra_map is intended. In that case, the same communicator
* is used for data exchange.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*/
void reinit (const std::vector<Epetra_Map> &partitioning,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinitialize the BlockVector to contain as many blocks as there are
* with a distributed vector based on the same initialization is intended.
* In that case, the same communicator is used for data exchange.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*/
void reinit (const std::vector<IndexSet> &partitioning,
const MPI_Comm &communicator = MPI_COMM_WORLD,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinitialize the BlockVector to contain as many blocks as there are
* elements in the first argument, and with the respective sizes. Since no
* distribution map is given, all vectors are local vectors.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*/
void reinit (const std::vector<size_type> &N,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Reinitialize the vector in the same way as the given to a distributed
* as for the other reinit() function.
*
* The elements of <tt>V</tt> are not copied, i.e. this function is the
- * same as calling <tt>reinit (V.size(), fast)</tt>.
+ * same as calling <tt>reinit (V.size(), omit_zeroing_entries)</tt>.
*
* Note that you must call this (or the other reinit() functions)
* function, rather than calling the reinit() functions of an individual
* the wrong block.
*/
void reinit (const BlockVector &V,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Change the number of blocks to <tt>num_blocks</tt>. The individual
static
void reinit_range_vector (const Matrix &matrix,
TrilinosWrappers::BlockVector &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.range_partitioner(), fast);
+ v.reinit(matrix.range_partitioner(), omit_zeroing_entries);
}
template <typename Matrix>
static
void reinit_domain_vector(const Matrix &matrix,
TrilinosWrappers::BlockVector &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.domain_partitioner(), fast);
+ v.reinit(matrix.domain_partitioner(), omit_zeroing_entries);
}
};
* Epetra_Maps given in the input argument, according to the parallel
* distribution of the individual components described in the maps.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*
* This function is deprecated.
*/
void reinit (const std::vector<Epetra_Map> ¶llel_partitioning,
- const bool fast = false) DEAL_II_DEPRECATED;
+ const bool omit_zeroing_entries = false) DEAL_II_DEPRECATED;
/**
* Reinitialize the BlockVector to contain as many blocks as there are
* index sets given in the input argument, according to the parallel
* distribution of the individual components described in the maps.
*
- * If <tt>fast==false</tt>, the vector is filled with zeros.
+ * If <tt>omit_zeroing_entries==false</tt>, the vector is filled with zeros.
*/
void reinit (const std::vector<IndexSet> ¶llel_partitioning,
const MPI_Comm &communicator = MPI_COMM_WORLD,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinit functionality. This function destroys the old vector content
* applies as for the other reinit() function.
*
* The elements of <tt>V</tt> are not copied, i.e. this function is the
- * same as calling <tt>reinit (V.size(), fast)</tt>.
+ * same as calling <tt>reinit (V.size(), omit_zeroing_entries)</tt>.
*
* Note that you must call this (or the other reinit() functions)
* function, rather than calling the reinit() functions of an individual
* be routed to the wrong block.
*/
void reinit (const BlockVector &V,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Change the number of blocks to <tt>num_blocks</tt>. The individual
static
void reinit_range_vector (const Matrix &matrix,
TrilinosWrappers::MPI::BlockVector &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.range_partitioner(), fast);
+ v.reinit(matrix.range_partitioner(), omit_zeroing_entries);
}
template <typename Matrix>
static
void reinit_domain_vector(const Matrix &matrix,
TrilinosWrappers::MPI::BlockVector &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.domain_partitioner(), fast);
+ v.reinit(matrix.domain_partitioner(), omit_zeroing_entries);
}
};
/**
* Reinit functionality. This function sets the calling vector to the
* dimension and the parallel distribution of the input vector, but does
- * not copy the elements in <tt>v</tt>. If <tt>fast</tt> is not
+ * not copy the elements in <tt>v</tt>. If <tt>omit_zeroing_entries</tt> is not
* <tt>true</tt>, the elements in the vector are initialized with zero,
* otherwise the content will be left unchanged and the user has to set
* all elements.
* application of this function is to generate a replication of a whole
* vector on each machine, when the calling vector is built according to
* the localized vector class TrilinosWrappers::Vector, and <tt>v</tt>
- * is a distributed vector. In this case, the variable <tt>fast</tt>
+ * is a distributed vector. In this case, the variable <tt>omit_zeroing_entries</tt>
* needs to be set to <tt>false</tt>, since it does not make sense to
* exchange data between differently parallelized vectors without
* touching the elements.
*/
void reinit (const VectorBase &v,
- const bool fast = false,
+ const bool omit_zeroing_entries = false,
const bool allow_different_maps = false);
/**
* @ref GlossGhostedVector "vectors with ghost elements"
*/
void reinit (const Epetra_Map ¶llel_partitioning,
- const bool fast = false) DEAL_II_DEPRECATED;
+ const bool omit_zeroing_entries = false) DEAL_II_DEPRECATED;
/**
* Copy-constructor from deal.II vectors. Sets the dimension to that of
/**
* Reinit functionality. This function destroys the old vector content
* and generates a new one based on the input partitioning. The flag
- * <tt>fast</tt> determines whether the vector should be filled with
+ * <tt>omit_zeroing_entries</tt> determines whether the vector should be filled with
* zero (false) or left untouched (true).
*
*
*/
void reinit (const IndexSet ¶llel_partitioning,
const MPI_Comm &communicator = MPI_COMM_WORLD,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinit functionality. This function destroys the old vector content
* <tt>n</tt>.
*/
void reinit (const size_type n,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Initialization with an Epetra_Map. Similar to the call in the other
* is generated. This initialization function is appropriate when the data
* in the localized vector should be imported from a distributed vector
* that has been initialized with the same communicator. The variable
- * <tt>fast</tt> determines whether the vector should be filled with zero
+ * <tt>omit_zeroing_entries</tt> determines whether the vector should be filled with zero
* or left untouched.
*
* Which element of the @p input_map argument are set is in fact ignored,
* this argument.
*/
void reinit (const Epetra_Map &input_map,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Initialization with an IndexSet. Similar to the call in the other class
* generated. This initialization function is appropriate in case the data
* in the localized vector should be imported from a distributed vector
* that has been initialized with the same communicator. The variable
- * <tt>fast</tt> determines whether the vector should be filled with zero
+ * <tt>omit_zeroing_entries</tt> determines whether the vector should be filled with zero
* (false) or left untouched (true).
*
* Which element of the @p input_map argument are set is in fact ignored,
*/
void reinit (const IndexSet &input_map,
const MPI_Comm &communicator = MPI_COMM_WORLD,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Reinit function. Takes the information of a Vector and copies
* everything to the calling vector, now also allowing different maps.
*/
void reinit (const VectorBase &V,
- const bool fast = false,
+ const bool omit_zeroing_entries = false,
const bool allow_different_maps = false);
/**
static
void reinit_range_vector (const Matrix &matrix,
TrilinosWrappers::MPI::Vector &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.locally_owned_range_indices(), matrix.get_mpi_communicator(), fast);
+ v.reinit(matrix.locally_owned_range_indices(), matrix.get_mpi_communicator(), omit_zeroing_entries);
}
template <typename Matrix>
static
void reinit_domain_vector(const Matrix &matrix,
TrilinosWrappers::MPI::Vector &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.locally_owned_domain_indices(), matrix.get_mpi_communicator(), fast);
+ v.reinit(matrix.locally_owned_domain_indices(), matrix.get_mpi_communicator(), omit_zeroing_entries);
}
};
static
void reinit_range_vector (const Matrix &matrix,
TrilinosWrappers::Vector &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.locally_owned_range_indices(), matrix.get_mpi_communicator(), fast);
+ v.reinit(matrix.locally_owned_range_indices(),
+ matrix.get_mpi_communicator(),
+ omit_zeroing_entries);
}
template <typename Matrix>
static
void reinit_domain_vector(const Matrix &matrix,
TrilinosWrappers::Vector &v,
- bool fast)
+ bool omit_zeroing_entries)
{
- v.reinit(matrix.locally_owned_domain_indices(), matrix.get_mpi_communicator(), fast);
+ v.reinit(matrix.locally_owned_domain_indices(),
+ matrix.get_mpi_communicator(),
+ omit_zeroing_entries);
}
};
* input vector.
*/
void reinit (const VectorBase &v,
- const bool fast = false);
+ const bool omit_zeroing_entries = false);
/**
* Compress the underlying representation of the Trilinos object, i.e.
inline
void
VectorBase::reinit (const VectorBase &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
Assert (vector.get() != 0,
ExcMessage("Vector has not been constructed properly."));
- if (fast == false ||
+ if (omit_zeroing_entries == false ||
vector_partitioner().SameAs(v.vector_partitioner())==false)
vector.reset (new Epetra_FEVector(*v.vector));
* <tt>reinit(N)</tt>. This cited behaviour is analogous to that of the
* standard library containers.
*
- * If @p fast is false, the vector is filled by zeros. Otherwise, the
+ * If @p omit_zeroing_entries is false, the vector is filled by zeros. Otherwise, the
* elements are left an unspecified state.
*
* This function is virtual in order to allow for derived classes to handle
* memory separately.
*/
virtual void reinit (const size_type N,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Change the dimension to that of the vector @p V. The same applies as for
* the other @p reinit function.
*
* The elements of @p V are not copied, i.e. this function is the same as
- * calling <tt>reinit (V.size(), fast)</tt>.
+ * calling <tt>reinit (V.size(), omit_zeroing_entries)</tt>.
*/
template <typename Number2>
void reinit (const Vector<Number2> &V,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* Swap the contents of this vector and the other vector @p v. One could do
template <typename Number>
inline
-void Vector<Number>::reinit (const size_type n, const bool fast)
+void Vector<Number>::reinit (const size_type n,
+ const bool omit_zeroing_entries)
{
if (n==0)
{
allocate();
};
vec_size = n;
- if (fast == false)
+ if (omit_zeroing_entries == false)
*this = static_cast<Number>(0);
}
template <typename Number>
template <typename Number2>
void Vector<Number>::reinit (const Vector<Number2> &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
- reinit (v.size(), fast);
+ reinit (v.size(), omit_zeroing_entries);
}
* have of the original object. Notice that it is your own responsibility to
* ensure that the memory you are pointing to is big enough.
*
- * Similarly to what happens in the base class, if fast is false, then the
- * entire content of the vector is set to 0, otherwise the content of the
- * memory is left unchanged.
+ * Similarly to what happens in the base class, if
+ * 'omit_zeroing_entries' is false, then the entire content of the
+ * vector is set to 0, otherwise the content of the memory is left
+ * unchanged.
*
* Notice that the following snippet of code may not produce what you
* expect:
* call this reinit function if you really know what you are doing.
*/
virtual void reinit (const size_type N,
- const bool fast=false);
+ const bool omit_zeroing_entries=false);
/**
* This reinit function is equivalent to constructing a new object with the
template<typename Number>
inline
-void VectorView<Number>::reinit(const size_type N, const bool fast)
+void VectorView<Number>::reinit(const size_type N,
+ const bool omit_zeroing_entries)
{
this->vec_size = N;
this->max_vec_size = N;
- if (fast == false)
+ if (omit_zeroing_entries == false)
Vector<Number>::operator=(static_cast<Number>(0));
}
Vector::reinit (const MPI_Comm &comm,
const size_type n,
const size_type local_sz,
- const bool fast)
+ const bool omit_zeroing_entries)
{
communicator = comm;
// finally clear the new vector if so
// desired
- if (fast == false)
+ if (omit_zeroing_entries == false)
*this = 0;
}
void
Vector::reinit (const Vector &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
if (v.has_ghost_elements())
{
reinit (v.locally_owned_elements(), v.ghost_indices, v.communicator);
- if (!fast)
+ if (!omit_zeroing_entries)
{
int ierr = VecSet(vector, 0.0);
AssertThrow (ierr == 0, ExcPETScError(ierr));
}
}
else
- reinit (v.communicator, v.size(), v.local_size(), fast);
+ reinit (v.communicator, v.size(), v.local_size(), omit_zeroing_entries);
}
void
Vector::reinit (const size_type n,
- const bool fast)
+ const bool omit_zeroing_entries)
{
// only do something if the sizes
// mismatch
// finally clear the new vector if so
// desired
- if (fast == false)
+ if (omit_zeroing_entries == false)
*this = 0;
}
void
Vector::reinit (const Vector &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
- reinit (v.size(), fast);
+ reinit (v.size(), omit_zeroing_entries);
}
void
BlockVector::reinit (const std::vector<Epetra_Map> &input_maps,
- const bool fast)
+ const bool omit_zeroing_entries)
{
const size_type no_blocks = input_maps.size();
std::vector<size_type> block_sizes (no_blocks);
components.resize(n_blocks());
for (size_type i=0; i<n_blocks(); ++i)
- components[i].reinit(input_maps[i], fast);
+ components[i].reinit(input_maps[i], omit_zeroing_entries);
collect_sizes();
}
void
BlockVector::reinit (const std::vector<IndexSet> ¶llel_partitioning,
const MPI_Comm &communicator,
- const bool fast)
+ const bool omit_zeroing_entries)
{
const size_type no_blocks = parallel_partitioning.size();
std::vector<size_type> block_sizes (no_blocks);
components.resize(n_blocks());
for (size_type i=0; i<n_blocks(); ++i)
- components[i].reinit(parallel_partitioning[i], communicator, fast);
+ components[i].reinit(parallel_partitioning[i], communicator, omit_zeroing_entries);
collect_sizes();
}
void
BlockVector::reinit (const BlockVector &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
block_indices = v.get_block_indices();
if (components.size() != n_blocks())
components.resize(n_blocks());
for (size_type i=0; i<n_blocks(); ++i)
- components[i].reinit(v.block(i), fast, false);
+ components[i].reinit(v.block(i), omit_zeroing_entries, false);
collect_sizes();
}
void
BlockVector::reinit (const std::vector<Epetra_Map> &input_maps,
- const bool fast)
+ const bool omit_zeroing_entries)
{
size_type no_blocks = input_maps.size();
std::vector<size_type> block_sizes (no_blocks);
components.resize(n_blocks());
for (size_type i=0; i<n_blocks(); ++i)
- components[i].reinit(input_maps[i], fast);
+ components[i].reinit(input_maps[i], omit_zeroing_entries);
collect_sizes();
}
void
BlockVector::reinit (const std::vector<IndexSet> &partitioning,
const MPI_Comm &communicator,
- const bool fast)
+ const bool omit_zeroing_entries)
{
size_type no_blocks = partitioning.size();
std::vector<size_type> block_sizes (no_blocks);
components.resize(n_blocks());
for (size_type i=0; i<n_blocks(); ++i)
- components[i].reinit(partitioning[i], communicator, fast);
+ components[i].reinit(partitioning[i], communicator, omit_zeroing_entries);
collect_sizes();
}
void
BlockVector::reinit (const std::vector<size_type> &block_sizes,
- const bool fast)
+ const bool omit_zeroing_entries)
{
this->block_indices.reinit (block_sizes);
if (components.size() != n_blocks())
components.resize(n_blocks());
for (size_type i=0; i<n_blocks(); ++i)
- components[i].reinit(block_sizes[i], fast);
+ components[i].reinit(block_sizes[i], omit_zeroing_entries);
collect_sizes();
}
void
BlockVector::reinit (const BlockVector &v,
- const bool fast)
+ const bool omit_zeroing_entries)
{
block_indices = v.get_block_indices();
if (components.size() != n_blocks())
components.resize(n_blocks());
for (size_type i=0; i<n_blocks(); ++i)
- components[i].reinit(v.block(i), fast);
+ components[i].reinit(v.block(i), omit_zeroing_entries);
collect_sizes();
}
void
Vector::reinit (const Epetra_Map &input_map,
- const bool fast)
+ const bool omit_zeroing_entries)
{
nonlocal_vector.reset();
if (vector->Map().SameAs(input_map)==false)
vector.reset (new Epetra_FEVector(input_map));
- else if (fast == false)
+ else if (omit_zeroing_entries == false)
{
const int ierr = vector->PutScalar(0.);
(void)ierr;
void
Vector::reinit (const IndexSet ¶llel_partitioner,
const MPI_Comm &communicator,
- const bool fast)
+ const bool omit_zeroing_entries)
{
nonlocal_vector.reset();
Epetra_Map map = parallel_partitioner.make_trilinos_map (communicator,
true);
- reinit (map, fast);
+ reinit (map, omit_zeroing_entries);
}
void
Vector::reinit (const VectorBase &v,
- const bool fast,
+ const bool omit_zeroing_entries,
const bool allow_different_maps)
{
nonlocal_vector.reset();
has_ghosts = v.has_ghosts;
last_action = Zero;
}
- else if (fast == false)
+ else if (omit_zeroing_entries == false)
{
// old and new vectors
// have exactly the
// what she is doing.
else
{
- Assert (fast == false,
+ Assert (omit_zeroing_entries == false,
ExcMessage ("It is not possible to exchange data with the "
- "option fast set, which would not write "
+ "option 'omit_zeroing_entries' set, which would not write "
"elements."));
AssertThrow (size() == v.size(),
void
Vector::reinit (const size_type n,
- const bool fast)
+ const bool omit_zeroing_entries)
{
if (size() != n)
{
Utilities::Trilinos::comm_self());
vector.reset (new Epetra_FEVector (map));
}
- else if (fast == false)
+ else if (omit_zeroing_entries == false)
{
int ierr;
ierr = vector->GlobalAssemble(last_action);
void
Vector::reinit (const Epetra_Map &input_map,
- const bool fast)
+ const bool omit_zeroing_entries)
{
if (n_global_elements(vector->Map()) != n_global_elements(input_map))
{
input_map.Comm());
vector.reset (new Epetra_FEVector (map));
}
- else if (fast == false)
+ else if (omit_zeroing_entries == false)
{
int ierr;
ierr = vector->GlobalAssemble(last_action);
void
Vector::reinit (const IndexSet &partitioning,
const MPI_Comm &communicator,
- const bool fast)
+ const bool omit_zeroing_entries)
{
if (n_global_elements(vector->Map()) !=
static_cast<TrilinosWrappers::types::int_type>(partitioning.size()))
#endif
vector.reset (new Epetra_FEVector(map));
}
- else if (fast == false)
+ else if (omit_zeroing_entries == false)
{
int ierr;
ierr = vector->GlobalAssemble(last_action);
void
Vector::reinit (const VectorBase &v,
- const bool fast,
+ const bool omit_zeroing_entries,
const bool allow_different_maps)
{
// In case we do not allow to
// the vector, initialize our
// map with the map in v, and
// generate the vector.
- (void)fast;
+ (void)omit_zeroing_entries;
if (allow_different_maps == false)
{
if (local_range() != v.local_range())
// the data.
else
{
- Assert (fast == false,
+ Assert (omit_zeroing_entries == false,
ExcMessage ("It is not possible to exchange data with the "
- "option fast set, which would not write "
+ "option 'omit_zeroing_entries' set, which would not write "
"elements."));
AssertThrow (size() == v.size(),