]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Implement get_interpolation_matrix on FE_Nothing. 4126/head
authorSimon Sticko <simon.sticko@it.uu.se>
Tue, 28 Mar 2017 08:45:45 +0000 (10:45 +0200)
committerSimon Sticko <simon.sticko@it.uu.se>
Tue, 28 Mar 2017 08:45:45 +0000 (10:45 +0200)
include/deal.II/fe/fe_nothing.h
source/fe/fe_nothing.cc

index 34351ef5fe249c892541584f20a50a79bfcadd7d..8c98c12dc379845edea15bb94e9f6ac27a92339d 100644 (file)
@@ -215,6 +215,16 @@ public:
   bool
   hp_constraints_are_implemented () const;
 
+  /**
+   * Return the matrix interpolating from the given finite element to the
+   * present one. Since the current finite element has no degrees of freedom, the
+   * interpolation matrix is necessarily empty.
+   */
+  virtual
+  void
+  get_interpolation_matrix (const FiniteElement<dim,spacedim> &source_fe,
+                            FullMatrix<double>       &interpolation_matrix) const;
+
   /**
    * Return the matrix interpolating from a face of of one element to the face
    * of the neighboring element. The size of the matrix is then
index 3ed5782264b12c38bae96cb6dd30d5862531da2a..9a4fb881658f5de7974cb43eb7c7f5cc22c748d6 100644 (file)
@@ -239,6 +239,27 @@ hp_constraints_are_implemented () const
 }
 
 
+
+template <int dim, int spacedim>
+void
+FE_Nothing<dim,spacedim>::
+get_interpolation_matrix (const FiniteElement<dim,spacedim> &/*source_fe*/,
+                          FullMatrix<double>       &interpolation_matrix) const
+{
+  // Since this element has no dofs,
+  // the interpolation matrix is necessarily empty.
+  (void)interpolation_matrix;
+
+  Assert (interpolation_matrix.m() == 0,
+          ExcDimensionMismatch (interpolation_matrix.m(),
+                                0));
+  Assert (interpolation_matrix.n() == 0,
+          ExcDimensionMismatch (interpolation_matrix.n(),
+                                0));
+}
+
+
+
 template <int dim, int spacedim>
 void
 FE_Nothing<dim,spacedim>::

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.