From: wolf Date: Wed, 30 Apr 2003 23:08:40 +0000 (+0000) Subject: More fixes for cxx. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebd75cdca606a052322fbf3a035db319566c4ccb;p=dealii-svn.git More fixes for cxx. git-svn-id: https://svn.dealii.org/trunk@7525 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/lac/benchmark.cc b/tests/lac/benchmark.cc index 91d0aed70e..23f1d15e4f 100644 --- a/tests/lac/benchmark.cc +++ b/tests/lac/benchmark.cc @@ -18,7 +18,9 @@ #include #define ITER 100 -main() + + +int main() { Vector u; Vector v; diff --git a/tests/lac/block_matrices.cc b/tests/lac/block_matrices.cc index 5864e08388..9a93a3ae2e 100644 --- a/tests/lac/block_matrices.cc +++ b/tests/lac/block_matrices.cc @@ -175,7 +175,7 @@ void test () // now check what came out for (unsigned int row=0; row<19; ++row) { - std::vector t(29, 0); + std::vector t(29, 0.); // first check which elements // in this row exist for (unsigned int i=0; i<10; ++i) diff --git a/tests/lac/eigen.cc b/tests/lac/eigen.cc index fdbd04b001..0a976920f5 100644 --- a/tests/lac/eigen.cc +++ b/tests/lac/eigen.cc @@ -47,8 +47,8 @@ int main() * Satz 4.1.1) */ const double h = 1./size; - const double s = std::sin(M_PI*h/2.); - const double c = std::cos(M_PI*h/2.); + const double s = std::sin(deal_II_numbers::PI*h/2.); + const double c = std::cos(deal_II_numbers::PI*h/2.); const double lambda_max = 8.*c*c; const double lambda_min = 8.*s*s; diff --git a/tests/lac/full_matrix.cc b/tests/lac/full_matrix.cc index 71ebb588b1..d206038dda 100644 --- a/tests/lac/full_matrix.cc +++ b/tests/lac/full_matrix.cc @@ -32,7 +32,7 @@ void random_matrix(FullMatrix& A) for (unsigned int i=0; i T(3,3,entries); T.print_formatted(logfile, 0, false); @@ -92,9 +92,9 @@ main () // Setup rotation matrix C.clear(); C.diagadd(1.); - C(i,i) = C(i+1,i+1) = cos(i+1); - C(i+1,i) = sin(i+1); - C(i,i+1) = -sin(i+1); + C(i,i) = C(i+1,i+1) = std::cos(i+1.); + C(i+1,i) = std::sin(i+1.); + C(i,i+1) = -std::sin(i+1.); C.print_formatted (logfile,3,false); deallog << "l1-norm: " << C.l1_norm() << std::endl; diff --git a/tests/lac/sparse_ilu.cc b/tests/lac/sparse_ilu.cc index c73fd28820..f4a84ca240 100644 --- a/tests/lac/sparse_ilu.cc +++ b/tests/lac/sparse_ilu.cc @@ -97,7 +97,7 @@ int main() for (unsigned int i=0; i<3; ++i) { for (unsigned int j=0; j &d1, Vector &d2) sum += 4.*i*i; deallog << d2.norm_sqr() << '\t' << sum << std::endl; - sum = sqrt(sum); + sum = std::sqrt(sum); deallog << d2.l2_norm() << '\t' << sum << std::endl; sum = 0.;