]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Compile TransfiniteInterpolationManifold<1> in the library. 4535/head
authorDavid Wells <wellsd2@rpi.edu>
Wed, 21 Jun 2017 02:15:25 +0000 (22:15 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 21 Jun 2017 02:15:25 +0000 (22:15 -0400)
In addition, disable usage of the class by throwing an exception.

This class is not as useful in 1D as it is in higher spatial dimensions, but
compiling it in the library improves generic programming (i.e., one can write a
solver that runs in 1D and 2D and on a 2D execution path can use
TransfiniteInterpolationManifold).

include/deal.II/grid/tria_accessor.h
include/deal.II/grid/tria_accessor.templates.h
source/grid/manifold_lib.cc
source/grid/manifold_lib.inst.in

index 6bf44eacbccd2ad911ad2992f97d05fce11f19eb..f4ae231bed8a679da52805fbcd5bf6851d82df58 100644 (file)
@@ -558,6 +558,11 @@ public:
    * has children.
    */
   bool has_children () const;
+
+  /**
+   * Dummy function that always returns numbers::invalid_manifold_id.
+   */
+  types::manifold_id manifold_id () const;
 };
 
 
index 0e2721dd5a80ff18b6f234f71c59828dd61152d0..9d6252cad119e8deacb6cf425725ce429ccc5c4f 100644 (file)
@@ -511,6 +511,15 @@ InvalidAccessor<structdim, dim, spacedim>::operator -- () const
 
 
 
+template <int structdim, int dim, int spacedim>
+types::manifold_id
+InvalidAccessor<structdim, dim, spacedim>::manifold_id () const
+{
+  return numbers::invalid_manifold_id;
+}
+
+
+
 /*------------------------ Functions: TriaAccessor ---------------------------*/
 
 
index 5566da7ea882be6c4a21599e3852fe9085e38005..6a806d0cda5a5ca7c9e21e7b163fc6d375be318b 100644 (file)
@@ -630,7 +630,9 @@ TransfiniteInterpolationManifold<dim,spacedim>::TransfiniteInterpolationManifold
   :
   triangulation(nullptr),
   level_coarse (-1)
-{}
+{
+  AssertThrow(dim > 1, ExcNotImplemented());
+}
 
 
 
@@ -675,7 +677,7 @@ namespace
   Point<AccessorType::space_dimension>
   compute_transfinite_interpolation(const AccessorType &cell,
                                     const Point<1> &chart_point,
-                                    const bool      cell_is_flat)
+                                    const bool      /*cell_is_flat*/)
   {
     return cell.vertex(0) * (1.-chart_point[0]) + cell.vertex(1) * chart_point[0];
   }
index b3387bf72023c68f64b379c5fdd82d8111b0dec6..d9d00a7c7b77045286cb9e80cc7b4265e682f451 100644 (file)
@@ -23,10 +23,8 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS
 #if deal_II_dimension <= deal_II_space_dimension
     template class PolarManifold<deal_II_dimension, deal_II_space_dimension>;
     template class SphericalManifold<deal_II_dimension, deal_II_space_dimension>;
-#if deal_II_dimension > 1
     template class TransfiniteInterpolationManifold<deal_II_dimension, deal_II_space_dimension>;
 #endif
-#endif
 #if deal_II_dimension == deal_II_space_dimension
     template class TorusManifold<deal_II_dimension>;
 #endif

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.