Reference documentation for deal.II version 8.5.1
dof_objects.cc
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2006 - 2015 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 at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #include <deal.II/base/exceptions.h>
17 #include <deal.II/base/memory_consumption.h>
18 #include <deal.II/dofs/dof_objects.h>
19 #include <deal.II/dofs/dof_handler.h>
20 #include <deal.II/fe/fe.h>
21 
22 DEAL_II_NAMESPACE_OPEN
23 
24 namespace internal
25 {
26  namespace DoFHandler
27  {
28  template <int dim>
29  std::size_t
31  {
33  }
34 
35 
36 
37  template <int dim>
38  template <int dh_dim, int spacedim>
39  void
41  set_dof_index (const ::DoFHandler<dh_dim, spacedim> &dof_handler,
42  const unsigned int obj_index,
43  const unsigned int fe_index,
44  const unsigned int local_index,
45  const types::global_dof_index global_index)
46  {
47  (void)fe_index;
49  ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
50  Assert (local_index<dof_handler.get_fe().template n_dofs_per_object<dim>(),
51  ExcIndexRange (local_index, 0, dof_handler.get_fe().template n_dofs_per_object<dim>()));
52  Assert (obj_index * dof_handler.get_fe().template n_dofs_per_object<dim>()+local_index
53  <
54  dofs.size(),
56 
57  dofs[obj_index * dof_handler.get_fe()
58  .template n_dofs_per_object<dim>() + local_index] = global_index;
59  }
60  }
61 }
62 
63 
64 // explicit instantiations
65 namespace internal
66 {
67  namespace DoFHandler
68  {
69 #include "dof_objects.inst"
70  }
71 }
72 
73 DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
static ::ExceptionBase & ExcMessage(std::string arg1)
unsigned int global_dof_index
Definition: types.h:88
#define Assert(cond, exc)
Definition: exceptions.h:313
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:41
std::size_t memory_consumption() const
Definition: dof_objects.cc:30
std_cxx11::enable_if< std_cxx11::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
static ::ExceptionBase & ExcInternalError()