Reference documentation for deal.II version 9.0.0
mesh_worker.cc
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2006 - 2017 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 
75  template <int dim, int spacedim, typename number>
76  void
79  {
80  Assert(false, ExcPureFunction());
81  }
82 
83 
84  template <int dim, int spacedim, typename number>
85  void
88  {
89  Assert(false, ExcPureFunction());
90  }
91 
92 
93  template <int dim, int spacedim, typename number>
94  void
99  {
100  Assert(false, ExcPureFunction());
101  }
102 
103 
104  template class LocalIntegrator<1,1,float>;
105  template class LocalIntegrator<1,1,double>;
106  template class LocalIntegrator<1,2,float>;
107  template class LocalIntegrator<1,2,double>;
108  template class LocalIntegrator<1,3,float>;
109  template class LocalIntegrator<1,3,double>;
110  template class LocalIntegrator<2,2,float>;
111  template class LocalIntegrator<2,2,double>;
112  template class LocalIntegrator<2,3,float>;
113  template class LocalIntegrator<2,3,double>;
114  template class LocalIntegrator<3,3,float>;
115  template class LocalIntegrator<3,3,double>;
116 }
117 
118 
119 DEAL_II_NAMESPACE_CLOSE
virtual void cell(DoFInfo< dim, spacedim, number > &dinfo, IntegrationInfo< dim, spacedim > &info) const
Definition: mesh_worker.cc:77
size_type block_size(const unsigned int i) const
#define Assert(cond, exc)
Definition: exceptions.h:1142
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:95
std::enable_if< std::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
virtual void boundary(DoFInfo< dim, spacedim, number > &dinfo, IntegrationInfo< dim, spacedim > &info) const
Definition: mesh_worker.cc:86