Reference documentation for deal.II version Git cb0bd54b52 2019-09-21 16:31:22 -0400
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Protected Member Functions | List of all members
FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType > Class Template Reference

#include <deal.II/matrix_free/fe_evaluation.h>

Inheritance diagram for FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >:
[legend]

Public Member Functions

value_type get_dof_value (const unsigned int dof) const
 
void submit_dof_value (const value_type val_in, const unsigned int dof)
 
value_type get_value (const unsigned int q_point) const
 
void submit_value (const value_type val_in, const unsigned int q_point)
 
void submit_value (const Tensor< 1, 1, VectorizedArrayType > val_in, const unsigned int q_point)
 
gradient_type get_gradient (const unsigned int q_point) const
 
value_type get_normal_derivative (const unsigned int q_point) const
 
void submit_gradient (const gradient_type grad_in, const unsigned int q_point)
 
void submit_normal_derivative (const value_type grad_in, const unsigned int q_point)
 
Tensor< 2, dim, VectorizedArrayType > get_hessian (unsigned int q_point) const
 
gradient_type get_hessian_diagonal (const unsigned int q_point) const
 
value_type get_laplacian (const unsigned int q_point) const
 
value_type integrate_value () const
 
- Public Member Functions inherited from FEEvaluationBase< dim, 1, Number, is_face, VectorizedArrayType >
 ~FEEvaluationBase ()
 
unsigned int get_cell_data_number () const
 
unsigned int get_mapping_data_index_offset () const
 
internal::MatrixFreeFunctions::GeometryType get_cell_type () const
 
const internal::MatrixFreeFunctions::ShapeInfo< VectorizedArrayType > & get_shape_info () const
 
void read_dof_values (const VectorType &src, const unsigned int first_index=0)
 
void read_dof_values_plain (const VectorType &src, const unsigned int first_index=0)
 
void distribute_local_to_global (VectorType &dst, const unsigned int first_index=0, const std::bitset< VectorizedArrayType::n_array_elements > &mask=std::bitset< VectorizedArrayType::n_array_elements >().flip()) const
 
void set_dof_values (VectorType &dst, const unsigned int first_index=0, const std::bitset< VectorizedArrayType::n_array_elements > &mask=std::bitset< VectorizedArrayType::n_array_elements >().flip()) const
 
value_type get_dof_value (const unsigned int dof) const
 
void submit_dof_value (const value_type val_in, const unsigned int dof)
 
value_type get_value (const unsigned int q_point) const
 
void submit_value (const value_type val_in, const unsigned int q_point)
 
gradient_type get_gradient (const unsigned int q_point) const
 
value_type get_normal_derivative (const unsigned int q_point) const
 
void submit_gradient (const gradient_type grad_in, const unsigned int q_point)
 
void submit_normal_derivative (const value_type grad_in, const unsigned int q_point)
 
Tensor< 1, n_components_, Tensor< 2, dim, VectorizedArrayType > > get_hessian (const unsigned int q_point) const
 
gradient_type get_hessian_diagonal (const unsigned int q_point) const
 
value_type get_laplacian (const unsigned int q_point) const
 
VectorizedArrayType get_divergence (const unsigned int q_point) const
 
SymmetricTensor< 2, dim, VectorizedArrayType > get_symmetric_gradient (const unsigned int q_point) const
 
Tensor< 1,(dim==2 ? 1 :dim), VectorizedArrayType > get_curl (const unsigned int q_point) const
 
void submit_divergence (const VectorizedArrayType div_in, const unsigned int q_point)
 
void submit_symmetric_gradient (const SymmetricTensor< 2, dim, VectorizedArrayType > grad_in, const unsigned int q_point)
 
void submit_curl (const Tensor< 1, dim==2 ? 1 :dim, VectorizedArrayType > curl_in, const unsigned int q_point)
 
value_type integrate_value () const
 
VectorizedArrayType JxW (const unsigned int q_index) const
 
void fill_JxW_values (AlignedVector< VectorizedArrayType > &JxW_values) const
 
Tensor< 2, dim, VectorizedArrayType > inverse_jacobian (const unsigned int q_index) const
 
Tensor< 1, dim, VectorizedArrayType > get_normal_vector (const unsigned int q_point) const
 
VectorizedArrayType read_cell_data (const AlignedVector< VectorizedArrayType > &array) const
 
const VectorizedArrayType * begin_dof_values () const
 
VectorizedArrayType * begin_dof_values ()
 
const VectorizedArrayType * begin_values () const
 
VectorizedArrayType * begin_values ()
 
const VectorizedArrayType * begin_gradients () const
 
VectorizedArrayType * begin_gradients ()
 
const VectorizedArrayType * begin_hessians () const
 
VectorizedArrayType * begin_hessians ()
 
const std::vector< unsigned int > & get_internal_dof_numbering () const
 
ArrayView< VectorizedArrayType > get_scratch_data () const
 

Protected Member Functions

 FEEvaluationAccess (const MatrixFree< dim, Number, VectorizedArrayType > &matrix_free, const unsigned int dof_no, const unsigned int first_selected_component, const unsigned int quad_no, const unsigned int fe_degree, const unsigned int n_q_points, const bool is_interior_face=true)
 
template<int n_components_other>
 FEEvaluationAccess (const Mapping< dim > &mapping, const FiniteElement< dim > &fe, const Quadrature< 1 > &quadrature, const UpdateFlags update_flags, const unsigned int first_selected_component, const FEEvaluationBase< dim, n_components_other, Number, is_face, VectorizedArrayType > *other)
 
 FEEvaluationAccess (const FEEvaluationAccess &other)
 
FEEvaluationAccessoperator= (const FEEvaluationAccess &other)
 
- Protected Member Functions inherited from FEEvaluationBase< dim, 1, Number, is_face, VectorizedArrayType >
 FEEvaluationBase (const MatrixFree< dim, Number, VectorizedArrayType > &matrix_free, const unsigned int dof_no, const unsigned int first_selected_component, const unsigned int quad_no, const unsigned int fe_degree, const unsigned int n_q_points, const bool is_interior_face)
 
 FEEvaluationBase (const Mapping< dim > &mapping, const FiniteElement< dim > &fe, const Quadrature< 1 > &quadrature, const UpdateFlags update_flags, const unsigned int first_selected_component, const FEEvaluationBase< dim, n_components_other, Number, is_face, VectorizedArrayType > *other)
 
 FEEvaluationBase (const FEEvaluationBase &other)
 
FEEvaluationBaseoperator= (const FEEvaluationBase &other)
 
void read_write_operation (const VectorOperation &operation, VectorType *vectors[], const std::bitset< VectorizedArrayType::n_array_elements > &mask, const bool apply_constraints=true) const
 
void read_write_operation_contiguous (const VectorOperation &operation, VectorType *vectors[], const std::bitset< VectorizedArrayType::n_array_elements > &mask) const
 
void read_write_operation_global (const VectorOperation &operation, VectorType *vectors[]) const
 

Additional Inherited Members

- Protected Attributes inherited from FEEvaluationBase< dim, 1, Number, is_face, VectorizedArrayType >
AlignedVector< VectorizedArrayType > * scratch_data_array
 
VectorizedArrayType * scratch_data
 
VectorizedArrayType * values_dofs [n_components]
 
VectorizedArrayType * values_quad [n_components]
 
VectorizedArrayType * gradients_quad [n_components][dim]
 
VectorizedArrayType * hessians_quad [n_components][(dim *(dim+1))/2]
 
const unsigned int quad_no
 
const unsigned int n_fe_components
 
const unsigned int active_fe_index
 
const unsigned int active_quad_index
 
const unsigned int n_quadrature_points
 
const MatrixFree< dim, Number, VectorizedArrayType > * matrix_info
 
const internal::MatrixFreeFunctions::DoFInfodof_info
 
const internal::MatrixFreeFunctions::MappingInfoStorage<(is_face ? dim - 1 :dim), dim, Number, VectorizedArrayType > * mapping_data
 
const internal::MatrixFreeFunctions::ShapeInfo< VectorizedArrayType > * data
 
const Tensor< 2, dim, VectorizedArrayType > * jacobian
 
const VectorizedArrayType * J_value
 
const Tensor< 1, dim, VectorizedArrayType > * normal_vectors
 
const Tensor< 1, dim, VectorizedArrayType > * normal_x_jacobian
 
const Number * quadrature_weights
 
unsigned int cell
 
bool is_interior_face
 
internal::MatrixFreeFunctions::DoFInfo::DoFAccessIndex dof_access_index
 
unsigned int face_no
 
unsigned int face_orientation
 
unsigned int subface_index
 
internal::MatrixFreeFunctions::GeometryType cell_type
 
bool dof_values_initialized
 
bool values_quad_initialized
 
bool gradients_quad_initialized
 
bool hessians_quad_initialized
 
bool values_quad_submitted
 
bool gradients_quad_submitted
 
std::shared_ptr< internal::MatrixFreeFunctions::MappingDataOnTheFly< dim, Number, VectorizedArrayType > > mapped_geometry
 
const unsigned int first_selected_component
 
std::vector< types::global_dof_indexlocal_dof_indices
 

Detailed Description

template<int dim, typename Number, bool is_face, typename VectorizedArrayType>
class FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >

This class provides access to the data fields of the FEEvaluation classes. Partial specialization for scalar fields that defines access with simple data fields, i.e., scalars for the values and Tensor<1,dim> for the gradients.

Author
Katharina Kormann and Martin Kronbichler, 2010, 2011

Definition at line 1229 of file fe_evaluation.h.

Constructor & Destructor Documentation

◆ FEEvaluationAccess() [1/3]

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::FEEvaluationAccess ( const MatrixFree< dim, Number, VectorizedArrayType > &  matrix_free,
const unsigned int  dof_no,
const unsigned int  first_selected_component,
const unsigned int  quad_no,
const unsigned int  fe_degree,
const unsigned int  n_q_points,
const bool  is_interior_face = true 
)
protected

Constructor. Made protected to avoid initialization in user code. Takes all data stored in MatrixFree. If applied to problems with more than one finite element or more than one quadrature formula selected during construction of matrix_free, first_selected_component and quad_no allow to select the appropriate components.

◆ FEEvaluationAccess() [2/3]

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
template<int n_components_other>
FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::FEEvaluationAccess ( const Mapping< dim > &  mapping,
const FiniteElement< dim > &  fe,
const Quadrature< 1 > &  quadrature,
const UpdateFlags  update_flags,
const unsigned int  first_selected_component,
const FEEvaluationBase< dim, n_components_other, Number, is_face, VectorizedArrayType > *  other 
)
protected

Constructor with reduced functionality for similar usage of FEEvaluation as FEValues, including matrix assembly.

◆ FEEvaluationAccess() [3/3]

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::FEEvaluationAccess ( const FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType > &  other)
protected

Copy constructor

Member Function Documentation

◆ get_dof_value()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
value_type FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::get_dof_value ( const unsigned int  dof) const

Return the value stored for the local degree of freedom with index dof. If the object is vector-valued, a vector-valued return argument is given. Thus, the argument dof can at most run until dofs_per_component rather than dofs_per_cell since the different components of a vector-valued FE are return together. Note that when vectorization is enabled, values from several cells are grouped together. If set_dof_values was called last, the value corresponds to the one set there. If integrate was called last, it instead corresponds to the value of the integrated function with the test function of the given index.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ submit_dof_value()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
void FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::submit_dof_value ( const value_type  val_in,
const unsigned int  dof 
)

Write a value to the field containing the degrees of freedom with component dof. Writes to the same field as is accessed through get_dof_value. Therefore, the original data that was read from a vector is overwritten as soon as a value is submitted.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ get_value()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
value_type FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::get_value ( const unsigned int  q_point) const

Return the value of a finite element function at quadrature point number q_point after a call to evaluate(true,...), or the value that has been stored there with a call to submit_value. If the object is vector-valued, a vector-valued return argument is given. Note that when vectorization is enabled, values from several cells are grouped together.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ submit_value() [1/2]

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
void FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::submit_value ( const value_type  val_in,
const unsigned int  q_point 
)

Write a value to the field containing the values on quadrature points with component q_point. Access to the same field as through get_value. If applied before the function integrate(true,...) is called, this specifies the value which is tested by all basis function on the current cell and integrated over.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ submit_value() [2/2]

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
void FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::submit_value ( const Tensor< 1, 1, VectorizedArrayType >  val_in,
const unsigned int  q_point 
)

Write a value to the field containing the values on quadrature points with component q_point. Access to the same field as through get_value. If applied before the function integrate(true,...) is called, this specifies the value which is tested by all basis function on the current cell and integrated over.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ get_gradient()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
gradient_type FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::get_gradient ( const unsigned int  q_point) const

Return the gradient of a finite element function at quadrature point number q_point after a call to evaluate(...,true,...), or the value that has been stored there with a call to submit_gradient.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ get_normal_derivative()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
value_type FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::get_normal_derivative ( const unsigned int  q_point) const

Return the derivative of a finite element function at quadrature point number q_point after a call to evaluate(...,true,...) in the direction normal to the face: \(\boldsymbol \nabla u(\mathbf x_q) \cdot \mathbf n(\mathbf x_q)\)

This call is equivalent to calling get_gradient() * get_normal_vector() but will use a more efficient internal representation of data.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ submit_gradient()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
void FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::submit_gradient ( const gradient_type  grad_in,
const unsigned int  q_point 
)

Write a contribution that is tested by the gradient to the field containing the values on quadrature points with component q_point. Access to the same field as through get_gradient(). If applied before the function integrate(...,true) is called, this specifies what is tested by all basis function gradients on the current cell and integrated over.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ submit_normal_derivative()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
void FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::submit_normal_derivative ( const value_type  grad_in,
const unsigned int  q_point 
)

Write a contribution that is tested by the gradient to the field containing the values on quadrature points with component q_point. Access to the same field as through get_gradient() or get_normal_derivative(). If applied before the function integrate(...,true) is called, this specifies what is tested by all basis function gradients on the current cell and integrated over.

Note
This operation writes the data to the same field as submit_gradient(). As a consequence, only one of these two can be used. Usually, the contribution of a potential call to this function must be added into the contribution for submit_gradient().
The derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ get_hessian()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
Tensor<2, dim, VectorizedArrayType> FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::get_hessian ( unsigned int  q_point) const

Return the Hessian of a finite element function at quadrature point number q_point after a call to evaluate(...,true). If only the diagonal or even the trace of the Hessian, the Laplacian, is needed, use the other functions below.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ get_hessian_diagonal()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
gradient_type FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::get_hessian_diagonal ( const unsigned int  q_point) const

Return the diagonal of the Hessian of a finite element function at quadrature point number q_point after a call to evaluate(...,true).

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ get_laplacian()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
value_type FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::get_laplacian ( const unsigned int  q_point) const

Return the Laplacian (i.e., the trace of the Hessian) of a finite element function at quadrature point number q_point after a call to evaluate(...,true). Compared to the case when computing the full Hessian, some operations can be saved when only the Laplacian is requested.

Note that the derived class FEEvaluationAccess overloads this operation with specializations for the scalar case (n_components == 1) and for the vector-valued case (n_components == dim).

◆ integrate_value()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
value_type FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::integrate_value ( ) const

Takes values on quadrature points, multiplies by the Jacobian determinant and quadrature weights (JxW) and sums the values for all quadrature points on the cell. The result is a scalar, representing the integral over the function over the cell. If a vector-element is used, the resulting components are still separated. Moreover, if vectorization is enabled, the integral values of several cells are contained in the slots of the returned VectorizedArray field.

Note
In case the FEEvaluation object is initialized with a batch of cells where not all lanes in the SIMD vector VectorizedArray are representing actual data, this method performs computations on dummy data (that is copied from the last valid lane) that will not make sense. Thus, the user needs to make sure that it is not used in any computation explicitly, like when summing the results of several cells.

◆ operator=()

template<int dim, typename Number , bool is_face, typename VectorizedArrayType >
FEEvaluationAccess& FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType >::operator= ( const FEEvaluationAccess< dim, 1, Number, is_face, VectorizedArrayType > &  other)
protected

Copy assignment operator


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