Assert (data.shape_gradients[k].size() <=
fe_data.shape_gradients[k].size(),
ExcInternalError());
- mapping.transform_covariant(fe_data.shape_gradients[k], 0,
- data.shape_gradients[k],
- mapping_data);
+ mapping.transform(fe_data.shape_gradients[k],
+ data.shape_gradients[k],
+ mapping_data, mapping_covariant);
}
}
Assert (data.shape_gradients[k].size() <=
fe_data.shape_gradients[k].size(),
ExcInternalError());
- mapping.transform_covariant(fe_data.shape_gradients[k], 0,
- data.shape_gradients[k],
- mapping_data);
+ mapping.transform(fe_data.shape_gradients[k],
+ data.shape_gradients[k],
+ mapping_data, mapping_covariant);
}
}
for (unsigned int i=0; i<quadrature.size(); ++i)
data.shape_values(k,i) = fe_data.shape_values[k][i];
+// TODO: I would think this should work. Guido
+
if (flags & update_gradients)
{
AssertThrow(false, ExcNotImplemented());
-/* Assert (data.shape_gradients[k].size() */
-/* fe_data.shape_gradients[k].size(), */
-/* ExcInternalError()); */
-/* mapping.transform_covariant(fe_data.shape_gradients[k], 0, */
-/* data.shape_gradients[k], */
-/* mapping_data); */
+// mapping.transform(fe_data.shape_gradients[k], 0,
+// data.shape_gradients[k],
+// mapping_data, mapping_covariant);
}
}
- // const typename QProjector<1>::DataSetDescriptor dsd;
+ // const typename QProjector<1>::DataSetDescriptor dsd;
if (flags & update_hessians)
{
AssertThrow(false, ExcNotImplemented());
/* Assert (data.shape_gradients[k].size() */
/* fe_data.shape_gradients[k].size(), */
/* ExcInternalError()); */
-/* mapping.transform_covariant(fe_data.shape_gradients[k], 0, */
+/* mapping.transform(fe_data.shape_gradients[k], 0, */
/* data.shape_gradients[k], */
-/* mapping_data); */
+/* mapping_data, mapping_covariant); */
}
}
data.shape_values(k,i) = fe_data.shape_values[k][i];
if (flags & update_gradients)
- {
- Assert (data.shape_gradients[k].size() <=
- fe_data.shape_gradients[k].size(),
- ExcInternalError());
- mapping.transform_covariant(fe_data.shape_gradients[k], 0,
- data.shape_gradients[k],
- mapping_data);
- }
+ mapping.transform(fe_data.shape_gradients[k], data.shape_gradients[k],
+ mapping_data, mapping_covariant);
}
const typename QProjector<dim>::DataSetDescriptor dsd;
data.shape_values(k,i) = fe_data.shape_values[k][i+offset];
if (flags & update_gradients)
- {
- Assert (data.shape_gradients[k].size() + offset <=
- fe_data.shape_gradients[k].size(),
- ExcInternalError());
- mapping.transform_covariant(make_slice(fe_data.shape_gradients[k], offset, quadrature.size()),
- 0, data.shape_gradients[k],
- mapping_data);
- }
+ mapping.transform(make_slice(fe_data.shape_gradients[k], offset, quadrature.size()),
+ data.shape_gradients[k],
+ mapping_data, mapping_covariant);
}
if (flags & update_hessians)
Assert (data.shape_gradients[k].size() + offset <=
fe_data.shape_gradients[k].size(),
ExcInternalError());
- mapping.transform_covariant(make_slice(fe_data.shape_gradients[k], offset, quadrature.size()),
- 0, data.shape_gradients[k],
- mapping_data);
+ mapping.transform(make_slice(fe_data.shape_gradients[k], offset, quadrature.size()),
+ data.shape_gradients[k],
+ mapping_data, mapping_covariant);
}
}
* the transform() functions of
* inheriting classes in order to
* work.
+ *
+ * Mappings are usually defined
+ * for vectors. If such a
+ * MappingType is applied to a
+ * rank 2 tensor, it is implied
+ * that the resulting Tensor
+ * corresponds to the derivative
+ * of the vector.
*/
enum MappingType
{
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
Assert (diff_quot2.size() <=
diff_quot[d].size(),
ExcInternalError());
- mapping.transform_covariant (diff_quot[d], 0, diff_quot2,
- mapping_internal);
+ mapping.transform (diff_quot[d], diff_quot2,
+ mapping_internal, mapping_covariant);
for (unsigned int q=0; q<n_q_points; ++q)
for (unsigned int d1=0; d1<dim; ++d1)
// values...
Assert (fe_data.shape_values[k].size() == n_q_points,
ExcInternalError());
- mapping.transform_covariant(fe_data.shape_values[k], 0,
- shape_values,
- mapping_data);
+ mapping.transform(fe_data.shape_values[k], shape_values,
+ mapping_data, mapping_covariant);
// then copy over to target:
for (unsigned int q=0; q<n_q_points; ++q)
Assert (fe_data.shape_gradients[k].size() == n_q_points,
ExcInternalError());
// do first transformation
- mapping.transform_covariant(fe_data.shape_gradients[k], 0,
- shape_grads1,
- mapping_data);
+ mapping.transform(fe_data.shape_gradients[k], shape_grads1,
+ mapping_data, mapping_covariant);
// transpose matrix
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
// do second transformation
- mapping.transform_covariant(shape_grads2, 0, shape_grads1,
- mapping_data);
+ mapping.transform(shape_grads2, shape_grads1,
+ mapping_data, mapping_covariant);
// transpose back
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
{
// first transform shape
// values...
- mapping.transform_covariant(make_slice(fe_data.shape_values[k], offset, n_q_points),
- 0,
- shape_values,
- mapping_data);
+ mapping.transform(make_slice(fe_data.shape_values[k], offset, n_q_points),
+ shape_values, mapping_data, mapping_covariant);
// then copy over to target:
for (unsigned int q=0; q<n_q_points; ++q)
// little in between
//
// do first transformation
- mapping.transform_covariant(make_slice(fe_data.shape_gradients[k], offset, n_q_points),
- 0, shape_grads1,
- mapping_data);
+ mapping.transform(make_slice(fe_data.shape_gradients[k], offset, n_q_points),
+ shape_grads1, mapping_data, mapping_covariant);
// transpose matrix
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
// do second transformation
- mapping.transform_covariant(shape_grads2, 0, shape_grads1,
- mapping_data);
+ mapping.transform(shape_grads2, shape_grads1,
+ mapping_data, mapping_covariant);
// transpose back
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
{
// first transform shape
// values...
- mapping.transform_covariant(make_slice(fe_data.shape_values[k], offset, n_q_points),
- 0, shape_values,
- mapping_data);
+ mapping.transform(make_slice(fe_data.shape_values[k], offset, n_q_points),
+ shape_values, mapping_data, mapping_covariant);
// then copy over to target:
for (unsigned int q=0; q<n_q_points; ++q)
// little in between
//
// do first transformation
- mapping.transform_covariant(make_slice(fe_data.shape_gradients[k], offset, n_q_points),
- 0, shape_grads1,
- mapping_data);
+ mapping.transform(make_slice(fe_data.shape_gradients[k], offset, n_q_points),
+ shape_grads1, mapping_data, mapping_covariant);
// transpose matrix
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
// do second transformation
- mapping.transform_covariant(shape_grads2, 0, shape_grads1,
- mapping_data);
+ mapping.transform(shape_grads2, shape_grads1,
+ mapping_data, mapping_covariant);
// transpose back
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
// transformation
std::vector<Tensor<1,dim> > shape_values (n_q_points);
if (mapping_type == covariant)
- mapping.transform_covariant(fe_data.shape_values[i], 0,
- shape_values, mapping_data);
+ mapping.transform(fe_data.shape_values[i],
+ shape_values, mapping_data, mapping_covariant);
else
- mapping.transform_contravariant(fe_data.shape_values[i], 0,
- shape_values, mapping_data);
+ mapping.transform(fe_data.shape_values[i],
+ shape_values, mapping_data, mapping_contravariant);
// then copy over to target:
for (unsigned int k=0; k<n_q_points; ++k)
case independent:
case independent_on_cartesian:
{
- mapping.transform_covariant(fe_data.shape_grads[i], 0,
- shape_grads1,
- mapping_data);
+ mapping.transform(fe_data.shape_grads[i], shape_grads1,
+ mapping_data, mapping_covariant);
for (unsigned int k=0; k<n_q_points; ++k)
for (unsigned int d=0; d<dim; ++d)
data.shape_gradients[first+d][k] = shape_grads1[k][d];
case covariant:
{
- mapping.transform_covariant(fe_data.shape_grads[i], 0,
- shape_grads1,
- mapping_data);
+ mapping.transform(fe_data.shape_grads[i], shape_grads1,
+ mapping_data, mapping_covariant);
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
// do second transformation
- mapping.transform_covariant(shape_grads2, 0, shape_grads1,
- mapping_data);
+ mapping.transform(shape_grads2, shape_grads1,
+ mapping_data, mapping_covariant);
// transpose back
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
case contravariant:
{
- mapping.transform_covariant(fe_data.shape_grads[i], 0,
- shape_grads1,
- mapping_data);
-
- mapping.transform_contravariant(shape_grads1, 0,
- shape_grads2,
- mapping_data);
+ mapping.transform(fe_data.shape_grads[i], shape_grads1,
+ mapping_data, mapping_covariant);
+
+ mapping.transform(shape_grads1, shape_grads2,
+ mapping_data, mapping_contravariant);
for (unsigned int k=0; k<n_q_points; ++k)
for (unsigned int d=0; d<dim; ++d)
// for transformation
std::vector<Tensor<1,dim> > shape_values (n_q_points);
if (mapping_type == covariant)
- mapping.transform_covariant(make_slice(fe_data.shape_values[i], offset, n_q_points),
- 0, shape_values, mapping_data);
+ mapping.transform(make_slice(fe_data.shape_values[i], offset, n_q_points),
+ shape_values, mapping_data, mapping_covariant);
else
- mapping.transform_contravariant(make_slice(fe_data.shape_values[i], offset, n_q_points),
- 0, shape_values, mapping_data);
+ mapping.transform(make_slice(fe_data.shape_values[i], offset, n_q_points),
+ shape_values, mapping_data, mapping_contravariant);
// then copy over to target:
for (unsigned int k=0; k<n_q_points; ++k)
case independent:
case independent_on_cartesian:
{
- mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
- 0, shape_grads1, mapping_data);
+ mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ shape_grads1, mapping_data, mapping_covariant);
for (unsigned int k=0; k<n_q_points; ++k)
for (unsigned int d=0; d<dim; ++d)
data.shape_gradients[first+d][k] = shape_grads1[k][d];
case covariant:
{
- mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
- 0, shape_grads1, mapping_data);
+ mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ shape_grads1, mapping_data, mapping_covariant);
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
// do second transformation
- mapping.transform_covariant(shape_grads2, 0, shape_grads1,
- mapping_data);
+ mapping.transform(shape_grads2, shape_grads1,
+ mapping_data, mapping_covariant);
// transpose back
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
case contravariant:
{
- mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
- 0, shape_grads1,
- mapping_data);
+ mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ shape_grads1, mapping_data, mapping_covariant);
- mapping.transform_contravariant(shape_grads1, 0,
- shape_grads2,
- mapping_data);
+ mapping.transform(shape_grads1, shape_grads2,
+ mapping_data, mapping_contravariant);
for (unsigned int k=0; k<n_q_points; ++k)
for (unsigned int d=0; d<dim; ++d)
// transformation
std::vector<Tensor<1,dim> > shape_values (n_q_points);
if (mapping_type == covariant)
- mapping.transform_covariant(make_slice(fe_data.shape_values[i], offset, n_q_points),
- 0, shape_values, mapping_data);
+ mapping.transform(make_slice(fe_data.shape_values[i], offset, n_q_points),
+ shape_values, mapping_data, mapping_covariant);
else
- mapping.transform_contravariant(make_slice(fe_data.shape_values[i], offset, n_q_points),
- 0, shape_values, mapping_data);
+ mapping.transform(make_slice(fe_data.shape_values[i], offset, n_q_points),
+ shape_values, mapping_data, mapping_contravariant);
// then copy over to target:
for (unsigned int k=0; k<n_q_points; ++k)
case independent:
case independent_on_cartesian:
{
- mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
- 0, shape_grads1, mapping_data);
+ mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ shape_grads1, mapping_data, mapping_covariant);
for (unsigned int k=0; k<n_q_points; ++k)
for (unsigned int d=0; d<dim; ++d)
data.shape_gradients[first+d][k] = shape_grads1[k][d];
case covariant:
{
- mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
- 0, shape_grads1,
- mapping_data);
+ mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ shape_grads1, mapping_data, mapping_covariant);
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
// do second transformation
- mapping.transform_covariant(shape_grads2, 0, shape_grads1,
- mapping_data);
+ mapping.transform(shape_grads2, shape_grads1,
+ mapping_data, mapping_covariant);
// transpose back
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
case contravariant:
{
- mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
- 0, shape_grads1,
- mapping_data);
+ mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ shape_grads1, mapping_data, mapping_covariant);
- mapping.transform_contravariant(shape_grads1, 0,
- shape_grads2,
- mapping_data);
+ mapping.transform(shape_grads1, shape_grads2,
+ mapping_data, mapping_contravariant);
for (unsigned int k=0; k<n_q_points; ++k)
for (unsigned int d=0; d<dim; ++d)
ExcDimensionMismatch(normal_vectors.size(), n_q_points));
if (update_flags & update_JxW_values)
Assert (JxW_values.size() == n_q_points,
- ExcDimensionMismatch(JxW_values.size(), n_q_points));
+ ExcDimensionMismatch(JxW_values.size(), n_q_points));
-
- Assert (data.aux[0].size() <= data.unit_tangentials[face_no].size(),
- ExcInternalError());
- transform_contravariant(data.unit_tangentials[face_no], 0,
- data.aux[0],
- data);
+ transform(data.unit_tangentials[face_no], data.aux[0],
+ data, mapping_contravariant);
typename std::vector<Tensor<1,dim> >::iterator
result = boundary_forms.begin();
Assert (data.aux[1].size() <=
data.unit_tangentials[face_no+GeometryInfo<dim>::faces_per_cell].size(),
ExcInternalError());
- transform_contravariant(data.unit_tangentials[
- face_no+GeometryInfo<dim>::faces_per_cell], 0,
- data.aux[1],
- data);
+ transform(data.unit_tangentials[face_no+GeometryInfo<dim>::faces_per_cell],
+ data.aux[1], data, mapping_contravariant);
for (unsigned int i=0; result != end; ++result, ++i)
cross_product (*result, data.aux[0][i], data.aux[1][i]);
}
+// This function is deprecated and has been replaced by transform above
template<int dim, int spacedim>
void
MappingQ1<dim,spacedim>::transform_covariant (
+// This function is deprecated and has been replaced by transform above
template <int dim, int spacedim>
void
MappingQ1<dim, spacedim>::transform_covariant (
#if deal_II_dimension == 1
+
+// This function is deprecated and has been replaced by transform above
template <>
void
MappingQ1<1, 2>::transform_covariant (
#if deal_II_dimension == 2
+
+// This function is deprecated and has been replaced by transform above
template <>
void
MappingQ1<2, 3>::transform_covariant (
#endif
+// This function is deprecated and has been replaced by transform above
template<int dim, int spacedim>
void
-MappingQ1<dim,spacedim>::
-transform_contravariant (
+MappingQ1<dim,spacedim>::transform_contravariant (
const VectorSlice<const std::vector<Tensor<1,dim> > > input,
const unsigned int offset,
VectorSlice<std::vector<Tensor<1,spacedim> > > output,
+// This function is deprecated and has been replaced by transform above
template<int dim, int spacedim>
void
MappingQ1<dim,spacedim>::transform_contravariant (
#if deal_II_dimension == 1
+// This function is deprecated and has been replaced by transform above
template <>
void
MappingQ1<1, 2>::transform_contravariant (
#if deal_II_dimension == 2
+// This function is deprecated and has been replaced by transform above
template <>
void
MappingQ1<2, 3>::transform_contravariant (