]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
component -system index pre-implemented
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Feb 1999 18:26:26 +0000 (18:26 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Feb 1999 18:26:26 +0000 (18:26 +0000)
git-svn-id: https://svn.dealii.org/trunk@793 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe.h

index 9864d3dd4a8a105d8dd3de0497c02dc49c50ee84..f1ade0acd49b33a883c9cc837a52a37899a52035 100644 (file)
@@ -158,10 +158,10 @@ struct FiniteElementData<2> {
                                      */
     const unsigned int n_transform_functions;
 
-                                  /**
-                                   * Number of components.
-                                   */
-  const unsigned int n_components;
+                                    /**
+                                     * Number of components.
+                                     */
+    const unsigned int n_components;
 
                                     /**
                                      * Default constructor. Constructs an element
@@ -285,6 +285,18 @@ struct FiniteElementBase :
                                      */
     bool operator == (const FiniteElementBase<dim> &) const;
 
+                                    /**
+                                     * Compute system index from components.
+                                     */
+    unsigned component_to_system_index (unsigned component,
+                                       unsigned component_index) const;
+  
+                                    /**
+                                     * Compute component and index from system index.
+                                     */
+    pair<unsigned,unsigned> system_to_component_index (unsigned index) const; 
+    
+
                                     /**
                                      * Exception
                                      */
@@ -1134,17 +1146,6 @@ class FiniteElement : public FiniteElementBase<dim> {
                                        const Boundary<dim> &boundary, 
                                        dFMatrix            &local_mass_matrix) const =0;
 
-                                  /**
-                                   * Compute system index from components.
-                                   */
-  virtual unsigned component_to_system_index (unsigned component,
-                                             unsigned component_index) const;
-  
-                                  /**
-                                   * Compute component and index from system index.
-                                   */
-  virtual pair<unsigned,unsigned> system_to_component_index (unsigned index) const; 
-    
                                     /**
                                      * Exception
                                      */
@@ -1163,10 +1164,26 @@ class FiniteElement : public FiniteElementBase<dim> {
     DeclException0 (ExcJacobiDeterminantHasWrongSign);
 };
 
+template <int dim>
+inline unsigned
+FiniteElementBase<dim>::component_to_system_index (unsigned component,
+                                                  unsigned component_index) const
+{
+  Assert(false, ExcInvalidIndex(component));
+  return component_index;
+}
+
 
+template <int dim>  
+inline pair<unsigned,unsigned>
+FiniteElementBase<dim>::system_to_component_index (unsigned index) const
+{
+  Assert(false, ExcInvalidIndex(index));
+  return pair<unsigned,unsigned>(0,0);
+}
 
+    
 
-  
 /*----------------------------   fe.h     ---------------------------*/
 /* end of #ifndef __fe_H */
 #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.