Reference documentation for deal.II version 9.5.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
internal::DataOutImplementation::DataEntryBase< dim, spacedim > Class Template Referenceabstract

#include <deal.II/numerics/data_out_dof_data.h>

Inheritance diagram for internal::DataOutImplementation::DataEntryBase< dim, spacedim >:
[legend]

Public Member Functions

 DataEntryBase (const DoFHandler< dim, spacedim > *dofs, const std::vector< std::string > &names, const std::vector< DataComponentInterpretation::DataComponentInterpretation > &data_component_interpretation)
 
 DataEntryBase (const DoFHandler< dim, spacedim > *dofs, const DataPostprocessor< spacedim > *data_postprocessor)
 
virtual ~DataEntryBase ()=default
 
virtual double get_cell_data_value (const unsigned int cell_number, const ComponentExtractor extract_component) const =0
 
virtual void get_function_values (const FEValuesBase< dim, spacedim > &fe_patch_values, const ComponentExtractor extract_component, std::vector< double > &patch_values) const =0
 
virtual void get_function_values (const FEValuesBase< dim, spacedim > &fe_patch_values, const ComponentExtractor extract_component, std::vector<::Vector< double > > &patch_values_system) const =0
 
virtual void get_function_gradients (const FEValuesBase< dim, spacedim > &fe_patch_values, const ComponentExtractor extract_component, std::vector< Tensor< 1, spacedim > > &patch_gradients) const =0
 
virtual void get_function_gradients (const FEValuesBase< dim, spacedim > &fe_patch_values, const ComponentExtractor extract_component, std::vector< std::vector< Tensor< 1, spacedim > > > &patch_gradients_system) const =0
 
virtual void get_function_hessians (const FEValuesBase< dim, spacedim > &fe_patch_values, const ComponentExtractor extract_component, std::vector< Tensor< 2, spacedim > > &patch_hessians) const =0
 
virtual void get_function_hessians (const FEValuesBase< dim, spacedim > &fe_patch_values, const ComponentExtractor extract_component, std::vector< std::vector< Tensor< 2, spacedim > > > &patch_hessians_system) const =0
 
virtual bool is_complex_valued () const =0
 
virtual void clear ()=0
 
virtual std::size_t memory_consumption () const =0
 

Public Attributes

SmartPointer< const DoFHandler< dim, spacedim > > dof_handler
 
const std::vector< std::string > names
 
const std::vector< DataComponentInterpretation::DataComponentInterpretationdata_component_interpretation
 
SmartPointer< const ::DataPostprocessor< spacedim > > postprocessor
 
unsigned int n_output_variables
 

Detailed Description

template<int dim, int spacedim>
class internal::DataOutImplementation::DataEntryBase< dim, spacedim >

For each vector that has been added through the add_data_vector() functions, we need to keep track of a pointer to it, and allow data extraction from it when we generate patches. Unfortunately, we need to do this for a number of different vector types. Fortunately, they all have the same interface. So the way we go is to have a base class that provides the functions to access the vector's information, and to have a derived template class that can be instantiated for each vector type. Since the vectors all have the same interface, this is no big problem, as they can all use the same general templatized code.

Note
This class is an example of the type erasure design pattern.

Definition at line 226 of file data_out_dof_data.h.

Constructor & Destructor Documentation

◆ DataEntryBase() [1/2]

template<int dim, int spacedim>
internal::DataOutImplementation::DataEntryBase< dim, spacedim >::DataEntryBase ( const DoFHandler< dim, spacedim > *  dofs,
const std::vector< std::string > &  names,
const std::vector< DataComponentInterpretation::DataComponentInterpretation > &  data_component_interpretation 
)

Constructor. Give a list of names for the individual components of the vector and their interpretation as scalar or vector data. This constructor assumes that no postprocessor is going to be used.

◆ DataEntryBase() [2/2]

template<int dim, int spacedim>
internal::DataOutImplementation::DataEntryBase< dim, spacedim >::DataEntryBase ( const DoFHandler< dim, spacedim > *  dofs,
const DataPostprocessor< spacedim > *  data_postprocessor 
)

Constructor when a data postprocessor is going to be used. In that case, the names and vector declarations are going to be acquired from the postprocessor.

◆ ~DataEntryBase()

template<int dim, int spacedim>
virtual internal::DataOutImplementation::DataEntryBase< dim, spacedim >::~DataEntryBase ( )
virtualdefault

Destructor made virtual.

Member Function Documentation

◆ get_cell_data_value()

template<int dim, int spacedim>
virtual double internal::DataOutImplementation::DataEntryBase< dim, spacedim >::get_cell_data_value ( const unsigned int  cell_number,
const ComponentExtractor  extract_component 
) const
pure virtual

Assuming that the stored vector is a cell vector, extract the given element from it.

◆ get_function_values() [1/2]

template<int dim, int spacedim>
virtual void internal::DataOutImplementation::DataEntryBase< dim, spacedim >::get_function_values ( const FEValuesBase< dim, spacedim > &  fe_patch_values,
const ComponentExtractor  extract_component,
std::vector< double > &  patch_values 
) const
pure virtual

Given a FEValuesBase object, extract the values on the present cell from the vector we actually store.

◆ get_function_values() [2/2]

template<int dim, int spacedim>
virtual void internal::DataOutImplementation::DataEntryBase< dim, spacedim >::get_function_values ( const FEValuesBase< dim, spacedim > &  fe_patch_values,
const ComponentExtractor  extract_component,
std::vector<::Vector< double > > &  patch_values_system 
) const
pure virtual

Given a FEValuesBase object, extract the values on the present cell from the vector we actually store. This function does the same as the one above but for vector-valued finite elements.

◆ get_function_gradients() [1/2]

template<int dim, int spacedim>
virtual void internal::DataOutImplementation::DataEntryBase< dim, spacedim >::get_function_gradients ( const FEValuesBase< dim, spacedim > &  fe_patch_values,
const ComponentExtractor  extract_component,
std::vector< Tensor< 1, spacedim > > &  patch_gradients 
) const
pure virtual

Given a FEValuesBase object, extract the gradients on the present cell from the vector we actually store.

◆ get_function_gradients() [2/2]

template<int dim, int spacedim>
virtual void internal::DataOutImplementation::DataEntryBase< dim, spacedim >::get_function_gradients ( const FEValuesBase< dim, spacedim > &  fe_patch_values,
const ComponentExtractor  extract_component,
std::vector< std::vector< Tensor< 1, spacedim > > > &  patch_gradients_system 
) const
pure virtual

Given a FEValuesBase object, extract the gradients on the present cell from the vector we actually store. This function does the same as the one above but for vector-valued finite elements.

◆ get_function_hessians() [1/2]

template<int dim, int spacedim>
virtual void internal::DataOutImplementation::DataEntryBase< dim, spacedim >::get_function_hessians ( const FEValuesBase< dim, spacedim > &  fe_patch_values,
const ComponentExtractor  extract_component,
std::vector< Tensor< 2, spacedim > > &  patch_hessians 
) const
pure virtual

Given a FEValuesBase object, extract the second derivatives on the present cell from the vector we actually store.

◆ get_function_hessians() [2/2]

template<int dim, int spacedim>
virtual void internal::DataOutImplementation::DataEntryBase< dim, spacedim >::get_function_hessians ( const FEValuesBase< dim, spacedim > &  fe_patch_values,
const ComponentExtractor  extract_component,
std::vector< std::vector< Tensor< 2, spacedim > > > &  patch_hessians_system 
) const
pure virtual

Given a FEValuesBase object, extract the second derivatives on the present cell from the vector we actually store. This function does the same as the one above but for vector-valued finite elements.

◆ is_complex_valued()

template<int dim, int spacedim>
virtual bool internal::DataOutImplementation::DataEntryBase< dim, spacedim >::is_complex_valued ( ) const
pure virtual

Return whether the data represented by (a derived class of) this object represents a complex-valued (as opposed to real-valued) information.

◆ clear()

template<int dim, int spacedim>
virtual void internal::DataOutImplementation::DataEntryBase< dim, spacedim >::clear ( )
pure virtual

Clear all references to the vectors.

◆ memory_consumption()

template<int dim, int spacedim>
virtual std::size_t internal::DataOutImplementation::DataEntryBase< dim, spacedim >::memory_consumption ( ) const
pure virtual

Determine an estimate for the memory consumption (in bytes) of this object.

Member Data Documentation

◆ dof_handler

template<int dim, int spacedim>
SmartPointer<const DoFHandler<dim, spacedim> > internal::DataOutImplementation::DataEntryBase< dim, spacedim >::dof_handler

Pointer to the DoFHandler object that the vector is based on.

Definition at line 346 of file data_out_dof_data.h.

◆ names

template<int dim, int spacedim>
const std::vector<std::string> internal::DataOutImplementation::DataEntryBase< dim, spacedim >::names

Names of the components of this data vector.

Definition at line 351 of file data_out_dof_data.h.

◆ data_component_interpretation

template<int dim, int spacedim>
const std::vector< DataComponentInterpretation::DataComponentInterpretation> internal::DataOutImplementation::DataEntryBase< dim, spacedim >::data_component_interpretation

A vector that for each of the n_output_variables variables of the current data set indicates whether they are scalar fields, parts of a vector-field, or any of the other supported kinds of data.

Definition at line 360 of file data_out_dof_data.h.

◆ postprocessor

template<int dim, int spacedim>
SmartPointer<const ::DataPostprocessor<spacedim> > internal::DataOutImplementation::DataEntryBase< dim, spacedim >::postprocessor

Pointer to a DataPostprocessing object which shall be applied to this data vector.

Definition at line 366 of file data_out_dof_data.h.

◆ n_output_variables

template<int dim, int spacedim>
unsigned int internal::DataOutImplementation::DataEntryBase< dim, spacedim >::n_output_variables

Number of output variables this dataset provides (either number of components in vector valued function / data vector or number of computed quantities, if DataPostprocessor is applied). This variable is determined via and thus equivalent to names.size().

Definition at line 374 of file data_out_dof_data.h.


The documentation for this class was generated from the following file: