#include <mymapping_q1.h>
Public Member Functions | |
MyMappingQ1 () | |
virtual Point< dim > | transform_unit_to_real_cell (const typename Triangulation< dim >::cell_iterator &cell, const Point< dim > &p) const |
virtual Point< dim > | transform_real_to_unit_cell (const typename Triangulation< dim >::cell_iterator &cell, const Point< dim > &p) const |
virtual void | transform_covariant (const VectorSlice< const std::vector< Tensor< 1, dim > > > input, const unsigned int offset, VectorSlice< std::vector< Tensor< 1, dim > > > output, const typename Mapping< dim >::InternalDataBase &internal) const |
virtual void | transform_covariant (const VectorSlice< const std::vector< Tensor< 2, dim > > > input, const unsigned int offset, VectorSlice< std::vector< Tensor< 2, dim > > > output, const typename Mapping< dim >::InternalDataBase &internal) const |
virtual void | transform_contravariant (const VectorSlice< const std::vector< Tensor< 1, dim > > > input, const unsigned int offset, VectorSlice< std::vector< Tensor< 1, dim > > > output, const typename Mapping< dim >::InternalDataBase &internal) const |
virtual void | transform_contravariant (const VectorSlice< const std::vector< Tensor< 2, dim > > > input, const unsigned int offset, VectorSlice< std::vector< Tensor< 2, dim > > > output, const typename Mapping< dim >::InternalDataBase &internal) const |
virtual UpdateFlags | update_once (const UpdateFlags flags) const |
virtual UpdateFlags | update_each (const UpdateFlags flags) const |
virtual Mapping< dim > * | clone () const |
DeclException0 (ExcAccessToUninitializedField) | |
template<> | |
void | compute_shapes_virtual (const std::vector< Point< 1 > > &quadrature_points, InternalData &data) const |
template<> | |
void | compute_shapes_virtual (const std::vector< Point< 2 > > &quadrature_points, InternalData &data) const |
template<> | |
void | compute_face_data (const UpdateFlags update_flags, const Quadrature< 1 > &q, const unsigned int n_original_q_points, InternalData &data) const |
template<> | |
void | compute_fill_face (const Triangulation< 1 >::cell_iterator &, const unsigned int, const bool, const unsigned int, const DataSetDescriptor, const std::vector< double > &, InternalData &, std::vector< Point< 1 > > &, std::vector< double > &, std::vector< Tensor< 1, 1 > > &, std::vector< Point< 1 > > &, std::vector< double > &) const |
template<> | |
void | fill_fe_face_values (const Triangulation< 1 >::cell_iterator &, const unsigned, const Quadrature< 0 > &, Mapping< 1 >::InternalDataBase &, std::vector< Point< 1 > > &, std::vector< double > &, std::vector< Tensor< 1, 1 > > &, std::vector< Point< 1 > > &, std::vector< double > &) const |
template<> | |
void | fill_fe_subface_values (const Triangulation< 1 >::cell_iterator &, const unsigned, const unsigned, const Quadrature< 0 > &, Mapping< 1 >::InternalDataBase &, std::vector< Point< 1 > > &, std::vector< double > &, std::vector< Tensor< 1, 1 > > &, std::vector< Point< 1 > > &, std::vector< double > &) const |
template<> | |
void | compute_shapes_virtual (const std::vector< Point< 1 > > &quadrature_points, InternalData &data) const |
template<> | |
void | compute_shapes_virtual (const std::vector< Point< 2 > > &quadrature_points, InternalData &data) const |
template<> | |
void | compute_shapes_virtual (const std::vector< Point< 3 > > &quadrature_points, InternalData &data) const |
template<> | |
void | compute_face_data (const UpdateFlags, const Quadrature< 1 > &, const unsigned int, InternalData &) const |
template<> | |
void | compute_fill_face (const Triangulation< 1 >::cell_iterator &, const unsigned int, const bool, const unsigned int, const DataSetDescriptor, const std::vector< double > &, InternalData &, std::vector< Point< 1 > > &, std::vector< double > &, std::vector< Tensor< 1, 1 > > &, std::vector< Point< 1 > > &, std::vector< double > &) const |
template<> | |
void | fill_fe_face_values (const Triangulation< 1 >::cell_iterator &, const unsigned, const Quadrature< 0 > &, Mapping< 1 >::InternalDataBase &, std::vector< Point< 1 > > &, std::vector< double > &, std::vector< Tensor< 1, 1 > > &, std::vector< Point< 1 > > &, std::vector< double > &) const |
template<> | |
void | fill_fe_subface_values (const Triangulation< 1 >::cell_iterator &, const unsigned, const unsigned, const Quadrature< 0 > &, Mapping< 1 >::InternalDataBase &, std::vector< Point< 1 > > &, std::vector< double > &, std::vector< Tensor< 1, 1 > > &, std::vector< Point< 1 > > &, std::vector< double > &) const |
Protected Types | |
typedef QProjector < dim > ::DataSetDescriptor | DataSetDescriptor |
Protected Member Functions | |
virtual void | fill_fe_values (const typename Triangulation< dim >::cell_iterator &cell, const Quadrature< dim > &quadrature, typename Mapping< dim >::InternalDataBase &mapping_data, typename std::vector< Point< dim > > &quadrature_points, std::vector< double > &JxW_values, std::vector< Tensor< 2, dim > > &jacobians, std::vector< Tensor< 3, dim > > &jacobian_grads, std::vector< Tensor< 2, dim > > &inverse_jacobians) const |
virtual void | fill_fe_face_values (const typename Triangulation< dim >::cell_iterator &cell, const unsigned int face_no, const Quadrature< dim-1 > &quadrature, typename Mapping< dim >::InternalDataBase &mapping_data, typename std::vector< Point< dim > > &quadrature_points, std::vector< double > &JxW_values, typename std::vector< Tensor< 1, dim > > &boundary_form, typename std::vector< Point< dim > > &normal_vectors, std::vector< double > &cell_JxW_values) const |
virtual void | fill_fe_subface_values (const typename Triangulation< dim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim-1 > &quadrature, typename Mapping< dim >::InternalDataBase &mapping_data, typename std::vector< Point< dim > > &quadrature_points, std::vector< double > &JxW_values, typename std::vector< Tensor< 1, dim > > &boundary_form, typename std::vector< Point< dim > > &normal_vectors, std::vector< double > &cell_JxW_values) const |
void | compute_shapes (const std::vector< Point< dim > > &quadrature_points, InternalData &data) const |
void | compute_data (const UpdateFlags flags, const std::vector< Point< dim > > &quadrature_points, const unsigned int n_orig_q_points, InternalData &data) const |
void | compute_face_data (const UpdateFlags flags, const Quadrature< dim > &quadrature, const unsigned int n_orig_q_points, InternalData &data) const |
void | compute_fill (const typename Triangulation< dim >::cell_iterator &cell, const unsigned int npts, const DataSetDescriptor data_set, InternalData &data, std::vector< Point< dim > > &quadrature_points) const |
void | compute_fill_face (const typename Triangulation< dim >::cell_iterator &cell, const unsigned int face_no, const bool is_subface, const unsigned int npts, const DataSetDescriptor data_set, const std::vector< double > &weights, InternalData &mapping_data, std::vector< Point< dim > > &quadrature_points, std::vector< double > &JxW_values, std::vector< Tensor< 1, dim > > &boundary_form, std::vector< Point< dim > > &normal_vectors, std::vector< double > &cell_JxW_values) const |
virtual void | compute_shapes_virtual (const std::vector< Point< dim > > &quadrature_points, InternalData &data) const |
Point< dim > | transform_unit_to_real_cell_internal (const InternalData &mdata) const |
void | transform_real_to_unit_cell_internal (const typename Triangulation< dim >::cell_iterator &cell, const Point< dim > &p, InternalData &mdata, Point< dim > &p_unit) const |
Private Member Functions | |
virtual Mapping< dim > ::InternalDataBase * | get_data (const UpdateFlags, const Quadrature< dim > &quadrature) const |
virtual Mapping< dim > ::InternalDataBase * | get_face_data (const UpdateFlags flags, const Quadrature< dim-1 > &quadrature) const |
virtual Mapping< dim > ::InternalDataBase * | get_subface_data (const UpdateFlags flags, const Quadrature< dim-1 > &quadrature) const |
virtual void | compute_mapping_support_points (const typename Triangulation< dim >::cell_iterator &cell, std::vector< Point< dim > > &a) const |
Static Private Attributes | |
static const unsigned int | n_shape_functions = GeometryInfo<dim>::vertices_per_cell |
Classes | |
class | InternalData |
typedef QProjector<dim>::DataSetDescriptor MyMappingQ1< dim >::DataSetDescriptor [protected] |
Declare a convenience typedef for the class that describes offsets into quadrature formulas projected onto faces and subfaces.
MyMappingQ1< dim >::MyMappingQ1 | ( | ) | [inline] |
Default constructor.
Point< dim > MyMappingQ1< dim >::transform_unit_to_real_cell | ( | const typename Triangulation< dim >::cell_iterator & | cell, | |
const Point< dim > & | p | |||
) | const [inline, virtual] |
Implements Mapping< dim >.
Point< dim > MyMappingQ1< dim >::transform_real_to_unit_cell | ( | const typename Triangulation< dim >::cell_iterator & | cell, | |
const Point< dim > & | p | |||
) | const [inline, virtual] |
Transforms the point p
on the real cell to the point p_unit
on the unit cell cell
and returns p_unit
.
Uses Newton iteration and the transform_unit_to_real_cell
function.
Implements Mapping< dim >.
void MyMappingQ1< dim >::transform_covariant | ( | const VectorSlice< const std::vector< Tensor< 1, dim > > > | input, | |
const unsigned int | offset, | |||
VectorSlice< std::vector< Tensor< 1, dim > > > | output, | |||
const typename Mapping< dim >::InternalDataBase & | internal | |||
) | const [inline, virtual] |
void MyMappingQ1< dim >::transform_covariant | ( | const VectorSlice< const std::vector< Tensor< 2, dim > > > | input, | |
const unsigned int | offset, | |||
VectorSlice< std::vector< Tensor< 2, dim > > > | output, | |||
const typename Mapping< dim >::InternalDataBase & | internal | |||
) | const [inline, virtual] |
void MyMappingQ1< dim >::transform_contravariant | ( | const VectorSlice< const std::vector< Tensor< 1, dim > > > | input, | |
const unsigned int | offset, | |||
VectorSlice< std::vector< Tensor< 1, dim > > > | output, | |||
const typename Mapping< dim >::InternalDataBase & | internal | |||
) | const [inline, virtual] |
void MyMappingQ1< dim >::transform_contravariant | ( | const VectorSlice< const std::vector< Tensor< 2, dim > > > | input, | |
const unsigned int | offset, | |||
VectorSlice< std::vector< Tensor< 2, dim > > > | output, | |||
const typename Mapping< dim >::InternalDataBase & | internal | |||
) | const [inline, virtual] |
UpdateFlags MyMappingQ1< dim >::update_once | ( | const UpdateFlags | flags | ) | const [inline, virtual] |
Implements Mapping< dim >.
UpdateFlags MyMappingQ1< dim >::update_each | ( | const UpdateFlags | flags | ) | const [inline, virtual] |
Implements Mapping< dim >.
Mapping< dim > * MyMappingQ1< dim >::clone | ( | ) | const [inline, virtual] |
Return a pointer to a copy of the present object. The caller of this copy then assumes ownership of it.
Implements Mapping< dim >.
MyMappingQ1< dim >::DeclException0 | ( | ExcAccessToUninitializedField | ) |
void MyMappingQ1< dim >::fill_fe_values | ( | const typename Triangulation< dim >::cell_iterator & | cell, | |
const Quadrature< dim > & | quadrature, | |||
typename Mapping< dim >::InternalDataBase & | mapping_data, | |||
typename std::vector< Point< dim > > & | quadrature_points, | |||
std::vector< double > & | JxW_values, | |||
std::vector< Tensor< 2, dim > > & | jacobians, | |||
std::vector< Tensor< 3, dim > > & | jacobian_grads, | |||
std::vector< Tensor< 2, dim > > & | inverse_jacobians | |||
) | const [inline, protected, virtual] |
Implementation of the interface in Mapping.
void MyMappingQ1< dim >::fill_fe_face_values | ( | const typename Triangulation< dim >::cell_iterator & | cell, | |
const unsigned int | face_no, | |||
const Quadrature< dim-1 > & | quadrature, | |||
typename Mapping< dim >::InternalDataBase & | mapping_data, | |||
typename std::vector< Point< dim > > & | quadrature_points, | |||
std::vector< double > & | JxW_values, | |||
typename std::vector< Tensor< 1, dim > > & | boundary_form, | |||
typename std::vector< Point< dim > > & | normal_vectors, | |||
std::vector< double > & | cell_JxW_values | |||
) | const [inline, protected, virtual] |
Implementation of the interface in Mapping.
void MyMappingQ1< dim >::fill_fe_subface_values | ( | const typename Triangulation< dim >::cell_iterator & | cell, | |
const unsigned int | face_no, | |||
const unsigned int | sub_no, | |||
const Quadrature< dim-1 > & | quadrature, | |||
typename Mapping< dim >::InternalDataBase & | mapping_data, | |||
typename std::vector< Point< dim > > & | quadrature_points, | |||
std::vector< double > & | JxW_values, | |||
typename std::vector< Tensor< 1, dim > > & | boundary_form, | |||
typename std::vector< Point< dim > > & | normal_vectors, | |||
std::vector< double > & | cell_JxW_values | |||
) | const [inline, protected, virtual] |
Implementation of the interface in Mapping.
void MyMappingQ1< dim >::compute_shapes | ( | const std::vector< Point< dim > > & | quadrature_points, | |
InternalData & | data | |||
) | const [inline, protected] |
void MyMappingQ1< dim >::compute_data | ( | const UpdateFlags | flags, | |
const std::vector< Point< dim > > & | quadrature_points, | |||
const unsigned int | n_orig_q_points, | |||
InternalData & | data | |||
) | const [inline, protected] |
Do the computations for the get_data
functions. Here, the data vectors of InternalData
are reinitialized to proper size and shape values are computed.
void MyMappingQ1< dim >::compute_face_data | ( | const UpdateFlags | flags, | |
const Quadrature< dim > & | quadrature, | |||
const unsigned int | n_orig_q_points, | |||
InternalData & | data | |||
) | const [inline, protected] |
Do the computations for the get_face_data
functions. Here, the data vectors of InternalData
are reinitialized to proper size and shape values and derivatives are computed. Furthermore unit_tangential
vectors of the face are computed.
void MyMappingQ1< dim >::compute_fill | ( | const typename Triangulation< dim >::cell_iterator & | cell, | |
const unsigned int | npts, | |||
const DataSetDescriptor | data_set, | |||
InternalData & | data, | |||
std::vector< Point< dim > > & | quadrature_points | |||
) | const [inline, protected] |
Do the computation for the fill_*
functions.
void MyMappingQ1< dim >::compute_fill_face | ( | const typename Triangulation< dim >::cell_iterator & | cell, | |
const unsigned int | face_no, | |||
const bool | is_subface, | |||
const unsigned int | npts, | |||
const DataSetDescriptor | data_set, | |||
const std::vector< double > & | weights, | |||
InternalData & | mapping_data, | |||
std::vector< Point< dim > > & | quadrature_points, | |||
std::vector< double > & | JxW_values, | |||
std::vector< Tensor< 1, dim > > & | boundary_form, | |||
std::vector< Point< dim > > & | normal_vectors, | |||
std::vector< double > & | cell_JxW_values | |||
) | const [inline, protected] |
Do the computation for the fill_*
functions.
virtual void MyMappingQ1< dim >::compute_shapes_virtual | ( | const std::vector< Point< dim > > & | quadrature_points, | |
InternalData & | data | |||
) | const [protected, virtual] |
Compute shape values and/or derivatives.
Point< dim > MyMappingQ1< dim >::transform_unit_to_real_cell_internal | ( | const InternalData & | mdata | ) | const [inline, protected] |
Transforms a point p
on the unit cell to the point p_real
on the real cell cell
and returns p_real
.
This function is called by transform_unit_to_real_cell
and multiply (through the Newton iteration) by transform_real_to_unit_cell_internal
.
Takes a reference to an InternalData
that must already include the shape values at point p
and the mapping support points of the cell.
This InternalData
argument avoids multiple computations of the shape values at point p
and especially multiple computations of the mapping support points.
void MyMappingQ1< dim >::transform_real_to_unit_cell_internal | ( | const typename Triangulation< dim >::cell_iterator & | cell, | |
const Point< dim > & | p, | |||
InternalData & | mdata, | |||
Point< dim > & | p_unit | |||
) | const [inline, protected] |
Transforms the point p
on the real cell to the point p_unit
on the unit cell cell
by a Newton iteration.
Takes a reference to an InternalData
that is assumed to be previously created by the get_data
function with UpdateFlags
including update_transformation_values
and update_transformation_gradients
and a one point Quadrature including the given point p_unit
. Hence this function assumes that mdata
already includes the transformation shape values and gradients computed at p_unit
.
These assumptions should be fulfilled by the calling function. That is up to now only the function transform_real_to_unit_cell
and its overloaded versions. mdata
will be changed by this function.
Mapping< dim >::InternalDataBase * MyMappingQ1< dim >::get_data | ( | const | UpdateFlags, | |
const Quadrature< dim > & | quadrature | |||
) | const [inline, private, virtual] |
Implements Mapping< dim >.
Mapping< dim >::InternalDataBase * MyMappingQ1< dim >::get_face_data | ( | const UpdateFlags | flags, | |
const Quadrature< dim-1 > & | quadrature | |||
) | const [inline, private, virtual] |
Implements Mapping< dim >.
Mapping< dim >::InternalDataBase * MyMappingQ1< dim >::get_subface_data | ( | const UpdateFlags | flags, | |
const Quadrature< dim-1 > & | quadrature | |||
) | const [inline, private, virtual] |
Implements Mapping< dim >.
void MyMappingQ1< dim >::compute_mapping_support_points | ( | const typename Triangulation< dim >::cell_iterator & | cell, | |
std::vector< Point< dim > > & | a | |||
) | const [inline, private, virtual] |
Computes the support points of the mapping. For MappingQ1
these are the vertices. However, other classes may override this function. In particular, the MappingQ1Eulerian class does exactly this by not computing the support points from the geometry of the current cell but instead evaluating an externally given displacement field in addition to the geometry of the cell.
void MyMappingQ1< 1 >::compute_shapes_virtual | ( | const std::vector< Point< 1 > > & | quadrature_points, | |
InternalData & | data | |||
) | const [inline] |
void MyMappingQ1< 2 >::compute_shapes_virtual | ( | const std::vector< Point< 2 > > & | quadrature_points, | |
InternalData & | data | |||
) | const [inline] |
void MyMappingQ1< 1 >::compute_face_data | ( | const UpdateFlags | update_flags, | |
const Quadrature< 1 > & | q, | |||
const unsigned int | n_original_q_points, | |||
InternalData & | data | |||
) | const [inline] |
void MyMappingQ1< 1 >::compute_fill_face | ( | const Triangulation< 1 >::cell_iterator & | , | |
const unsigned | int, | |||
const | bool, | |||
const unsigned | int, | |||
const | DataSetDescriptor, | |||
const std::vector< double > & | , | |||
InternalData & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | , | |||
std::vector< Tensor< 1, 1 > > & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | ||||
) | const [inline] |
void MyMappingQ1< 1 >::fill_fe_face_values | ( | const Triangulation< 1 >::cell_iterator & | , | |
const | unsigned, | |||
const Quadrature< 0 > & | , | |||
Mapping< 1 >::InternalDataBase & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | , | |||
std::vector< Tensor< 1, 1 > > & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | ||||
) | const [inline] |
void MyMappingQ1< 1 >::fill_fe_subface_values | ( | const Triangulation< 1 >::cell_iterator & | , | |
const | unsigned, | |||
const | unsigned, | |||
const Quadrature< 0 > & | , | |||
Mapping< 1 >::InternalDataBase & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | , | |||
std::vector< Tensor< 1, 1 > > & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | ||||
) | const [inline] |
void MyMappingQ1< 1 >::compute_shapes_virtual | ( | const std::vector< Point< 1 > > & | quadrature_points, | |
InternalData & | data | |||
) | const [inline] |
void MyMappingQ1< 2 >::compute_shapes_virtual | ( | const std::vector< Point< 2 > > & | quadrature_points, | |
InternalData & | data | |||
) | const [inline] |
void MyMappingQ1< 3 >::compute_shapes_virtual | ( | const std::vector< Point< 3 > > & | quadrature_points, | |
InternalData & | data | |||
) | const [inline] |
void MyMappingQ1< 1 >::compute_face_data | ( | const | UpdateFlags, | |
const Quadrature< 1 > & | , | |||
const unsigned | int, | |||
InternalData & | ||||
) | const [inline] |
void MyMappingQ1< 1 >::compute_fill_face | ( | const Triangulation< 1 >::cell_iterator & | , | |
const unsigned | int, | |||
const | bool, | |||
const unsigned | int, | |||
const | DataSetDescriptor, | |||
const std::vector< double > & | , | |||
InternalData & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | , | |||
std::vector< Tensor< 1, 1 > > & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | ||||
) | const [inline] |
void MyMappingQ1< 1 >::fill_fe_face_values | ( | const Triangulation< 1 >::cell_iterator & | , | |
const | unsigned, | |||
const Quadrature< 0 > & | , | |||
Mapping< 1 >::InternalDataBase & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | , | |||
std::vector< Tensor< 1, 1 > > & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | ||||
) | const [inline] |
void MyMappingQ1< 1 >::fill_fe_subface_values | ( | const Triangulation< 1 >::cell_iterator & | , | |
const | unsigned, | |||
const | unsigned, | |||
const Quadrature< 0 > & | , | |||
Mapping< 1 >::InternalDataBase & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | , | |||
std::vector< Tensor< 1, 1 > > & | , | |||
std::vector< Point< 1 > > & | , | |||
std::vector< double > & | ||||
) | const [inline] |
const unsigned int MyMappingQ1< dim >::n_shape_functions = GeometryInfo<dim>::vertices_per_cell [inline, static, private] |
Number of shape functions. Is simply the number of vertices per cell for the Q1 mapping.