Reference documentation for deal.II version Git 3f1f337db3 2021-10-23 13:19:02 -0600
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
dof_objects.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2006 - 2020 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
18 
21 
22 #include <deal.II/fe/fe.h>
23 
25 
26 namespace internal
27 {
28  namespace DoFHandlerImplementation
29  {
30  template <int dim>
31  std::size_t
33  {
35  }
36 
37 
38 
39  template <int dim>
40  template <int dh_dim, int spacedim>
41  void
43  const ::DoFHandler<dh_dim, spacedim> &dof_handler,
44  const unsigned int obj_index,
45  const unsigned int fe_index,
46  const unsigned int local_index,
48  {
49  (void)fe_index;
50  Assert(
52  ExcMessage(
53  "Only the default FE index is allowed for non-hp-DoFHandler objects"));
54  Assert(
55  local_index < dof_handler.get_fe().template n_dofs_per_object<dim>(),
56  ExcIndexRange(local_index,
57  0,
58  dof_handler.get_fe().template n_dofs_per_object<dim>()));
59  Assert(obj_index *
60  dof_handler.get_fe().template n_dofs_per_object<dim>() +
61  local_index <
62  dofs.size(),
64 
65  dofs[obj_index * dof_handler.get_fe().template n_dofs_per_object<dim>() +
66  local_index] = global_index;
67  }
68  } // namespace DoFHandlerImplementation
69 } // namespace internal
70 
71 
72 // explicit instantiations
73 namespace internal
74 {
75  namespace DoFHandlerImplementation
76  {
77 #include "dof_objects.inst"
78  }
79 } // namespace internal
80 
void set_dof_index(const ::DoFHandler< dh_dim, spacedim > &dof_handler, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index)
Definition: dof_objects.cc:42
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
Definition: exceptions.h:1461
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:401
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:400
static ::ExceptionBase & ExcIndexRange(std::size_t arg1, std::size_t arg2, std::size_t arg3)
TrilinosWrappers::types::int_type global_index(const Epetra_BlockMap &map, const ::types::global_dof_index i)
std::enable_if< std::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
static ::ExceptionBase & ExcInternalError()