From 230d49317b76dd6259a3d6f81e99c0c30a3f75b5 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 20 Aug 2007 22:39:16 +0000 Subject: [PATCH] Work around a number of problems with icc10 git-svn-id: https://svn.dealii.org/trunk@14998 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-21/step-21.cc | 28 ++++++++++++++++++++++------ deal.II/examples/step-22/step-22.cc | 5 +++++ deal.II/examples/step-24/step-24.cc | 22 ++++++++++++++++------ 3 files changed, 43 insertions(+), 12 deletions(-) diff --git a/deal.II/examples/step-21/step-21.cc b/deal.II/examples/step-21/step-21.cc index 4e4470e3cf..a009908aa1 100644 --- a/deal.II/examples/step-21/step-21.cc +++ b/deal.II/examples/step-21/step-21.cc @@ -291,18 +291,29 @@ InitialValues::vector_value (const Point &p, // @sect4{Single curving crack permeability} - // The first function for the permeability - // was the one that models a single curving - // crack. It was already used at the end of - // step-20, and its functional form is given - // in the introduction of the present - // tutorial program: + // The first function for the + // permeability was the one that + // models a single curving crack. It + // was already used at the end of + // step-20, and its functional form + // is given in the introduction of + // the present tutorial program. As + // in some previous programs, we have + // to declare a (seemingly + // unnecessary) default constructor + // of the KInverse class to avoid + // warnings from some compilers: namespace SingleCurvingCrack { template class KInverse : public TensorFunction<2,dim> { public: + KInverse () + : + TensorFunction<2,dim> () + {} + virtual void value_list (const std::vector > &points, std::vector > &values) const; }; @@ -392,6 +403,11 @@ namespace RandomMedium class KInverse : public TensorFunction<2,dim> { public: + KInverse () + : + TensorFunction<2,dim> () + {} + virtual void value_list (const std::vector > &points, std::vector > &values) const; diff --git a/deal.II/examples/step-22/step-22.cc b/deal.II/examples/step-22/step-22.cc index 774ea0025b..d6cc6b48db 100644 --- a/deal.II/examples/step-22/step-22.cc +++ b/deal.II/examples/step-22/step-22.cc @@ -266,6 +266,11 @@ namespace RandomMedium class KInverse : public TensorFunction<2,dim> { public: + KInverse () + : + TensorFunction<2,dim>() + {} + virtual void value_list (const std::vector > &points, std::vector > &values) const; diff --git a/deal.II/examples/step-24/step-24.cc b/deal.II/examples/step-24/step-24.cc index 0b977696b6..c65c6a5c82 100644 --- a/deal.II/examples/step-24/step-24.cc +++ b/deal.II/examples/step-24/step-24.cc @@ -159,7 +159,10 @@ template class InitialValuesP : public Function { public: - InitialValuesP () : Function() {} + InitialValuesP () + : + Function() + {} virtual double value (const Point &p, const unsigned int component = 0) const; @@ -167,6 +170,13 @@ class InitialValuesP : public Function private: struct Source { + Source (const Point &l, + const double r) + : + location (l), + radius (r) + {} + const Point location; const double radius; }; @@ -177,11 +187,11 @@ template double InitialValuesP::value (const Point &p, const unsigned int /*component*/) const { - static const Source sources[] = {{ Point (0, 0), 0.025 }, - { Point (-0.135, 0), 0.05 }, - { Point (0.17, 0), 0.03 }, - { Point (-0.25, 0), 0.02 }, - { Point (-0.05, -0.15), 0.015 }}; + static const Source sources[] = {Source (Point (0, 0), 0.025), + Source (Point (-0.135, 0), 0.05), + Source (Point (0.17, 0), 0.03), + Source (Point (-0.25, 0), 0.02), + Source (Point (-0.05, -0.15), 0.015)}; static const unsigned int n_sources = sizeof(sources)/sizeof(sources[0]); for (unsigned int i=0; i