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> 21 #include <deal.II/base/tensor.h> 22 #include <deal.II/base/smartpointer.h> 23 #include <deal.II/base/mg_level_object.h> 25 DEAL_II_NAMESPACE_OPEN
58 void add(
const std::string &name,
59 const bool values =
true,
60 const bool gradients =
false,
61 const bool hessians =
false);
122 unsigned int value_index (
const unsigned int i)
const;
137 template <
class StreamType,
typename DATA>
143 template <
class StreamType>
144 void print (StreamType &s)
const;
175 template <
int dim,
int spacedim = dim,
typename Number=
double>
243 std::vector<std::vector<std::vector<Number> > > &values,
247 const std::vector<types::global_dof_index> &index,
248 const unsigned int component,
249 const unsigned int n_comp,
250 const unsigned int start,
251 const unsigned int size)
const;
260 std::vector<std::vector<std::vector<Number> > > &values,
264 const unsigned int level,
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;
284 template <
typename VectorType,
int dim,
int spacedim = dim>
286 public VectorDataBase<dim, spacedim,typename VectorType::value_type>
311 void initialize(
const VectorType *,
const std::string &name);
314 std::vector<std::vector<std::vector<typename VectorType::value_type> > > &values,
318 const std::vector<types::global_dof_index> &index,
319 const unsigned int component,
320 const unsigned int n_comp,
321 const unsigned int start,
322 const unsigned int size)
const;
325 std::vector<std::vector<std::vector<typename VectorType::value_type> > > &values,
329 const unsigned int level,
330 const std::vector<types::global_dof_index> &index,
331 const unsigned int component,
332 const unsigned int n_comp,
333 const unsigned int start,
334 const unsigned int size)
const;
351 template <
typename VectorType,
int dim,
int spacedim = dim>
387 const bool gradients,
490 template <
class StreamType>
501 template <
class StreamType,
typename DATA>
506 for (
unsigned int i=0; i<
n_values(); ++i)
508 s << std::endl <<
"gradients:";
511 s << std::endl <<
"hessians: ";
522 return sizeof(*this);
527 DEAL_II_NAMESPACE_CLOSE
void initialize(const AnyData &)
std::size_t memory_consumption() const
NamedSelection gradient_selection
bool has_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
void add(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 add(const std::string &name, const bool values=true, const bool gradients=false, const bool hessians=false)
unsigned int n_values() 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
void initialize(const AnyData &data)
std::size_t memory_consumption() const
virtual ~VectorDataBase()=default
unsigned int hessian_index(const unsigned int i) const
void initialize(const AnyData &)
unsigned int gradient_index(const unsigned int i) const
NamedSelection hessian_selection
bool has_hessians() const
unsigned int n_gradients() const
unsigned int size() const
unsigned int value_index(const unsigned int i) const
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 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