From: bangerth Date: Wed, 23 Feb 2011 14:19:29 +0000 (+0000) Subject: Introduce another code for face domination to satisfy what FE_Nothing is about. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dc2c01e363e32c6f0892646060ac880ddc0feb3;p=dealii-svn.git Introduce another code for face domination to satisfy what FE_Nothing is about. git-svn-id: https://svn.dealii.org/trunk@23429 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/fe/fe_base.h b/deal.II/include/deal.II/fe/fe_base.h index 916467b88c..6a4f611fe8 100644 --- a/deal.II/include/deal.II/fe/fe_base.h +++ b/deal.II/include/deal.II/fe/fe_base.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -111,6 +111,17 @@ namespace FiniteElementDomination * options open until we get to the * second base element. * + * Finally, the code + * no_requirements exists for cases + * where elements impose no + * continuity requirements. The + * case is primarily meant for + * FE_Nothing which is an element + * that has no degrees of freedom + * in a subdomain. It could also be + * used by discontinuous elements, + * for example. + * * More details on domination can be found * in the @ref hp_paper "hp paper". */ @@ -119,7 +130,8 @@ namespace FiniteElementDomination this_element_dominates, other_element_dominates, neither_element_dominates, - either_element_can_dominate + either_element_can_dominate, + no_requirements }; @@ -231,13 +243,13 @@ class FiniteElementData * system. */ unknown = 0x00, - + /** * Discontinuous * elements. See above! */ L2 = 0x01, - + /** * Conformity with the * space @@ -247,7 +259,7 @@ class FiniteElementData * field) */ Hcurl = 0x02, - + /** * Conformity with the * space @@ -257,7 +269,7 @@ class FiniteElementData * field) */ Hdiv = 0x04, - + /** * Conformity with the * space @@ -265,7 +277,7 @@ class FiniteElementData * (continuous) */ H1 = Hcurl | Hdiv, - + /** * Conformity with the * space @@ -282,7 +294,7 @@ class FiniteElementData * parameter dim */ static const unsigned int dimension = dim; - + /** * Number of degrees of freedom on * a vertex. @@ -318,22 +330,22 @@ class FiniteElementData * First index of dof on a line. */ const unsigned int first_line_index; - + /** * First index of dof on a quad. */ const unsigned int first_quad_index; - + /** * First index of dof on a hexahedron. */ const unsigned int first_hex_index; - + /** * First index of dof on a line for face data. */ const unsigned int first_face_line_index; - + /** * First index of dof on a quad for face data. */ @@ -349,7 +361,7 @@ class FiniteElementData * face. */ const unsigned int dofs_per_face; - + /** * Total number of degrees of freedom * on a cell. This is the @@ -392,7 +404,7 @@ class FiniteElementData * element multiplicities. */ const unsigned int blocks; - + /** * Maximal polynomial degree of a * shape function in a single @@ -404,7 +416,7 @@ class FiniteElementData * Indicate the space this element conforms to. */ const Conformity conforming_space; - + /** * Default * constructor. Constructs an @@ -506,7 +518,7 @@ class FiniteElementData */ template unsigned int n_dofs_per_object () const; - + /** * Number of components. */ @@ -534,7 +546,7 @@ class FiniteElementData * the constructor. */ bool is_primitive () const; - + /** * Maximal polynomial degree of a * shape function in a single @@ -564,14 +576,14 @@ class FiniteElementData * ordering of indices on a face, * return the index of the same * degree of freedom on the cell. - * + * */ unsigned int face_to_cell_index (const unsigned int face_index, const unsigned int face, const bool face_orientation = true, const bool face_flip = false, const bool face_rotation = false) const; - + /** * @deprecated This function is * just a special version of @@ -611,7 +623,7 @@ class FiniteElementData * */ unsigned int face_to_equivalent_cell_index (const unsigned int index) const; - + /** * Comparison operator. */ @@ -628,7 +640,7 @@ class FiniteElementData * for details. */ void set_primitivity(const bool value); - + private: /** * Store whether all shape @@ -674,7 +686,7 @@ namespace FiniteElementDomination return this_element_dominates; else return neither_element_dominates; - + case other_element_dominates: if ((d2 == other_element_dominates) || (d2 == either_element_can_dominate)) @@ -686,6 +698,7 @@ namespace FiniteElementDomination return neither_element_dominates; case either_element_can_dominate: + case no_requirements: return d2; default: @@ -700,7 +713,7 @@ namespace FiniteElementDomination template inline -unsigned int +unsigned int FiniteElementData::n_dofs_per_vertex () const { return dofs_per_vertex; @@ -710,7 +723,7 @@ FiniteElementData::n_dofs_per_vertex () const template inline -unsigned int +unsigned int FiniteElementData::n_dofs_per_line () const { return dofs_per_line; @@ -720,7 +733,7 @@ FiniteElementData::n_dofs_per_line () const template inline -unsigned int +unsigned int FiniteElementData::n_dofs_per_quad () const { return dofs_per_quad; @@ -730,7 +743,7 @@ FiniteElementData::n_dofs_per_quad () const template inline -unsigned int +unsigned int FiniteElementData::n_dofs_per_hex () const { return dofs_per_hex; @@ -740,7 +753,7 @@ FiniteElementData::n_dofs_per_hex () const template inline -unsigned int +unsigned int FiniteElementData::n_dofs_per_face () const { return dofs_per_face; @@ -750,7 +763,7 @@ FiniteElementData::n_dofs_per_face () const template inline -unsigned int +unsigned int FiniteElementData::n_dofs_per_cell () const { return dofs_per_cell; @@ -784,7 +797,7 @@ FiniteElementData::n_dofs_per_object () const template inline -unsigned int +unsigned int FiniteElementData::n_components () const { return components; @@ -792,7 +805,7 @@ FiniteElementData::n_components () const -template +template inline bool FiniteElementData::is_primitive () const @@ -801,7 +814,7 @@ FiniteElementData::is_primitive () const } -template +template inline void FiniteElementData::set_primitivity (const bool value) @@ -812,7 +825,7 @@ FiniteElementData::set_primitivity (const bool value) template inline -unsigned int +unsigned int FiniteElementData::n_blocks () const { return blocks; @@ -822,7 +835,7 @@ FiniteElementData::n_blocks () const template inline -unsigned int +unsigned int FiniteElementData::tensor_degree () const { return degree; diff --git a/deal.II/source/fe/fe_nothing.cc b/deal.II/source/fe/fe_nothing.cc index facbdce6d8..638c8300f2 100644 --- a/deal.II/source/fe/fe_nothing.cc +++ b/deal.II/source/fe/fe_nothing.cc @@ -181,10 +181,7 @@ FiniteElementDomination::Domination FE_Nothing :: compare_for_face_domination (const FiniteElement & fe_other) const { - if(dynamic_cast*>(&fe_other) != 0) - return FiniteElementDomination::either_element_can_dominate; - else - return FiniteElementDomination::this_element_dominates; + return FiniteElementDomination::no_requirements; } diff --git a/deal.II/source/fe/fe_q.cc b/deal.II/source/fe/fe_q.cc index 59546964e0..bd1751d11b 100644 --- a/deal.II/source/fe/fe_q.cc +++ b/deal.II/source/fe/fe_q.cc @@ -1244,16 +1244,12 @@ compare_for_face_domination (const FiniteElement &fe_other) const else if (dynamic_cast*>(&fe_other) != 0) { // the FE_Nothing has no - // degrees of - // freedom. nevertheless, we - // say that the FE_Q element - // dominates so that we don't - // have to force the FE_Q side - // to become a zero function - // and rather allow the - // function to be discontinuous - // along the interface - return FiniteElementDomination::other_element_dominates; + // degrees of freedom and it is + // typically used in a context + // where we don't require any + // continuity along the + // interface + return FiniteElementDomination::no_requirements; } Assert (false, ExcNotImplemented()); diff --git a/deal.II/source/hp/dof_handler.cc b/deal.II/source/hp/dof_handler.cc index 5d2ff3c96a..83ed306ef6 100644 --- a/deal.II/source/hp/dof_handler.cc +++ b/deal.II/source/hp/dof_handler.cc @@ -158,7 +158,9 @@ namespace internal // take it if ((domination == FiniteElementDomination::this_element_dominates) || - (domination == FiniteElementDomination::either_element_can_dominate)) + (domination == FiniteElementDomination::either_element_can_dominate) + || + (domination == FiniteElementDomination::no_requirements)) break; }