From: Bruno Turcksin Date: Thu, 24 Mar 2016 14:32:24 +0000 (-0400) Subject: Suppress warning in release mode. X-Git-Tag: v8.5.0-rc1~1179^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=980b32138994f45c0c4cc7d7651bd040c5a9bde6;p=dealii.git Suppress warning in release mode. --- diff --git a/source/lac/trilinos_epetra_vector.cc b/source/lac/trilinos_epetra_vector.cc index 953173f275..854de65ff7 100644 --- a/source/lac/trilinos_epetra_vector.cc +++ b/source/lac/trilinos_epetra_vector.cc @@ -66,8 +66,8 @@ namespace LinearAlgebra else if (omit_zeroing_entries==false) { const int ierr = vector->PutScalar(0.); - (void) ierr; Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; } } @@ -89,6 +89,7 @@ namespace LinearAlgebra const int ierr = vector->Import(V.trilinos_vector(), data_exchange, Insert); Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; } else vector.reset(new Epetra_FEVector(V.trilinos_vector())); @@ -181,8 +182,8 @@ namespace LinearAlgebra #if DEAL_II_TRILINOS_VERSION_GTE(11,11,0) Epetra_Import data_exchange (vector->Map(), down_V.trilinos_vector().Map()); int ierr = vector->Import(down_V.trilinos_vector(), data_exchange, Epetra_AddLocalAlso); - (void) ierr; Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; #else // In versions older than 11.11 the Import function is broken for adding // Hence, we provide a workaround in this case @@ -191,12 +192,12 @@ namespace LinearAlgebra Epetra_Import data_exchange(dummy.Map(), down_V.trilinos_vector().Map()); int ierr = dummy.Import(down_V.trilinos_vector(), data_exchange, Insert); - (void) ierr; Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; ierr = vector->Update(1.0, dummy, 1.0); - (void) ierr; Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; #endif } @@ -229,8 +230,8 @@ namespace LinearAlgebra double result(0.); const int ierr = vector->Dot(down_V.trilinos_vector(), &result); - (void) ierr; Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; return result; } @@ -261,6 +262,7 @@ namespace LinearAlgebra const int ierr = vector->Update(a, down_V.trilinos_vector(), 1.); Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; } @@ -289,6 +291,7 @@ namespace LinearAlgebra const int ierr = vector->Update(a, down_V.trilinos_vector(), b, down_W.trilinos_vector(), 1.); Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; } @@ -325,6 +328,7 @@ namespace LinearAlgebra const int ierr = vector->Multiply(1.0, down_scaling_factors.trilinos_vector(), *vector, 0.0); Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; } @@ -345,6 +349,7 @@ namespace LinearAlgebra // Otherwise, just update int ierr = vector->Update(a, down_V.trilinos_vector(), 0.); Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; } } @@ -355,6 +360,7 @@ namespace LinearAlgebra double norm(0.); int ierr = vector->Norm1(&norm); Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; return norm; } @@ -366,6 +372,7 @@ namespace LinearAlgebra double norm(0.); int ierr = vector->Norm2(&norm); Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; return norm; } @@ -377,6 +384,7 @@ namespace LinearAlgebra double norm(0.); int ierr = vector->NormInf(&norm); Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; return norm; } @@ -472,6 +480,7 @@ namespace LinearAlgebra int ierr = vector->ExtractView(&val, &leading_dimension); Assert(ierr==0, ExcTrilinosError(ierr)); + (void) ierr; out.precision (precision); if (scientific) out.setf(std::ios::scientific, std::ios::floatfield);