17 #ifndef dealii__mesh_worker_functional_h 18 #define dealii__mesh_worker_functional_h 20 #include <deal.II/algorithms/any_data.h> 21 #include <deal.II/base/smartpointer.h> 22 #include <deal.II/base/mg_level_object.h> 23 #include <deal.II/lac/block_vector.h> 24 #include <deal.II/meshworker/dof_info.h> 25 #include <deal.II/multigrid/mg_constrained_dofs.h> 28 DEAL_II_NAMESPACE_OPEN
43 template <
typename number =
double>
59 template <
class DOFINFO>
65 template<
class DOFINFO>
71 template<
class DOFINFO>
73 const DOFINFO &info2);
78 number
operator() (
const unsigned int i)
const;
93 template <
typename number =
double>
128 template <
class DOFINFO>
134 template<
class DOFINFO>
140 template<
class DOFINFO>
142 const DOFINFO &info2);
147 number
operator() (
const unsigned int i)
const;
154 template <
typename number>
159 std::fill(results.begin(), results.end(), 0.);
163 template <
typename number>
164 template <
class DOFINFO>
168 info.initialize_numbers(results.size());
172 template <
typename number>
173 template <
class DOFINFO>
177 for (
unsigned int i=0; i<results.size(); ++i)
178 results[i] += info.value(i);
182 template <
typename number>
183 template <
class DOFINFO>
186 const DOFINFO &info2)
188 for (
unsigned int i=0; i<results.size(); ++i)
190 results[i] += info1.value(i);
191 results[i] += info2.value(i);
196 template <
typename number>
206 template <
typename number>
209 : separate_faces(true)
214 template <
typename number>
227 separate_faces = sep;
230 template <
typename number>
231 template <
class DOFINFO>
239 template <
typename number>
240 template <
class DOFINFO>
245 if (separate_faces &&
251 for (
unsigned int i=0; i<info.n_values(); ++i)
252 v->
block(i)(info.cell->user_index()) += info.value(i);
256 template <
typename number>
257 template <
class DOFINFO>
260 const DOFINFO &info2)
262 for (
unsigned int i=0; i<info1.n_values(); ++i)
267 const double J = info1.value(i) + info2.value(i);
268 v1->
block(i)(info1.face->user_index()) += J;
269 if (info2.face != info1.face)
270 v1->
block(i)(info2.face->user_index()) += J;
275 v0->
block(i)(info1.cell->user_index()) += .5*info1.value(i);
276 v0->
block(i)(info2.cell->user_index()) += .5*info2.value(i);
283 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
type entry(const std::string &name)
Access to stored data object by name.
#define AssertDimension(dim1, dim2)
void initialize(const unsigned int n)
#define AssertIndexRange(index, range)
number operator()(const unsigned int i) const
void initialize(AnyData &results, bool separate_faces=true)
#define Assert(cond, exc)
void initialize_info(DOFINFO &info, bool face)
void initialize_info(DOFINFO &info, bool face) const
unsigned int n_blocks() const
void assemble(const DOFINFO &info)
std::vector< double > results
static ::ExceptionBase & ExcNameMismatch(int arg1, std::string arg2)
BlockType & block(const unsigned int i)
number operator()(const unsigned int i) const
const std::string & name(const unsigned int i) const
Name of object at index.
void assemble(const DOFINFO &info)