From 6990cdeee77dcc8bfef08ba1ca40adbcbc57714d Mon Sep 17 00:00:00 2001 From: kronbichler Date: Sun, 19 Jan 2014 19:54:31 +0000 Subject: [PATCH] Allow constant modes for FE_RaviartThomas and FE_Nedelec. git-svn-id: https://svn.dealii.org/trunk@32254 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/fe/fe_nedelec.h | 6 ++++++ deal.II/include/deal.II/fe/fe_raviart_thomas.h | 7 +++++++ deal.II/source/fe/fe_nedelec.cc | 13 +++++++++++++ deal.II/source/fe/fe_raviart_thomas.cc | 14 ++++++++++++++ 4 files changed, 40 insertions(+) diff --git a/deal.II/include/deal.II/fe/fe_nedelec.h b/deal.II/include/deal.II/fe/fe_nedelec.h index 6b15aa1be6..81dad103af 100644 --- a/deal.II/include/deal.II/fe/fe_nedelec.h +++ b/deal.II/include/deal.II/fe/fe_nedelec.h @@ -281,6 +281,12 @@ public: virtual void interpolate (std::vector &local_dofs, const VectorSlice > > &values) const; + + /** + * Returns a list of constant modes of the element. + */ + virtual Table<2,bool> get_constant_modes () const; + virtual std::size_t memory_consumption () const; virtual FiniteElement *clone() const; diff --git a/deal.II/include/deal.II/fe/fe_raviart_thomas.h b/deal.II/include/deal.II/fe/fe_raviart_thomas.h index 8f46f9f577..bda93239da 100644 --- a/deal.II/include/deal.II/fe/fe_raviart_thomas.h +++ b/deal.II/include/deal.II/fe/fe_raviart_thomas.h @@ -146,6 +146,13 @@ public: virtual void interpolate( std::vector &local_dofs, const VectorSlice > > &values) const; + + /** + * Returns a list of constant modes of the element. For this element, the + * list consists of true arguments for all components. + */ + virtual Table<2,bool> get_constant_modes () const; + virtual std::size_t memory_consumption () const; virtual FiniteElement *clone() const; diff --git a/deal.II/source/fe/fe_nedelec.cc b/deal.II/source/fe/fe_nedelec.cc index f14d895076..61111bb018 100644 --- a/deal.II/source/fe/fe_nedelec.cc +++ b/deal.II/source/fe/fe_nedelec.cc @@ -5469,6 +5469,19 @@ const } + +template +Table<2,bool> +FE_Nedelec::get_constant_modes() const +{ + Table<2,bool> constant_modes(dim, this->dofs_per_cell); + for (unsigned int d=0; ddofs_per_cell; ++i) + constant_modes(d,i) = true; + return constant_modes; +} + + template std::size_t FE_Nedelec::memory_consumption () const diff --git a/deal.II/source/fe/fe_raviart_thomas.cc b/deal.II/source/fe/fe_raviart_thomas.cc index bf82030640..22208bae95 100644 --- a/deal.II/source/fe/fe_raviart_thomas.cc +++ b/deal.II/source/fe/fe_raviart_thomas.cc @@ -403,6 +403,19 @@ FE_RaviartThomas::get_dpo_vector (const unsigned int deg) +template +Table<2,bool> +FE_RaviartThomas::get_constant_modes() const +{ + Table<2,bool> constant_modes(dim, this->dofs_per_cell); + for (unsigned int d=0; ddofs_per_cell; ++i) + constant_modes(d,i) = true; + return constant_modes; +} + + + //--------------------------------------------------------------------------- // Data field initialization //--------------------------------------------------------------------------- @@ -532,6 +545,7 @@ FE_RaviartThomas::interpolate( } + template std::size_t FE_RaviartThomas::memory_consumption () const -- 2.39.5