* @author Ralf Hartmann, 1998
*/
template <int dim>
-class FEDG_Q0 : public FELinearMapping<dim> {
+class FEDG_Q0 : public FEQ1Mapping<dim> {
public:
/**
* Constructor
/*---------------------------- fe_lib.h ---------------------------*/
-#include <fe/fe_linear_mapping.h>
-
-#define FELinear FEQ1
-#define FEQuadraticSub FEQ2
-#define FECubicSub FEQ3
-#define FEQuarticSub FEQ4
+#include <fe/q1_mapping.h>
/**
- * Define a (bi-, tri-, etc)linear finite element in #dim# space dimensions,
- * along with (bi-, tri-)linear (therefore isoparametric) transforms from the
- * unit cell to the real cell.
+ * Isoparametric Q1 finite element in #dim# space dimensions.
*
* The linear, isoparametric mapping from a point $\vec \xi$ on the unit cell
* to a point $\vec x$ on the real cell is defined as
* @author Wolfgang Bangerth, 1998, 1999
*/
template <int dim>
-class FEQ1 : public FELinearMapping<dim> {
+class FEQ1
+ :
+ public FEQ1Mapping<dim>
+{
public:
/**
* Constructor
/**
* Constructor that is called by the
* constructor of the derived
- * #FEDGLinear# class.
+ * #FEDG_Q1# class.
* It uses no dofs in the vertices and
* $2^d$ dofs per cell. No constraint
* matrices are build.
/**
- * Define a (bi-, tri-, etc)quadratic finite element in #dim# space dimensions.
- * A linear (subparametric) mapping from the unit cell
+ * Subparametric Q2 finite element in #dim# space dimensions.
+ * A Q1 mapping from the unit cell
* to the real cell is implemented.
*
* The numbering of the degrees of freedom is as follows:
* @author Wolfgang Bangerth, 1998, 1999
*/
template <int dim>
-class FEQ2 : public FELinearMapping<dim> {
+class FEQ2
+ :
+ public FEQ1Mapping<dim>
+{
public:
/**
* Constructor
/**
- * Define a (bi-, tri-, etc)cubic finite element in #dim# space dimensions.
- * A linear (subparametric) mapping from the unit cell
+ * Subparametric Q3 finite element in #dim# space dimensions.
+ * A Q1 mapping from the unit cell
* to the real cell is implemented.
*
* The numbering of degrees of freedom in one spatial dimension is as follows:
* @author Wolfgang Bangerth, 1998
*/
template <int dim>
-class FEQ3 : public FELinearMapping<dim> {
+class FEQ3
+ :
+ public FEQ1Mapping<dim>
+{
public:
/**
* Constructor
/**
- * Define a (bi-, tri-, etc)quartic finite element in #dim# space dimensions.
+ * Subparametric Q4 finite element in #dim# space dimensions.
* A linear (subparametric) mapping from the unit cell
* to the real cell is implemented.
*
* @author Wolfgang Bangerth, 1998
*/
template <int dim>
-class FEQ4 : public FELinearMapping<dim> {
+class FEQ4
+ :
+ public FEQ1Mapping<dim>
+{
public:
/**
* Constructor
* \textit{from the right}; the whole situation is a bit confusing and it
* either takes deep though or trial-and-error to do it right. Some more
* information on this can be found in the source code documentation for the
- * #FELinearMapping<dim>::fill_fe_values# function, where also a small test
+ * #FEQ1Mapping<dim>::fill_fe_values# function, where also a small test
* program is presented.
*
* The derivatives of the Jacobi matrices at the quadrature points with respect
-/*---------------------------- fe_linear_mapping.h ---------------------------*/
+/*---------------------------- q1_mapping.h ---------------------------*/
/* $Id$ */
/* Copyright W. Bangerth, University of Heidelberg, 1998 */
-#ifndef __fe_linear_mapping_H
-#define __fe_linear_mapping_H
-/*---------------------------- fe_linear_mapping.h ---------------------------*/
-
+#ifndef __fe_q1_mapping_H
+#define __fe_q1_mapping_H
+/*---------------------------- q1_mapping.h ---------------------------*/
+// File has moved from fe_linear_mapping.h
#include <cmath>
#include <fe/fe.h>
* are implemented here and do not have to be taken care of later.
*/
template <int dim>
-class FELinearMapping
+class FEQ1Mapping
:
public FiniteElement<dim>
{
* two space dimensions, #dofs_per_hex#
* shall be zero.
*/
- FELinearMapping (const unsigned int dofs_per_vertex,
+ FEQ1Mapping (const unsigned int dofs_per_vertex,
const unsigned int dofs_per_line,
const unsigned int dofs_per_quad=0,
const unsigned int dofs_per_hex =0,
-/*---------------------------- fe_linear_mapping.h ---------------------------*/
-/* end of #ifndef __fe_linear_mapping_H */
+/*---------------------------- q1_mapping.h ---------------------------*/
+/* end of #ifndef __q1_mapping_H */
#endif
-/*---------------------------- fe_linear_mapping.h ---------------------------*/
+/*---------------------------- q1_mapping.h ---------------------------*/
The scheme laid down above was originally used. Due to recent advances
in the authors understanding of most basic things, it was dropped and
- replaced by the following version. See #FELinearMapping<dim>::fill_fe_values#
+ replaced by the following version. See #FEQ1Mapping<dim>::fill_fe_values#
for more information on this.
*/
template <>
FEQ3<1>::FEQ3 () :
- FELinearMapping<1> (1, 2) {
+ FEQ1Mapping<1> (1, 2) {
initialize_matrices ();
};
template <>
FEQ3<1>::FEQ3 (const int) :
- FELinearMapping<1> (0, 4)
+ FEQ1Mapping<1> (0, 4)
{
initialize_matrices ();
};
template <>
FEQ3<2>::FEQ3 () :
- FELinearMapping<2> (1, 2, 4)
+ FEQ1Mapping<2> (1, 2, 4)
{
interface_constraints(0,0) = -1.0/16.0;
interface_constraints(0,1) = -1.0/16.0;
template <>
FEQ3<2>::FEQ3 (const int) :
- FELinearMapping<2> (0, 0, 16)
+ FEQ1Mapping<2> (0, 0, 16)
{
initialize_matrices ();
};
template <>
FEQ3<3>::FEQ3 () :
- FELinearMapping<3> (1, 2, 4, 8)
+ FEQ1Mapping<3> (1, 2, 4, 8)
{
interface_constraints(0,0) = 1.0/256.0;
interface_constraints(0,1) = 1.0/256.0;
template <>
FEQ3<3>::FEQ3 (const int) :
- FELinearMapping<3> (0, 0, 0, 64)
+ FEQ1Mapping<3> (0, 0, 0, 64)
{
initialize_matrices ();
};
template <>
FEDG_Q0<1>::FEDG_Q0 () :
- FELinearMapping<1> (0, 1)
+ FEQ1Mapping<1> (0, 1)
{
// for restriction and prolongation matrices:
// note that we do not add up all the
template <>
FEDG_Q0<2>::FEDG_Q0 () :
- FELinearMapping<2> (0, 0, 1)
+ FEQ1Mapping<2> (0, 0, 1)
{
// The restriction matrices got crazy values
// as it is yet not clear how they should work
template <>
FEQ1<1>::FEQ1 () :
- FELinearMapping<1> (1, 0)
+ FEQ1Mapping<1> (1, 0)
{
initialize_matrices ();
};
template <>
FEQ1<1>::FEQ1 (const int) :
- FELinearMapping<1> (0, 2)
+ FEQ1Mapping<1> (0, 2)
{
initialize_matrices ();
};
template <>
FEQ1<2>::FEQ1 () :
- FELinearMapping<2> (1, 0, 0)
+ FEQ1Mapping<2> (1, 0, 0)
{
interface_constraints(0,0) = 1./2.;
interface_constraints(0,1) = 1./2.;
template <>
FEQ1<2>::FEQ1 (const int) :
- FELinearMapping<2> (0, 0, 4)
+ FEQ1Mapping<2> (0, 0, 4)
{
initialize_matrices ();
};
template <>
FEQ1<3>::FEQ1 () :
- FELinearMapping<3> (1, 0, 0, 0)
+ FEQ1Mapping<3> (1, 0, 0, 0)
{
interface_constraints(0,0) = 1.0/4.0;
interface_constraints(0,1) = 1.0/4.0;
template <>
FEQ1<3>::FEQ1 (const int) :
- FELinearMapping<3> (0, 0, 0, 8)
+ FEQ1Mapping<3> (0, 0, 0, 8)
{
initialize_matrices ();
};
template <>
FEQ2<1>::FEQ2 () :
- FELinearMapping<1> (1, 1) {
+ FEQ1Mapping<1> (1, 1) {
initialize_matrices ();
};
template <>
FEQ2<1>::FEQ2 (const int) :
- FELinearMapping<1> (0, 3) {
+ FEQ1Mapping<1> (0, 3) {
initialize_matrices ();
};
template <>
FEQ2<2>::FEQ2 () :
- FELinearMapping<2> (1, 1, 1)
+ FEQ1Mapping<2> (1, 1, 1)
{
interface_constraints(0,2) = 1.0;
interface_constraints(1,0) = 3./8.;
template <>
FEQ2<2>::FEQ2 (const int) :
- FELinearMapping<2> (0, 0, 9)
+ FEQ1Mapping<2> (0, 0, 9)
{
initialize_matrices ();
};
template <>
FEQ2<3>::FEQ2 () :
- FELinearMapping<3> (1, 1, 1, 1)
+ FEQ1Mapping<3> (1, 1, 1, 1)
{
interface_constraints(0,8) = 1.0;
interface_constraints(1,4) = 1.0;
template <>
FEQ2<3>::FEQ2 (const int) :
- FELinearMapping<3> (0, 0, 0, 27)
+ FEQ1Mapping<3> (0, 0, 0, 27)
{
initialize_matrices ();
};
template <>
FEQ4<1>::FEQ4 () :
- FELinearMapping<1> (1, 3) {
+ FEQ1Mapping<1> (1, 3) {
initialize_matrices ();
};
template <>
FEQ4<1>::FEQ4 (const int) :
- FELinearMapping<1> (0, 5) {
+ FEQ1Mapping<1> (0, 5) {
initialize_matrices ();
};
template <>
FEQ4<2>::FEQ4 () :
- FELinearMapping<2> (1, 3, 9)
+ FEQ1Mapping<2> (1, 3, 9)
{
interface_constraints(0,3) = 1.0;
interface_constraints(1,0) = 35.0/128.0;
template <>
FEQ4<2>::FEQ4 (const int) :
- FELinearMapping<2> (0, 0, 25)
+ FEQ1Mapping<2> (0, 0, 25)
{
initialize_matrices ();
};
/* $Id$ */
/* Copyright W. Bangerth, University of Heidelberg, 1998 */
+// moved from file fe_linear_mapping.cc
-#include <fe/fe_linear_mapping.h>
+#include <fe/q1_mapping.h>
#include <base/quadrature.h>
#include <grid/tria_iterator.h>
#include <grid/dof_accessor.h>
-/*---------------------------- FELinearMapping ----------------------------------*/
+/*---------------------------- FEQ1Mapping ----------------------------------*/
#if deal_II_dimension == 1
template <>
-FELinearMapping<1>::FELinearMapping (const unsigned int dofs_per_vertex,
+FEQ1Mapping<1>::FEQ1Mapping (const unsigned int dofs_per_vertex,
const unsigned int dofs_per_line,
const unsigned int dofs_per_quad,
const unsigned int dofs_per_hex,
template <>
inline
double
-FELinearMapping<1>::shape_value_transform (const unsigned int i,
+FEQ1Mapping<1>::shape_value_transform (const unsigned int i,
const Point<1> &p) const
{
Assert((i<2), ExcInvalidIndex(i));
template <>
inline
Tensor<1,1>
-FELinearMapping<1>::shape_grad_transform(const unsigned int i,
+FEQ1Mapping<1>::shape_grad_transform(const unsigned int i,
const Point<1>&) const
{
Assert((i<2), ExcInvalidIndex(i));
template <>
-void FELinearMapping<1>::get_face_jacobians (const DoFHandler<1>::face_iterator &,
+void FEQ1Mapping<1>::get_face_jacobians (const DoFHandler<1>::face_iterator &,
const vector<Point<0> > &,
vector<double> &) const {
Assert (false, ExcInternalError());
template <>
-void FELinearMapping<1>::get_subface_jacobians (const DoFHandler<1>::face_iterator &,
+void FEQ1Mapping<1>::get_subface_jacobians (const DoFHandler<1>::face_iterator &,
const unsigned int ,
const vector<Point<0> > &,
vector<double> &) const {
template <>
-void FELinearMapping<1>::get_normal_vectors (const DoFHandler<1>::cell_iterator &,
+void FEQ1Mapping<1>::get_normal_vectors (const DoFHandler<1>::cell_iterator &,
const unsigned int,
const vector<Point<0> > &,
vector<Point<1> > &) const {
template <>
-void FELinearMapping<1>::get_normal_vectors (const DoFHandler<1>::cell_iterator &,
+void FEQ1Mapping<1>::get_normal_vectors (const DoFHandler<1>::cell_iterator &,
const unsigned int,
const unsigned int,
const vector<Point<0> > &,
template <>
-void FELinearMapping<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &cell,
+void FEQ1Mapping<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &cell,
const vector<Point<1> > &unit_points,
vector<Tensor<2,1> > &jacobians,
const bool compute_jacobians,
#if deal_II_dimension == 2
template <>
-FELinearMapping<2>::FELinearMapping (const unsigned int dofs_per_vertex,
+FEQ1Mapping<2>::FEQ1Mapping (const unsigned int dofs_per_vertex,
const unsigned int dofs_per_line,
const unsigned int dofs_per_quad,
const unsigned int dofs_per_hex,
template <>
inline
double
-FELinearMapping<2>::shape_value_transform (const unsigned int i,
+FEQ1Mapping<2>::shape_value_transform (const unsigned int i,
const Point<2>& p) const
{
Assert((i<4), ExcInvalidIndex(i));
template <>
inline
Tensor<1,2>
-FELinearMapping<2>::shape_grad_transform (const unsigned int i,
+FEQ1Mapping<2>::shape_grad_transform (const unsigned int i,
const Point<2>& p) const
{
Assert((i<4), ExcInvalidIndex(i));
template <>
-void FELinearMapping<2>::get_face_jacobians (const DoFHandler<2>::face_iterator &face,
+void FEQ1Mapping<2>::get_face_jacobians (const DoFHandler<2>::face_iterator &face,
const vector<Point<1> > &unit_points,
vector<double> &face_jacobians) const {
// more or less copied from the linear
template <>
-void FELinearMapping<2>::get_subface_jacobians (const DoFHandler<2>::face_iterator &face,
+void FEQ1Mapping<2>::get_subface_jacobians (const DoFHandler<2>::face_iterator &face,
const unsigned int ,
const vector<Point<1> > &unit_points,
vector<double> &face_jacobians) const {
template <>
-void FELinearMapping<2>::get_normal_vectors (const DoFHandler<2>::cell_iterator &cell,
+void FEQ1Mapping<2>::get_normal_vectors (const DoFHandler<2>::cell_iterator &cell,
const unsigned int face_no,
const vector<Point<1> > &unit_points,
vector<Point<2> > &normal_vectors) const {
template <>
-void FELinearMapping<2>::get_normal_vectors (const DoFHandler<2>::cell_iterator &cell,
+void FEQ1Mapping<2>::get_normal_vectors (const DoFHandler<2>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int,
const vector<Point<1> > &unit_points,
#if deal_II_dimension == 3
template <>
-FELinearMapping<3>::FELinearMapping (const unsigned int dofs_per_vertex,
+FEQ1Mapping<3>::FEQ1Mapping (const unsigned int dofs_per_vertex,
const unsigned int dofs_per_line,
const unsigned int dofs_per_quad,
const unsigned int dofs_per_hex,
template <>
inline
double
-FELinearMapping<3>::shape_value_transform (const unsigned int i,
+FEQ1Mapping<3>::shape_value_transform (const unsigned int i,
const Point<3>& p) const
{
Assert((i<8), ExcInvalidIndex(i));
template <>
inline
Tensor<1,3>
-FELinearMapping<3>::shape_grad_transform (const unsigned int i,
+FEQ1Mapping<3>::shape_grad_transform (const unsigned int i,
const Point<3>& p) const
{
Assert((i<8), ExcInvalidIndex(i));
template <>
-void FELinearMapping<3>::get_face_jacobians (const DoFHandler<3>::face_iterator &face,
+void FEQ1Mapping<3>::get_face_jacobians (const DoFHandler<3>::face_iterator &face,
const vector<Point<2> > &unit_points,
vector<double> &face_jacobians) const {
Assert (unit_points.size() == face_jacobians.size(),
template <>
-void FELinearMapping<3>::get_subface_jacobians (const DoFHandler<3>::face_iterator &/*face*/,
+void FEQ1Mapping<3>::get_subface_jacobians (const DoFHandler<3>::face_iterator &/*face*/,
const unsigned int ,
const vector<Point<2> > &unit_points,
vector<double> &face_jacobians) const {
template <>
-void FELinearMapping<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &cell,
+void FEQ1Mapping<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &cell,
const unsigned int face_no,
const vector<Point<2> > &unit_points,
vector<Point<3> > &normal_vectors) const {
template <>
-void FELinearMapping<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &/*cell*/,
+void FEQ1Mapping<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &/*cell*/,
const unsigned int /*face_no*/,
const unsigned int,
const vector<Point<2> > &unit_points,
template <int dim>
-void FELinearMapping<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
+void FEQ1Mapping<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
const vector<Point<dim> > &unit_points,
vector<Tensor<2,dim> > &jacobians,
const bool compute_jacobians,
/*------------------------------- Explicit Instantiations -------------*/
-template class FELinearMapping<deal_II_dimension>;
+template class FEQ1Mapping<deal_II_dimension>;
/* $Id$ */
/* Copyright W. Bangerth, University of Heidelberg, 1998 */
+// moved from file fe_linear_mapping_jacobians.cc
-#include <fe/fe_linear_mapping.h>
+#include <fe/q1_mapping.h>
#include <grid/tria_iterator.h>
#include <grid/dof_accessor.h>
/**
- * This file has been singled out from fe_linear_mapping.cc because the computation
+ * This file has been singled out from q1_mapping.cc because the computation
* of the 3d matrices is so extremely large that it can't be done with
* optimization switched on. On the other hand, this also is not necessary,
* because Maple outputs fairly good optimized code already. Singling out this file
#if deal_II_dimension == 1
template <>
-void FELinearMapping<1>::compute_jacobian_matrices (const DoFHandler<1>::cell_iterator &cell,
+void FEQ1Mapping<1>::compute_jacobian_matrices (const DoFHandler<1>::cell_iterator &cell,
const vector<Point<1> > &unit_points,
vector<Tensor<2,1> > &jacobians)
{
template <>
-void FELinearMapping<1>::compute_jacobian_gradients (const DoFHandler<1>::cell_iterator &,
+void FEQ1Mapping<1>::compute_jacobian_gradients (const DoFHandler<1>::cell_iterator &,
const vector<Point<1> > &unit_points,
vector<Tensor<3,1> > &jacobians_grad)
{
#if deal_II_dimension == 2
template <>
-void FELinearMapping<2>::compute_jacobian_matrices (const DoFHandler<2>::cell_iterator &cell,
+void FEQ1Mapping<2>::compute_jacobian_matrices (const DoFHandler<2>::cell_iterator &cell,
const vector<Point<2> > &unit_points,
vector<Tensor<2,2> > &jacobians)
{
template <>
-void FELinearMapping<2>::compute_jacobian_gradients (const DoFHandler<2>::cell_iterator &cell,
+void FEQ1Mapping<2>::compute_jacobian_gradients (const DoFHandler<2>::cell_iterator &cell,
const vector<Point<2> > &unit_points,
vector<Tensor<3,2> > &jacobians_grad)
{
#if deal_II_dimension == 3
template <>
-void FELinearMapping<3>::compute_jacobian_matrices (const DoFHandler<3>::cell_iterator &cell,
+void FEQ1Mapping<3>::compute_jacobian_matrices (const DoFHandler<3>::cell_iterator &cell,
const vector<Point<3> > &unit_points,
vector<Tensor<2,3> > &jacobians)
{
template <>
-void FELinearMapping<3>::compute_jacobian_gradients (const DoFHandler<3>::cell_iterator &cell,
+void FEQ1Mapping<3>::compute_jacobian_gradients (const DoFHandler<3>::cell_iterator &cell,
const vector<Point<3> > &unit_points,
vector<Tensor<3,3> > &jacobians_grad)
{