15#ifndef dealii_mesh_worker_vector_selector_h
16#define dealii_mesh_worker_vector_selector_h
61 add(
const std::string &name,
62 const bool values =
true,
63 const bool gradients =
false,
64 const bool hessians =
false);
151 template <
typename StreamType,
typename DATA>
158 template <
typename StreamType>
160 print(StreamType &s)
const;
191 template <
int dim,
int spacedim = dim,
typename Number =
double>
259 fill(std::vector<std::vector<std::vector<Number>>> &values,
265 const std::vector<types::global_dof_index> &index,
266 const unsigned int component,
267 const unsigned int n_comp,
268 const unsigned int start,
269 const unsigned int size)
const;
278 mg_fill(std::vector<std::vector<std::vector<Number>>> &values,
284 const unsigned int level,
285 const std::vector<types::global_dof_index> &index,
286 const unsigned int component,
287 const unsigned int n_comp,
288 const unsigned int start,
289 const unsigned int size)
const;
303 template <
typename VectorType,
int dim,
int spacedim = dim>
305 :
public VectorDataBase<dim, spacedim, typename VectorType::value_type>
335 fill(std::vector<std::vector<std::vector<typename VectorType::value_type>>>
337 std::vector<std::vector<
340 std::vector<std::vector<
344 const std::vector<types::global_dof_index> &index,
345 const unsigned int component,
346 const unsigned int n_comp,
347 const unsigned int start,
348 const unsigned int size)
const override;
352 std::vector<std::vector<std::vector<typename VectorType::value_type>>>
354 std::vector<std::vector<
357 std::vector<std::vector<
361 const unsigned int level,
362 const std::vector<types::global_dof_index> &index,
363 const unsigned int component,
364 const unsigned int n_comp,
365 const unsigned int start,
366 const unsigned int size)
const override;
383 template <
typename VectorType,
int dim,
int spacedim = dim>
420 const bool gradients,
522 template <
typename StreamType>
527 <<
" hessians: " <<
n_hessians() << std::endl;
531 template <
typename StreamType,
typename DATA>
536 for (
unsigned int i = 0; i <
n_values(); ++i)
538 s << std::endl <<
"gradients:";
541 s << std::endl <<
"hessians: ";
542 for (
unsigned int i = 0; i <
n_hessians(); ++i)
551 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