16#ifndef dealii_mesh_worker_vector_selector_h
17#define dealii_mesh_worker_vector_selector_h
63 add(
const std::string &name,
64 const bool values =
true,
65 const bool gradients =
false,
66 const bool hessians =
false);
153 template <
class StreamType,
typename DATA>
160 template <
class StreamType>
162 print(StreamType &s)
const;
193 template <
int dim,
int spacedim = dim,
typename Number =
double>
261 fill(std::vector<std::vector<std::vector<Number>>> &values,
267 const std::vector<types::global_dof_index> &index,
268 const unsigned int component,
269 const unsigned int n_comp,
270 const unsigned int start,
271 const unsigned int size)
const;
280 mg_fill(std::vector<std::vector<std::vector<Number>>> &values,
286 const unsigned int level,
287 const std::vector<types::global_dof_index> &index,
288 const unsigned int component,
289 const unsigned int n_comp,
290 const unsigned int start,
291 const unsigned int size)
const;
305 template <
typename VectorType,
int dim,
int spacedim = dim>
307 :
public VectorDataBase<dim, spacedim, typename VectorType::value_type>
337 fill(std::vector<std::vector<std::vector<typename VectorType::value_type>>>
339 std::vector<std::vector<
342 std::vector<std::vector<
346 const std::vector<types::global_dof_index> &index,
347 const unsigned int component,
348 const unsigned int n_comp,
349 const unsigned int start,
350 const unsigned int size)
const override;
354 std::vector<std::vector<std::vector<typename VectorType::value_type>>>
356 std::vector<std::vector<
359 std::vector<std::vector<
363 const unsigned int level,
364 const std::vector<types::global_dof_index> &index,
365 const unsigned int component,
366 const unsigned int n_comp,
367 const unsigned int start,
368 const unsigned int size)
const override;
385 template <
typename VectorType,
int dim,
int spacedim = dim>
422 const bool gradients,
524 template <
class StreamType>
529 <<
" hessians: " <<
n_hessians() << std::endl;
533 template <
class StreamType,
typename DATA>
538 for (
unsigned int i = 0; i <
n_values(); ++i)
540 s << std::endl <<
"gradients:";
543 s << std::endl <<
"hessians: ";
544 for (
unsigned int i = 0; i <
n_hessians(); ++i)
553 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