From: cvs Date: Tue, 19 Oct 1999 12:28:01 +0000 (+0000) Subject: Changes and conditional compilations to make the library work with gcc2.95.1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36561efac1bf844ddc680a6f324f5c9e4b7c8161;p=dealii-svn.git Changes and conditional compilations to make the library work with gcc2.95.1 git-svn-id: https://svn.dealii.org/trunk@1781 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/data_out_base.h b/deal.II/base/include/base/data_out_base.h index 9a3c39b4c3..f459eb677f 100644 --- a/deal.II/base/include/base/data_out_base.h +++ b/deal.II/base/include/base/data_out_base.h @@ -250,7 +250,11 @@ class DataOutBase * is the same as for cells * in the triangulation. */ +#if ! ((__GNUC__==2) && (__GNUC_MINOR__==95)) Point vertices[GeometryInfo::vertices_per_cell]; +#else + Point vertices[1< { */ static const unsigned int rank = 1; +#if (__GNUC__==2) && (__GNUC_MINOR__ < 95) /** * Unnecessary variable, only used in * the declaration of #array_type#. @@ -67,7 +68,7 @@ class Tensor<1,dim> { * we need it presently. */ static const unsigned int array_size = ((dim!=0) ? (dim) : 1); - + /** * Declare an array type which can * be used to initialize statically @@ -77,7 +78,19 @@ class Tensor<1,dim> { * as in the #TensorBase<1,dim># class. */ typedef double array_type[array_size]; +#else + /** + * Declare an array type which can + * be used to initialize statically + * an object of this type. + * + * Use the same condition for #dim==0# + * as in the #TensorBase<1,dim># class. + */ + typedef double array_type[(dim!=0) ? dim : 1]; +#endif + /** * Constructor. Initialize all entries * to zero if #initialize==true#; this diff --git a/deal.II/deal.II/include/dofs/dof_handler.h b/deal.II/deal.II/include/dofs/dof_handler.h index d0c85d9825..95d9bfd3bb 100644 --- a/deal.II/deal.II/include/dofs/dof_handler.h +++ b/deal.II/deal.II/include/dofs/dof_handler.h @@ -1435,9 +1435,19 @@ class DoFHandler : public Subscriptor, vector vertex_dofs; +#if (__GNUC__==2) && (__GNUC_MINOR__ < 95) + // this seems to be disallowed + // by the standard, so gcc2.95 + // does not accept it friend class DoFObjectAccessor<1, dim>; friend class DoFObjectAccessor<2, dim>; friend class DoFObjectAccessor<3, dim>; +#else + // this, however, may grant + // access to too many classes, + // but ... + template friend class DoFObjectAccessor; +#endif }; diff --git a/deal.II/deal.II/include/dofs/mg_dof_handler.h b/deal.II/deal.II/include/dofs/mg_dof_handler.h index db852371c7..22705878e5 100644 --- a/deal.II/deal.II/include/dofs/mg_dof_handler.h +++ b/deal.II/deal.II/include/dofs/mg_dof_handler.h @@ -958,9 +958,19 @@ class MGDoFHandler */ vector mg_used_dofs; +#if (__GNUC__==2) && (__GNUC_MINOR__ < 95) + // this seems to be disallowed + // by the standard, so gcc2.95 + // does not accept it friend class MGDoFObjectAccessor<1, dim>; friend class MGDoFObjectAccessor<2, dim>; friend class MGDoFObjectAccessor<3, dim>; +#else + // this, however, may grant + // access to too many classes, + // but ... + template friend class MGDoFObjectAccessor; +#endif }; diff --git a/deal.II/deal.II/include/fe/fe.h b/deal.II/deal.II/include/fe/fe.h index c1161292d0..e609614da3 100644 --- a/deal.II/deal.II/include/fe/fe.h +++ b/deal.II/deal.II/include/fe/fe.h @@ -420,7 +420,11 @@ class FiniteElementBase : public Subscriptor, * matrix are discarded and will not fill * up the transfer matrix. */ +#if !((__GNUC__==2) && (__GNUC_MINOR__==95)) FullMatrix restriction[GeometryInfo::children_per_cell]; +#else + FullMatrix restriction[1 << dim]; +#endif /** * Have #N=2^dim# matrices keeping the @@ -458,7 +462,11 @@ class FiniteElementBase : public Subscriptor, * matrix are discarded and will not fill * up the transfer matrix. */ +#if ! ((__GNUC__==2) && (__GNUC_MINOR__==95)) FullMatrix prolongation[GeometryInfo::children_per_cell]; +#else + FullMatrix prolongation[1 << dim]; +#endif /** * Specify the constraints which the diff --git a/deal.II/deal.II/include/grid/grid_out.h b/deal.II/deal.II/include/grid/grid_out.h index 8bcbf341b2..4e688c6cc1 100644 --- a/deal.II/deal.II/include/grid/grid_out.h +++ b/deal.II/deal.II/include/grid/grid_out.h @@ -316,12 +316,14 @@ class GridOut struct EpsFlags : public EpsFlagsBase {}; +#if (__GNUC__==2) && (__GNUC_MINOR__ < 95) + /** * Flags specific to the output of * grids in three space dimensions. */ template <> - struct EpsFlags<3> : public EpsFlagsBase + struct EpsFlags<3> : public EpsFlagsBase { /** * Angle of the line origin-viewer @@ -355,6 +357,9 @@ class GridOut azimut_angle (azimut_angle), turn_angle (turn_angle) {}; }; +#else +# warning Not implemented for gcc2.95 +#endif diff --git a/deal.II/deal.II/include/grid/intergrid_map.h b/deal.II/deal.II/include/grid/intergrid_map.h index 6233332d0b..95bd7cd45b 100644 --- a/deal.II/deal.II/include/grid/intergrid_map.h +++ b/deal.II/deal.II/include/grid/intergrid_map.h @@ -99,12 +99,32 @@ template