const ::dealii::SparsityPattern *use_this_sparsity)
{
Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, false);
- reinit (map, map, sparse_matrix, drop_tolerance, copy_values,
+ reinit (map, map, sparse_matrix, drop_tolerance, copy_values,
use_this_sparsity);
}
void Vector::reinit (const Epetra_Map ¶llel_partitioner,
const dealii::Vector<number> &v)
{
- if (&*vector != 0 && vector->Map().SameAs(parallel_partitioner))
+ if (vector.get() != 0 && vector->Map().SameAs(parallel_partitioner))
vector.reset (new Epetra_FEVector(parallel_partitioner));
const int size = parallel_partitioner.NumMyElements();
VectorBase::reinit (const VectorBase &v,
const bool fast)
{
- Assert (&*vector != 0,
+ Assert (vector.get() != 0,
ExcMessage("Vector has not been constructed properly."));
if (fast == false || local_range() != v.local_range())
// first create a solver object if this
// is necessary
- if (&*solver_data == 0)
+ if (solver_data.get() == 0)
{
solver_data.reset (new SolverData());
solver_data.reset ();
}
-
+
SolverControl &
SolverBase::control() const
}
SolverBase::~SolverBase ()
- {
- if (&*solver_data != 0)
- solver_data.reset ();
- }
+ {}
void
SolverBase::set_matrices (const PETScWrappers::MatrixBase &A)
{
int ierr;
- AssertThrow (&*solver_data == 0, ExcSLEPcWrappersUsageError());
+ AssertThrow (solver_data.get() == 0, ExcSLEPcWrappersUsageError());
solver_data.reset (new SolverData());
// create eigensolver context and
#endif
PETScWrappers::VectorBase &vr)
{
- AssertThrow (&*solver_data != 0, ExcSLEPcWrappersUsageError());
+ AssertThrow (solver_data.get() != 0, ExcSLEPcWrappersUsageError());
// get converged eigenpair
int ierr = EPSGetEigenpair(solver_data->eps, index,
void
SolverBase::reset ()
{
- AssertThrow (&*solver_data != 0, ExcSLEPcWrappersUsageError());
+ AssertThrow (solver_data.get() != 0, ExcSLEPcWrappersUsageError());
// destroy solver object.
solver_data.reset ();
EPS *
SolverBase::get_EPS ()
{
- if( &*solver_data == 0 )
+ if( solver_data.get() == 0 )
return NULL;
return &solver_data->eps;
}
void TransformationBase::set_context (EPS &eps)
{
- AssertThrow (&*transformation_data == 0,
+ AssertThrow (transformation_data.get() == 0,
SolverBase::ExcSLEPcWrappersUsageError());
transformation_data.reset (new TransformationData());
const_cast<Epetra_CrsMatrix*>(&matrix.trilinos_matrix()),
0));
- Assert (&*ifpack != 0, ExcMessage ("Trilinos could not create this "
- "preconditioner"));
+ Assert (ifpack.get() != 0, ExcMessage ("Trilinos could not create this "
+ "preconditioner"));
int ierr;
ierr = ifpack->Compute();
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
- preconditioner = Teuchos::rcp (&*ifpack, false);
+ preconditioner = Teuchos::rcp (ifpack.get(), false);
}
const_cast<Epetra_CrsMatrix*>(&matrix.trilinos_matrix()),
additional_data.overlap));
- Assert (&*ifpack != 0, ExcMessage ("Trilinos could not create this "
- "preconditioner"));
+ Assert (ifpack.get() != 0, ExcMessage ("Trilinos could not create this "
+ "preconditioner"));
int ierr;
ierr = ifpack->Compute();
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
- preconditioner = Teuchos::rcp (&*ifpack, false);
+ preconditioner = Teuchos::rcp (ifpack.get(), false);
}
const_cast<Epetra_CrsMatrix*>(&matrix.trilinos_matrix()),
additional_data.overlap));
- Assert (&*ifpack != 0, ExcMessage ("Trilinos could not create this "
- "preconditioner"));
+ Assert (ifpack.get() != 0, ExcMessage ("Trilinos could not create this "
+ "preconditioner"));
int ierr;
ierr = ifpack->Compute();
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
- preconditioner = Teuchos::rcp (&*ifpack, false);
+ preconditioner = Teuchos::rcp (ifpack.get(), false);
}
const_cast<Epetra_CrsMatrix*>(&matrix.trilinos_matrix()),
additional_data.overlap));
- Assert (&*ifpack != 0, ExcMessage ("Trilinos could not create this "
- "preconditioner"));
+ Assert (ifpack.get() != 0, ExcMessage ("Trilinos could not create this "
+ "preconditioner"));
int ierr;
ierr = ifpack->Compute();
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
- preconditioner = Teuchos::rcp (&*ifpack, false);
+ preconditioner = Teuchos::rcp (ifpack.get(), false);
}
const_cast<Epetra_CrsMatrix*>(&matrix.trilinos_matrix()),
additional_data.overlap));
- Assert (&*ifpack != 0, ExcMessage ("Trilinos could not create this "
- "preconditioner"));
+ Assert (ifpack.get() != 0, ExcMessage ("Trilinos could not create this "
+ "preconditioner"));
int ierr;
ierr = ifpack->Compute();
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
- preconditioner = Teuchos::rcp (&*ifpack, false);
+ preconditioner = Teuchos::rcp (ifpack.get(), false);
}
const_cast<Epetra_CrsMatrix*>(&matrix.trilinos_matrix()),
additional_data.overlap));
- Assert (&*ifpack != 0, ExcMessage ("Trilinos could not create this "
- "preconditioner"));
+ Assert (ifpack.get() != 0, ExcMessage ("Trilinos could not create this "
+ "preconditioner"));
int ierr;
ierr = ifpack->Compute();
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
- preconditioner = Teuchos::rcp (&*ifpack, false);
+ preconditioner = Teuchos::rcp (ifpack.get(), false);
}
("Amesos",
const_cast<Epetra_CrsMatrix*>(&matrix.trilinos_matrix()),
additional_data.overlap));
- Assert (&*ifpack != 0, ExcMessage ("Trilinos could not create this "
- "preconditioner"));
+ Assert (ifpack.get() != 0, ExcMessage ("Trilinos could not create this "
+ "preconditioner"));
int ierr;
ierr = ifpack->Compute();
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
- preconditioner = Teuchos::rcp (&*ifpack, false);
+ preconditioner = Teuchos::rcp (ifpack.get(), false);
}
ifpack.release();
ifpack = Teuchos::rcp (new Ifpack_Chebyshev (&matrix.trilinos_matrix()));
- Assert (&*ifpack != 0, ExcMessage ("Trilinos could not create this "
- "preconditioner"));
+ Assert (ifpack.get() != 0, ExcMessage ("Trilinos could not create this "
+ "preconditioner"));
int ierr;
ierr = ifpack->Compute();
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
- preconditioner = Teuchos::rcp (&*ifpack, false);
+ preconditioner = Teuchos::rcp (ifpack.get(), false);
}
multilevel_operator = Teuchos::rcp (new ML_Epetra::MultiLevelPreconditioner(
matrix.trilinos_matrix(), ml_parameters,
true));
- preconditioner = Teuchos::rcp (&*multilevel_operator, false);
+ preconditioner = Teuchos::rcp (multilevel_operator.get(), false);
}
// elements.
vector_distributor.reset (new Epetra_Map(n_rows, 0, communicator));
- if (&*Matrix==0)
+ if (Matrix.get() == 0)
Matrix.reset (new SparseMatrix());
Matrix->reinit (*vector_distributor, *vector_distributor,
// todo: find a way to read out ML's data
// sizes
- if (&*Matrix != 0)
+ if (Matrix.get() != 0)
memory += Matrix->memory_consumption();
return memory;
}
// Introduce the
// preconditioner, ...
ierr = solver.SetPrecOperator (const_cast<Epetra_Operator*>
- (&*preconditioner.preconditioner));
+ (preconditioner.preconditioner.get()));
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
// ... set some options, ...
// Introduce the
// preconditioner, ...
ierr = solver.SetPrecOperator (const_cast<Epetra_Operator*>
- (&*preconditioner.preconditioner));
+ (preconditioner.preconditioner.get()));
AssertThrow (ierr == 0, ExcTrilinosError(ierr));
// ... set some options, ...
std_cxx1x::shared_ptr<Epetra_CrsGraph> graph;
int * first_row_length = &n_entries_per_row[input_row_map.MinMyGID()];
if (input_row_map.Comm().NumProc() > 1)
- graph.reset (new Epetra_CrsGraph (Copy, input_row_map, first_row_length,
+ graph.reset (new Epetra_CrsGraph (Copy, input_row_map, first_row_length,
true));
else
graph.reset (new Epetra_CrsGraph (Copy, input_row_map, input_col_map,
{
// reinit with a (parallel) Trilinos
// sparsity pattern.
- column_space_map.reset (new Epetra_Map
+ column_space_map.reset (new Epetra_Map
(sparsity_pattern.domain_partitioner()));
matrix.reset (new Epetra_FECrsMatrix
(Copy, sparsity_pattern.trilinos_sparsity_pattern(), false));
(use_this_sparsity!=0)? *use_this_sparsity :
dealii_sparse_matrix.get_sparsity_pattern();
- if (&*matrix != 0 && m() == n_rows &&
+ if (matrix.get() != 0 && m() == n_rows &&
n_nonzero_elements() == sparsity_pattern.n_nonzero_elements())
goto set_matrix_values;
// When we clear the matrix, reset
// the pointer and generate an
// empty matrix.
- column_space_map.reset (new Epetra_Map (0, 0,
+ column_space_map.reset (new Epetra_Map (0, 0,
Utilities::Trilinos::comm_self()));
matrix.reset (new Epetra_FECrsMatrix(View, *column_space_map, 0));
Teuchos::RCP<Epetra_CrsMatrix> mod_B;
if (use_vector == false)
{
- mod_B = Teuchos::rcp(const_cast<Epetra_CrsMatrix*>(&inputright.trilinos_matrix()),
+ mod_B = Teuchos::rcp(const_cast<Epetra_CrsMatrix*>
+ (&inputright.trilinos_matrix()),
false);
}
else
{
- mod_B = Teuchos::rcp(new Epetra_CrsMatrix (Copy,
- inputright.trilinos_sparsity_pattern()),
+ mod_B = Teuchos::rcp(new Epetra_CrsMatrix
+ (Copy, inputright.trilinos_sparsity_pattern()),
true);
mod_B->FillComplete(inputright.domain_partitioner(),
inputright.range_partitioner());
if (transpose_left == false)
ML_Operator_WrapEpetraCrsMatrix
- (const_cast<Epetra_CrsMatrix*>(&inputleft.trilinos_matrix()),A_,false);
+ (const_cast<Epetra_CrsMatrix*>(&inputleft.trilinos_matrix()),A_,
+ false);
else
{
ML_Operator_WrapEpetraCrsMatrix
- (const_cast<Epetra_CrsMatrix*>(&inputleft.trilinos_matrix()),Anotrans_,false);
+ (const_cast<Epetra_CrsMatrix*>(&inputleft.trilinos_matrix()),
+ Anotrans_,false);
ML_Operator_Transpose_byrow(Anotrans_,A_);
}
- ML_Operator_WrapEpetraCrsMatrix(&*mod_B,B_,false);
+ ML_Operator_WrapEpetraCrsMatrix(mod_B.get(),B_,false);
// We implement the multiplication by
// hand in a similar way as is done in
SparsityPattern::compress ()
{
int ierr;
- Assert (&* column_space_map != 0, ExcInternalError());
+ Assert (column_space_map.get() != 0, ExcInternalError());
ierr = graph->GlobalAssemble (*column_space_map,
static_cast<const Epetra_Map&>(graph->RangeMap()),
true);
Teuchos::RCP<Epetra_FEVector> actual_vec = (import_data == true) ?
Teuchos::rcp (new Epetra_FEVector (new_map), true) :
- Teuchos::rcp (&*vector, false);
+ Teuchos::rcp (vector.get(), false);
TrilinosScalar* entries = (*actual_vec)[0];
block_offset = 0;
VectorBase &
VectorBase::operator = (const VectorBase &v)
{
- Assert (&*vector != 0,
+ Assert (vector.get() != 0,
ExcMessage("Vector is not constructed properly."));
if (local_range() != v.local_range())