16 #ifndef dealii_mesh_worker_vector_selector_h 17 #define dealii_mesh_worker_vector_selector_h 19 #include <deal.II/algorithms/any_data.h> 20 #include <deal.II/algorithms/named_selection.h> 22 #include <deal.II/base/mg_level_object.h> 23 #include <deal.II/base/smartpointer.h> 24 #include <deal.II/base/tensor.h> 26 DEAL_II_NAMESPACE_OPEN
59 add(
const std::string &name,
60 const bool values =
true,
61 const bool gradients =
false,
62 const bool hessians =
false);
149 template <
class StreamType,
typename DATA>
156 template <
class StreamType>
158 print(StreamType &s)
const;
190 template <
int dim,
int spacedim = dim,
typename Number =
double>
258 fill(std::vector<std::vector<std::vector<Number>>> &values,
264 const std::vector<types::global_dof_index> &index,
265 const unsigned int component,
266 const unsigned int n_comp,
267 const unsigned int start,
268 const unsigned int size)
const;
277 mg_fill(std::vector<std::vector<std::vector<Number>>> &values,
283 const unsigned int level,
284 const std::vector<types::global_dof_index> &index,
285 const unsigned int component,
286 const unsigned int n_comp,
287 const unsigned int start,
288 const unsigned int size)
const;
303 template <
typename VectorType,
int dim,
int spacedim = dim>
305 :
public VectorDataBase<dim, spacedim, typename VectorType::value_type>
332 initialize(
const VectorType *,
const std::string &name);
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;
384 template <
typename VectorType,
int dim,
int spacedim = dim>
421 const bool gradients,
523 template <
class StreamType>
528 <<
" hessians: " <<
n_hessians() << std::endl;
532 template <
class 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);
557 DEAL_II_NAMESPACE_CLOSE
void initialize(const AnyData &)
std::size_t memory_consumption() const
NamedSelection gradient_selection
bool has_gradients() const
void add(const std::string &name)
void add(const std::string &name, const bool values=true, const bool gradients=false, const bool hessians=false)
virtual ~VectorDataBase() override=default
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
unsigned int n_values() const
void initialize(const AnyData &data)
std::size_t memory_consumption() const
unsigned int hessian_index(const unsigned int i) const
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
void initialize(const AnyData &)
unsigned int gradient_index(const unsigned int i) const
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
NamedSelection hessian_selection
bool has_hessians() const
unsigned int n_gradients() const
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
unsigned int size() const
unsigned int value_index(const unsigned int i) const
void initialize(const AnyData &)
unsigned int n_hessians() const
void initialize(const AnyData &)
void print(StreamType &s, const AnyData &v) const
const std::string & name(const unsigned int i) const
Name of object at index.
NamedSelection value_selection