From efbfe3d34ae9c9bb123d9123ab01daedcfeb5ce2 Mon Sep 17 00:00:00 2001 From: guido Date: Fri, 12 Feb 1999 18:26:26 +0000 Subject: [PATCH] component -system index pre-implemented git-svn-id: https://svn.dealii.org/trunk@793 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/fe/fe.h | 49 ++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/deal.II/deal.II/include/fe/fe.h b/deal.II/deal.II/include/fe/fe.h index 9864d3dd4a..f1ade0acd4 100644 --- a/deal.II/deal.II/include/fe/fe.h +++ b/deal.II/deal.II/include/fe/fe.h @@ -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 &) 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 system_to_component_index (unsigned index) const; + + /** * Exception */ @@ -1134,17 +1146,6 @@ class FiniteElement : public FiniteElementBase { const Boundary &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 system_to_component_index (unsigned index) const; - /** * Exception */ @@ -1163,10 +1164,26 @@ class FiniteElement : public FiniteElementBase { DeclException0 (ExcJacobiDeterminantHasWrongSign); }; +template +inline unsigned +FiniteElementBase::component_to_system_index (unsigned component, + unsigned component_index) const +{ + Assert(false, ExcInvalidIndex(component)); + return component_index; +} + +template +inline pair +FiniteElementBase::system_to_component_index (unsigned index) const +{ + Assert(false, ExcInvalidIndex(index)); + return pair(0,0); +} + - /*---------------------------- fe.h ---------------------------*/ /* end of #ifndef __fe_H */ #endif -- 2.39.5