From: kronbichler Date: Mon, 28 Apr 2014 19:53:24 +0000 (+0000) Subject: Cleanup file fe_trace.cc X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d172c073f2366b7b3318eecde5613a969d960faf;p=dealii-svn.git Cleanup file fe_trace.cc git-svn-id: https://svn.dealii.org/trunk@32853 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/fe/fe_trace.h b/deal.II/include/deal.II/fe/fe_trace.h index d098aa16b7..86f2be75be 100644 --- a/deal.II/include/deal.II/fe/fe_trace.h +++ b/deal.II/include/deal.II/fe/fe_trace.h @@ -24,7 +24,7 @@ DEAL_II_NAMESPACE_OPEN /** - * A finite element, which is the trace of Fe_Q elements, that is + * A finite element, which is the trace of FE_Q elements, that is * a tensor product of polynomials on the faces, * undefined in the interior of the cells and continuous. The basis functions on * the faces are from Polynomials::LagrangeEquidistant @@ -90,6 +90,13 @@ public: virtual bool has_support_on_face (const unsigned int shape_index, const unsigned int face_index) const; + /** + * Returns a list of constant modes of the element. For this element, it + * simply returns one row with all entries set to true. + */ + virtual std::pair, std::vector > + get_constant_modes () const; + private: /** * Return vector with dofs per diff --git a/deal.II/source/fe/fe_trace.cc b/deal.II/source/fe/fe_trace.cc index 902ae85f0d..af79e48461 100644 --- a/deal.II/source/fe/fe_trace.cc +++ b/deal.II/source/fe/fe_trace.cc @@ -1,7 +1,7 @@ // --------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2000 - 2013 by the deal.II authors +// Copyright (C) 2000 - 2014 by the deal.II authors // // This file is part of the deal.II library. // @@ -14,98 +14,18 @@ // // --------------------------------------------------------------------- -#include -#include -#include -#include -#include -#include - #include #include #include - -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - +#include -#include -#include #include +#include +#include DEAL_II_NAMESPACE_OPEN -/** FE-Class for continuous face functions -* adaption of FE_Q and FE_FaceQ -*/ - -template -class FE_TraceQ : public FE_PolyFace, dim, spacedim> -{ - public: - /** - * Constructor for tensor product - * polynomials of degree - * p. The shape - * functions created using this - * constructor correspond to - * Legendre polynomials in each - * coordinate direction. - */ - FE_TraceQ(unsigned int p); - - virtual FiniteElement* clone() const; - - /** - * Return a string that uniquely - * identifies a finite - * element. This class returns - * FE_DGQ(degree) , with - * dim and degree - * replaced by appropriate - * values. - */ - virtual std::string get_name () const; - - /** - * Check for non-zero values on a face. - * - * This function returns - * @p true, if the shape - * function @p shape_index has - * non-zero values on the face - * @p face_index. - * - * Implementation of the - * interface in - * FiniteElement - */ - virtual bool has_support_on_face (const unsigned int shape_index, - const unsigned int face_index) const; - - private: - /** - * Return vector with dofs per - * vertex, line, quad, hex. - */ - static std::vector get_dpo_vector (const unsigned int deg); -}; template @@ -246,6 +166,21 @@ FE_TraceQ::has_support_on_face (const unsigned int shape_index, return false; } + + +template +std::pair, std::vector > +FE_TraceQ::get_constant_modes () const +{ + Table<2,bool> constant_modes(1, this->dofs_per_cell); + for (unsigned int i=0; idofs_per_cell; ++i) + constant_modes(0,i) = true; + return std::pair, std::vector > + (constant_modes, std::vector(1, 0)); +} + + + template std::vector FE_TraceQ::get_dpo_vector (const unsigned int deg)