15#ifndef dealii_mesh_worker_vector_selector_h
16#define dealii_mesh_worker_vector_selector_h
59 add(
const std::string &name,
60 const bool values =
true,
61 const bool gradients =
false,
62 const bool hessians =
false);
149 template <
typename StreamType,
typename DATA>
156 template <
typename StreamType>
158 print(StreamType &s)
const;
189 template <
int dim,
int spacedim = dim,
typename Number =
double>
257 fill(std::vector<std::vector<std::vector<Number>>> &values,
263 const std::vector<types::global_dof_index> &index,
264 const unsigned int component,
265 const unsigned int n_comp,
266 const unsigned int start,
267 const unsigned int size)
const;
276 mg_fill(std::vector<std::vector<std::vector<Number>>> &values,
282 const unsigned int level,
283 const std::vector<types::global_dof_index> &index,
284 const unsigned int component,
285 const unsigned int n_comp,
286 const unsigned int start,
287 const unsigned int size)
const;
301 template <
typename VectorType,
int dim,
int spacedim = dim>
303 :
public VectorDataBase<dim, spacedim, typename VectorType::value_type>
333 fill(std::vector<std::vector<std::vector<typename VectorType::value_type>>>
335 std::vector<std::vector<
338 std::vector<std::vector<
342 const std::vector<types::global_dof_index> &index,
343 const unsigned int component,
344 const unsigned int n_comp,
345 const unsigned int start,
346 const unsigned int size)
const override;
350 std::vector<std::vector<std::vector<typename VectorType::value_type>>>
352 std::vector<std::vector<
355 std::vector<std::vector<
359 const unsigned int level,
360 const std::vector<types::global_dof_index> &index,
361 const unsigned int component,
362 const unsigned int n_comp,
363 const unsigned int start,
364 const unsigned int size)
const override;
381 template <
typename VectorType,
int dim,
int spacedim = dim>
418 const bool gradients,
520 template <
typename StreamType>
525 <<
" hessians: " <<
n_hessians() << std::endl;
529 template <
typename StreamType,
typename DATA>
534 for (
unsigned int i = 0; i <
n_values(); ++i)
536 s << std::endl <<
"gradients:";
539 s << std::endl <<
"hessians: ";
540 for (
unsigned int i = 0; i <
n_hessians(); ++i)
549 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