Reference documentation for deal.II version 8.5.1
mesh_worker.cc
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2006 - 2016 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 
17 #include <deal.II/meshworker/local_results.h>
18 #include <deal.II/meshworker/local_integrator.h>
19 #include <deal.II/lac/block_indices.h>
20 
21 DEAL_II_NAMESPACE_OPEN
22 
23 namespace MeshWorker
24 {
25  template <typename number>
26  void
28  {
29  for (unsigned int i=0; i<J.size(); ++i)
30  J[i] = 0.;
31  for (unsigned int i=0; i<R.size(); ++i)
32  R[i].reinit(bi);
33  for (unsigned int i=0; i<M1.size(); ++i)
34  M1[i].matrix.reinit(bi.block_size(M1[i].row),
35  bi.block_size(M1[i].column));
36  for (unsigned int i=0; i<M2.size(); ++i)
37  M2[i].matrix.reinit(bi.block_size(M2[i].row),
38  bi.block_size(M2[i].column));
39  quadrature_data.reset_values();
40  }
41 
42 
43  template <typename number>
44  std::size_t
46  {
47  std::size_t mem = sizeof(*this)
52  + MemoryConsumption::memory_consumption(quadrature_data);
53  return mem;
54  }
55 
56 
57  template class LocalResults<float>;
58  template class LocalResults<double>;
59 
60  template <int dim, int spacedim, typename number>
62  :
63  use_cell(true), use_boundary(true), use_face(true)
64  {}
65 
66 
67  template <int dim, int spacedim, typename number>
69  :
70  use_cell(c), use_boundary(b), use_face(f)
71  {}
72 
73 
74  template <int dim, int spacedim, typename number>
76  {}
77 
78  template <int dim, int spacedim, typename number>
79  void
82  {
83  Assert(false, ExcPureFunction());
84  }
85 
86 
87  template <int dim, int spacedim, typename number>
88  void
91  {
92  Assert(false, ExcPureFunction());
93  }
94 
95 
96  template <int dim, int spacedim, typename number>
97  void
102  {
103  Assert(false, ExcPureFunction());
104  }
105 
106 
107  template class LocalIntegrator<1,1,float>;
108  template class LocalIntegrator<1,1,double>;
109  template class LocalIntegrator<1,2,float>;
110  template class LocalIntegrator<1,2,double>;
111  template class LocalIntegrator<1,3,float>;
112  template class LocalIntegrator<1,3,double>;
113  template class LocalIntegrator<2,2,float>;
114  template class LocalIntegrator<2,2,double>;
115  template class LocalIntegrator<2,3,float>;
116  template class LocalIntegrator<2,3,double>;
117  template class LocalIntegrator<3,3,float>;
118  template class LocalIntegrator<3,3,double>;
119 }
120 
121 
122 DEAL_II_NAMESPACE_CLOSE
virtual void cell(DoFInfo< dim, spacedim, number > &dinfo, IntegrationInfo< dim, spacedim > &info) const
Definition: mesh_worker.cc:80
size_type block_size(const unsigned int i) const
#define Assert(cond, exc)
Definition: exceptions.h:313
std_cxx11::enable_if< std_cxx11::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
void reinit(const BlockIndices &local_sizes)
Definition: mesh_worker.cc:27
std::size_t memory_consumption() const
Definition: mesh_worker.cc:45
virtual void face(DoFInfo< dim, spacedim, number > &dinfo1, DoFInfo< dim, spacedim, number > &dinfo2, IntegrationInfo< dim, spacedim > &info1, IntegrationInfo< dim, spacedim > &info2) const
Definition: mesh_worker.cc:98
virtual void boundary(DoFInfo< dim, spacedim, number > &dinfo, IntegrationInfo< dim, spacedim > &info) const
Definition: mesh_worker.cc:89