From: guido Date: Tue, 31 May 2005 16:36:48 +0000 (+0000) Subject: throw exception if Cartesian mapping is required, but other mapping is used X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ad8c2555dbb2b42ef0ecc2d17bb489523436a58;p=dealii-svn.git throw exception if Cartesian mapping is required, but other mapping is used git-svn-id: https://svn.dealii.org/trunk@10794 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_poly_tensor.cc b/deal.II/deal.II/source/fe/fe_poly_tensor.cc index b67fe6d26a..52ece16f5d 100644 --- a/deal.II/deal.II/source/fe/fe_poly_tensor.cc +++ b/deal.II/deal.II/source/fe/fe_poly_tensor.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -269,13 +270,15 @@ FE_PolyTensor::fill_fe_values ( // possible InternalData &fe_data = dynamic_cast (fedata); + Assert(mapping_type == independent + || ( mapping_type == independent_on_cartesian + && dynamic_cast*>(&mapping) != 0), + ExcNotImplemented()); + const unsigned int n_dofs = this->dofs_per_cell; const unsigned int n_quad = quadrature.n_quadrature_points; const UpdateFlags flags(fe_data.current_update_flags()); - Assert(mapping_type == independent || mapping_type == independent_on_cartesian, - ExcNotImplemented()); - Assert(!(flags & update_values) || fe_data.shape_values.size() == n_dofs, ExcDimensionMismatch(fe_data.shape_values.size(), n_dofs)); Assert(!(flags & update_values) || fe_data.shape_values[0].size() == n_quad, @@ -340,7 +343,9 @@ FE_PolyTensor::fill_fe_face_values ( const UpdateFlags flags(fe_data.update_once | fe_data.update_each); - Assert(mapping_type == independent || mapping_type == independent_on_cartesian, + Assert(mapping_type == independent + || ( mapping_type == independent_on_cartesian + && dynamic_cast*>(&mapping) != 0), ExcNotImplemented()); //TODO: Size assertions @@ -401,7 +406,9 @@ FE_PolyTensor::fill_fe_subface_values ( const UpdateFlags flags(fe_data.update_once | fe_data.update_each); - Assert(mapping_type == independent || mapping_type == independent_on_cartesian, + Assert(mapping_type == independent + || ( mapping_type == independent_on_cartesian + && dynamic_cast*>(&mapping) != 0), ExcNotImplemented()); //TODO: Size assertions