17 #ifndef dealii_mesh_worker_functional_h 18 #define dealii_mesh_worker_functional_h 20 #include <deal.II/algorithms/any_data.h> 22 #include <deal.II/base/mg_level_object.h> 23 #include <deal.II/base/smartpointer.h> 25 #include <deal.II/lac/block_vector.h> 27 #include <deal.II/meshworker/dof_info.h> 29 #include <deal.II/multigrid/mg_constrained_dofs.h> 32 DEAL_II_NAMESPACE_OPEN
47 template <
typename number =
double>
64 template <
class DOFINFO>
71 template <
class DOFINFO>
78 template <
class DOFINFO>
80 assemble(
const DOFINFO &info1,
const DOFINFO &info2);
105 template <
typename number =
double>
141 template <
class DOFINFO>
148 template <
class DOFINFO>
155 template <
class DOFINFO>
157 assemble(
const DOFINFO &info1,
const DOFINFO &info2);
171 template <
typename number>
176 std::fill(results.begin(), results.end(), 0.);
180 template <
typename number>
181 template <
class DOFINFO>
185 info.initialize_numbers(results.size());
189 template <
typename number>
190 template <
class DOFINFO>
194 for (
unsigned int i = 0; i < results.size(); ++i)
195 results[i] += info.value(i);
199 template <
typename number>
200 template <
class DOFINFO>
204 for (
unsigned int i = 0; i < results.size(); ++i)
206 results[i] += info1.value(i);
207 results[i] += info2.value(i);
212 template <
typename number>
222 template <
typename number>
224 : separate_faces(true)
229 template <
typename number>
242 separate_faces = sep;
245 template <
typename number>
246 template <
class DOFINFO>
250 info.initialize_numbers(
255 template <
typename number>
256 template <
class DOFINFO>
266 for (
unsigned int i = 0; i < info.n_values(); ++i)
267 v->
block(i)(info.cell->user_index()) += info.value(i);
271 template <
typename number>
272 template <
class DOFINFO>
276 for (
unsigned int i = 0; i < info1.n_values(); ++i)
281 const double J = info1.value(i) + info2.value(i);
282 v1->
block(i)(info1.face->user_index()) += J;
283 if (info2.face != info1.face)
284 v1->
block(i)(info2.face->user_index()) += J;
289 v0->
block(i)(info1.cell->user_index()) += .5 * info1.value(i);
290 v0->
block(i)(info2.cell->user_index()) += .5 * info2.value(i);
297 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)