From 35afc200ffe696079579f10d0680616aacf719fd Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 1 Nov 2015 15:46:13 -0500 Subject: [PATCH] More VECTOR -> VectorType --- tests/bits/fe_tools_common.h | 8 +++---- tests/gla/extract_subvector_to_parallel.cc | 2 +- tests/lac/filtered_matrix.cc | 10 ++++----- tests/lac/linear_operator_08.cc | 26 +++++++++++----------- tests/lac/solver.cc | 19 ++++++++++------ tests/lac/solver_memorytest.cc | 9 ++++---- tests/lac/solver_monitor.cc | 10 +++++---- tests/lac/solver_monitor_disconnect.cc | 10 +++++---- tests/lac/solver_relaxation_01.cc | 10 +++++---- tests/lac/solver_relaxation_02.cc | 10 +++++---- tests/lac/solver_relaxation_03.cc | 10 +++++---- tests/lac/solver_selector_01.cc | 8 +++---- tests/lac/solver_selector_02.cc | 8 +++---- tests/lac/solver_signals.cc | 10 +++++---- tests/lac/vector_memory.cc | 22 +++++++++--------- tests/trilinos/deal_solver_01.cc | 11 ++++----- tests/trilinos/deal_solver_02.cc | 11 ++++----- tests/trilinos/deal_solver_03.cc | 9 ++++---- tests/trilinos/deal_solver_04.cc | 11 ++++----- tests/trilinos/deal_solver_05.cc | 11 ++++----- tests/trilinos/deal_solver_06.cc | 11 ++++----- tests/trilinos/solver_03.cc | 11 ++++----- tests/trilinos/solver_05.cc | 11 ++++----- tests/trilinos/solver_07.cc | 11 ++++----- tests/umfpack/umfpack_04.cc | 4 ++-- 25 files changed, 150 insertions(+), 123 deletions(-) diff --git a/tests/bits/fe_tools_common.h b/tests/bits/fe_tools_common.h index 5707052333..c0b5146015 100644 --- a/tests/bits/fe_tools_common.h +++ b/tests/bits/fe_tools_common.h @@ -76,17 +76,17 @@ output_matrix (const FullMatrix &m) // output some indicators for a given vector -template +template void -output_vector (const VECTOR &v) +output_vector (const VectorType &v) { deallog << v.l1_norm() << ' ' << v.l2_norm() << ' ' << v.linfty_norm() << std::endl; // write out at most 20 equispaced // elements of the vector - for (unsigned int i=0; i(1), - static_cast(v.size()/20))) + for (unsigned int i=0; i(1), + static_cast(v.size()/20))) deallog << v(i) << ' '; deallog << std::endl; } diff --git a/tests/gla/extract_subvector_to_parallel.cc b/tests/gla/extract_subvector_to_parallel.cc index a231ba956f..0453cd94d3 100644 --- a/tests/gla/extract_subvector_to_parallel.cc +++ b/tests/gla/extract_subvector_to_parallel.cc @@ -15,7 +15,7 @@ -// test the various VECTOR::extract_subvector_to functions for +// test the various extract_subvector_to functions for // parallel vectors and block vectors #include "../tests.h" diff --git a/tests/lac/filtered_matrix.cc b/tests/lac/filtered_matrix.cc index 158a973ddd..593ecea22d 100644 --- a/tests/lac/filtered_matrix.cc +++ b/tests/lac/filtered_matrix.cc @@ -25,21 +25,21 @@ #include -template -void test (const FilteredMatrix &M) +template +void test (const FilteredMatrix &M) { deallog << "Iterator"; unsigned int max = 0; - for (typename FilteredMatrix::const_iterator i= M.begin(); + for (typename FilteredMatrix::const_iterator i= M.begin(); i != M.end(); ++i) { Assert(i->row() == i->column(), ExcInternalError()); deallog << ' ' << i->row() << ':' << i->value(); max = i->row(); } - VECTOR v(max+1); - VECTOR w(max+1); + VectorType v(max+1); + VectorType w(max+1); for (unsigned int i=0; i void test_preconditioner (const MATRIX &A, - const VECTOR &b, + const VectorType &b, const ADDITIONAL_DATA &data = ADDITIONAL_DATA()) { - const auto lo_A = linear_operator(A); + const auto lo_A = linear_operator(A); PRECONDITIONER preconditioner; preconditioner.initialize(A, data); SolverControl solver_control (100, 1.0e-10); - SolverCG solver (solver_control); + SolverCG solver (solver_control); // Exact inverse const auto lo_A_inv = inverse_operator(lo_A, solver, preconditioner); - const VECTOR x = lo_A_inv*b; + const VectorType x = lo_A_inv*b; // Approximate inverse { // Using exemplar matrix - const auto lo_A_inv_approx = linear_operator(A, preconditioner); - const VECTOR x_approx = lo_A_inv_approx*b; + const auto lo_A_inv_approx = linear_operator(A, preconditioner); + const VectorType x_approx = lo_A_inv_approx*b; } { // Stand-alone - const auto lo_A_inv_approx = linear_operator(preconditioner); - const VECTOR x_approx = lo_A_inv_approx*b; + const auto lo_A_inv_approx = linear_operator(preconditioner); + const VectorType x_approx = lo_A_inv_approx*b; } } @@ -193,16 +193,16 @@ public: matrix.n_block_cols()); } - template + template void - vmult(VECTOR &dst, const VECTOR &src) const + vmult(VectorType &dst, const VectorType &src) const { dst = src; } - template + template void - Tvmult(VECTOR &dst, const VECTOR &src) const + Tvmult(VectorType &dst, const VectorType &src) const { dst = src; } diff --git a/tests/lac/solver.cc b/tests/lac/solver.cc index 8f3ece8434..b5da2d6541 100644 --- a/tests/lac/solver.cc +++ b/tests/lac/solver.cc @@ -33,10 +33,13 @@ #include #include -template +template void -check_solve( SOLVER &solver, const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) +check_solve (SOLVER &solver, + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { u = 0.; f = 1.; @@ -50,10 +53,13 @@ check_solve( SOLVER &solver, const MATRIX &A, } } -template +template void -check_Tsolve(SOLVER &solver, const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) +check_Tsolve (SOLVER &solver, + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { u = 0.; f = 1.; @@ -286,4 +292,3 @@ int main() check_solve(rich,A,u,f,prec_psor); } } - diff --git a/tests/lac/solver_memorytest.cc b/tests/lac/solver_memorytest.cc index 4c4998c663..935afb8742 100644 --- a/tests/lac/solver_memorytest.cc +++ b/tests/lac/solver_memorytest.cc @@ -39,10 +39,12 @@ #include #include -template +template void -check_solve( const MATRIX &A, VECTOR &u, VECTOR &f, - const typename SOLVER::AdditionalData &additional_data = typename SOLVER::AdditionalData() ) +check_solve (const MATRIX &A, + VectorType &u, + VectorType &f, + const typename SOLVER::AdditionalData &additional_data = typename SOLVER::AdditionalData()) { GrowingVectorMemory<> mem; SolverControl control(100, 1.e-3); @@ -102,4 +104,3 @@ int main() } } - diff --git a/tests/lac/solver_monitor.cc b/tests/lac/solver_monitor.cc index eec4e9ca93..b2a888f2dc 100644 --- a/tests/lac/solver_monitor.cc +++ b/tests/lac/solver_monitor.cc @@ -56,10 +56,13 @@ SolverControl::State monitor_mean (const unsigned int iteration, -template +template void -check_solve( SOLVER &solver, const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) +check_solve (SOLVER &solver, + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { u = 0.; f = 1.; @@ -140,4 +143,3 @@ int main() } } } - diff --git a/tests/lac/solver_monitor_disconnect.cc b/tests/lac/solver_monitor_disconnect.cc index c405de2544..e95b7d7fd8 100644 --- a/tests/lac/solver_monitor_disconnect.cc +++ b/tests/lac/solver_monitor_disconnect.cc @@ -57,10 +57,13 @@ SolverControl::State monitor_mean (const unsigned int iteration, -template +template void -check_solve( SOLVER &solver, const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) +check_solve (SOLVER &solver, + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { u = 0.; f = 1.; @@ -137,4 +140,3 @@ int main() cg_c1.disconnect(); } } - diff --git a/tests/lac/solver_relaxation_01.cc b/tests/lac/solver_relaxation_01.cc index 72ea3fc4f4..dbbe821f00 100644 --- a/tests/lac/solver_relaxation_01.cc +++ b/tests/lac/solver_relaxation_01.cc @@ -31,10 +31,13 @@ #include #include -template +template double -check_solve( SOLVER &solver, const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) +check_solve (SOLVER &solver, + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { double result = 0.; u = 0.; @@ -176,4 +179,3 @@ int main() check_solve(rich,A,u,f,prec_psor); } } - diff --git a/tests/lac/solver_relaxation_02.cc b/tests/lac/solver_relaxation_02.cc index fe62b29e40..785c02deff 100644 --- a/tests/lac/solver_relaxation_02.cc +++ b/tests/lac/solver_relaxation_02.cc @@ -32,10 +32,13 @@ #include #include -template +template double -check_solve( SOLVER &solver, const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) +check_solve (SOLVER &solver, + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { double result = 0.; u = 0.; @@ -151,4 +154,3 @@ int main() } } } - diff --git a/tests/lac/solver_relaxation_03.cc b/tests/lac/solver_relaxation_03.cc index 131520c3af..e332339d16 100644 --- a/tests/lac/solver_relaxation_03.cc +++ b/tests/lac/solver_relaxation_03.cc @@ -33,10 +33,13 @@ #include #include -template +template double -check_solve( SOLVER &solver, const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) +check_solve (SOLVER &solver, + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { double result = 0.; u = 0.; @@ -207,4 +210,3 @@ int main() } } } - diff --git a/tests/lac/solver_selector_01.cc b/tests/lac/solver_selector_01.cc index bf857718c3..c3a5aab4f3 100644 --- a/tests/lac/solver_selector_01.cc +++ b/tests/lac/solver_selector_01.cc @@ -26,9 +26,9 @@ #include -template +template void -check(const MATRIX &A, const VECTOR &f) +check (const MATRIX &A, const VectorType &f) { std::vector names; names.push_back("cg"); @@ -38,11 +38,11 @@ check(const MATRIX &A, const VECTOR &f) ReductionControl cont1(100, 0., 1.e-4); SolverControl cont2(100, 1.e-7); - SolverSelector solver; + SolverSelector solver; PreconditionSSOR > pre; pre.initialize(A); - VECTOR u; + VectorType u; u.reinit(f); std::vector::const_iterator name; diff --git a/tests/lac/solver_selector_02.cc b/tests/lac/solver_selector_02.cc index 43d115cf1c..b92608e199 100644 --- a/tests/lac/solver_selector_02.cc +++ b/tests/lac/solver_selector_02.cc @@ -41,9 +41,9 @@ public: -template +template void -check(const MATRIX &A, const VECTOR &f) +check(const MATRIX &A, const VectorType &f) { std::vector names; names.push_back("cg"); @@ -52,11 +52,11 @@ check(const MATRIX &A, const VECTOR &f) names.push_back("fgmres"); MySolverControl mycont; - SolverSelector solver; + SolverSelector solver; PreconditionSSOR > pre; pre.initialize(A); - VECTOR u; + VectorType u; u.reinit(f); std::vector::const_iterator name; diff --git a/tests/lac/solver_signals.cc b/tests/lac/solver_signals.cc index f8c4ccb49b..695ec589ae 100644 --- a/tests/lac/solver_signals.cc +++ b/tests/lac/solver_signals.cc @@ -56,10 +56,13 @@ void output_eigenvalues(const std::vector &eigenvalues,const std::string deallog << std::endl; } -template +template void -check_solve( SOLVER &solver, const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) +check_solve(SOLVER &solver, + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { u = 0.; f = 1.; @@ -134,4 +137,3 @@ int main() } } - diff --git a/tests/lac/vector_memory.cc b/tests/lac/vector_memory.cc index 23bee7d963..f458c61d46 100644 --- a/tests/lac/vector_memory.cc +++ b/tests/lac/vector_memory.cc @@ -24,27 +24,27 @@ using namespace dealii; -template +template void test_leak() { - GrowingVectorMemory mem; - VECTOR *v = mem.alloc(); + GrowingVectorMemory mem; + VectorType *v = mem.alloc(); v->reinit(5); } -template +template void test_stat() { - GrowingVectorMemory mem(1, true); - VECTOR *v1 = mem.alloc(); - VECTOR *v2 = mem.alloc(); - VECTOR *v3 = mem.alloc(); - VECTOR *v4 = mem.alloc(); - VECTOR *v5 = mem.alloc(); - VECTOR *v6 = mem.alloc(); + GrowingVectorMemory mem(1, true); + VectorType *v1 = mem.alloc(); + VectorType *v2 = mem.alloc(); + VectorType *v3 = mem.alloc(); + VectorType *v4 = mem.alloc(); + VectorType *v5 = mem.alloc(); + VectorType *v6 = mem.alloc(); v1->reinit(5); v2->reinit(5); v3->reinit(5); diff --git a/tests/trilinos/deal_solver_01.cc b/tests/trilinos/deal_solver_01.cc index 5a94be72e4..65ecba6476 100644 --- a/tests/trilinos/deal_solver_01.cc +++ b/tests/trilinos/deal_solver_01.cc @@ -37,12 +37,14 @@ #include #include -template +template void -check_solve( SOLVER &solver, +check_solve (SOLVER &solver, const SolverControl &solver_control, - const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; @@ -103,4 +105,3 @@ int main(int argc, char **argv) check_solve (solver, control, A,u,f, preconditioner); } } - diff --git a/tests/trilinos/deal_solver_02.cc b/tests/trilinos/deal_solver_02.cc index 073cdb7528..67ac684037 100644 --- a/tests/trilinos/deal_solver_02.cc +++ b/tests/trilinos/deal_solver_02.cc @@ -39,12 +39,14 @@ #include #include -template +template void -check_solve( SOLVER &solver, +check_solve (SOLVER &solver, const SolverControl &solver_control, - const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; @@ -104,4 +106,3 @@ int main(int argc, char **argv) check_solve (solver, control, A,u,f, preconditioner); } } - diff --git a/tests/trilinos/deal_solver_03.cc b/tests/trilinos/deal_solver_03.cc index 37ac44b28c..0f4b136d8a 100644 --- a/tests/trilinos/deal_solver_03.cc +++ b/tests/trilinos/deal_solver_03.cc @@ -39,12 +39,14 @@ #include #include -template +template void -check_solve( SOLVER &solver, +check_solve (SOLVER &solver, const SolverControl &solver_control, const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; @@ -105,4 +107,3 @@ int main(int argc, char **argv) check_solve (solver, control, A,u,f, preconditioner); } } - diff --git a/tests/trilinos/deal_solver_04.cc b/tests/trilinos/deal_solver_04.cc index afa0020f0a..044ef1ceeb 100644 --- a/tests/trilinos/deal_solver_04.cc +++ b/tests/trilinos/deal_solver_04.cc @@ -38,12 +38,14 @@ #include #include -template +template void -check_solve( SOLVER &solver, +check_solve (SOLVER &solver, const SolverControl &solver_control, - const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; @@ -104,4 +106,3 @@ int main(int argc, char **argv) check_solve (solver, control, A,u,f, preconditioner); } } - diff --git a/tests/trilinos/deal_solver_05.cc b/tests/trilinos/deal_solver_05.cc index 5db7c660ac..6ebb71eef7 100644 --- a/tests/trilinos/deal_solver_05.cc +++ b/tests/trilinos/deal_solver_05.cc @@ -37,12 +37,14 @@ #include #include -template +template void -check_solve( SOLVER &solver, +check_solve (SOLVER &solver, const SolverControl &solver_control, - const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; @@ -103,4 +105,3 @@ int main(int argc, char **argv) check_solve (solver, control, A,u,f, preconditioner); } } - diff --git a/tests/trilinos/deal_solver_06.cc b/tests/trilinos/deal_solver_06.cc index bf1a77d9ec..f53512a8ae 100644 --- a/tests/trilinos/deal_solver_06.cc +++ b/tests/trilinos/deal_solver_06.cc @@ -37,12 +37,14 @@ #include #include -template +template void -check_solve( SOLVER &solver, +check_solve (SOLVER &solver, const SolverControl &solver_control, - const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; @@ -102,4 +104,3 @@ int main(int argc, char **argv) check_solve (solver, control, A,u,f, preconditioner); } } - diff --git a/tests/trilinos/solver_03.cc b/tests/trilinos/solver_03.cc index a82cd87d23..300c0a235b 100644 --- a/tests/trilinos/solver_03.cc +++ b/tests/trilinos/solver_03.cc @@ -32,12 +32,14 @@ #include #include -template +template void -check_solve( SOLVER &solver, +check_solve (SOLVER &solver, const SolverControl &solver_control, - const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; @@ -98,4 +100,3 @@ int main(int argc, char **argv) check_solve (solver, control, A,u,f, preconditioner); } } - diff --git a/tests/trilinos/solver_05.cc b/tests/trilinos/solver_05.cc index a3c2d09875..64c665545d 100644 --- a/tests/trilinos/solver_05.cc +++ b/tests/trilinos/solver_05.cc @@ -32,12 +32,14 @@ #include #include -template +template void -check_solve( SOLVER &solver, +check_solve (SOLVER &solver, const SolverControl &solver_control, - const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; @@ -98,4 +100,3 @@ int main(int argc, char **argv) check_solve (solver, control, A,u,f, preconditioner); } } - diff --git a/tests/trilinos/solver_07.cc b/tests/trilinos/solver_07.cc index ed9227cc6e..7b03471878 100644 --- a/tests/trilinos/solver_07.cc +++ b/tests/trilinos/solver_07.cc @@ -32,12 +32,14 @@ #include #include -template +template void -check_solve( SOLVER &solver, +check_solve (SOLVER &solver, const SolverControl &solver_control, - const MATRIX &A, - VECTOR &u, VECTOR &f, const PRECONDITION &P) + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; @@ -98,4 +100,3 @@ int main(int argc, char **argv) } } - diff --git a/tests/umfpack/umfpack_04.cc b/tests/umfpack/umfpack_04.cc index 05763903df..51ca7d08af 100644 --- a/tests/umfpack/umfpack_04.cc +++ b/tests/umfpack/umfpack_04.cc @@ -44,8 +44,8 @@ #include #include -template -void assemble_laplace (MATRIX &B, VECTOR &bb, DoFHandler &dof_handler, FiniteElement &fe) +template +void assemble_laplace (MATRIX &B, VectorType &bb, DoFHandler &dof_handler, FiniteElement &fe) { QGauss quadrature_formula(2); FEValues fe_values (fe, quadrature_formula, -- 2.39.5