From: wolf Date: Wed, 26 Jan 2000 16:51:15 +0000 (+0000) Subject: Implement several functions, in part as dummies, which were still missing in the... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94d1ce71b30801e01b257f4792b03e9b5e1af629;p=dealii-svn.git Implement several functions, in part as dummies, which were still missing in the 3d part. They were not needed previously since they were not accessed, but they are now if the library is compiler in shared mode. git-svn-id: https://svn.dealii.org/trunk@2272 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/mg_dof_accessor.cc b/deal.II/deal.II/source/dofs/mg_dof_accessor.cc index 3af8742a17..9b0b78cf2e 100644 --- a/deal.II/deal.II/source/dofs/mg_dof_accessor.cc +++ b/deal.II/deal.II/source/dofs/mg_dof_accessor.cc @@ -665,6 +665,19 @@ MGDoFCellAccessor<2>::face (const unsigned int i) const +#if deal_II_dimension == 3 + +template <> +MGDoFCellAccessor<3>::face_iterator +MGDoFCellAccessor<3>::face (const unsigned int i) const +{ + return quad(i); +}; + +#endif + + + // explicit instantiations diff --git a/deal.II/deal.II/source/fe/fe_lib.criss_cross.cc b/deal.II/deal.II/source/fe/fe_lib.criss_cross.cc index 9c38373122..43c494cdd9 100644 --- a/deal.II/deal.II/source/fe/fe_lib.criss_cross.cc +++ b/deal.II/deal.II/source/fe/fe_lib.criss_cross.cc @@ -1145,6 +1145,172 @@ void FECrissCross::fill_fe_values (const DoFHandler::cell_iterator &ce +#if deal_II_dimension == 3 + +// provide dummy implementations of the functions above. the reason is +// that true implementations would simply be too large (several 10.000 +// lines of code) for today's compilers and computers. + +template <> +FECrissCross<3>::FECrissCross () : + // set more or less invalid data + FiniteElement<3> (FiniteElementData<3> (0,0,0,0,0,0), + vector()) +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +double +FECrissCross<3>::shape_value (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return 0; +}; + + + +template <> +Tensor<1,3> +FECrissCross<3>::shape_grad (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return Tensor<1,3>(); +}; + + + +template <> +Tensor<2,3> +FECrissCross<3>::shape_grad_grad (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return Tensor<2,3>(); +}; + + + +template <> +void +FECrissCross<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &, + FullMatrix &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FECrissCross<3>::get_unit_support_points (vector > &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FECrissCross<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &, + vector > &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FECrissCross<3>::get_face_support_points (const typename DoFHandler<3>::face_iterator &, + vector > &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + + +template <> +void FECrissCross<3>::get_face_jacobians (const DoFHandler<3>::face_iterator &, + const vector > &, + vector &) const { + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FECrissCross<3>::get_subface_jacobians (const DoFHandler<3>::face_iterator &, + const unsigned int, + const vector > &, + vector &) const { + Assert (false, ExcNotImplemented()); +}; + + +template <> +void FECrissCross<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &, + const unsigned int, + const vector > &, + vector > &) const { + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FECrissCross<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &, + const unsigned int, + const unsigned int, + const vector > &, + vector > &) const { + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FECrissCross<3>::fill_fe_values (const DoFHandler<3>::cell_iterator &, + const vector > &, + vector > &, + const bool , + vector > &, + const bool , + vector > &, + const bool , + vector > &, + const bool , + const FullMatrix &, + const vector > > &) const { + Assert (false, ExcNotImplemented()); +}; + + + +template <> +double FECrissCross<3>::shape_value_transform (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return 0; +}; + + + +template <> +Tensor<1,3> FECrissCross<3>::shape_grad_transform (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return Point<3>(); +}; + + +#endif // deal_II_dimension == 3 + + /*--------------------------- QCrissCross* ------------------------------------*/ diff --git a/deal.II/deal.II/source/fe/fe_lib.cubic.cc b/deal.II/deal.II/source/fe/fe_lib.cubic.cc index 79f7324b61..c6980421df 100644 --- a/deal.II/deal.II/source/fe/fe_lib.cubic.cc +++ b/deal.II/deal.II/source/fe/fe_lib.cubic.cc @@ -1600,11 +1600,15 @@ void FEQ3<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face, -#if 0 // ignore the following, since it doesn't compile properly. it simply - // is too large #if deal_II_dimension == 3 +// ignore the following, since it doesn't compile properly. it simply +// is too large. instead, in the `else' branch of the `if 0', we +// provide dummy implementations. + +#if 0 + template <> FEQ3<3>::FEQ3 () : FEQ1Mapping<3> (1, 2, 4, 8, 1, @@ -1879,7 +1883,8 @@ FEQ3<3>::FEQ3 (const int) : template <> -void FEQ3<3>::initialize_matrices () { +void FEQ3<3>::initialize_matrices () +{ prolongation[0](0,0) = 1.0; prolongation[0](1,0) = -1.0/16.0; prolongation[0](1,1) = -1.0/16.0; @@ -9953,7 +9958,7 @@ void FEQ3<3>::initialize_matrices () { template <> double FEQ3<3>::shape_value (const unsigned int i, - const Point<3> &p) const + const Point<3> &p) const { Assert (i Tensor<1,3> FEQ3<3>::shape_grad (const unsigned int i, - const Point<3> &p) const + const Point<3> &p) const { Assert (i::shape_grad (const unsigned int i, template <> Tensor<2,3> FEQ3<3>::shape_grad_grad (const unsigned int i, - const Point<3> &p) const + const Point<3> &p) const { Assert (i void FEQ3<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &, - FullMatrix &local_mass_matrix) const + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == dofs_per_cell, ExcWrongFieldDimension(local_mass_matrix.n(),dofs_per_cell)); @@ -11410,7 +11415,8 @@ FEQ3<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &, template <> -void FEQ3<3>::get_unit_support_points (vector > &unit_points) const { +void FEQ3<3>::get_unit_support_points (vector > &unit_points) const +{ Assert (unit_points.size() == dofs_per_cell, ExcWrongFieldDimension (unit_points.size(), dofs_per_cell)); unit_points[0] = Point<3>(0, 0, 0); @@ -11483,7 +11489,8 @@ void FEQ3<3>::get_unit_support_points (vector > &unit_points) const { template <> void FEQ3<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &cell, - vector > &support_points) const { + vector > &support_points) const +{ Assert (support_points.size() == dofs_per_cell, ExcWrongFieldDimension (support_points.size(), dofs_per_cell)); @@ -11861,7 +11868,8 @@ void FEQ3<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &c template <> void FEQ3<3>::get_face_support_points (const typename DoFHandler<3>::face_iterator &face, - vector > &support_points) const { + vector > &support_points) const +{ Assert (support_points.size() == dofs_per_face, ExcWrongFieldDimension (support_points.size(), dofs_per_face)); @@ -11897,8 +11905,110 @@ void FEQ3<3>::get_face_support_points (const typename DoFHandler<3>::face_iterat -#endif // deal_II_dimension == 3 +#else // 0 + +// provide dummy implementations of the functions above. for the +// reason, see the beginning of the `if 0' conditional + +template <> +FEQ3<3>::FEQ3 () : + FEQ1Mapping<3> (1, 2, 4, 8, 1, + vector (1, false)) +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +FEQ3<3>::FEQ3 (const int) : + FEQ1Mapping<3> (0, 0, 0, 64, 1, + vector (1, false)) +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FEQ3<3>::initialize_matrices () +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +double +FEQ3<3>::shape_value (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return 0; +}; + + + +template <> +Tensor<1,3> +FEQ3<3>::shape_grad (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return Tensor<1,3>(); +}; + + + +template <> +Tensor<2,3> +FEQ3<3>::shape_grad_grad (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return Tensor<2,3>(); +}; + + + +template <> +void +FEQ3<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &, + FullMatrix &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FEQ3<3>::get_unit_support_points (vector > &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FEQ3<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &, + vector > &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FEQ3<3>::get_face_support_points (const typename DoFHandler<3>::face_iterator &, + vector > &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + #endif // 0 +#endif // deal_II_dimension == 3 // explicit instantiations diff --git a/deal.II/deal.II/source/fe/fe_lib.quartic.cc b/deal.II/deal.II/source/fe/fe_lib.quartic.cc index 09988f107a..ccc9b75edd 100644 --- a/deal.II/deal.II/source/fe/fe_lib.quartic.cc +++ b/deal.II/deal.II/source/fe/fe_lib.quartic.cc @@ -2768,6 +2768,114 @@ void FEQ4<2>::get_face_support_points (const DoFHandler<2>::face_iterator &face, +#if deal_II_dimension == 3 + +// provide dummy implementations of the functions above. the reason is +// that true implementations would simply be too large (several 10.000 +// lines of code) for today's compilers and computers. + +template <> +FEQ4<3>::FEQ4 () : + FEQ1Mapping<3> (1, 2, 4, 8, 1, + vector (1, false)) +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +FEQ4<3>::FEQ4 (const int) : + FEQ1Mapping<3> (0, 0, 0, 64, 1, + vector (1, false)) +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FEQ4<3>::initialize_matrices () +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +double +FEQ4<3>::shape_value (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return 0; +}; + + + +template <> +Tensor<1,3> +FEQ4<3>::shape_grad (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return Tensor<1,3>(); +}; + + + +template <> +Tensor<2,3> +FEQ4<3>::shape_grad_grad (const unsigned int, + const Point<3> &) const +{ + Assert (false, ExcNotImplemented()); + return Tensor<2,3>(); +}; + + + +template <> +void +FEQ4<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &, + FullMatrix &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FEQ4<3>::get_unit_support_points (vector > &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FEQ4<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &, + vector > &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +template <> +void FEQ4<3>::get_face_support_points (const typename DoFHandler<3>::face_iterator &, + vector > &) const +{ + Assert (false, ExcNotImplemented()); +}; + + + +#endif // deal_II_dimension == 3 + + + + diff --git a/deal.II/deal.II/source/fe/q1_mapping.cc b/deal.II/deal.II/source/fe/q1_mapping.cc index a69a63d74a..06acd7e7dc 100644 --- a/deal.II/deal.II/source/fe/q1_mapping.cc +++ b/deal.II/deal.II/source/fe/q1_mapping.cc @@ -103,27 +103,28 @@ void FEQ1Mapping<1>::get_normal_vectors (const DoFHandler<1>::cell_iterator &, template <> void FEQ1Mapping<1>::get_normal_vectors (const DoFHandler<1>::cell_iterator &, - const unsigned int, - const unsigned int, - const vector > &, - vector > &) const { + const unsigned int, + const unsigned int, + const vector > &, + vector > &) const { Assert (false, ExcInternalError()); }; + template <> void FEQ1Mapping<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &cell, - const vector > &unit_points, - vector > &jacobians, - const bool compute_jacobians, - vector > &jacobians_grad, - const bool compute_jacobians_grad, - vector > &support_points, - const bool compute_support_points, - vector > &q_points, - const bool compute_q_points, - const FullMatrix &shape_values_transform, - const vector > > &shape_gradients_transform) const { + const vector > &unit_points, + vector > &jacobians, + const bool compute_jacobians, + vector > &jacobians_grad, + const bool compute_jacobians_grad, + vector > &support_points, + const bool compute_support_points, + vector > &q_points, + const bool compute_q_points, + const FullMatrix &shape_values_transform, + const vector > > &shape_gradients_transform) const { // simply pass down FiniteElement<1>::fill_fe_values (cell, unit_points, jacobians, compute_jacobians, @@ -554,17 +555,17 @@ void FEQ1Mapping<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &/*c template void FEQ1Mapping::fill_fe_values (const DoFHandler::cell_iterator &cell, - const vector > &unit_points, - vector > &jacobians, - const bool compute_jacobians, - vector > &jacobians_grad, - const bool compute_jacobians_grad, - vector > &support_points, - const bool compute_support_points, - vector > &q_points, - const bool compute_q_points, - const FullMatrix &shape_values_transform, - const vector > > &/*shape_grad_transform*/) const + const vector > &unit_points, + vector > &jacobians, + const bool compute_jacobians, + vector > &jacobians_grad, + const bool compute_jacobians_grad, + vector > &support_points, + const bool compute_support_points, + vector > &q_points, + const bool compute_q_points, + const FullMatrix &shape_values_transform, + const vector > > &/*shape_grad_transform*/) const { Assert ((!compute_jacobians) || (jacobians.size() == unit_points.size()), ExcWrongFieldDimension(jacobians.size(), unit_points.size())); diff --git a/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc b/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc index 3af8742a17..9b0b78cf2e 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc @@ -665,6 +665,19 @@ MGDoFCellAccessor<2>::face (const unsigned int i) const +#if deal_II_dimension == 3 + +template <> +MGDoFCellAccessor<3>::face_iterator +MGDoFCellAccessor<3>::face (const unsigned int i) const +{ + return quad(i); +}; + +#endif + + + // explicit instantiations