*
* @ingroup constraints
*/
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
- make_sparsity_pattern (const DoFHandlerType &dof,
- SP &sparsity_pattern,
- const ConstraintMatrix &constraints = ConstraintMatrix(),
- const bool keep_constrained_dofs = true,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id);
+ make_sparsity_pattern (const DoFHandlerType &dof,
+ SparsityPatternType &sparsity_pattern,
+ const ConstraintMatrix &constraints = ConstraintMatrix(),
+ const bool keep_constrained_dofs = true,
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id);
/**
* Locate non-zero entries for vector valued finite elements. This function
*
* @ingroup constraints
*/
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_sparsity_pattern (const DoFHandlerType &dof,
const Table<2, Coupling> &coupling,
- SP &sparsity_pattern,
- const ConstraintMatrix &constraints = ConstraintMatrix(),
+ SparsityPatternType &sparsity_pattern,
+ const ConstraintMatrix &constraints = ConstraintMatrix(),
const bool keep_constrained_dofs = true,
- const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id);
+ const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id);
/**
* Construct a sparsity pattern that allows coupling degrees of freedom on
* whereas the ones that correspond to columns come from the second
* DoFHandler.
*/
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
- make_sparsity_pattern (const DoFHandlerType &dof_row,
- const DoFHandlerType &dof_col,
- SP &sparsity);
+ make_sparsity_pattern (const DoFHandlerType &dof_row,
+ const DoFHandlerType &dof_col,
+ SparsityPatternType &sparsity);
/**
* Create the sparsity pattern for boundary matrices. See the general
* class that satisfies similar requirements. It is assumed that the size of
* the sparsity pattern is already correct.
*/
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
- make_boundary_sparsity_pattern (const DoFHandlerType &dof,
+ make_boundary_sparsity_pattern (const DoFHandlerType &dof,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
- SP &sparsity_pattern);
+ SparsityPatternType &sparsity_pattern);
/**
* Write the sparsity structure of the matrix composed of the basis
*
* For the type of the sparsity pattern, the same holds as said above.
*/
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
- make_boundary_sparsity_pattern (const DoFHandlerType &dof,
- const typename FunctionMap<DoFHandlerType::space_dimension>::type &boundary_ids,
- const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
- SP &sparsity);
+ make_boundary_sparsity_pattern
+ (const DoFHandlerType &dof,
+ const typename FunctionMap<DoFHandlerType::space_dimension>::type &boundary_ids,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
+ SparsityPatternType &sparsity);
/**
* Generate sparsity pattern for fluxes, i.e. formulations of the discrete
* neighboring elements, the normal couplings and these extra matrix entries
* are considered.
*/
- template<typename DoFHandlerType, class SP>
+ template<typename DoFHandlerType, typename SparsityPatternType>
void
make_flux_sparsity_pattern (const DoFHandlerType &dof_handler,
- SP &sparsity_pattern);
+ SparsityPatternType &sparsity_pattern);
/**
* This function does the same as the other with the same name, but it gets
*
* @ingroup constraints
*/
- template<typename DoFHandlerType, class SP>
+ template<typename DoFHandlerType, typename SparsityPatternType>
void
- make_flux_sparsity_pattern (const DoFHandlerType &dof_handler,
- SP &sparsity_pattern,
- const ConstraintMatrix &constraints,
- const bool keep_constrained_dofs = true,
- const types::subdomain_id subdomain_id = numbers::invalid_unsigned_int);
+ make_flux_sparsity_pattern (const DoFHandlerType &dof_handler,
+ SparsityPatternType &sparsity_pattern,
+ const ConstraintMatrix &constraints,
+ const bool keep_constrained_dofs = true,
+ const types::subdomain_id subdomain_id = numbers::invalid_unsigned_int);
/**
* This function does the same as the other with the same name, but it gets
*
* @todo Not implemented for hp::DoFHandler.
*/
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_flux_sparsity_pattern (const DoFHandlerType &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const Table<2,Coupling> &int_mask,
const Table<2,Coupling> &flux_mask);
* @ref GlossBlockLA "Block (linear algebra)"
* @author Wolfgang Bangerth, 2000, 2001
*/
-template <class SP>
+template <typename SparsityPatternType>
class BlockSparsityPatternBase : public Subscriptor
{
public:
/**
* Access the block with the given coordinates.
*/
- SP &
+ SparsityPatternType &
block (const size_type row,
const size_type column);
* Access the block with the given coordinates. Version for constant
* objects.
*/
- const SP &
+ const SparsityPatternType &
block (const size_type row,
const size_type column) const;
/**
* Array of sparsity patterns.
*/
- Table<2,SmartPointer<SP, BlockSparsityPatternBase<SP> > > sub_objects;
+ Table<2,SmartPointer<SparsityPatternType, BlockSparsityPatternBase<SparsityPatternType> > > sub_objects;
/**
* Object storing and managing the transformation of row indices to indices
-template <class SP>
+template <typename SparsityPatternType>
inline
-SP &
-BlockSparsityPatternBase<SP>::block (const size_type row,
- const size_type column)
+SparsityPatternType &
+BlockSparsityPatternBase<SparsityPatternType>::block (const size_type row,
+ const size_type column)
{
Assert (row<rows, ExcIndexRange(row,0,rows));
Assert (column<columns, ExcIndexRange(column,0,columns));
-template <class SP>
+template <typename SparsityPatternType>
inline
-const SP &
-BlockSparsityPatternBase<SP>::block (const size_type row,
- const size_type column) const
+const SparsityPatternType &
+BlockSparsityPatternBase<SparsityPatternType>::block (const size_type row,
+ const size_type column) const
{
Assert (row<rows, ExcIndexRange(row,0,rows));
Assert (column<columns, ExcIndexRange(column,0,columns));
-template <class SP>
+template <typename SparsityPatternType>
inline
const BlockIndices &
-BlockSparsityPatternBase<SP>::get_row_indices () const
+BlockSparsityPatternBase<SparsityPatternType>::get_row_indices () const
{
return row_indices;
}
-template <class SP>
+template <typename SparsityPatternType>
inline
const BlockIndices &
-BlockSparsityPatternBase<SP>::get_column_indices () const
+BlockSparsityPatternBase<SparsityPatternType>::get_column_indices () const
{
return column_indices;
}
-template <class SP>
+template <typename SparsityPatternType>
inline
void
-BlockSparsityPatternBase<SP>::add (const size_type i,
- const size_type j)
+BlockSparsityPatternBase<SparsityPatternType>::add (const size_type i,
+ const size_type j)
{
// if you get an error here, are
// you sure you called
-template <class SP>
+template <typename SparsityPatternType>
template <typename ForwardIterator>
void
-BlockSparsityPatternBase<SP>::add_entries (const size_type row,
- ForwardIterator begin,
- ForwardIterator end,
- const bool indices_are_sorted)
+BlockSparsityPatternBase<SparsityPatternType>::add_entries (const size_type row,
+ ForwardIterator begin,
+ ForwardIterator end,
+ const bool indices_are_sorted)
{
// Resize scratch arrays
if (block_column_indices.size() < this->n_block_cols())
-template <class SP>
+template <typename SparsityPatternType>
inline
bool
-BlockSparsityPatternBase<SP>::exists (const size_type i,
- const size_type j) const
+BlockSparsityPatternBase<SparsityPatternType>::exists (const size_type i,
+ const size_type j) const
{
// if you get an error here, are
// you sure you called
-template <class SP>
+template <typename SparsityPatternType>
inline
unsigned int
-BlockSparsityPatternBase<SP>::
+BlockSparsityPatternBase<SparsityPatternType>::
row_length (const size_type row) const
{
const std::pair<size_type , size_type>
-template <class SP>
+template <typename SparsityPatternType>
inline
-typename BlockSparsityPatternBase<SP>::size_type
-BlockSparsityPatternBase<SP>::n_block_cols () const
+typename BlockSparsityPatternBase<SparsityPatternType>::size_type
+BlockSparsityPatternBase<SparsityPatternType>::n_block_cols () const
{
return columns;
}
-template <class SP>
+template <typename SparsityPatternType>
inline
-typename BlockSparsityPatternBase<SP>::size_type
-BlockSparsityPatternBase<SP>::n_block_rows () const
+typename BlockSparsityPatternBase<SparsityPatternType>::size_type
+BlockSparsityPatternBase<SparsityPatternType>::n_block_rows () const
{
return rows;
}
* of this object is lost, and the sparsity pattern is in compressed mode
* afterwards.
*/
- template <typename SparsityType>
- void copy_from (const SparsityType &dsp,
- const size_type chunk_size);
+ template <typename SparsityPatternType>
+ void copy_from (const SparsityPatternType &dsp,
+ const size_type chunk_size);
/**
* Take a full matrix and use its nonzero entries to generate a sparse
* caller's site. There is no locking mechanism inside this method to
* prevent data races.
*/
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
- SparsityType &sparsity_pattern,
+ SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries = true,
- const Table<2,bool> &dof_mask = default_empty_table) const;
+ const Table<2,bool> &dof_mask = default_empty_table) const;
/**
* Similar to the other function, but for non-quadratic sparsity patterns.
*/
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
add_entries_local_to_global (const std::vector<size_type> &row_indices,
const std::vector<size_type> &col_indices,
- SparsityType &sparsity_pattern,
+ SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries = true,
- const Table<2,bool> &dof_mask = default_empty_table) const;
+ const Table<2,bool> &dof_mask = default_empty_table) const;
/**
* This function imports values from a global vector (@p global_vector) by
* This function actually implements the local_to_global function for
* standard (non-block) sparsity types.
*/
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
- SparsityType &sparsity_pattern,
+ SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
internal::bool2type<false>) const;
* This function actually implements the local_to_global function for block
* sparsity types.
*/
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
- SparsityType &sparsity_pattern,
+ SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
internal::bool2type<true>) const;
* the global row indices.
*/
void
- make_sorted_row_list (const std::vector<size_type> &local_dof_indices,
- internals::GlobalRowsFromLocal &global_rows) const;
+ make_sorted_row_list (const std::vector<size_type> &local_dof_indices,
+ internals::GlobalRowsFromLocal &global_rows) const;
/**
* Internal helper function for add_entries_local_to_global function.
template <typename MatrixType> class BlockMatrixBase;
-template <typename SparsityType> class BlockSparsityPatternBase;
+template <typename SparsityPatternType> class BlockSparsityPatternBase;
template <typename number> class BlockSparseMatrixEZ;
/**
-template <typename SparsityType>
+template <typename SparsityPatternType>
inline
void
ConstraintMatrix::
add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
- SparsityType &sparsity_pattern,
+ SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask) const
{
// the actual implementation follows in the cm.templates.h file.
add_entries_local_to_global (local_dof_indices, sparsity_pattern,
keep_constrained_entries, dof_mask,
- internal::bool2type<IsBlockMatrix<SparsityType>::value>());
+ internal::bool2type<IsBlockMatrix<SparsityPatternType>::value>());
}
// add_entries_local_to_global. In case we keep constrained entries, add all
// the rows and columns related to the constrained dof, otherwise just add
// the diagonal
- template <typename SparsityType>
+ template <typename SparsityPatternType>
inline void
set_sparsity_diagonals (const internals::GlobalRowsFromLocal &global_rows,
const std::vector<size_type> &local_dof_indices,
const Table<2,bool> &dof_mask,
const bool keep_constrained_entries,
- SparsityType &sparsity_pattern)
+ SparsityPatternType &sparsity_pattern)
{
// if we got constraints, need to add the diagonal element and, if the
// user requested so, also the rest of the entries in rows and columns
-template <typename SparsityType>
+template <typename SparsityPatternType>
void
ConstraintMatrix::
add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
- SparsityType &sparsity_pattern,
+ SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
internal::bool2type<false> ) const
-template <typename SparsityType>
+template <typename SparsityPatternType>
void
ConstraintMatrix::
add_entries_local_to_global (const std::vector<size_type> &row_indices,
const std::vector<size_type> &col_indices,
- SparsityType &sparsity_pattern,
+ SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask) const
{
-template <typename SparsityType>
+template <typename SparsityPatternType>
void
ConstraintMatrix::
add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
- SparsityType &sparsity_pattern,
+ SparsityPatternType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
internal::bool2type<true> ) const
* greatly slow down your program. It is therefore significantly more
* efficient to get memory allocation right from the start.
*/
- template <typename SparsityType>
+ template <typename SparsityPatternType>
SparseMatrix (const MPI_Comm &communicator,
- const SparsityType &sparsity_pattern,
+ const SparsityPatternType &sparsity_pattern,
const std::vector<size_type> &local_rows_per_process,
const std::vector<size_type> &local_columns_per_process,
const unsigned int this_process,
* greatly slow down your program. It is therefore significantly more
* efficient to get memory allocation right from the start.
*/
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void reinit (const MPI_Comm &communicator,
- const SparsityType &sparsity_pattern,
+ const SparsityPatternType &sparsity_pattern,
const std::vector<size_type> &local_rows_per_process,
const std::vector<size_type> &local_columns_per_process,
const unsigned int this_process,
* give the rows and columns for the calling processor. Note that only
* contiguous IndexSets are supported.
*/
- template <typename SparsityType>
- void reinit (const IndexSet &local_rows,
- const IndexSet &local_columns,
- const SparsityType &sparsity_pattern,
- const MPI_Comm &communicator);
+ template <typename SparsityPatternType>
+ void reinit (const IndexSet &local_rows,
+ const IndexSet &local_columns,
+ const SparsityPatternType &sparsity_pattern,
+ const MPI_Comm &communicator);
/**
* Initialize this matrix to have the same structure as @p other. This
/**
* Same as previous functions.
*/
- template <typename SparsityType>
- void do_reinit (const SparsityType &sparsity_pattern,
+ template <typename SparsityPatternType>
+ void do_reinit (const SparsityPatternType &sparsity_pattern,
const std::vector<size_type> &local_rows_per_process,
const std::vector<size_type> &local_columns_per_process,
const unsigned int this_process,
/**
* Same as previous functions.
*/
- template <typename SparsityType>
- void do_reinit (const IndexSet &local_rows,
- const IndexSet &local_columns,
- const SparsityType &sparsity_pattern);
+ template <typename SparsityPatternType>
+ void do_reinit (const IndexSet &local_rows,
+ const IndexSet &local_columns,
+ const SparsityPatternType &sparsity_pattern);
/**
* To allow calling protected prepare_add() and prepare_set().
* greatly slow down your program. It is therefore significantly more
* efficient to get memory allocation right from the start.
*/
- template <typename SparsityType>
- explicit SparseMatrix (const SparsityType &sparsity_pattern,
- const bool preset_nonzero_locations = true);
+ template <typename SparsityPatternType>
+ explicit SparseMatrix (const SparsityPatternType &sparsity_pattern,
+ const bool preset_nonzero_locations = true);
/**
* This operator assigns a scalar to a matrix. Since this does usually not
* once; nevertheless, given the fact that it is inefficient, the
* respective flag has a default value equal to @p false.
*/
- template <typename SparsityType>
- void reinit (const SparsityType &sparsity_pattern,
- const bool preset_nonzero_locations = true);
+ template <typename SparsityPatternType>
+ void reinit (const SparsityPatternType &sparsity_pattern,
+ const bool preset_nonzero_locations = true);
/**
* Return a reference to the MPI communicator object in use with this
/**
* Same as previous function.
*/
- template <typename SparsityType>
- void do_reinit (const SparsityType &sparsity_pattern,
- const bool preset_nonzero_locations);
+ template <typename SparsityPatternType>
+ void do_reinit (const SparsityPatternType &sparsity_pattern,
+ const bool preset_nonzero_locations);
/**
* To allow calling protected prepare_add() and prepare_set().
* content of this object is lost, and the sparsity pattern is in compressed
* mode afterwards.
*/
- template <typename CompressedSparsityType>
- void copy_from (const CompressedSparsityType &dsp);
+ template <typename SparsityPatternType>
+ void copy_from (const SparsityPatternType &dsp);
/**
* %parallel distribution of the individual matrices. This function
* assumes that a quadratic block matrix is generated.
*/
- template <typename BlockSparsityType>
- void reinit (const std::vector<Epetra_Map> &input_maps,
- const BlockSparsityType &block_sparsity_pattern,
- const bool exchange_data = false);
+ template <typename BlockSparsityPatternType>
+ void reinit (const std::vector<Epetra_Map> &input_maps,
+ const BlockSparsityPatternType &block_sparsity_pattern,
+ const bool exchange_data = false);
/**
* Resize the matrix, by using an array of index sets to determine the
* %parallel distribution of the individual matrices. This function
* assumes that a quadratic block matrix is generated.
*/
- template <typename BlockSparsityType>
- void reinit (const std::vector<IndexSet> &input_maps,
- const BlockSparsityType &block_sparsity_pattern,
- const MPI_Comm &communicator = MPI_COMM_WORLD,
- const bool exchange_data = false);
+ template <typename BlockSparsityPatternType>
+ void reinit (const std::vector<IndexSet> &input_maps,
+ const BlockSparsityPatternType &block_sparsity_pattern,
+ const MPI_Comm &communicator = MPI_COMM_WORLD,
+ const bool exchange_data = false);
/**
* Resize the matrix and initialize it by the given sparsity pattern.
* Since no distribution map is given, the result is a block matrix for
* which all elements are stored locally.
*/
- template <typename BlockSparsityType>
- void reinit (const BlockSparsityType &block_sparsity_pattern);
+ template <typename BlockSparsityPatternType>
+ void reinit (const BlockSparsityPatternType &block_sparsity_pattern);
/**
* This function initializes the Trilinos matrix using the deal.II sparse
* This is a collective operation that needs to be called on all
* processors in order to avoid a dead lock.
*/
- template<typename SparsityType>
- void reinit (const SparsityType &sparsity_pattern);
+ template<typename SparsityPatternType>
+ void reinit (const SparsityPatternType &sparsity_pattern);
/**
* This function reinitializes the Trilinos sparse matrix from a (possibly
*
* @deprecated Use the respective method with IndexSet argument instead.
*/
- template<typename SparsityType>
- void reinit (const Epetra_Map ¶llel_partitioning,
- const SparsityType &sparsity_pattern,
- const bool exchange_data = false) DEAL_II_DEPRECATED;
+ template<typename SparsityPatternType>
+ void reinit (const Epetra_Map ¶llel_partitioning,
+ const SparsityPatternType &sparsity_pattern,
+ const bool exchange_data = false) DEAL_II_DEPRECATED;
/**
* This function is similar to the other initialization function above,
*
* @deprecated Use the respective method with IndexSet argument instead.
*/
- template<typename SparsityType>
- void reinit (const Epetra_Map &row_parallel_partitioning,
- const Epetra_Map &col_parallel_partitioning,
- const SparsityType &sparsity_pattern,
- const bool exchange_data = false) DEAL_II_DEPRECATED;
+ template<typename SparsityPatternType>
+ void reinit (const Epetra_Map &row_parallel_partitioning,
+ const Epetra_Map &col_parallel_partitioning,
+ const SparsityPatternType &sparsity_pattern,
+ const bool exchange_data = false) DEAL_II_DEPRECATED;
/**
* This function initializes the Trilinos matrix using the deal.II sparse
* This is a collective operation that needs to be called on all
* processors in order to avoid a dead lock.
*/
- template<typename SparsityType>
- void reinit (const IndexSet ¶llel_partitioning,
- const SparsityType &sparsity_pattern,
- const MPI_Comm &communicator = MPI_COMM_WORLD,
- const bool exchange_data = false);
+ template<typename SparsityPatternType>
+ void reinit (const IndexSet ¶llel_partitioning,
+ const SparsityPatternType &sparsity_pattern,
+ const MPI_Comm &communicator = MPI_COMM_WORLD,
+ const bool exchange_data = false);
/**
* This function is similar to the other initialization function above,
* This is a collective operation that needs to be called on all
* processors in order to avoid a dead lock.
*/
- template<typename SparsityType>
- void reinit (const IndexSet &row_parallel_partitioning,
- const IndexSet &col_parallel_partitioning,
- const SparsityType &sparsity_pattern,
- const MPI_Comm &communicator = MPI_COMM_WORLD,
- const bool exchange_data = false);
+ template<typename SparsityPatternType>
+ void reinit (const IndexSet &row_parallel_partitioning,
+ const IndexSet &col_parallel_partitioning,
+ const SparsityPatternType &sparsity_pattern,
+ const MPI_Comm &communicator = MPI_COMM_WORLD,
+ const bool exchange_data = false);
/**
* This function initializes the Trilinos matrix using the deal.II sparse
- template <typename SparsityType>
+ template <typename SparsityPatternType>
inline
- void SparseMatrix::reinit (const IndexSet ¶llel_partitioning,
- const SparsityType &sparsity_pattern,
- const MPI_Comm &communicator,
- const bool exchange_data)
+ void SparseMatrix::reinit (const IndexSet ¶llel_partitioning,
+ const SparsityPatternType &sparsity_pattern,
+ const MPI_Comm &communicator,
+ const bool exchange_data)
{
reinit (parallel_partitioning, parallel_partitioning,
sparsity_pattern, communicator, exchange_data);
template <typename number>
inline
- void SparseMatrix::reinit (const IndexSet ¶llel_partitioning,
+ void SparseMatrix::reinit (const IndexSet ¶llel_partitioning,
const ::dealii::SparseMatrix<number> &sparse_matrix,
- const MPI_Comm &communicator,
- const double drop_tolerance,
- const bool copy_values,
- const ::dealii::SparsityPattern *use_this_sparsity)
+ const MPI_Comm &communicator,
+ const double drop_tolerance,
+ const bool copy_values,
+ const ::dealii::SparsityPattern *use_this_sparsity)
{
Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, false);
reinit (parallel_partitioning, parallel_partitioning, sparse_matrix,
* parallel, this function uses an ad-hoc partitioning of the rows and
* columns.
*/
- template<typename SparsityType>
+ template<typename SparsityPatternType>
void
- copy_from (const SparsityType &nontrilinos_sparsity_pattern);
+ copy_from (const SparsityPatternType &nontrilinos_sparsity_pattern);
/**
* Copy operator. This operation is only allowed for empty objects, to
*
* @deprecated Use the respective method with IndexSet argument instead.
*/
- template<typename SparsityType>
+ template<typename SparsityPatternType>
void
- reinit (const Epetra_Map &row_parallel_partitioning,
- const Epetra_Map &col_parallel_partitioning,
- const SparsityType &nontrilinos_sparsity_pattern,
- const bool exchange_data = false) DEAL_II_DEPRECATED;
+ reinit (const Epetra_Map &row_parallel_partitioning,
+ const Epetra_Map &col_parallel_partitioning,
+ const SparsityPatternType &nontrilinos_sparsity_pattern,
+ const bool exchange_data = false) DEAL_II_DEPRECATED;
/**
* Reinit function. Takes one of the deal.II sparsity patterns and a
*
* @deprecated Use the respective method with IndexSet argument instead.
*/
- template<typename SparsityType>
+ template<typename SparsityPatternType>
void
- reinit (const Epetra_Map ¶llel_partitioning,
- const SparsityType &nontrilinos_sparsity_pattern,
- const bool exchange_data = false) DEAL_II_DEPRECATED;
+ reinit (const Epetra_Map ¶llel_partitioning,
+ const SparsityPatternType &nontrilinos_sparsity_pattern,
+ const bool exchange_data = false) DEAL_II_DEPRECATED;
//@}
/**
* @name Constructors and initialization using an IndexSet description
* constructed. This feature is only implemented for input sparsity
* patterns of type DynamicSparsityPattern.
*/
- template<typename SparsityType>
+ template<typename SparsityPatternType>
void
- reinit (const IndexSet &row_parallel_partitioning,
- const IndexSet &col_parallel_partitioning,
- const SparsityType &nontrilinos_sparsity_pattern,
- const MPI_Comm &communicator = MPI_COMM_WORLD,
- const bool exchange_data = false);
+ reinit (const IndexSet &row_parallel_partitioning,
+ const IndexSet &col_parallel_partitioning,
+ const SparsityPatternType &nontrilinos_sparsity_pattern,
+ const MPI_Comm &communicator = MPI_COMM_WORLD,
+ const bool exchange_data = false);
/**
* Reinit function. Takes one of the deal.II sparsity patterns and a
* that is not fully constructed. This feature is only implemented for
* input sparsity patterns of type DynamicSparsityPattern.
*/
- template<typename SparsityType>
+ template<typename SparsityPatternType>
void
- reinit (const IndexSet ¶llel_partitioning,
- const SparsityType &nontrilinos_sparsity_pattern,
- const MPI_Comm &communicator = MPI_COMM_WORLD,
- const bool exchange_data = false);
+ reinit (const IndexSet ¶llel_partitioning,
+ const SparsityPatternType &nontrilinos_sparsity_pattern,
+ const MPI_Comm &communicator = MPI_COMM_WORLD,
+ const bool exchange_data = false);
//@}
/**
* @name Information on the sparsity pattern
* There is no need to consider hanging nodes here, since only one level is
* considered.
*/
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
- make_sparsity_pattern (const DoFHandlerType &dof_handler,
- SP &sparsity,
- const unsigned int level);
+ make_sparsity_pattern (const DoFHandlerType &dof_handler,
+ SparsityPatternType &sparsity,
+ const unsigned int level);
/**
* Make a sparsity pattern including fluxes of discontinuous Galerkin
* and
* @ref DoFTools
*/
- template <int dim, class SP, int spacedim>
+ template <int dim, typename SparsityPatternType, int spacedim>
void
make_flux_sparsity_pattern (const DoFHandler<dim,spacedim> &dof_handler,
- SP &sparsity,
- const unsigned int level);
+ SparsityPatternType &sparsity,
+ const unsigned int level);
/**
* Create sparsity pattern for the fluxes at refinement edges. The matrix
*
* make_flux_sparsity_pattern()
*/
- template <int dim, class SP, int spacedim>
+ template <int dim, typename SparsityPatternType, int spacedim>
void
make_flux_sparsity_pattern_edge (const DoFHandler<dim,spacedim> &dof_handler,
- SP &sparsity,
- const unsigned int level);
+ SparsityPatternType &sparsity,
+ const unsigned int level);
/**
* This function does the same as the other with the same name, but it gets
* two additional coefficient matrices. A matrix entry will only be
* There is one matrix for couplings in a cell and one for the couplings
* occurring in fluxes.
*/
- template <int dim, class SP, int spacedim>
+ template <int dim, typename SparsityPatternType, int spacedim>
void
make_flux_sparsity_pattern (const DoFHandler<dim,spacedim> &dof,
- SP &sparsity,
- const unsigned int level,
+ SparsityPatternType &sparsity,
+ const unsigned int level,
const Table<2,DoFTools::Coupling> &int_mask,
const Table<2,DoFTools::Coupling> &flux_mask);
*
* make_flux_sparsity_pattern()
*/
- template <int dim, class SP, int spacedim>
+ template <int dim, typename SparsityPatternType, int spacedim>
void
make_flux_sparsity_pattern_edge (const DoFHandler<dim,spacedim> &dof_handler,
- SP &sparsity,
- const unsigned int level,
+ SparsityPatternType &sparsity,
+ const unsigned int level,
const Table<2,DoFTools::Coupling> &flux_mask);
/**
typedef ::dealii::SparsityPattern Sparsity;
typedef ::dealii::SparseMatrix<typename VectorType::value_type> Matrix;
- template <class DSP, typename DoFHandlerType>
- static void reinit(Matrix &matrix, Sparsity &sparsity, int level, const DSP &dsp, const DoFHandlerType &)
+ template <typename SparsityPatternType, typename DoFHandlerType>
+ static void reinit(Matrix &matrix, Sparsity &sparsity, int level, const SparsityPatternType &sp, const DoFHandlerType &)
{
- sparsity.copy_from (dsp);
+ sparsity.copy_from (sp);
(void)level;
matrix.reinit (sparsity);
}
typedef ::dealii::TrilinosWrappers::SparsityPattern Sparsity;
typedef ::dealii::TrilinosWrappers::SparseMatrix Matrix;
- template <class DSP, typename DoFHandlerType>
- static void reinit(Matrix &matrix, Sparsity &, int level, const DSP &dsp, DoFHandlerType &dh)
+ template <typename SparsityPatternType, typename DoFHandlerType>
+ static void reinit(Matrix &matrix, Sparsity &, int level, const SparsityPatternType &sp, DoFHandlerType &dh)
{
matrix.reinit(dh.locally_owned_mg_dofs(level+1),
dh.locally_owned_mg_dofs(level),
- dsp, MPI_COMM_WORLD, true);
+ sp, MPI_COMM_WORLD, true);
}
};
typedef ::dealii::TrilinosWrappers::SparsityPattern Sparsity;
typedef ::dealii::TrilinosWrappers::SparseMatrix Matrix;
- template <class DSP, typename DoFHandlerType>
- static void reinit(Matrix &matrix, Sparsity &, int level, const DSP &dsp, DoFHandlerType &dh)
+ template <typename SparsityPatternType, typename DoFHandlerType>
+ static void reinit(Matrix &matrix, Sparsity &, int level, const SparsityPatternType &sp, DoFHandlerType &dh)
{
matrix.reinit(dh.locally_owned_mg_dofs(level+1),
dh.locally_owned_mg_dofs(level),
- dsp, MPI_COMM_WORLD, true);
+ sp, MPI_COMM_WORLD, true);
}
};
typedef ::dealii::TrilinosWrappers::SparsityPattern Sparsity;
typedef ::dealii::TrilinosWrappers::SparseMatrix Matrix;
- template <class DSP, typename DoFHandlerType>
- static void reinit(Matrix &, Sparsity &, int /*level*/, const DSP &, DoFHandlerType &)
+ template <typename SparsityPatternType, typename DoFHandlerType>
+ static void reinit(Matrix &, Sparsity &, int /*level*/, const SparsityPatternType &, DoFHandlerType &)
{
}
};
namespace DoFTools
{
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_sparsity_pattern (const DoFHandlerType &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const ConstraintMatrix &constraints,
const bool keep_constrained_dofs,
const types::subdomain_id subdomain_id)
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_sparsity_pattern (const DoFHandlerType &dof,
const Table<2,Coupling> &couplings,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const ConstraintMatrix &constraints,
const bool keep_constrained_dofs,
const types::subdomain_id subdomain_id)
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_sparsity_pattern (const DoFHandlerType &dof_row,
const DoFHandlerType &dof_col,
- SP &sparsity)
+ SparsityPatternType &sparsity)
{
const types::global_dof_index n_dofs_row = dof_row.n_dofs();
const types::global_dof_index n_dofs_col = dof_col.n_dofs();
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_boundary_sparsity_pattern
(const DoFHandlerType &dof,
const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
- SP &sparsity)
+ SparsityPatternType &sparsity)
{
if (DoFHandlerType::dimension == 1)
{
typename DoFHandlerType::FunctionMap boundary_ids;
boundary_ids[0] = 0;
boundary_ids[1] = 0;
- make_boundary_sparsity_pattern<DoFHandlerType, SP> (dof,
- boundary_ids,
- dof_to_boundary_mapping,
- sparsity);
+ make_boundary_sparsity_pattern<DoFHandlerType, SparsityPatternType>
+ (dof,
+ boundary_ids,
+ dof_to_boundary_mapping,
+ sparsity);
return;
}
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void make_boundary_sparsity_pattern
- (const DoFHandlerType &dof,
+ (const DoFHandlerType &dof,
const typename FunctionMap<DoFHandlerType::space_dimension>::type &boundary_ids,
- const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
- SP &sparsity)
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
+ SparsityPatternType &sparsity)
{
if (DoFHandlerType::dimension == 1)
{
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_flux_sparsity_pattern (const DoFHandlerType &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const ConstraintMatrix &constraints,
const bool keep_constrained_dofs,
const types::subdomain_id subdomain_id)
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_flux_sparsity_pattern (const DoFHandlerType &dof,
- SP &sparsity)
+ SparsityPatternType &sparsity)
{
ConstraintMatrix constraints;
make_flux_sparsity_pattern (dof, sparsity, constraints);
// implementation of the same function in namespace DoFTools for
// non-hp DoFHandlers
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_flux_sparsity_pattern (const DoFHandlerType &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const Table<2,Coupling> &int_mask,
const Table<2,Coupling> &flux_mask)
{
// implementation of the same function in namespace DoFTools for
// non-hp DoFHandlers
- template <int dim, int spacedim, class SP>
+ template <int dim, int spacedim, typename SparsityPatternType>
void
make_flux_sparsity_pattern (const dealii::hp::DoFHandler<dim,spacedim> &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const Table<2,Coupling> &int_mask,
const Table<2,Coupling> &flux_mask)
{
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void
make_flux_sparsity_pattern (const DoFHandlerType &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const Table<2,Coupling> &int_mask,
const Table<2,Coupling> &flux_mask)
{
-template <typename SparsityType>
+template <typename SparsityPatternType>
void
-ChunkSparsityPattern::copy_from (const SparsityType &dsp,
- const size_type chunk_size)
+ChunkSparsityPattern::copy_from (const SparsityPatternType &dsp,
+ const size_type chunk_size)
{
Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
this->chunk_size = chunk_size;
// TODO: This could be made more efficient if we cached the
// previous column and only called add() if the previous and the
// current column lead to different chunk columns
- for (typename SparsityType::iterator col_num = dsp.begin(row);
+ for (typename SparsityPatternType::iterator col_num = dsp.begin(row);
col_num != dsp.end(row); ++col_num)
temporary_sp.add (reduced_row, col_num->column()/chunk_size);
}
{
namespace
{
- template <typename SP>
- void copy_sparsity (const SP &src,
- SparsityPattern &dst)
+ template <typename SparsityPatternType>
+ void copy_sparsity (const SparsityPatternType &src,
+ SparsityPattern &dst)
{
dst.copy_from(src);
}
#endif
-#define SPARSITY_FUNCTIONS(SparsityType) \
- template void ConstraintMatrix::add_entries_local_to_global<SparsityType> (\
- const std::vector<ConstraintMatrix::size_type> &, \
- SparsityType &, \
- const bool, \
- const Table<2,bool> &, \
- internal::bool2type<false>) const; \
- template void ConstraintMatrix::add_entries_local_to_global<SparsityType> (\
- const std::vector<ConstraintMatrix::size_type> &, \
- const std::vector<ConstraintMatrix::size_type> &, \
- SparsityType &, \
- const bool, \
+#define SPARSITY_FUNCTIONS(SparsityPatternType) \
+ template void ConstraintMatrix::add_entries_local_to_global<SparsityPatternType> ( \
+ const std::vector<ConstraintMatrix::size_type> &, \
+ SparsityPatternType &, \
+ const bool, \
+ const Table<2,bool> &, \
+ internal::bool2type<false>) const; \
+ template void ConstraintMatrix::add_entries_local_to_global<SparsityPatternType> ( \
+ const std::vector<ConstraintMatrix::size_type> &, \
+ const std::vector<ConstraintMatrix::size_type> &, \
+ SparsityPatternType &, \
+ const bool, \
const Table<2,bool> &) const
-#define BLOCK_SPARSITY_FUNCTIONS(SparsityType) \
- template void ConstraintMatrix::add_entries_local_to_global<SparsityType> (\
- const std::vector<ConstraintMatrix::size_type> &, \
- SparsityType &, \
- const bool, \
- const Table<2,bool> &, \
- internal::bool2type<true>) const; \
- template void ConstraintMatrix::add_entries_local_to_global<SparsityType> (\
- const std::vector<ConstraintMatrix::size_type> &, \
- const std::vector<ConstraintMatrix::size_type> &, \
- SparsityType &, \
- const bool, \
+#define BLOCK_SPARSITY_FUNCTIONS(SparsityPatternType) \
+ template void ConstraintMatrix::add_entries_local_to_global<SparsityPatternType> ( \
+ const std::vector<ConstraintMatrix::size_type> &, \
+ SparsityPatternType &, \
+ const bool, \
+ const Table<2,bool> &, \
+ internal::bool2type<true>) const; \
+ template void ConstraintMatrix::add_entries_local_to_global<SparsityPatternType> ( \
+ const std::vector<ConstraintMatrix::size_type> &, \
+ const std::vector<ConstraintMatrix::size_type> &, \
+ SparsityPatternType &, \
+ const bool, \
const Table<2,bool> &) const
SPARSITY_FUNCTIONS(SparsityPattern);
- template <typename SparsityType>
+ template <typename SparsityPatternType>
SparseMatrix::
SparseMatrix (const MPI_Comm &communicator,
- const SparsityType &sparsity_pattern,
+ const SparsityPatternType &sparsity_pattern,
const std::vector<size_type> &local_rows_per_process,
const std::vector<size_type> &local_columns_per_process,
const unsigned int this_process,
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
SparseMatrix::
reinit (const MPI_Comm &communicator,
- const SparsityType &sparsity_pattern,
+ const SparsityPatternType &sparsity_pattern,
const std::vector<size_type> &local_rows_per_process,
const std::vector<size_type> &local_columns_per_process,
const unsigned int this_process,
preset_nonzero_locations);
}
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
SparseMatrix::
- reinit (const IndexSet &local_rows,
- const IndexSet &local_columns,
- const SparsityType &sparsity_pattern,
- const MPI_Comm &communicator)
+ reinit (const IndexSet &local_rows,
+ const IndexSet &local_columns,
+ const SparsityPatternType &sparsity_pattern,
+ const MPI_Comm &communicator)
{
this->communicator = communicator;
}
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
SparseMatrix::
- do_reinit (const IndexSet &local_rows,
- const IndexSet &local_columns,
- const SparsityType &sparsity_pattern)
+ do_reinit (const IndexSet &local_rows,
+ const IndexSet &local_columns,
+ const SparsityPatternType &sparsity_pattern)
{
Assert(sparsity_pattern.n_rows()==local_rows.size(),
ExcMessage("SparsityPattern and IndexSet have different number of rows"));
{
PetscInt *ptr = & colnums_in_window[0];
for (PetscInt i=local_row_start; i<local_row_end; ++i)
- for (typename SparsityType::iterator p=sparsity_pattern.begin(i);
+ for (typename SparsityPatternType::iterator p=sparsity_pattern.begin(i);
p != sparsity_pattern.end(i); ++p, ++ptr)
*ptr = p->column();
}
}
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
SparseMatrix::
- do_reinit (const SparsityType &sparsity_pattern,
+ do_reinit (const SparsityPatternType &sparsity_pattern,
const std::vector<size_type> &local_rows_per_process,
const std::vector<size_type> &local_columns_per_process,
const unsigned int this_process,
{
PetscInt *ptr = & colnums_in_window[0];
for (size_type i=local_row_start; i<local_row_end; ++i)
- for (typename SparsityType::iterator p=sparsity_pattern.begin(i);
+ for (typename SparsityPatternType::iterator p=sparsity_pattern.begin(i);
p != sparsity_pattern.end(i); ++p, ++ptr)
*ptr = p->column();
}
- template <typename SparsityType>
+ template <typename SparsityPatternType>
SparseMatrix::
- SparseMatrix (const SparsityType &sparsity_pattern,
- const bool preset_nonzero_locations)
+ SparseMatrix (const SparsityPatternType &sparsity_pattern,
+ const bool preset_nonzero_locations)
{
do_reinit (sparsity_pattern, preset_nonzero_locations);
}
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
SparseMatrix::
- reinit (const SparsityType &sparsity_pattern,
- const bool preset_nonzero_locations)
+ reinit (const SparsityPatternType &sparsity_pattern,
+ const bool preset_nonzero_locations)
{
// get rid of old matrix and generate a
// new one
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
- SparseMatrix::do_reinit (const SparsityType &sparsity_pattern,
- const bool preset_nonzero_locations)
+ SparseMatrix::do_reinit (const SparsityPatternType &sparsity_pattern,
+ const bool preset_nonzero_locations)
{
std::vector<size_type> row_lengths (sparsity_pattern.n_rows());
for (size_type i=0; i<sparsity_pattern.n_rows(); ++i)
-template <typename DSP>
+template <typename SparsityPatternType>
void
-SparsityPattern::copy_from (const DSP &dsp)
+SparsityPattern::copy_from (const SparsityPatternType &dsp)
{
// first determine row lengths for each row. if the matrix is quadratic,
// then we might have to add an additional entry for the diagonal, if that
for (size_type row = 0; row<dsp.n_rows(); ++row)
{
size_type *cols = &colnums[rowstart[row]] + (do_diag_optimize ? 1 : 0);
- typename DSP::iterator col_num = dsp.begin (row),
- end_row = dsp.end (row);
+ typename SparsityPatternType::iterator col_num = dsp.begin (row),
+ end_row = dsp.end (row);
for (; col_num != end_row; ++col_num)
{
}
// do not need to compress the sparsity pattern since we already have
- // allocated the right amount of data, and the DSP data is sorted, too.
+ // allocated the right amount of data, and the SparsityPatternType data is sorted,
+ // too.
compressed = true;
}
- template <typename BlockSparsityType>
+ template <typename BlockSparsityPatternType>
void
BlockSparseMatrix::
- reinit (const std::vector<Epetra_Map> ¶llel_partitioning,
- const BlockSparsityType &block_sparsity_pattern,
- const bool exchange_data)
+ reinit (const std::vector<Epetra_Map> ¶llel_partitioning,
+ const BlockSparsityPatternType &block_sparsity_pattern,
+ const bool exchange_data)
{
Assert (parallel_partitioning.size() == block_sparsity_pattern.n_block_rows(),
ExcDimensionMismatch (parallel_partitioning.size(),
- template <typename BlockSparsityType>
+ template <typename BlockSparsityPatternType>
void
BlockSparseMatrix::
- reinit (const std::vector<IndexSet> ¶llel_partitioning,
- const BlockSparsityType &block_sparsity_pattern,
- const MPI_Comm &communicator,
- const bool exchange_data)
+ reinit (const std::vector<IndexSet> ¶llel_partitioning,
+ const BlockSparsityPatternType &block_sparsity_pattern,
+ const MPI_Comm &communicator,
+ const bool exchange_data)
{
std::vector<Epetra_Map> epetra_maps;
for (size_type i=0; i<block_sparsity_pattern.n_block_rows(); ++i)
- template <typename BlockSparsityType>
+ template <typename BlockSparsityPatternType>
void
BlockSparseMatrix::
- reinit (const BlockSparsityType &block_sparsity_pattern)
+ reinit (const BlockSparsityPatternType &block_sparsity_pattern)
{
std::vector<Epetra_Map> parallel_partitioning;
for (size_type i=0; i<block_sparsity_pattern.n_block_rows(); ++i)
{
typedef SparseMatrix::size_type size_type;
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
reinit_matrix (const Epetra_Map &input_row_map,
const Epetra_Map &input_col_map,
- const SparsityType &sparsity_pattern,
+ const SparsityPatternType &sparsity_pattern,
const bool exchange_data,
std_cxx11::shared_ptr<Epetra_Map> &column_space_map,
std_cxx11::shared_ptr<Epetra_FECrsMatrix> &matrix,
row_indices.resize (row_length, -1);
{
- typename SparsityType::iterator p = sparsity_pattern.begin(row);
+ typename SparsityPatternType::iterator p = sparsity_pattern.begin(row);
for (size_type col=0; p != sparsity_pattern.end(row); ++p, ++col)
row_indices[col] = p->column();
}
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
- SparseMatrix::reinit (const SparsityType &sparsity_pattern)
+ SparseMatrix::reinit (const SparsityPatternType &sparsity_pattern)
{
const Epetra_Map rows (static_cast<TrilinosWrappers::types::int_type>(sparsity_pattern.n_rows()),
0,
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
- SparseMatrix::reinit (const Epetra_Map &input_map,
- const SparsityType &sparsity_pattern,
- const bool exchange_data)
+ SparseMatrix::reinit (const Epetra_Map &input_map,
+ const SparsityPatternType &sparsity_pattern,
+ const bool exchange_data)
{
reinit_matrix (input_map, input_map, sparsity_pattern, exchange_data,
column_space_map, matrix, nonlocal_matrix,
- template <typename SparsityType>
+ template <typename SparsityPatternType>
inline
- void SparseMatrix::reinit (const IndexSet &row_parallel_partitioning,
- const IndexSet &col_parallel_partitioning,
- const SparsityType &sparsity_pattern,
- const MPI_Comm &communicator,
- const bool exchange_data)
+ void SparseMatrix::reinit (const IndexSet &row_parallel_partitioning,
+ const IndexSet &col_parallel_partitioning,
+ const SparsityPatternType &sparsity_pattern,
+ const MPI_Comm &communicator,
+ const bool exchange_data)
{
Epetra_Map row_map =
row_parallel_partitioning.make_trilinos_map (communicator, false);
- template <typename SparsityType>
+ template <typename SparsityPatternType>
inline
- void SparseMatrix::reinit (const Epetra_Map &row_map,
- const Epetra_Map &col_map,
- const SparsityType &sparsity_pattern,
- const bool exchange_data)
+ void SparseMatrix::reinit (const Epetra_Map &row_map,
+ const Epetra_Map &col_map,
+ const SparsityPatternType &sparsity_pattern,
+ const bool exchange_data)
{
reinit_matrix (row_map, col_map, sparsity_pattern, exchange_data,
column_space_map, matrix, nonlocal_matrix,
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
reinit_sp (const Epetra_Map &row_map,
const Epetra_Map &col_map,
- const SparsityType &sp,
+ const SparsityPatternType &sp,
const bool exchange_data,
std_cxx11::shared_ptr<Epetra_Map> &column_space_map,
std_cxx11::shared_ptr<Epetra_FECrsGraph> &graph,
row_indices.resize (row_length, -1);
{
- typename SparsityType::iterator p = sp.begin(row);
+ typename SparsityPatternType::iterator p = sp.begin(row);
// avoid incrementing p over the end of the current row because
// it is slow for DynamicSparsityPattern in parallel
for (int col=0; col<row_length; )
row_indices.resize (row_length, -1);
{
- typename SparsityType::iterator p = sp.begin(row);
+ typename SparsityPatternType::iterator p = sp.begin(row);
// avoid incrementing p over the end of the current row because
// it is slow for DynamicSparsityPattern in parallel
for (int col=0; col<row_length; )
- template<typename SparsityType>
+ template<typename SparsityPatternType>
void
- SparsityPattern::reinit (const IndexSet &row_parallel_partitioning,
- const IndexSet &col_parallel_partitioning,
- const SparsityType &nontrilinos_sparsity_pattern,
- const MPI_Comm &communicator,
- const bool exchange_data)
+ SparsityPattern::reinit (const IndexSet &row_parallel_partitioning,
+ const IndexSet &col_parallel_partitioning,
+ const SparsityPatternType &nontrilinos_sparsity_pattern,
+ const MPI_Comm &communicator,
+ const bool exchange_data)
{
Epetra_Map row_map =
row_parallel_partitioning.make_trilinos_map (communicator, false);
- template<typename SparsityType>
+ template<typename SparsityPatternType>
void
- SparsityPattern::reinit (const IndexSet ¶llel_partitioning,
- const SparsityType &nontrilinos_sparsity_pattern,
- const MPI_Comm &communicator,
- const bool exchange_data)
+ SparsityPattern::reinit (const IndexSet ¶llel_partitioning,
+ const SparsityPatternType &nontrilinos_sparsity_pattern,
+ const MPI_Comm &communicator,
+ const bool exchange_data)
{
Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator,
false);
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
- SparsityPattern::reinit (const Epetra_Map &input_map,
- const SparsityType &sp,
- const bool exchange_data)
+ SparsityPattern::reinit (const Epetra_Map &input_map,
+ const SparsityPatternType &sp,
+ const bool exchange_data)
{
reinit_sp (input_map, input_map, sp, exchange_data,
column_space_map, graph, nonlocal_graph);
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
- SparsityPattern::reinit (const Epetra_Map &input_row_map,
- const Epetra_Map &input_col_map,
- const SparsityType &sp,
- const bool exchange_data)
+ SparsityPattern::reinit (const Epetra_Map &input_row_map,
+ const Epetra_Map &input_col_map,
+ const SparsityPatternType &sp,
+ const bool exchange_data)
{
reinit_sp (input_row_map, input_col_map, sp, exchange_data,
column_space_map, graph, nonlocal_graph);
- template <typename SparsityType>
+ template <typename SparsityPatternType>
void
- SparsityPattern::copy_from (const SparsityType &sp)
+ SparsityPattern::copy_from (const SparsityPatternType &sp)
{
const Epetra_Map rows (TrilinosWrappers::types::int_type(sp.n_rows()), 0,
Utilities::Trilinos::comm_self());
- template <typename DoFHandlerType, class SP>
+ template <typename DoFHandlerType, typename SparsityPatternType>
void make_sparsity_pattern (const DoFHandlerType &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const unsigned int level)
{
const types::global_dof_index n_dofs = dof.n_dofs(level);
- template <int dim, class SP, int spacedim>
+ template <int dim, typename SparsityPatternType, int spacedim>
void
make_flux_sparsity_pattern (const DoFHandler<dim,spacedim> &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const unsigned int level)
{
const types::global_dof_index n_dofs = dof.n_dofs(level);
- template <int dim, class SP, int spacedim>
+ template <int dim, typename SparsityPatternType, int spacedim>
void
make_flux_sparsity_pattern_edge (const DoFHandler<dim,spacedim> &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const unsigned int level)
{
Assert ((level>=1) && (level<dof.get_tria().n_global_levels()),
- template <int dim, class SP, int spacedim>
+ template <int dim, typename SparsityPatternType, int spacedim>
void
make_flux_sparsity_pattern (const DoFHandler<dim,spacedim> &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const unsigned int level,
const Table<2,DoFTools::Coupling> &int_mask,
const Table<2,DoFTools::Coupling> &flux_mask)
- template <int dim, class SP, int spacedim>
+ template <int dim, typename SparsityPatternType, int spacedim>
void
make_flux_sparsity_pattern_edge (const DoFHandler<dim,spacedim> &dof,
- SP &sparsity,
+ SparsityPatternType &sparsity,
const unsigned int level,
const Table<2,DoFTools::Coupling> &flux_mask)
{