// $Id$
// Version: $Name$
//
-// Copyright (C) 2006, 2007, 2008 by the deal.II authors
+// Copyright (C) 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 (data.shape_gradients[k].size() + offset <=
fe_data.shape_gradients[k].size(),
ExcInternalError());
- mapping.transform_covariant(fe_data.shape_gradients[k], offset,
- data.shape_gradients[k],
+ mapping.transform_covariant(make_slice(fe_data.shape_gradients[k], offset, quadrature.size()),
+ 0, data.shape_gradients[k],
mapping_data);
}
}
Assert (data.shape_gradients[k].size() + offset <=
fe_data.shape_gradients[k].size(),
ExcInternalError());
- mapping.transform_covariant(fe_data.shape_gradients[k], offset,
- data.shape_gradients[k],
+ mapping.transform_covariant(make_slice(fe_data.shape_gradients[k], offset, quadrature.size()),
+ 0, data.shape_gradients[k],
mapping_data);
}
}
// $Id$
// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors
+// Copyright (C) 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
{
// first transform shape
// values...
- mapping.transform_covariant(fe_data.shape_values[k], offset,
+ mapping.transform_covariant(make_slice(fe_data.shape_values[k], offset, n_q_points),
+ 0,
shape_values,
mapping_data);
// little in between
//
// do first transformation
- mapping.transform_covariant(fe_data.shape_gradients[k], offset,
- shape_grads1,
+ mapping.transform_covariant(make_slice(fe_data.shape_gradients[k], offset, n_q_points),
+ 0, shape_grads1,
mapping_data);
// transpose matrix
for (unsigned int q=0; q<n_q_points; ++q)
{
// first transform shape
// values...
- mapping.transform_covariant(fe_data.shape_values[k], offset,
- shape_values,
+ mapping.transform_covariant(make_slice(fe_data.shape_values[k], offset, n_q_points),
+ 0, shape_values,
mapping_data);
// then copy over to target:
// little in between
//
// do first transformation
- mapping.transform_covariant(fe_data.shape_gradients[k], offset,
- shape_grads1,
+ mapping.transform_covariant(make_slice(fe_data.shape_gradients[k], offset, n_q_points),
+ 0, shape_grads1,
mapping_data);
// transpose matrix
for (unsigned int q=0; q<n_q_points; ++q)
// $Id$
// Version: $Name$
//
-// Copyright (C) 2005, 2006, 2007, 2008 by the deal.II authors
+// Copyright (C) 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
// for transformation
std::vector<Tensor<1,dim> > shape_values (n_q_points);
if (mapping_type == covariant)
- mapping.transform_covariant(fe_data.shape_values[i], offset,
- shape_values, mapping_data);
+ mapping.transform_covariant(make_slice(fe_data.shape_values[i], offset, n_q_points),
+ 0, shape_values, mapping_data);
else
- mapping.transform_contravariant(fe_data.shape_values[i], offset,
- shape_values, mapping_data);
+ mapping.transform_contravariant(make_slice(fe_data.shape_values[i], offset, n_q_points),
+ 0, shape_values, mapping_data);
// 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], offset,
- shape_grads1, mapping_data);
+ mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ 0, shape_grads1, mapping_data);
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], offset,
- shape_grads1,
- mapping_data);
+ mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ 0, shape_grads1, mapping_data);
for (unsigned int q=0; q<n_q_points; ++q)
shape_grads2[q] = transpose(shape_grads1[q]);
// do second transformation
case contravariant:
{
- mapping.transform_covariant(fe_data.shape_grads[i], offset,
- shape_grads1,
+ mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ 0, shape_grads1,
mapping_data);
mapping.transform_contravariant(shape_grads1, 0,
// transformation
std::vector<Tensor<1,dim> > shape_values (n_q_points);
if (mapping_type == covariant)
- mapping.transform_covariant(fe_data.shape_values[i], offset,
- shape_values, mapping_data);
+ mapping.transform_covariant(make_slice(fe_data.shape_values[i], offset, n_q_points),
+ 0, shape_values, mapping_data);
else
- mapping.transform_contravariant(fe_data.shape_values[i], offset,
- shape_values, mapping_data);
+ mapping.transform_contravariant(make_slice(fe_data.shape_values[i], offset, n_q_points),
+ 0, shape_values, mapping_data);
// 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], offset,
- shape_grads1, mapping_data);
+ mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ 0, shape_grads1, mapping_data);
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], offset,
- shape_grads1,
+ mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ 0, shape_grads1,
mapping_data);
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], offset,
- shape_grads1,
+ mapping.transform_covariant(make_slice(fe_data.shape_grads[i], offset, n_q_points),
+ 0, shape_grads1,
mapping_data);
mapping.transform_contravariant(shape_grads1, 0,
VectorSlice<std::vector<Tensor<1,spacedim> > > output,
const typename Mapping<dim, spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
const InternalData &data = dynamic_cast<const InternalData&> (mapping_data);
Assert (data.update_flags & update_covariant_transformation,
VectorSlice<std::vector<Tensor<2,spacedim> > > output,
const typename Mapping<dim, spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
const InternalData &data = dynamic_cast<const InternalData&> (mapping_data);
Assert (data.update_flags & update_covariant_transformation,
VectorSlice<std::vector<Tensor<1,spacedim> > > output,
const typename Mapping<dim, spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
// convert data object to internal
// data for this class. fails with
// an exception if that is not
VectorSlice<std::vector<Tensor<2,spacedim> > > output,
const typename Mapping<dim, spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
// convert data object to internal
// data for this class. fails with
// an exception if that is not
VectorSlice<std::vector<Tensor<1,spacedim> > > output,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
const typename MappingQ1<dim,spacedim>::InternalData *q1_data =
dynamic_cast<const typename MappingQ1<dim,spacedim>::InternalData *> (&mapping_data);
Assert(q1_data!=0, ExcInternalError());
- Assert (output.size() + offset <= input.size(), ExcInternalError());
-
typename std::vector<Tensor<2,dim> >::const_iterator tensor;
if (q1_data->is_mapping_q1_data)
VectorSlice<std::vector<Tensor<2,spacedim> > > output,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
const typename MappingQ1<dim,spacedim>::InternalData *q1_data =
dynamic_cast<const typename MappingQ1<dim,spacedim>::InternalData *> (&mapping_data);
Assert(q1_data!=0, ExcInternalError());
- Assert (output.size() + offset <= input.size(), ExcInternalError());
-
typename std::vector<Tensor<2,dim> >::const_iterator tensor;
if (q1_data->is_mapping_q1_data)
VectorSlice<std::vector<Tensor<1,spacedim> > > output,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
const typename MappingQ1<dim,spacedim>::InternalData *q1_data =
dynamic_cast<const typename MappingQ1<dim,spacedim>::InternalData *> (&mapping_data);
Assert(q1_data!=0, ExcInternalError());
- Assert (output.size() + offset <= input.size(), ExcInternalError());
-
typename std::vector<Tensor<2,dim> >::const_iterator tensor;
if (q1_data->is_mapping_q1_data)
VectorSlice<std::vector<Tensor<2,spacedim> > > output,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
const typename MappingQ1<dim,spacedim>::InternalData *q1_data =
dynamic_cast<const typename MappingQ1<dim,spacedim>::InternalData *> (&mapping_data);
Assert(q1_data!=0, ExcInternalError());
- Assert (output.size() + offset <= input.size(), ExcInternalError());
-
typename std::vector<Tensor<2,dim> >::const_iterator tensor;
if (q1_data->is_mapping_q1_data)
VectorSlice<std::vector<Tensor<1,spacedim> > > output,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
// ensure that the following cast is really correct:
Assert (dynamic_cast<const InternalData *>(&mapping_data) != 0,
ExcInternalError());
VectorSlice<std::vector<Tensor<1,2> > > output,
const Mapping<1,2>::InternalDataBase &mapping_data) const
{
- // ensure that the following cast is really correct:
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
+
+ // ensure that the following cast is really correct:
Assert (dynamic_cast<const InternalData *>(&mapping_data) != 0,
ExcInternalError());
const InternalData &data = static_cast<const InternalData&>(mapping_data);
VectorSlice<std::vector<Tensor<1,3> > > output,
const Mapping<2,3>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
// ensure that the following cast is really correct:
Assert (dynamic_cast<const InternalData *>(&mapping_data) != 0,
ExcInternalError());
VectorSlice<std::vector<Tensor<2,spacedim> > > output,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data) const
{
+ Assert (offset == 0, ExcInternalError());
+ AssertDimension (input.size(), output.size());
// ensure that the following cast is really correct:
Assert (dynamic_cast<const InternalData *>(&mapping_data) != 0,
ExcInternalError());