&*mdata);
compute_mapping_support_points(cell, p_data->mapping_support_points);
-
+ // If this should be Q1, ignore all
+ // other support points.
+ if(p_data->shape_values.size()<p_data->mapping_support_points.size())
+ p_data->mapping_support_points.resize
+ (GeometryInfo<dim>::vertices_per_cell);
+
+
return this->transform_unit_to_real_cell_internal(*p_data);
}
std::vector<Point<spacedim> > &points = mdata->mapping_support_points;
compute_mapping_support_points (cell, points);
+ // If this is a q1 mapping,
+ // then only use the support
+ // points on the vertices.
+ if(mdata->shape_values.size()<points.size())
+ points.resize(GeometryInfo<dim>::vertices_per_cell);
+
this->transform_real_to_unit_cell_internal(cell, p, *mdata, p_unit);
}
// points
compute_mapping_support_points(cell, mdata->mapping_support_points);
+ // Mapping support points can be
+ // bigger than necessary. If this
+ // is the case, force them to be
+ // Q1.
+ if(mdata->mapping_support_points.size() > mdata->shape_values.size())
+ mdata->mapping_support_points.resize
+ (GeometryInfo<dim>::vertices_per_cell);
+
+
return transform_unit_to_real_cell_internal(*mdata);
}
| update_transformation_gradients,
point_quadrature)));
- MappingQ1<dim,spacedim>::compute_mapping_support_points (cell,
- mdata->mapping_support_points);
-
-// compute_mapping_support_points (cell, mdata->mapping_support_points);
-
- Assert(mdata->mapping_support_points.size() ==
- GeometryInfo<dim>::vertices_per_cell,
+ compute_mapping_support_points (cell, mdata->mapping_support_points);
+ // The support points have to be at
+ // least as many as there are
+ // vertices.
+ Assert(mdata->mapping_support_points.size() >=
+ GeometryInfo<dim>::vertices_per_cell,
ExcInternalError());
+ // Ignore non vertex support points.
+ mdata->mapping_support_points.resize(GeometryInfo<dim>::vertices_per_cell);
// perform the newton iteration.
transform_real_to_unit_cell_internal(cell, p, *mdata, p_unit);