else
{
column_space_map.reset (new Epetra_Map (m.domain_partitioner()));
+
+ // release memory before reallocation
+ matrix.reset ();
+ temp_vector.clear ();
matrix.reset (new Epetra_FECrsMatrix(*m.matrix));
}
const SparsityType &sparsity_pattern,
const bool exchange_data)
{
+ // release memory before reallocation
+ temp_vector.clear();
matrix.reset();
const unsigned int n_rows = sparsity_pattern.n_rows();
// sparsity pattern.
column_space_map.reset (new Epetra_Map
(sparsity_pattern.domain_partitioner()));
+ temp_vector.clear ();
+ matrix.reset ();
matrix.reset (new Epetra_FECrsMatrix
(Copy, sparsity_pattern.trilinos_sparsity_pattern(), false));
compress();
SparseMatrix::reinit (const SparseMatrix &sparse_matrix)
{
column_space_map.reset (new Epetra_Map (sparse_matrix.domain_partitioner()));
-
+ temp_vector.clear ();
+ matrix.reset ();
matrix.reset (new Epetra_FECrsMatrix
(Copy, sparse_matrix.trilinos_sparsity_pattern(), false));
const Epetra_CrsGraph *graph = &input_matrix.Graph();
+ temp_vector.clear ();
+ matrix.reset ();
matrix.reset (new Epetra_FECrsMatrix(Copy, *graph, false));
matrix->FillComplete (*column_space_map, input_matrix.RangeMap(), true);
// empty matrix.
column_space_map.reset (new Epetra_Map (0, 0,
Utilities::Trilinos::comm_self()));
+ temp_vector.clear();
matrix.reset (new Epetra_FECrsMatrix(View, *column_space_map, 0));
matrix->FillComplete();
const Epetra_Map &input_col_map,
const unsigned int n_entries_per_row)
{
+ graph.reset ();
column_space_map.reset (new Epetra_Map (input_col_map));
compressed = false;
const Epetra_Map &input_col_map,
const std::vector<unsigned int> &n_entries_per_row)
{
+ // release memory before reallocation
+ graph.reset ();
Assert (n_entries_per_row.size() ==
static_cast<unsigned int>(input_row_map.NumGlobalElements()),
ExcDimensionMismatch (n_entries_per_row.size(),
const SparsityType &sp,
const bool exchange_data)
{
+ graph.reset ();
+
Assert (sp.n_rows() ==
static_cast<unsigned int>(input_row_map.NumGlobalElements()),
ExcDimensionMismatch (sp.n_rows(),