try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
//---------------------------- 49b.cc ---------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
// Copyright (C) 2004, 2005, 2008, 2009 by the deal.II authors
//
// ::operator = (dealii::BlockVector<TrilinosScalar>)
// with block vectors instead of plain vectors
-#include "../tests.h"
+#include "../tests.h"
#include <base/utilities.h>
#include <lac/trilinos_block_vector.h>
#include <lac/block_vector.h>
for (unsigned int i=0; i<w.size(); ++i)
w(i) = i;
-
+
v = w;
-
+
// make sure we get the expected result
for (unsigned int i=0; i<v.size(); ++i)
{
Assert (w(i) == i, ExcInternalError());
Assert (v(i) == i, ExcInternalError());
}
-
-
+
+
deallog << "OK" << std::endl;
}
-int main (int argc,char **argv)
+int main (int argc,char **argv)
{
std::ofstream logfile("49b/output");
deallog.attach(logfile);
deallog.depth_console(0);
- deallog.threshold_double(1.e-10);
+ deallog.threshold_double(1.e-10);
Utilities::System::MPI_InitFinalize mpi_initialization (argc, argv);
Epetra_Map map(3, 3, 0, Utilities::Trilinos::comm_world());
sizes.push_back (map);
sizes.push_back (map);
-
+
TrilinosWrappers::MPI::BlockVector v (sizes);
test (v);
}
<< "Aborting!" << std::endl
<< "----------------------------------------------------"
<< std::endl;
-
+
return 1;
}
- catch (...)
+ catch (...)
{
std::cerr << std::endl << std::endl
<< "----------------------------------------------------"
{
std::vector<unsigned int> row_lengths (5, 3U);
row_lengths.back() = 2;
- TrilinosWrappers::SparseMatrix m (5,5,row_lengths);
+ TrilinosWrappers::SparseMatrix m (5U,5U,row_lengths);
test (m);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix v (100,100,5);
+ TrilinosWrappers::SparseMatrix v (100U,100U,5U);
test (v);
}
}
try
{
{
- TrilinosWrappers::SparseMatrix v (100,100,5);
+ TrilinosWrappers::SparseMatrix v (100U,100U,5U);
test (v);
}
}
// check
// TrilinosWrappers::SparseMatrix
TrilinosWrappers::SparseMatrix
- v1 (n_dofs, n_dofs, 5);
+ v1 (n_dofs, n_dofs, 5U);
test (v1);
// check
try
{
{
- TrilinosWrappers::SparseMatrix v (14,14,3);
+ TrilinosWrappers::SparseMatrix v (14U,14U,3U);
test (v);
}
}
-DEAL::7.15267e+09 7.15267e+09
+DEAL::7.02303e+09 7.02303e+09
+DEAL::32 32
+DEAL::6.89422e+09 6.89422e+09
DEAL::32 32
-DEAL::6.84337e+09 6.84337e+09
-DEAL::30 32
DEAL::OK
+++ /dev/null
-
-DEAL::7.15267e+09 7.15267e+09
-DEAL::32 32
-DEAL::6.84337e+09 6.84337e+09
-DEAL::29 32
-DEAL::OK
try
{
{
- TrilinosWrappers::SparseMatrix v (14,14,3);
+ TrilinosWrappers::SparseMatrix v (14U,14U,3U);
test (v);
}
}
-DEAL::7.15267e+09 7.15267e+09
+DEAL::7.02303e+09 7.02303e+09
+DEAL::32 32
+DEAL::6.68247e+09 6.68247e+09
DEAL::32 32
-DEAL::6.71272e+09 6.71272e+09
-DEAL::29 32
DEAL::OK
+++ /dev/null
-
-DEAL::7.15267e+09 7.15267e+09
-DEAL::32 32
-DEAL::6.71272e+09 6.71272e+09
-DEAL::27 32
-DEAL::OK
try
{
{
- TrilinosWrappers::SparseMatrix v (14,14,3);
+ TrilinosWrappers::SparseMatrix v (14U,14U,3U);
test (v);
}
}
-DEAL::7.15267e+09 7.15267e+09
+DEAL::7.02303e+09 7.02303e+09
+DEAL::32 32
+DEAL::6.89431e+09 7.02885e+09
DEAL::32 32
-DEAL::6.96869e+09 6.96869e+09
-DEAL::30 32
DEAL::OK
// $Id$
// Version: $Name$
//
-// Copyright (C) 2004, 2005, 2008 by the deal.II authors
+// Copyright (C) 2004, 2005, 2008, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
try
{
{
- TrilinosWrappers::SparseMatrix v (14,14,3);
+ TrilinosWrappers::SparseMatrix v (14U,14U,3U);
test (v);
}
}
-DEAL::7.15267e+09 7.15267e+09
+DEAL::7.02303e+09 7.02303e+09
+DEAL::32 32
+DEAL::6.81766e+09 6.95733e+09
DEAL::32 32
-DEAL::6.96580e+09 6.96580e+09
-DEAL::29 32
DEAL::OK
// first set a few entries one-by-one in
// a small matrix
const unsigned int block_size = 16;
- TrilinosWrappers::SparseMatrix m_small (block_size,block_size,3);
+ TrilinosWrappers::SparseMatrix m_small (block_size,block_size,3U);
for (unsigned int i=0; i<block_size; ++i)
for (unsigned int j=0; j<block_size; ++j)
if (std::fabs((double)i-j) < 2)
// first set a few entries one-by-one in
// a small matrix
const unsigned int block_size = 16;
- TrilinosWrappers::SparseMatrix m_small (block_size,block_size,3);
+ TrilinosWrappers::SparseMatrix m_small (block_size,block_size,3U);
for (unsigned int i=0; i<block_size; ++i)
for (unsigned int j=0; j<block_size; ++j)
if (std::fabs((double)i-j) < 2)
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii8SolverCGINS_13TrilinosWrappers6VectorEEE
-DEAL:cg::Starting value 31.00
-DEAL:cg::Convergence step 43 value 0.0008189
-DEAL::Solver stopped after 43 iterations
-DEAL::GrowingVectorMemory:Overall allocated vectors: 4
-DEAL::GrowingVectorMemory:Maximum allocated vectors: 4
+DEAL::Solver type: N6dealii8SolverCGINS_16TrilinosWrappers6VectorEEE
+DEAL:cg::Starting value 31.0000
+DEAL:cg::Convergence step 128 value 0.000807536
+DEAL::Solver stopped after 128 iterations
+++ /dev/null
-
-DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii8SolverCGINS_16TrilinosWrappers6VectorEEE
-DEAL:cg::Starting value 31.0000
-DEAL:cg::Convergence step 128 value 0.000815153
-DEAL::Solver stopped after 128 iterations
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii14SolverBicgstabINS_13TrilinosWrappers6VectorEEE
-DEAL:Bicgstab::Starting value 31.00
-DEAL:Bicgstab::Convergence step 29 value 0.0008735
-DEAL::Solver stopped after 29 iterations
-DEAL::GrowingVectorMemory:Overall allocated vectors: 8
-DEAL::GrowingVectorMemory:Maximum allocated vectors: 8
+DEAL::Solver type: N6dealii14SolverBicgstabINS_16TrilinosWrappers6VectorEEE
+DEAL:Bicgstab::Starting value 31.0000
+DEAL:Bicgstab::Convergence step 157 value 0.000791865
+DEAL::Solver stopped after 157 iterations
+++ /dev/null
-
-DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii14SolverBicgstabINS_16TrilinosWrappers6VectorEEE
-DEAL:Bicgstab::Starting value 31.0000
-DEAL:Bicgstab::Convergence step 171 value 0.000968854
-DEAL::Solver stopped after 171 iterations
// $Id$
// Version: $Name$
//
-// Copyright (C) 2004, 2005, 2008 by the deal.II authors
+// Copyright (C) 2004, 2005, 2008, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
int main(int argc, char **argv)
{
std::ofstream logfile("deal_solver_03/output");
- logfile.precision(4);
+ logfile.precision(2);
deallog.attach(logfile);
deallog.depth_console(0);
deallog.threshold_double(1.e-10);
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii11SolverGMRESINS_13TrilinosWrappers6VectorEEE
-DEAL:GMRES::Starting value 31.00
-DEAL:GMRES::Convergence step 75 value 0.0008096
-DEAL::Solver stopped after 75 iterations
-DEAL::GrowingVectorMemory:Overall allocated vectors: 30
-DEAL::GrowingVectorMemory:Maximum allocated vectors: 30
+DEAL::Solver type: N6dealii11SolverGMRESINS_16TrilinosWrappers6VectorEEE
+DEAL:GMRES::Starting value 31.0000
+DEAL:GMRES::Convergence step 1216 value 0.000999125
+DEAL::Solver stopped after 1216 iterations
+++ /dev/null
-
-DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii11SolverGMRESINS_16TrilinosWrappers6VectorEEE
-DEAL:GMRES::Starting value 31.0000
-DEAL:GMRES::Convergence step 1219 value 0.000994115
-DEAL::Solver stopped after 1219 iterations
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii12SolverMinResINS_13TrilinosWrappers6VectorEEE
-DEAL:minres::Starting value 31.00
-DEAL:minres::Convergence step 43 value 0.0006916
-DEAL::Solver stopped after 43 iterations
-DEAL::GrowingVectorMemory:Overall allocated vectors: 7
-DEAL::GrowingVectorMemory:Maximum allocated vectors: 7
+DEAL::Solver type: N6dealii12SolverMinResINS_16TrilinosWrappers6VectorEEE
+DEAL:minres::Starting value 31.0000
+DEAL:minres::Convergence step 33 value 0.000792239
+DEAL::Solver stopped after 33 iterations
+++ /dev/null
-
-DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii12SolverMinResINS_16TrilinosWrappers6VectorEEE
-DEAL:minres::Starting value 31.0000
-DEAL:minres::Convergence step 33 value 0.000792244
-DEAL::Solver stopped after 33 iterations
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii10SolverQMRSINS_13TrilinosWrappers6VectorEEE
-DEAL:QMRS::Starting value 31.00
-DEAL:QMRS::Convergence step 46 value 0.0009063
-DEAL::Solver stopped after 46 iterations
-DEAL::GrowingVectorMemory:Overall allocated vectors: 5
-DEAL::GrowingVectorMemory:Maximum allocated vectors: 5
+DEAL::Solver type: N6dealii10SolverQMRSINS_16TrilinosWrappers6VectorEEE
+DEAL:QMRS::Starting value 31.0000
+DEAL:QMRS::Convergence step 135 value 0.000563443
+DEAL::Solver stopped after 135 iterations
+++ /dev/null
-
-DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii10SolverQMRSINS_16TrilinosWrappers6VectorEEE
-DEAL:QMRS::Starting value 31.0000
-DEAL:QMRS::Convergence step 135 value 0.000576843
-DEAL::Solver stopped after 135 iterations
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii16SolverRichardsonINS_13TrilinosWrappers6VectorEEE
-DEAL:Richardson::Starting value 31.00
-DEAL:Richardson::Failure step 372 value nan
-DEAL::Iterative method reported convergence failure in step 372 with residual nan
-DEAL::Solver stopped after 372 iterations
-DEAL::GrowingVectorMemory:Overall allocated vectors: 2
-DEAL::GrowingVectorMemory:Maximum allocated vectors: 2
+DEAL::Solver type: N6dealii16SolverRichardsonINS_16TrilinosWrappers6VectorEEE
+DEAL:Richardson::Starting value 31.0000
+DEAL:Richardson::Failure step 304 value nan
+DEAL::Iterative method reported convergence failure in step 304 with residual nan
+DEAL::Solver stopped after 304 iterations
+++ /dev/null
-
-DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii16SolverRichardsonINS_16TrilinosWrappers6VectorEEE
-DEAL:Richardson::Starting value 31.0000
-DEAL:Richardson::Failure step 304 value nan
-DEAL::Iterative method reported convergence failure in step 304 with residual nan
-DEAL::Solver stopped after 304 iterations
const unsigned int N = 200;
// build the sparse matrix
- TrilinosWrappers::SparseMatrix matrix (N*N, N*N, 5);
+ TrilinosWrappers::SparseMatrix matrix (N*N, N*N, 5U);
for(unsigned int i=0; i<N; i++)
for(unsigned int j=0; j<N; j++)
{
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
+++ /dev/null
-
-DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii13TrilinosWrappers14SolverBicgstabE
-DEAL::Starting value 7.750
-DEAL::Convergence step 33 value 0.0005777
-DEAL::Solver stopped after 33 iterations
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
// Make matrix
FDMatrix testproblem(size, size);
- TrilinosWrappers::SparseMatrix A(dim, dim, 5);
+ TrilinosWrappers::SparseMatrix A(dim, dim, 5U);
testproblem.five_point(A);
TrilinosWrappers::Vector f(dim);
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
void test (TrilinosWrappers::SparseMatrix &m)
{
- TrilinosWrappers::SparseMatrix m2(m.m(), m.n(), 3);
+ TrilinosWrappers::SparseMatrix m2(m.m(), m.n(), 3U);
// first set a few entries one-by-one and
// initialize the sparsity pattern for m2
try
{
{
- TrilinosWrappers::SparseMatrix m (16,16,3);
+ TrilinosWrappers::SparseMatrix m (16U,16U,3U);
test (m);
}
}
//---------------------------- trilinos_sparse_matrix_iterator_01.cc ---------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
// Copyright (C) 2004, 2005, 2008 by the deal.II authors
//
// test TrilinosWrappers::MatrixBase::const_iterator
-#include "../tests.h"
+#include "../tests.h"
#include <base/utilities.h>
-#include <lac/trilinos_sparse_matrix.h>
+#include <lac/trilinos_sparse_matrix.h>
#include <fstream>
#include <iostream>
void test ()
{
- TrilinosWrappers::SparseMatrix m(5,5,5);
+ TrilinosWrappers::SparseMatrix m(5U,5U,5U);
m.set (0,0,1);
m.set (1,1,2);
- m.set (1,2,3);
+ m.set (1,2,3);
m.compress ();
TrilinosWrappers::SparseMatrix::const_iterator i = m.begin();
deallog << i->row() << ' ' << i->column() << ' ' << i->value() << std::endl;
deallog << i->row() << ' ' << i->column() << ' ' << i->value() << std::endl;
i++;
deallog << i->row() << ' ' << i->column() << ' ' << i->value() << std::endl;
-
+
deallog << "OK" << std::endl;
}
std::ofstream logfile("sparse_matrix_iterator_01/output");
deallog.attach(logfile);
deallog.depth_console(0);
- deallog.threshold_double(1.e-10);
+ deallog.threshold_double(1.e-10);
Utilities::System::MPI_InitFinalize mpi_initialization (argc, argv);
<< "Aborting!" << std::endl
<< "----------------------------------------------------"
<< std::endl;
-
+
return 1;
}
- catch (...)
+ catch (...)
{
std::cerr << std::endl << std::endl
<< "----------------------------------------------------"
try
{
{
- TrilinosWrappers::SparseMatrix m (5,5,3);
+ TrilinosWrappers::SparseMatrix m (5U,5U,3U);
test (m);
}
}
void test (TrilinosWrappers::SparseMatrix &m)
{
- TrilinosWrappers::SparseMatrix m2(m.m(), m.n(), 3);
+ TrilinosWrappers::SparseMatrix m2(m.m(), m.n(), 3U);
// first set a few entries one-by-one and
// initialize the sparsity pattern for m2
try
{
{
- TrilinosWrappers::SparseMatrix m (16,16,3);
+ TrilinosWrappers::SparseMatrix m (16U,16U,3U);
test (m);
}
}
TrilinosWrappers::SparseMatrix m(v.size(),v.size(),v.size());
for (unsigned int i=0; i<m.m(); ++i)
for (unsigned int j=0; j<m.m(); ++j)
- m.set (i,j, i+2*j);
+ m.set (i,j, i+2*j);
for (unsigned int i=0; i<v.size(); ++i)
{
m.compress ();
v.compress ();
w.compress ();
-
// w:=Mv
m.Tvmult_add (w,v);