Reference documentation for deal.II version 8.4.2
mesh_worker.cc
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2006 - 2014 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  template class LocalResults<long double>;
60 
61  template <int dim, int spacedim, typename number>
63  :
64  use_cell(true), use_boundary(true), use_face(true)
65  {}
66 
67 
68  template <int dim, int spacedim, typename number>
70  :
71  use_cell(c), use_boundary(b), use_face(f)
72  {}
73 
74 
75  template <int dim, int spacedim, typename number>
77  {}
78 
79  template <int dim, int spacedim, typename number>
80  void
83  {
84  Assert(false, ExcPureFunction());
85  }
86 
87 
88  template <int dim, int spacedim, typename number>
89  void
92  {
93  Assert(false, ExcPureFunction());
94  }
95 
96 
97  template <int dim, int spacedim, typename number>
98  void
103  {
104  Assert(false, ExcPureFunction());
105  }
106 
107 
108  template class LocalIntegrator<1,1,float>;
109  template class LocalIntegrator<1,1,double>;
110  template class LocalIntegrator<1,2,float>;
111  template class LocalIntegrator<1,2,double>;
112  template class LocalIntegrator<1,3,float>;
113  template class LocalIntegrator<1,3,double>;
114  template class LocalIntegrator<2,2,float>;
115  template class LocalIntegrator<2,2,double>;
116  template class LocalIntegrator<2,3,float>;
117  template class LocalIntegrator<2,3,double>;
118  template class LocalIntegrator<3,3,float>;
119  template class LocalIntegrator<3,3,double>;
120 }
121 
122 
123 DEAL_II_NAMESPACE_CLOSE
virtual void cell(DoFInfo< dim, spacedim, number > &dinfo, IntegrationInfo< dim, spacedim > &info) const
Definition: mesh_worker.cc:81
Auxiliary class aiding in the handling of block structures like in BlockVector or FESystem...
Definition: block_indices.h:54
size_type block_size(const unsigned int i) const
#define Assert(cond, exc)
Definition: exceptions.h:294
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:99
virtual void boundary(DoFInfo< dim, spacedim, number > &dinfo, IntegrationInfo< dim, spacedim > &info) const
Definition: mesh_worker.cc:90