17 #ifndef __deal2__mesh_worker_vector_selector_h
18 #define __deal2__mesh_worker_vector_selector_h
20 #include <deal.II/base/named_data.h>
21 #include <deal.II/base/tensor.h>
22 #include <deal.II/base/smartpointer.h>
23 #include <deal.II/base/mg_level_object.h>
25 DEAL_II_NAMESPACE_OPEN
70 void add(
const std::string &name,
71 const bool values =
true,
72 const bool gradients =
false,
73 const bool hessians =
false);
104 template <
class DATA>
148 unsigned int value_index (
const unsigned int i)
const;
164 template <
class STREAM,
typename DATA>
170 template <
class STREAM>
171 void print (STREAM &s)
const;
205 template <
int dim,
int spacedim = dim>
294 std::vector<std::vector<std::vector<double> > > &values,
295 std::vector<std::vector<std::vector<
Tensor<1,dim> > > > &gradients,
296 std::vector<std::vector<std::vector<
Tensor<2,dim> > > > &hessians,
298 const std::vector<types::global_dof_index> &index,
299 const unsigned int component,
300 const unsigned int n_comp,
301 const unsigned int start,
302 const unsigned int size)
const;
316 std::vector<std::vector<std::vector<double> > > &values,
317 std::vector<std::vector<std::vector<
Tensor<1,dim> > > > &gradients,
318 std::vector<std::vector<std::vector<
Tensor<2,dim> > > > &hessians,
320 const unsigned int level,
321 const std::vector<types::global_dof_index> &index,
322 const unsigned int component,
323 const unsigned int n_comp,
324 const unsigned int start,
325 const unsigned int size)
const;
342 template <
class VECTOR,
int dim,
int spacedim = dim>
383 void initialize(
const VECTOR *,
const std::string &name);
386 std::vector<std::vector<std::vector<double> > > &values,
387 std::vector<std::vector<std::vector<
Tensor<1,dim> > > > &gradients,
388 std::vector<std::vector<std::vector<
Tensor<2,dim> > > > &hessians,
390 const std::vector<types::global_dof_index> &index,
391 const unsigned int component,
392 const unsigned int n_comp,
393 const unsigned int start,
394 const unsigned int size)
const;
414 template <
class VECTOR,
int dim,
int spacedim = dim>
458 std::vector<std::vector<std::vector<double> > > &values,
459 std::vector<std::vector<std::vector<
Tensor<1,dim> > > > &gradients,
460 std::vector<std::vector<std::vector<
Tensor<2,dim> > > > &hessians,
462 const unsigned int level,
463 const std::vector<types::global_dof_index> &index,
464 const unsigned int component,
465 const unsigned int n_comp,
466 const unsigned int start,
467 const unsigned int size)
const;
484 const bool gradients,
507 template <
typename DATA>
588 template <
class STREAM>
599 template <
class STREAM,
typename DATA>
604 for (
unsigned int i=0; i<
n_values(); ++i)
606 s << std::endl <<
"gradients:";
609 s << std::endl <<
"hessians: ";
620 return sizeof(*this);
625 DEAL_II_NAMESPACE_CLOSE
NamedSelection gradient_selection
void initialize(const NamedData< VECTOR * > &)
const std::string & name(unsigned int i) const
Name of object at index.
std::size_t memory_consumption() const
void add(const std::string &name)
void initialize(const NamedData< DATA > &)
unsigned int gradient_index(const unsigned int i) const
virtual ~VectorDataBase()
void add(const std::string &name, const bool values=true, const bool gradients=false, const bool hessians=false)
unsigned int n_values() const
unsigned int hessian_index(const unsigned int i) const
virtual void fill(std::vector< std::vector< std::vector< double > > > &values, std::vector< std::vector< std::vector< Tensor< 1, dim > > > > &gradients, std::vector< std::vector< std::vector< Tensor< 2, dim > > > > &hessians, const FEValuesBase< dim, spacedim > &fe, const std::vector< types::global_dof_index > &index, const unsigned int component, const unsigned int n_comp, const unsigned int start, const unsigned int size) const
void initialize(const NamedData< DATA > &data)
void initialize(const NamedData< MGLevelObject< VECTOR > * > &)
unsigned int size() const
unsigned int n_hessians() const
unsigned int value_index(const unsigned int i) const
std::size_t memory_consumption() const
bool has_hessians() const
bool has_gradients() const
std::size_t memory_consumption() const
std::size_t memory_consumption() const
virtual void mg_fill(std::vector< std::vector< std::vector< double > > > &values, std::vector< std::vector< std::vector< Tensor< 1, dim > > > > &gradients, std::vector< std::vector< std::vector< Tensor< 2, dim > > > > &hessians, const FEValuesBase< dim, spacedim > &fe, const unsigned int level, const std::vector< types::global_dof_index > &index, const unsigned int component, const unsigned int n_comp, const unsigned int start, const unsigned int size) const
NamedSelection hessian_selection
virtual void fill(std::vector< std::vector< std::vector< double > > > &values, std::vector< std::vector< std::vector< Tensor< 1, dim > > > > &gradients, std::vector< std::vector< std::vector< Tensor< 2, dim > > > > &hessians, const FEValuesBase< dim, spacedim > &fe, const std::vector< types::global_dof_index > &index, const unsigned int component, const unsigned int n_comp, const unsigned int start, const unsigned int size) const
void print(STREAM &s, const NamedData< DATA > &v) const
unsigned int n_gradients() const
virtual void mg_fill(std::vector< std::vector< std::vector< double > > > &values, std::vector< std::vector< std::vector< Tensor< 1, dim > > > > &gradients, std::vector< std::vector< std::vector< Tensor< 2, dim > > > > &hessians, const FEValuesBase< dim, spacedim > &fe, const unsigned int level, const std::vector< types::global_dof_index > &index, const unsigned int component, const unsigned int n_comp, const unsigned int start, const unsigned int size) const
NamedSelection value_selection