Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number > Class Template Reference

#include <fe_evaluation.h>

Inheritance diagram for FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >:
[legend]

Public Types

typedef Number number_type
 
typedef Tensor
< 1, n_components_,
VectorizedArray< Number > > 
value_type
 
typedef Tensor
< 1, n_components_, Tensor
< 1, dim, VectorizedArray
< Number > > > 
gradient_type
 

Public Member Functions

1: General operations
void reinit (const unsigned int cell)
 
unsigned int get_cell_data_number () const
 
internal::MatrixFreeFunctions::CellType get_cell_type () const
 
2: Reading from and writing to vectors
template<typename VectorType >
void read_dof_values (const VectorType &src)
 
template<typename VectorType >
void read_dof_values (const std::vector< VectorType > &src, const unsigned int first_index=0)
 
template<typename VectorType >
void read_dof_values (const std::vector< VectorType * > &src, const unsigned int first_index=0)
 
template<typename VectorType >
void read_dof_values_plain (const VectorType &src)
 
template<typename VectorType >
void read_dof_values_plain (const std::vector< VectorType > &src, const unsigned int first_index=0)
 
template<typename VectorType >
void read_dof_values_plain (const std::vector< VectorType * > &src, const unsigned int first_index=0)
 
template<typename VectorType >
void distribute_local_to_global (VectorType &dst) const
 
template<typename VectorType >
void distribute_local_to_global (std::vector< VectorType > &dst, const unsigned int first_index=0) const
 
template<typename VectorType >
void distribute_local_to_global (std::vector< VectorType * > &dst, const unsigned int first_index=0) const
 
template<typename VectorType >
void set_dof_values (VectorType &dst) const
 
template<typename VectorType >
void set_dof_values (std::vector< VectorType > &dst, const unsigned int first_index=0) const
 
template<typename VectorType >
void set_dof_values (std::vector< VectorType * > &dst, const unsigned int first_index=0) const
 
3: Data access
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
 
void submit_gradient (const gradient_type grad_in, const unsigned int q_point)
 
Tensor< 1, n_components_,
Tensor< 2, dim,
VectorizedArray< Number > > > 
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
 
value_type integrate_value () const
 
4: Access to internal data
const VectorizedArray< Number > * begin_dof_values () const
 
VectorizedArray< Number > * begin_dof_values ()
 
const VectorizedArray< Number > * begin_values () const
 
VectorizedArray< Number > * begin_values ()
 
const VectorizedArray< Number > * begin_gradients () const
 
VectorizedArray< Number > * begin_gradients ()
 
const VectorizedArray< Number > * begin_hessians () const
 
VectorizedArray< Number > * begin_hessians ()
 

Static Public Attributes

static const unsigned int dimension = dim
 
static const unsigned int n_components = n_components_
 
static const unsigned int dofs_per_cell = dofs_per_cell_
 
static const unsigned int n_q_points = n_q_points_
 

Protected Member Functions

 FEEvaluationBase (const MatrixFree< dim, Number > &matrix_free, const unsigned int fe_no=0, const unsigned int quad_no=0)
 
template<typename VectorType , typename VectorOperation >
void read_write_operation (const VectorOperation &operation, VectorType *vectors[]) const
 
template<typename VectorType >
void read_dof_values_plain (const VectorType *src_data[])
 

Protected Attributes

VectorizedArray< Number > values_dofs [n_components][dofs_per_cell >0?dofs_per_cell:1]
 
VectorizedArray< Number > values_quad [n_components][n_q_points >0?n_q_points:1]
 
VectorizedArray< Number > gradients_quad [n_components][dim][n_q_points >0?n_q_points:1]
 
VectorizedArray< Number > hessians_quad [n_components][(dim *(dim+1))/2][n_q_points >0?n_q_points:1]
 
const unsigned int quad_no
 
const unsigned int n_fe_components
 
const unsigned int active_fe_index
 
const unsigned int active_quad_index
 
const MatrixFree< dim, Number > & matrix_info
 
const
internal::MatrixFreeFunctions::DoFInfo & 
dof_info
 
const
internal::MatrixFreeFunctions::MappingInfo
< dim, Number > & 
mapping_info
 
const
internal::MatrixFreeFunctions::ShapeInfo
< Number > & 
data
 
const Tensor< 1, dim,
VectorizedArray< Number > > * 
cartesian_data
 
const Tensor< 2, dim,
VectorizedArray< Number > > * 
jacobian
 
const VectorizedArray< Number > * J_value
 
const VectorizedArray< Number > * quadrature_weights
 
const Point< dim,
VectorizedArray< Number > > * 
quadrature_points
 
const Tensor< 2, dim,
VectorizedArray< Number > > * 
jacobian_grad
 
const Tensor< 1,(dim >1?dim
*(dim-1)/2:1), Tensor< 1, dim,
VectorizedArray< Number > > > * 
jacobian_grad_upper
 
unsigned int cell
 
internal::MatrixFreeFunctions::CellType cell_type
 
unsigned int cell_data_number
 
bool dof_values_initialized
 
bool values_quad_initialized
 
bool gradients_quad_initialized
 
bool hessians_quad_initialized
 
bool values_quad_submitted
 
bool gradients_quad_submitted
 

Detailed Description

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
class FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >

This is the base class for the FEEvaluation classes. This class is a base class and needs usually not be called in user code. Use one of the derived classes FEEvaluationGeneral, FEEvaluation or FEEvaluationGL instead. It implements a reinit method that is used to set pointers so that operations on quadrature points can be performed quickly, access functions to vectors for the read_dof_values, set_dof_values, and distributed_local_to_global functions, as well as methods to access values and gradients of finite element functions.

This class has five template arguments:

Parameters
dimDimension in which this class is to be used
dofs_per_cellNumber of degrees of freedom of the FE per cell, usually (fe_degree+1)^dim for elements based on a tensor product
n_q_pointsNumber of points in the quadrature formula, usually (fe_degree+1)^dim for tensor-product quadrature formulas
n_componentsNumber of vector components when solving a system of PDEs. If the same operation is applied to several components of a PDE (e.g. a vector Laplace equation), they can be applied simultaneously with one call (and often more efficiently)
NumberNumber format, usually double or float
Author
Katharina Kormann and Martin Kronbichler, 2010, 2011

Definition at line 87 of file fe_evaluation.h.

Constructor & Destructor Documentation

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::FEEvaluationBase ( const MatrixFree< dim, Number > &  matrix_free,
const unsigned int  fe_no = 0,
const unsigned int  quad_no = 0 
)
protected

Constructor. Made protected to prevent users from directly using this class. 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, fe_no and quad_no allow to select the appropriate components.

Member Function Documentation

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::reinit ( const unsigned int  cell)

Initializes the operation pointer to the current cell. Unlike the FEValues::reinit function, where the information related to a particular cell is generated in the reinit call, this function is very cheap since all data is pre-computed in matrix_free, and only a few indices have to be set appropriately.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
unsigned int FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::get_cell_data_number ( ) const

For the transformation information stored in MappingInfo, this function returns the index which belongs to the current cell as specified in reinit. Note that MappingInfo has different fields for Cartesian cells, cells with affine mapping and with general mappings, so in order to access the correct data, this interface must be used together with get_cell_type.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
internal::MatrixFreeFunctions::CellType FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::get_cell_type ( ) const

Returns the type of the cell the reinit function has been called for. Valid values are cartesian for Cartesian cells (which allows for considerable data compression), affine for cells with affine mappings, and general for general cells without any compressed storage applied.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::read_dof_values ( const VectorType src)

For the vector src, read out the values on the degrees of freedom of the current cell, and store them internally. Similar functionality as the function DoFAccessor::get_interpolated_dof_values when no constraints are present, but it also includes constraints from hanging nodes, so one can see it as a similar function to ConstraintMatrix::read_dof_values as well. Note that if vectorization is enabled, the DoF values for several cells are set.

If some constraints on the vector are inhomogeneous, use the function read_dof_values_plain instead and provide the vector with useful data also in constrained positions by calling ConstraintMatrix::distribute. When accessing vector entries during the solution of linear systems, the temporary solution should always have homogeneous constraints and this method is the correct one.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::read_dof_values ( const std::vector< VectorType > &  src,
const unsigned int  first_index = 0 
)

For a collection of several vector src, read out the values on the degrees of freedom of the current cell for n_components (template argument), starting at first_index, and store them internally. Similar functionality as the function ConstraintMatrix::read_dof_values. Note that if vectorization is enabled, the DoF values for several cells are set.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::read_dof_values ( const std::vector< VectorType * > &  src,
const unsigned int  first_index = 0 
)

Reads data from several vectors. Same as other function with std::vector, but accepts a vector of pointers to vectors.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::read_dof_values_plain ( const VectorType src)

For the vector src, read out the values on the degrees of freedom of the current cell, and store them internally. Similar functionality as the function DoFAccessor::get_interpolated_dof_values. As opposed to the read_dof_values function, this function reads out the plain entries from vectors, without taking stored constraints into account. This way of access is appropriate when the constraints have been distributed on the vector by a call to ConstraintMatrix::distribute previously. This function is also necessary when inhomogeneous constraints are to be used, as MatrixFree can only handle homogeneous constraints. Note that if vectorization is enabled, the DoF values for several cells are set.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::read_dof_values_plain ( const std::vector< VectorType > &  src,
const unsigned int  first_index = 0 
)

For a collection of several vector src, read out the values on the degrees of freedom of the current cell for n_components (template argument), starting at first_index, and store them internally. Similar functionality as the function DoFAccessor::read_dof_values. Note that if vectorization is enabled, the DoF values for several cells are set.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::read_dof_values_plain ( const std::vector< VectorType * > &  src,
const unsigned int  first_index = 0 
)

Reads data from several vectors without resolving constraints. Same as other function with std::vector, but accepts a vector of pointers to vectors.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::distribute_local_to_global ( VectorType dst) const

Takes the values stored internally on dof values of the current cell and sums them into the vector dst. The function also applies constraints during the write operation. The functionality is hence similar to the function ConstraintMatrix::distribute_local_to_global. Note that if vectorization is enabled, the DoF values for several cells are used.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::distribute_local_to_global ( std::vector< VectorType > &  dst,
const unsigned int  first_index = 0 
) const

Takes the values stored internally on dof values of the current cell for a vector-valued problem consisting of n_components (template argument) and sums them into the collection of vectors vector dst, starting at index first_index. The function also applies constraints during the write operation. The functionality is hence similar to the function ConstraintMatrix::distribute_local_to_global. Note that if vectorization is enabled, the DoF values for several cells are used.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::distribute_local_to_global ( std::vector< VectorType * > &  dst,
const unsigned int  first_index = 0 
) const

Writes data to several vectors. Same as other function with std::vector, but accepts a vector of pointers to vectors.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::set_dof_values ( VectorType dst) const

Takes the values stored internally on dof values of the current cell and sums them into the vector dst. The function also applies constraints during the write operation. The functionality is hence similar to the function ConstraintMatrix::distribute_local_to_global. Note that if vectorization is enabled, the DoF values for several cells are used.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::set_dof_values ( std::vector< VectorType > &  dst,
const unsigned int  first_index = 0 
) const

Takes the values stored internally on dof values of the current cell for a vector-valued problem consisting of n_components (template argument) and sums them into the collection of vectors vector dst, starting at index first_index. The function also applies constraints during the write operation. The functionality is hence similar to the function ConstraintMatrix::distribute_local_to_global. Note that if vectorization is enabled, the DoF values for several cells are used.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::set_dof_values ( std::vector< VectorType * > &  dst,
const unsigned int  first_index = 0 
) const

Writes data to several vectors. Same as other function with std::vector, but accepts a vector of pointers to vectors.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
value_type FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::get_dof_value ( const unsigned int  dof) const

Returns 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. 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).

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::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).

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
value_type FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::get_value ( const unsigned int  q_point) const

Returns 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).

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::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).

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
gradient_type FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::get_gradient ( const unsigned int  q_point) const

Returns 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).

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::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).

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
Tensor<1,n_components_,Tensor<2,dim,VectorizedArray<Number> > > FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::get_hessian ( const unsigned int  q_point) const

Returns 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).

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
gradient_type FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::get_hessian_diagonal ( const unsigned int  q_point) const

Returns 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).

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
value_type FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::get_laplacian ( const unsigned int  q_point) const

Returns 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).

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
value_type FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::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 represented together.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::begin_dof_values ( ) const

Returns a read-only pointer to the first field of the dof values. This is the data field the read_dof_values() functions write into. First come the the dof values for the first component, then all values for the second component, and so on. This is related to the internal data structures used in this class. In general, it is safer to use the get_dof_value() function instead.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::begin_dof_values ( )

Returns a read and write pointer to the first field of the dof values. This is the data field the read_dof_values() functions write into. First come the the dof values for the first component, then all values for the second component, and so on. This is related to the internal data structures used in this class. In general, it is safer to use the get_dof_value() function instead.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::begin_values ( ) const

Returns a read-only pointer to the first field of function values on quadrature points. First come the function values on all quadrature points for the first component, then all values for the second component, and so on. This is related to the internal data structures used in this class. The raw data after a call to evaluate only contains unit cell operations, so possible transformations, quadrature weights etc. must be applied manually. In general, it is safer to use the get_value() function instead, which does all the transformation internally.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::begin_values ( )

Returns a read and write pointer to the first field of function values on quadrature points. First come the function values on all quadrature points for the first component, then all values for the second component, and so on. This is related to the internal data structures used in this class. The raw data after a call to evaluate only contains unit cell operations, so possible transformations, quadrature weights etc. must be applied manually. In general, it is safer to use the get_value() function instead, which does all the transformation internally.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::begin_gradients ( ) const

Returns a read-only pointer to the first field of function gradients on quadrature points. First comes the x-component of the gradient for the first component on all quadrature points, then the y-component, and so on. Next comes the x-component of the second component, and so on. This is related to the internal data structures used in this class. The raw data after a call to evaluate only contains unit cell operations, so possible transformations, quadrature weights etc. must be applied manually. In general, it is safer to use the get_gradient() function instead, which does all the transformation internally.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::begin_gradients ( )

Returns a read and write pointer to the first field of function gradients on quadrature points. First comes the x-component of the gradient for the first component on all quadrature points, then the y-component, and so on. Next comes the x-component of the second component, and so on. This is related to the internal data structures used in this class. The raw data after a call to evaluate only contains unit cell operations, so possible transformations, quadrature weights etc. must be applied manually. In general, it is safer to use the get_gradient() function instead, which does all the transformation internally.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::begin_hessians ( ) const

Returns a read-only pointer to the first field of function hessians on quadrature points. First comes the xx-component of the hessian for the first component on all quadrature points, then the yy-component, zz-component in (3D), then the xy-component, and so on. Next comes the xx-component of the second component, and so on. This is related to the internal data structures used in this class. The raw data after a call to evaluate only contains unit cell operations, so possible transformations, quadrature weights etc. must be applied manually. In general, it is safer to use the get_laplacian() or get_hessian() functions instead, which does all the transformation internally.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::begin_hessians ( )

Returns a read and write pointer to the first field of function hessians on quadrature points. First comes the xx-component of the hessian for the first component on all quadrature points, then the yy-component, zz-component in (3D), then the xy-component, and so on. Next comes the xx-component of the second component, and so on. This is related to the internal data structures used in this class. The raw data after a call to evaluate only contains unit cell operations, so possible transformations, quadrature weights etc. must be applied manually. In general, it is safer to use the get_laplacian() or get_hessian() functions instead, which does all the transformation internally.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType , typename VectorOperation >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::read_write_operation ( const VectorOperation operation,
VectorType vectors[] 
) const
protected

A unified function to read from and write into vectors based on the given template operation. It can perform the operation for read_dof_values, distribute_local_to_global, and set_dof_values. It performs the operation for several vectors at a time.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
template<typename VectorType >
void FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::read_dof_values_plain ( const VectorType src_data[])
protected

For a collection of several vector src, read out the values on the degrees of freedom of the current cell for n_components (template argument), and store them internally. Similar functionality as the function DoFAccessor::read_dof_values. Note that if vectorization is enabled, the DoF values for several cells are set.

Member Data Documentation

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
VectorizedArray<Number> FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::values_dofs[n_components][dofs_per_cell >0?dofs_per_cell:1]
protected

Internal data fields that store the values. Since all array lengths are known at compile time and since they are rarely more than a few kilobytes, allocate them on the stack. This makes it possible to cheaply set up a FEEvaluation object and write thread-safe programs by letting each thread own a private object of this type.

This field stores the values for local degrees of freedom (e.g. after reading out from a vector but before applying unit cell transformations or before distributing them into a result vector). The methods get_dof_value() and submit_dof_value() read from or write to this field.

Definition at line 554 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
VectorizedArray<Number> FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::values_quad[n_components][n_q_points >0?n_q_points:1]
protected

This field stores the values of the finite element function on quadrature points after applying unit cell transformations or before integrating. The methods get_value() and submit_value() access this field.

Definition at line 562 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
VectorizedArray<Number> FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::gradients_quad[n_components][dim][n_q_points >0?n_q_points:1]
protected

This field stores the gradients of the finite element function on quadrature points after applying unit cell transformations or before integrating. The methods get_gradient() and submit_gradient() (as well as some specializations like get_symmetric_gradient() or get_divergence()) access this field.

Definition at line 571 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
VectorizedArray<Number> FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::hessians_quad[n_components][(dim *(dim+1))/2][n_q_points >0?n_q_points:1]
protected

This field stores the Hessians of the finite element function on quadrature points after applying unit cell transformations. The methods get_hessian(), get_laplacian(), get_hessian_diagonal() access this field.

Definition at line 578 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const unsigned int FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::quad_no
protected

Stores the number of the quadrature formula of the present cell.

Definition at line 583 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const unsigned int FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::n_fe_components
protected

Stores the number of components in the finite element as detected in the MatrixFree storage class for comparison with the template argument.

Definition at line 589 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const unsigned int FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::active_fe_index
protected

Stores the active fe index for this class for efficient indexing in the hp case.

Definition at line 595 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const unsigned int FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::active_quad_index
protected

Stores the active quadrature index for this class for efficient indexing in the hp case.

Definition at line 601 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const MatrixFree<dim,Number>& FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::matrix_info
protected

Stores a reference to the underlying data.

Definition at line 606 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const internal::MatrixFreeFunctions::DoFInfo& FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::dof_info
protected

Stores a reference to the underlying DoF indices and constraint description for the component specified at construction. Also contained in matrix_info, but it simplifies code if we store a reference to it.

Definition at line 613 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const internal::MatrixFreeFunctions::MappingInfo<dim,Number>& FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::mapping_info
protected

Stores a reference to the underlying transformation data from unit to real cells for the given quadrature formula specified at construction. Also contained in matrix_info, but it simplifies code if we store a reference to it.

Definition at line 621 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const internal::MatrixFreeFunctions::ShapeInfo<Number>& FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::data
protected

Stores a reference to the unit cell data, i.e., values, gradients and Hessians in 1D at the quadrature points that constitute the tensor product. Also contained in matrix_info, but it simplifies code if we store a reference to it.

Definition at line 629 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const Tensor<1,dim,VectorizedArray<Number> >* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::cartesian_data
protected

A pointer to the Cartesian Jacobian information of the present cell. Only set to a useful value if on a Cartesian cell, otherwise zero.

Definition at line 635 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const Tensor<2,dim,VectorizedArray<Number> >* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::jacobian
protected

A pointer to the Jacobian information of the present cell. Only set to a useful value if on a non-Cartesian cell.

Definition at line 641 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::J_value
protected

A pointer to the Jacobian determinant of the present cell. If on a Cartesian cell or on a cell with constant Jacobian, this is just the Jacobian determinant, otherwise the Jacobian determinant times the quadrature weight.

Definition at line 649 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const VectorizedArray<Number>* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::quadrature_weights
protected

A pointer to the quadrature weights of the underlying quadrature formula.

Definition at line 654 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const Point<dim,VectorizedArray<Number> >* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::quadrature_points
protected

A pointer to the quadrature points on the present cell.

Definition at line 659 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const Tensor<2,dim,VectorizedArray<Number> >* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::jacobian_grad
protected

A pointer to the diagonal part of the Jacobian gradient on the present cell. Only set to a useful value if on a general cell with non-constant Jacobian.

Definition at line 666 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
const Tensor<1,(dim>1?dim*(dim-1)/2:1),Tensor<1,dim,VectorizedArray<Number> > >* FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::jacobian_grad_upper
protected

A pointer to the upper diagonal part of the Jacobian gradient on the present cell. Only set to a useful value if on a general cell with non-constant Jacobian.

Definition at line 673 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
unsigned int FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::cell
protected

After a call to reinit(), stores the number of the cell we are currently working with.

Definition at line 679 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
internal::MatrixFreeFunctions::CellType FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::cell_type
protected

Stores the type of the cell we are currently working with after a call to reinit(). Valid values are cartesian, affine and general, which have different implications on how the Jacobian transformations are stored internally in MappingInfo.

Definition at line 687 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
unsigned int FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::cell_data_number
protected

The stride to access the correct data in MappingInfo.

Definition at line 692 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
bool FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::dof_values_initialized
protected

Debug information to track whether dof values have been initialized before accessed. Used to control exceptions when uninitialized data is used.

Definition at line 699 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
bool FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::values_quad_initialized
protected

Debug information to track whether values on quadrature points have been initialized before accessed. Used to control exceptions when uninitialized data is used.

Definition at line 706 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
bool FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::gradients_quad_initialized
protected

Debug information to track whether gradients on quadrature points have been initialized before accessed. Used to control exceptions when uninitialized data is used.

Definition at line 713 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
bool FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::hessians_quad_initialized
protected

Debug information to track whether Hessians on quadrature points have been initialized before accessed. Used to control exceptions when uninitialized data is used.

Definition at line 720 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
bool FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::values_quad_submitted
protected

Debug information to track whether values on quadrature points have been submitted for integration before the integration is actually stared. Used to control exceptions when uninitialized data is used.

Definition at line 727 of file fe_evaluation.h.

template<int dim, int dofs_per_cell_, int n_q_points_, int n_components_, typename Number>
bool FEEvaluationBase< dim, dofs_per_cell_, n_q_points_, n_components_, Number >::gradients_quad_submitted
protected

Debug information to track whether gradients on quadrature points have been submitted for integration before the integration is actually stared. Used to control exceptions when uninitialized data is used.

Definition at line 734 of file fe_evaluation.h.


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