20 #include <deal.II/base/config.h> 21 #include <deal.II/base/geometry_info.h> 22 #include <deal.II/fe/fe_base.h> 23 #include <deal.II/fe/fe_values_extractors.h> 24 #include <deal.II/fe/component_mask.h> 25 #include <deal.II/fe/block_mask.h> 32 template <
int dim,
int spacedim>
class FEValues;
35 template <
int dim,
int spacedim>
class FESystem;
352 template <
int dim,
int spacedim=dim>
397 const std::vector<bool> &restriction_is_additive_flags,
398 const std::vector<ComponentMask> &nonzero_components);
416 virtual std::string get_name ()
const = 0;
460 virtual double shape_value (
const unsigned int i,
469 virtual double shape_value_component (
const unsigned int i,
471 const unsigned int component)
const;
498 virtual Tensor<1,dim> shape_grad_component (
const unsigned int i,
500 const unsigned int component)
const;
532 virtual Tensor<2,dim> shape_grad_grad_component (
const unsigned int i,
534 const unsigned int component)
const;
545 virtual bool has_support_on_face (
const unsigned int shape_index,
546 const unsigned int face_index)
const;
574 get_restriction_matrix (
const unsigned int child,
603 get_prolongation_matrix (
const unsigned int child,
627 bool prolongation_is_implemented ()
const;
644 bool isotropic_prolongation_is_implemented ()
const;
667 bool restriction_is_implemented ()
const;
684 bool isotropic_restriction_is_implemented ()
const;
694 bool restriction_is_additive (
const unsigned int index)
const;
751 virtual bool hp_constraints_are_implemented ()
const;
805 const unsigned int subface,
833 std::vector<std::pair<unsigned int, unsigned int> >
841 std::vector<std::pair<unsigned int, unsigned int> >
849 std::vector<std::pair<unsigned int, unsigned int> >
907 std::pair<unsigned int, unsigned int>
908 system_to_component_index (
const unsigned int index)
const;
919 unsigned int component_to_system_index(
const unsigned int component,
920 const unsigned int index)
const;
931 std::pair<unsigned int, unsigned int>
932 face_system_to_component_index (
const unsigned int index)
const;
987 unsigned int face_to_cell_index (
const unsigned int face_dof_index,
988 const unsigned int face,
989 const bool face_orientation =
true,
990 const bool face_flip =
false,
991 const bool face_rotation =
false)
const;
1001 unsigned int adjust_quad_dof_index_for_face_orientation (
const unsigned int index,
1002 const bool face_orientation,
1003 const bool face_flip,
1004 const bool face_rotation)
const;
1013 unsigned int adjust_line_dof_index_for_line_orientation (
const unsigned int index,
1014 const bool line_orientation)
const;
1033 get_nonzero_components (
const unsigned int i)
const;
1046 n_nonzero_components (
const unsigned int i)
const;
1059 is_primitive (
const unsigned int i)
const;
1078 unsigned int n_base_elements ()
const;
1086 base_element (
const unsigned int index)
const;
1095 element_multiplicity (
const unsigned int index)
const;
1116 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1117 system_to_base_index (
const unsigned int index)
const;
1127 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1128 face_system_to_base_index (
const unsigned int index)
const;
1148 std::pair<unsigned int, unsigned int>
1149 component_to_base_index (
const unsigned int component)
const;
1156 std::pair<unsigned int,unsigned int>
1157 block_to_base_index (
const unsigned int block)
const;
1162 std::pair<unsigned int,types::global_dof_index>
1163 system_to_block_index (
const unsigned int component)
const;
1169 component_to_block_index (
const unsigned int component)
const;
1233 component_mask (
const BlockMask &block_mask)
const;
1352 const std::vector<Point<dim> > &
1353 get_unit_support_points ()
const;
1369 bool has_support_points ()
const;
1385 unit_support_point (
const unsigned int index)
const;
1414 const std::vector<
Point<dim-1> > &
1415 get_unit_face_support_points ()
const;
1425 bool has_face_support_points ()
const;
1433 unit_face_support_point (
const unsigned int index)
const;
1441 const std::vector<Point<dim> > &
1442 get_generalized_support_points ()
const;
1451 bool has_generalized_support_points ()
const;
1456 const std::vector<
Point<dim-1> > &
1457 get_generalized_face_support_points ()
const;
1467 bool has_generalized_face_support_points ()
const;
1478 virtual void interpolate(std::vector<double> &local_dofs,
1479 const std::vector<double> &values)
const;
1490 virtual void interpolate(std::vector<double> &local_dofs,
1492 unsigned int offset = 0)
const;
1498 virtual void interpolate(
1499 std::vector<double> &local_dofs,
1500 const VectorSlice<
const std::vector<std::vector<double> > > &values)
const;
1512 virtual std::size_t memory_consumption ()
const;
1520 <<
"The shape function with index " << arg1
1521 <<
" is not primitive, i.e. it is vector-valued and " 1522 <<
"has more than one non-zero vector component. This " 1523 <<
"function cannot be called for these shape functions. " 1524 <<
"Maybe you want to use the same function with the " 1525 <<
"_component suffix?");
1579 <<
"The interface matrix has a size of " << arg1
1581 <<
", which is not reasonable in the present dimension.");
1588 <<
"The component-index pair (" << arg1 <<
", " << arg2
1589 <<
") is invalid, i.e. non-existent.");
1624 void reinit_restriction_and_prolongation_matrices(
const bool isotropic_restriction_only=
false,
1625 const bool isotropic_prolongation_only=
false);
1742 interface_constraints_size ()
const;
1749 const unsigned int offset,
1751 InternalDataBase &fe_internal,
1760 std::vector<unsigned int>
1761 compute_n_nonzero_components (
const std::vector<ComponentMask> &nonzero_components);
1836 std::vector<std::pair<std::pair<unsigned int,unsigned int>,
unsigned int> >
1842 std::vector<std::pair<std::pair<unsigned int,unsigned int>,
unsigned int> >
1871 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> >
1983 CellSimilarity::Similarity &cell_similarity)
const = 0;
1995 const unsigned int face_no,
2011 const unsigned int face_no,
2012 const unsigned int sub_no,
2018 friend class InternalDataBase;
2020 friend class FEValues<dim,spacedim>;
2023 template <
int,
int >
friend class FESystem;
2024 template <
class POLY,
int dim_,
int spacedim_>
friend class FE_PolyTensor;
2033 template <
int dim,
int spacedim>
2039 ExcMessage (
"A fe_index of zero is the only index allowed here"));
2045 template <
int dim,
int spacedim>
2047 std::pair<unsigned int,unsigned int>
2050 Assert (index < system_to_component_table.size(),
2052 Assert (is_primitive (index),
2054 return system_to_component_table[index];
2059 template <
int dim,
int spacedim>
2064 return base_to_block_indices.size();
2069 template <
int dim,
int spacedim>
2074 return static_cast<unsigned int>(base_to_block_indices.block_size(index));
2079 template <
int dim,
int spacedim>
2083 const unsigned int index)
const 2085 std::vector< std::pair<unsigned int, unsigned int> >::const_iterator
2086 it = std::find(system_to_component_table.begin(), system_to_component_table.end(),
2087 std::pair<unsigned int, unsigned int>(component, index));
2089 Assert(it != system_to_component_table.end(), ExcComponentIndexInvalid(component, index));
2090 return std::distance(system_to_component_table.begin(), it);
2095 template <
int dim,
int spacedim>
2097 std::pair<unsigned int,unsigned int>
2100 Assert(index < face_system_to_component_table.size(),
2101 ExcIndexRange(index, 0, face_system_to_component_table.size()));
2116 Assert (is_primitive(this->face_to_cell_index(index, 0)),
2119 return face_system_to_component_table[index];
2124 template <
int dim,
int spacedim>
2126 std::pair<std::pair<unsigned int,unsigned int>,
unsigned int>
2129 Assert (index < system_to_base_table.size(),
2131 return system_to_base_table[index];
2137 template <
int dim,
int spacedim>
2139 std::pair<std::pair<unsigned int,unsigned int>,
unsigned int>
2142 Assert(index < face_system_to_base_table.size(),
2144 return face_system_to_base_table[index];
2149 template <
int dim,
int spacedim>
2154 return base_to_block_indices.block_start(index);
2159 template <
int dim,
int spacedim>
2161 std::pair<unsigned int,unsigned int>
2164 Assert(index < component_to_base_table.size(),
2167 return component_to_base_table[index].first;
2172 template <
int dim,
int spacedim>
2174 std::pair<unsigned int,unsigned int>
2177 return base_to_block_indices.global_to_local(index);
2182 template <
int dim,
int spacedim>
2184 std::pair<unsigned int,types::global_dof_index>
2187 Assert (index < this->dofs_per_cell,
2192 return std::pair<unsigned int, types::global_dof_index>(
2193 first_block_of_base(system_to_base_table[index].first.first)
2194 + system_to_base_table[index].first.second,
2195 system_to_base_table[index].second);
2200 template <
int dim,
int spacedim>
2205 Assert(index < this->dofs_per_cell,
2207 return restriction_is_additive_flags[index];
2212 template <
int dim,
int spacedim>
2218 return nonzero_components[i];
2223 template <
int dim,
int spacedim>
2229 return n_nonzero_components_table[i];
2234 template <
int dim,
int spacedim>
2253 return (is_primitive() ||
2254 (n_nonzero_components_table[i] == 1));
2259 DEAL_II_NAMESPACE_CLOSE
std::vector< std::pair< unsigned int, unsigned int > > face_system_to_component_table
std::vector< std::vector< FullMatrix< double > > > restriction
#define DeclException2(Exception2, type1, type2, outsequence)
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
std::vector< Point< dim > > generalized_support_points
FullMatrix< double > interface_constraints
unsigned int component_to_system_index(const unsigned int component, const unsigned int index) const
::ExceptionBase & ExcMessage(std::string arg1)
Auxiliary class aiding in the handling of block structures like in BlockVector or FESystem...
Table< 2, int > adjust_quad_dof_index_for_face_orientation_table
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
bool is_primitive() const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > face_system_to_base_table
const std::vector< unsigned int > n_nonzero_components_table
std::vector< Point< dim > > unit_support_points
unsigned int element_multiplicity(const unsigned int index) const
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
#define DeclException1(Exception1, type1, outsequence)
std::vector< std::vector< FullMatrix< double > > > prolongation
unsigned int global_dof_index
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
#define Assert(cond, exc)
unsigned int n_nonzero_components(const unsigned int i) const
std::vector< Point< dim-1 > > unit_face_support_points
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
#define DeclException0(Exception0)
const ComponentMask & get_nonzero_components(const unsigned int i) const
::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
unsigned int n_base_elements() const
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index) const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
const FiniteElement< dim, spacedim > & operator[](const unsigned int fe_index) const
std::vector< Point< dim-1 > > generalized_face_support_points
static const double fd_step_length
std::vector< FEValues< dim, spacedim > * > differences
bool restriction_is_additive(const unsigned int index) const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index) const
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
const std::vector< ComponentMask > nonzero_components
BlockIndices base_to_block_indices
types::global_dof_index first_block_of_base(const unsigned int b) const
std::vector< int > adjust_line_dof_index_for_line_orientation_table
const std::vector< bool > restriction_is_additive_flags
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table