// $Id$
// Version: $Name$
//
-// Copyright (C) 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 2001, 2002, 2003, 2004 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* Mapping of an axis-parallel cell.
*
* This class maps the unit cell to a grid cell with surfaces parallel
- * to the coordinate lines/planes. It is specifically developed for
+ * to the coordinate lines/planes. The mapping is therefore a scaling
+ * along the coordinate directions. It is specifically developed for
* cartesian meshes. Apply this mapping to a general mesh to get
* strange results.
*
class MappingCartesian : public Mapping<dim>
{
public:
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual
typename Mapping<dim>::InternalDataBase *
get_data (const UpdateFlags,
const Quadrature<dim>& quadrature) const;
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual
typename Mapping<dim>::InternalDataBase *
get_face_data (const UpdateFlags flags,
const Quadrature<dim-1>& quadrature) const;
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual
typename Mapping<dim>::InternalDataBase *
get_subface_data (const UpdateFlags flags,
const Quadrature<dim-1>& quadrature) const;
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual void
fill_fe_values (const typename DoFHandler<dim>::cell_iterator &cell,
const Quadrature<dim>& quadrature,
std::vector<Point<dim> > &quadrature_points,
std::vector<double> &JxW_values) const ;
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual void
fill_fe_face_values (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
std::vector<double> &JxW_values,
std::vector<Tensor<1,dim> > &boundary_form,
std::vector<Point<dim> > &normal_vectors) const ;
-
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual void
fill_fe_subface_values (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
std::vector<Tensor<1,dim> > &boundary_form,
std::vector<Point<dim> > &normal_vectors) const ;
-
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual void
transform_covariant (Tensor<1,dim> *begin,
Tensor<1,dim> *end,
const Tensor<1,dim> *src,
const typename Mapping<dim>::InternalDataBase &internal) const;
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual void
transform_covariant (Tensor<2,dim> *begin,
Tensor<2,dim> *end,
const Tensor<2,dim> *src,
const typename Mapping<dim>::InternalDataBase &internal) const;
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual void
transform_contravariant (Tensor<1,dim> *begin,
Tensor<1,dim> *end,
const Tensor<1,dim> *src,
const typename Mapping<dim>::InternalDataBase &internal) const;
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
virtual void
transform_contravariant (Tensor<2,dim> *begin,
Tensor<2,dim> *end,
const Tensor<2,dim> *src,
const typename Mapping<dim>::InternalDataBase &internal) const;
- /**
- * Transforms the point @p{p} on
- * the unit cell to the point
- * @p{p_real} on the real cell
- * @p{cell} and returns @p{p_real}.
- */
virtual Point<dim>
transform_unit_to_real_cell (
const typename Triangulation<dim>::cell_iterator &cell,
const typename Triangulation<dim>::cell_iterator &cell,
const Point<dim> &p) const;
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
- virtual UpdateFlags update_once (const UpdateFlags) const;
-
- /**
- * Implementation of the interface in
- * @ref{Mapping}.
- */
+ virtual UpdateFlags update_once (const UpdateFlags) const;
virtual UpdateFlags update_each (const UpdateFlags) const;
/**
protected:
/**
* Storage for internal data of
- * d-linear transformation.
+ * the scaling.
*/
class InternalData : public Mapping<dim>::InternalDataBase
{
/**
* Length of the cell in
* different coordinate
- * directions, @p{h_x},
- * @p{h_y}, @p{h_z}.
+ * directions, <i>h<sub>x</sub></i>,
+ * <i>h<sub>y</sub></i>, <i>h<sub>z</sub></i>.
*/
Tensor<1,dim> length;
/**
* Vector of all quadrature
* points. Especially, all
- * points of all faces.
+ * points on all faces.
*/
std::vector<Point<dim> > quadrature_points;
};
/**
* Do the computation for the
- * @p{fill_*} functions.
+ * <tt>fill_*</tt> functions.
*/
void compute_fill (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no,
/* -------------- declaration of explicit specializations ------------- */
+/// @if NoDoc
template <> void MappingCartesian<1>::fill_fe_face_values (
const DoFHandler<1>::cell_iterator &,
std::vector<Tensor<1,1> >&,
std::vector<Point<1> >&) const;
-
+/// @endif
#endif
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
{
const UpdateFlags update_flags(data.current_update_flags());
- const unsigned int npts = quadrature_points.size ();
-
- const typename QProjector<dim>::DataSetDescriptor offset
- = (face_no == invalid_face_number
- ?
- QProjector<dim>::DataSetDescriptor::cell()
- :
- (sub_no == invalid_face_number
- ?
- // called from FEFaceValues
- QProjector<dim>::DataSetDescriptor::face (face_no,
- cell->face_orientation(face_no),
- quadrature_points.size())
- :
- // called from FESubfaceValues
- QProjector<dim>::DataSetDescriptor::sub_face (face_no, sub_no,
- cell->face_orientation(face_no),
- quadrature_points.size())
- ));
-
// some more sanity checks
if (face_no != invalid_face_number)
{
// each direction
if (update_flags & update_q_points)
{
- Assert (quadrature_points.size() == npts,
- ExcDimensionMismatch(quadrature_points.size(), npts));
- for (unsigned int i=0; i<npts; ++i)
+ const typename QProjector<dim>::DataSetDescriptor offset
+ = (face_no == invalid_face_number
+ ?
+ QProjector<dim>::DataSetDescriptor::cell()
+ :
+ (sub_no == invalid_face_number
+ ?
+ // called from FEFaceValues
+ QProjector<dim>::DataSetDescriptor::face (face_no,
+ cell->face_orientation(face_no),
+ quadrature_points.size())
+ :
+ // called from FESubfaceValues
+ QProjector<dim>::DataSetDescriptor::sub_face (face_no, sub_no,
+ cell->face_orientation(face_no),
+ quadrature_points.size())
+ ));
+
+//This assertion was nonsense, since we let npts = quadrature_points.size() above
+// Assert (quadrature_points.size() == npts,
+// ExcDimensionMismatch(quadrature_points.size(), npts));
+ for (unsigned int i=0; i<quadrature_points.size(); ++i)
{
quadrature_points[i] = start;
for (unsigned int d=0; d<dim; ++d)
// value
if (update_flags & update_normal_vectors)
{
- Assert (normal_vectors.size() == npts,
- ExcDimensionMismatch(normal_vectors.size(), npts));
+// We would like to have an assertion like this, but if
+// we do not compute quadrature points, npts is zero.
+
+// Assert (normal_vectors.size() == npts,
+// ExcDimensionMismatch(normal_vectors.size(), npts));
Assert (face_no < GeometryInfo<dim>::faces_per_cell,
ExcInternalError());