]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement several functions, in part as dummies, which were still missing in the...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Jan 2000 16:51:15 +0000 (16:51 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Jan 2000 16:51:15 +0000 (16:51 +0000)
git-svn-id: https://svn.dealii.org/trunk@2272 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/mg_dof_accessor.cc
deal.II/deal.II/source/fe/fe_lib.criss_cross.cc
deal.II/deal.II/source/fe/fe_lib.cubic.cc
deal.II/deal.II/source/fe/fe_lib.quartic.cc
deal.II/deal.II/source/fe/q1_mapping.cc
deal.II/deal.II/source/multigrid/mg_dof_accessor.cc

index 3af8742a173cfcd9aac822422ec9fbc564a628a2..9b0b78cf2e6e6a270c7fa18b23c0ed450a9aeb04 100644 (file)
@@ -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
index 9c38373122c28080c64ea6e92f54ee32f43c9792..43c494cdd9adb369802bf1521dfd54358b34a6a7 100644 (file)
@@ -1145,6 +1145,172 @@ void FECrissCross<dim>::fill_fe_values (const DoFHandler<dim>::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<bool>())
+{
+  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<double> &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FECrissCross<3>::get_unit_support_points (vector<Point<3> > &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FECrissCross<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &,
+                                 vector<Point<3> >  &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FECrissCross<3>::get_face_support_points (const typename DoFHandler<3>::face_iterator &,
+                                      vector<Point<3> >  &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+
+template <>
+void FECrissCross<3>::get_face_jacobians (const DoFHandler<3>::face_iterator &,
+                                         const vector<Point<2> > &,
+                                         vector<double>      &) const {
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FECrissCross<3>::get_subface_jacobians (const DoFHandler<3>::face_iterator &,
+                                            const unsigned int,
+                                            const vector<Point<2> > &,
+                                            vector<double>      &) const {
+  Assert (false, ExcNotImplemented());
+};
+
+
+template <>
+void FECrissCross<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &,
+                                         const unsigned int,
+                                         const vector<Point<2> > &,
+                                         vector<Point<3> >       &) const {
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FECrissCross<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &,
+                                         const unsigned int,
+                                         const unsigned int,
+                                         const vector<Point<2> > &,
+                                         vector<Point<3> >       &) const {
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FECrissCross<3>::fill_fe_values (const DoFHandler<3>::cell_iterator &,
+                                     const vector<Point<3> > &,
+                                     vector<Tensor<2,3> >    &,
+                                     const bool            ,
+                                     vector<Tensor<3,3> > &,
+                                     const bool            ,
+                                     vector<Point<3> >    &,
+                                     const bool            ,
+                                     vector<Point<3> >    &,
+                                     const bool            ,
+                                     const FullMatrix<double>       &,
+                                     const vector<vector<Tensor<1,3> > > &) 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* ------------------------------------*/
index 79f7324b6122eb21d85384340a76217bd05c318c..c6980421df0839a16735619af40c3d990b799501 100644 (file)
@@ -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<dofs_per_cell, ExcIndexRange(i, 0, dofs_per_cell));
 
@@ -10566,7 +10571,7 @@ xi*xi+6561.0/2.0*xi*xi*xi)*eta*eta+(-6561.0/8.0*xi+6561.0/2.0*xi*xi-19683.0/8.0
 template <>
 Tensor<1,3>
 FEQ3<3>::shape_grad (const unsigned int i,
-                              const Point<3>    &p) const
+                    const Point<3>    &p) const
 {
   Assert (i<dofs_per_cell, ExcIndexRange(i, 0, dofs_per_cell));
 
@@ -10781,7 +10786,7 @@ FEQ3<3>::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<dofs_per_cell, ExcIndexRange(i, 0, dofs_per_cell));
 
@@ -11397,7 +11402,7 @@ return_value[2][2] = 2.0*(729.0/2.0*xi-1458.0*xi*xi+2187.0/2.0*xi*xi*xi)*eta+2.0
 template <>
 void
 FEQ3<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &,
-                                     FullMatrix<double> &local_mass_matrix) const
+                               FullMatrix<double> &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<Point<3> > &unit_points) const {
+void FEQ3<3>::get_unit_support_points (vector<Point<3> > &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<Point<3> > &unit_points) const {
 
 template <>
 void FEQ3<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &cell,
-                                       vector<Point<3> >  &support_points) const {
+                                 vector<Point<3> >  &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<Point<3> >  &support_points) const {
+                                      vector<Point<3> >  &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<bool> (1, false))
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+FEQ3<3>::FEQ3 (const int) :
+               FEQ1Mapping<3> (0, 0, 0, 64, 1,
+                               vector<bool> (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<double> &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FEQ3<3>::get_unit_support_points (vector<Point<3> > &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FEQ3<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &,
+                                 vector<Point<3> >  &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FEQ3<3>::get_face_support_points (const typename DoFHandler<3>::face_iterator &,
+                                      vector<Point<3> >  &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
 #endif // 0
+#endif // deal_II_dimension == 3
 
 
 // explicit instantiations
index 09988f107a9f502b3f78405e643118d5144b4822..ccc9b75edd2ed7b4b1d139733a5df5e3e1139b2d 100644 (file)
@@ -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<bool> (1, false))
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+FEQ4<3>::FEQ4 (const int) :
+               FEQ1Mapping<3> (0, 0, 0, 64, 1,
+                               vector<bool> (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<double> &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FEQ4<3>::get_unit_support_points (vector<Point<3> > &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FEQ4<3>::get_support_points (const typename DoFHandler<3>::cell_iterator &,
+                                 vector<Point<3> >  &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+template <>
+void FEQ4<3>::get_face_support_points (const typename DoFHandler<3>::face_iterator &,
+                                      vector<Point<3> >  &) const
+{
+  Assert (false, ExcNotImplemented());
+};
+
+
+
+#endif // deal_II_dimension == 3
+
+
+
+
 
 
 
index a69a63d74a0adeefc69efa0d6c9bddab739f7026..06acd7e7dc09a8e623eb71852e614b9e60e9b2c0 100644 (file)
@@ -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<Point<0> > &,
-                                           vector<Point<1> > &) const {
+                                        const unsigned int,
+                                        const unsigned int,
+                                        const vector<Point<0> > &,
+                                        vector<Point<1> > &) const {
   Assert (false, ExcInternalError());
 };
 
 
+
 template <>
 void FEQ1Mapping<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &cell,
-                                        const vector<Point<1> > &unit_points,
-                                        vector<Tensor<2,1> >    &jacobians,
-                                        const bool            compute_jacobians,
-                                        vector<Tensor<3,1> > &jacobians_grad,
-                                        const bool            compute_jacobians_grad,
-                                        vector<Point<1> >    &support_points,
-                                        const bool            compute_support_points,
-                                        vector<Point<1> >    &q_points,
-                                        const bool            compute_q_points,
-                                        const FullMatrix<double>       &shape_values_transform,
-                                        const vector<vector<Tensor<1,1> > > &shape_gradients_transform) const {
+                                    const vector<Point<1> > &unit_points,
+                                    vector<Tensor<2,1> >    &jacobians,
+                                    const bool            compute_jacobians,
+                                    vector<Tensor<3,1> > &jacobians_grad,
+                                    const bool            compute_jacobians_grad,
+                                    vector<Point<1> >    &support_points,
+                                    const bool            compute_support_points,
+                                    vector<Point<1> >    &q_points,
+                                    const bool            compute_q_points,
+                                    const FullMatrix<double>       &shape_values_transform,
+                                    const vector<vector<Tensor<1,1> > > &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 <int dim>
 void FEQ1Mapping<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
-                                          const vector<Point<dim> >            &unit_points,
-                                          vector<Tensor<2,dim> >               &jacobians,
-                                          const bool              compute_jacobians,
-                                          vector<Tensor<3,dim> > &jacobians_grad,
-                                          const bool              compute_jacobians_grad,
-                                          vector<Point<dim> > &support_points,
-                                          const bool           compute_support_points,
-                                          vector<Point<dim> > &q_points,
-                                          const bool           compute_q_points,
-                                          const FullMatrix<double>      &shape_values_transform,
-                                          const vector<vector<Tensor<1,dim> > > &/*shape_grad_transform*/) const
+                                      const vector<Point<dim> >            &unit_points,
+                                      vector<Tensor<2,dim> >               &jacobians,
+                                      const bool              compute_jacobians,
+                                      vector<Tensor<3,dim> > &jacobians_grad,
+                                      const bool              compute_jacobians_grad,
+                                      vector<Point<dim> > &support_points,
+                                      const bool           compute_support_points,
+                                      vector<Point<dim> > &q_points,
+                                      const bool           compute_q_points,
+                                      const FullMatrix<double>      &shape_values_transform,
+                                      const vector<vector<Tensor<1,dim> > > &/*shape_grad_transform*/) const
 {
   Assert ((!compute_jacobians) || (jacobians.size() == unit_points.size()),
          ExcWrongFieldDimension(jacobians.size(), unit_points.size()));
index 3af8742a173cfcd9aac822422ec9fbc564a628a2..9b0b78cf2e6e6a270c7fa18b23c0ed450a9aeb04 100644 (file)
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.