/usr/include/deal.II/fe/fe_nothing.h is in libdeal.ii-dev 8.5.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | // ---------------------------------------------------------------------
//
// Copyright (C) 2009 - 2016 by the deal.II authors
//
// This file is part of the deal.II library.
//
// The deal.II library is free software; you can use it, redistribute
// it, and/or modify it under the terms of the GNU Lesser General
// Public License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// The full text of the license can be found in the file LICENSE at
// the top level of the deal.II distribution.
//
// ---------------------------------------------------------------------
#ifndef dealii__fe_nothing_h
#define dealii__fe_nothing_h
#include <deal.II/base/config.h>
#include <deal.II/fe/fe.h>
DEAL_II_NAMESPACE_OPEN
/*!@addtogroup fe */
/*@{*/
/**
* Definition of a finite element with zero degrees of freedom. This class is
* useful (in the context of an hp method) to represent empty cells in the
* triangulation on which no degrees of freedom should be allocated, or to
* describe a field that is extended by zero to a part of the domain where we
* don't need it. Thus a triangulation may be divided into two regions: an
* active region where normal elements are used, and an inactive region where
* FE_Nothing elements are used. The hp::DoFHandler will therefore assign no
* degrees of freedom to the FE_Nothing cells, and this subregion is therefore
* implicitly deleted from the computation. step-46 shows a use case for this
* element. An interesting application for this element is also presented in
* the paper A. Cangiani, J. Chapman, E. Georgoulis, M. Jensen:
* <b>Implementation of the Continuous-Discontinuous Galerkin Finite Element
* Method</b>, arXiv:1201.2878v1 [math.NA], 2012 (see
* http://arxiv.org/abs/1201.2878).
*
* Note that some care must be taken that the resulting mesh topology
* continues to make sense when FE_Nothing elements are introduced. This is
* particularly true when dealing with hanging node constraints, because the
* library makes some basic assumptions about the nature of those constraints.
* The following geometries are acceptable:
* @code
* +---------+----+----+
* | | 0 | |
* | 1 +----+----+
* | | 0 | |
* +---------+----+----+
* @endcode
* @code
* +---------+----+----+
* | | 1 | |
* | 0 +----+----+
* | | 1 | |
* +---------+----+----+
* @endcode
* Here, 0 denotes an FE_Nothing cell, and 1 denotes some other element type.
* The library has no difficulty computing the necessary hanging node
* constraints in these cases (i.e. no constraint). However, the following
* geometry is NOT acceptable (at least in the current implementation):
* @code
* +---------+----+----+
* | | 0 | |
* | 1 +----+----+
* | | 1 | |
* +---------+----+----+
* @endcode
* The distinction lies in the mixed nature of the child faces, a case we have
* not implemented as of yet.
*
* @author Joshua White, Wolfgang Bangerth
*/
template <int dim, int spacedim=dim>
class FE_Nothing : public FiniteElement<dim,spacedim>
{
public:
/**
* Constructor. First argument denotes the number of components to give this
* finite element (default = 1).
*
* Second argument decides whether FE_Nothing will dominate any other FE in
* compare_for_face_domination() (default = false). Therefore at interfaces
* where, for example, a Q1 meets an FE_Nothing, we will force the traces of
* the two functions to be the same. Because the FE_Nothing encodes a space
* that is zero everywhere, this means that the Q1 field will be forced to
* become zero at this interface.
*/
FE_Nothing (const unsigned int n_components = 1,
const bool dominate = false);
/**
* A sort of virtual copy constructor. Some places in the library, for
* example the constructors of FESystem as well as the hp::FECollection
* class, need to make copied of finite elements without knowing their exact
* type. They do so through this function.
*/
virtual
FiniteElement<dim,spacedim> *
clone() const;
/**
* Return a string that uniquely identifies a finite element. In this case
* it is <code>FE_Nothing@<dim@></code>.
*/
virtual
std::string
get_name() const;
// for documentation, see the FiniteElement base class
virtual
UpdateFlags
requires_update_flags (const UpdateFlags update_flags) const;
/**
* Return the value of the @p ith shape function at the point @p p. @p p is
* a point on the reference element. Because the current element has no
* degrees of freedom, this function should obviously not be called in
* practice. All this function really does, therefore, is trigger an
* exception.
*/
virtual
double
shape_value (const unsigned int i, const Point<dim> &p) const;
virtual
void
fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const CellSimilarity::Similarity cell_similarity,
const Quadrature<dim> &quadrature,
const Mapping<dim,spacedim> &mapping,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
const dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
virtual
void
fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const Quadrature<dim-1> &quadrature,
const Mapping<dim,spacedim> &mapping,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
const dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
virtual
void
fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int sub_no,
const Quadrature<dim-1> &quadrature,
const Mapping<dim,spacedim> &mapping,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_internal,
const dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
const typename FiniteElement<dim,spacedim>::InternalDataBase &fe_internal,
dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
/**
* Prepare internal data structures and fill in values independent of the
* cell. Returns a pointer to an object of which the caller of this function
* then has to assume ownership (which includes destruction when it is no
* more needed).
*
* In the current case, this function just returns a default pointer, since
* no meaningful data exists for this element.
*/
virtual
typename FiniteElement<dim,spacedim>::InternalDataBase *
get_data (const UpdateFlags update_flags,
const Mapping<dim,spacedim> &mapping,
const Quadrature<dim> &quadrature,
dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
/**
* Return whether this element dominates the one given as argument when they
* meet at a common face, whether it is the other way around, whether
* neither dominates, or if either could dominate.
*
* For a definition of domination, see FiniteElementDomination::Domination
* and in particular the
* @ref hp_paper "hp paper".
*
* In the current case, this element is assumed to dominate if the second
* argument in the constructor @p dominate is true. When this argument is
* false and @p fe_other is also of type FE_Nothing(), either element can
* dominate. Otherwise there are no_requirements.
*/
virtual
FiniteElementDomination::Domination
compare_for_face_domination (const FiniteElement<dim,spacedim> &fe_other) const;
virtual
std::vector<std::pair<unsigned int, unsigned int> >
hp_vertex_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
virtual
std::vector<std::pair<unsigned int, unsigned int> >
hp_line_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
virtual
std::vector<std::pair<unsigned int, unsigned int> >
hp_quad_dof_identities (const FiniteElement<dim,spacedim> &fe_other) const;
virtual
bool
hp_constraints_are_implemented () const;
/**
* Return the matrix interpolating from a face of of one element to the face
* of the neighboring element. The size of the matrix is then
* <tt>source.#dofs_per_face</tt> times <tt>this->#dofs_per_face</tt>.
*
* Since the current finite element has no degrees of freedom, the
* interpolation matrix is necessarily empty.
*/
virtual
void
get_face_interpolation_matrix (const FiniteElement<dim,spacedim> &source_fe,
FullMatrix<double> &interpolation_matrix) const;
/**
* Return the matrix interpolating from a face of of one element to the
* subface of the neighboring element. The size of the matrix is then
* <tt>source.#dofs_per_face</tt> times <tt>this->#dofs_per_face</tt>.
*
* Since the current finite element has no degrees of freedom, the
* interpolation matrix is necessarily empty.
*/
virtual
void
get_subface_interpolation_matrix (const FiniteElement<dim,spacedim> &source_fe,
const unsigned int index,
FullMatrix<double> &interpolation_matrix) const;
/**
* @return true if the FE dominates any other.
*/
bool is_dominating() const;
private:
/**
* If true, this element will dominate any other apart from itself in
* compare_for_face_domination();
*/
const bool dominate;
};
/*@}*/
DEAL_II_NAMESPACE_CLOSE
#endif
|