15#ifndef dealii_mesh_worker_vector_selector_h
16#define dealii_mesh_worker_vector_selector_h
62 add(
const std::string &name,
63 const bool values =
true,
64 const bool gradients =
false,
65 const bool hessians =
false);
152 template <
typename StreamType,
typename DATA>
159 template <
typename StreamType>
161 print(StreamType &s)
const;
192 template <
int dim,
int spacedim = dim,
typename Number =
double>
260 fill(std::vector<std::vector<std::vector<Number>>> &values,
266 const std::vector<types::global_dof_index> &index,
267 const unsigned int component,
268 const unsigned int n_comp,
269 const unsigned int start,
270 const unsigned int size)
const;
279 mg_fill(std::vector<std::vector<std::vector<Number>>> &values,
285 const unsigned int level,
286 const std::vector<types::global_dof_index> &index,
287 const unsigned int component,
288 const unsigned int n_comp,
289 const unsigned int start,
290 const unsigned int size)
const;
304 template <
typename VectorType,
int dim,
int spacedim = dim>
306 :
public VectorDataBase<dim, spacedim, typename VectorType::value_type>
336 fill(std::vector<std::vector<std::vector<typename VectorType::value_type>>>
338 std::vector<std::vector<
341 std::vector<std::vector<
345 const std::vector<types::global_dof_index> &index,
346 const unsigned int component,
347 const unsigned int n_comp,
348 const unsigned int start,
349 const unsigned int size)
const override;
353 std::vector<std::vector<std::vector<typename VectorType::value_type>>>
355 std::vector<std::vector<
358 std::vector<std::vector<
362 const unsigned int level,
363 const std::vector<types::global_dof_index> &index,
364 const unsigned int component,
365 const unsigned int n_comp,
366 const unsigned int start,
367 const unsigned int size)
const override;
384 template <
typename VectorType,
int dim,
int spacedim = dim>
421 const bool gradients,
523 template <
typename StreamType>
528 <<
" hessians: " <<
n_hessians() << std::endl;
532 template <
typename StreamType,
typename DATA>
537 for (
unsigned int i = 0; i <
n_values(); ++i)
539 s << std::endl <<
"gradients:";
542 s << std::endl <<
"hessians: ";
543 for (
unsigned int i = 0; i <
n_hessians(); ++i)
552 return sizeof(*this);
const std::string & name(const unsigned int i) const
Name of object at index.
void initialize(const AnyData &)
MGVectorData(const VectorSelector &)
void initialize(const MGLevelObject< VectorType > *, const std::string &name)
virtual void mg_fill(std::vector< std::vector< std::vector< Number > > > &values, std::vector< std::vector< std::vector< Tensor< 1, spacedim, Number > > > > &gradients, std::vector< std::vector< std::vector< Tensor< 2, spacedim, Number > > > > &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
void initialize(const AnyData &)
virtual ~VectorDataBase() override=default
VectorDataBase(const VectorSelector &)
virtual void fill(std::vector< std::vector< std::vector< Number > > > &values, std::vector< std::vector< std::vector< Tensor< 1, spacedim, Number > > > > &gradients, std::vector< std::vector< std::vector< Tensor< 2, spacedim, Number > > > > &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 VectorType *, const std::string &name)
virtual void fill(std::vector< std::vector< std::vector< typename VectorType::value_type > > > &values, std::vector< std::vector< std::vector< Tensor< 1, spacedim, typename VectorType::value_type > > > > &gradients, std::vector< std::vector< std::vector< Tensor< 2, spacedim, typename VectorType::value_type > > > > &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 override
VectorData(const VectorSelector &)
virtual void mg_fill(std::vector< std::vector< std::vector< typename VectorType::value_type > > > &values, std::vector< std::vector< std::vector< Tensor< 1, spacedim, typename VectorType::value_type > > > > &gradients, std::vector< std::vector< std::vector< Tensor< 2, spacedim, typename VectorType::value_type > > > > &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 override
std::size_t memory_consumption() const
void initialize(const AnyData &)
std::size_t memory_consumption() const
unsigned int n_values() const
unsigned int n_gradients() const
unsigned int value_index(const unsigned int i) const
bool has_gradients() const
void print(StreamType &s, const AnyData &v) const
bool has_hessians() const
void initialize(const AnyData &)
unsigned int n_hessians() const
unsigned int hessian_index(const unsigned int i) const
NamedSelection gradient_selection
NamedSelection hessian_selection
void add(const std::string &name, const bool values=true, const bool gradients=false, const bool hessians=false)
NamedSelection value_selection
unsigned int gradient_index(const unsigned int i) const
void initialize(const AnyData &data)
void add(const std::string &name)
unsigned int size() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE