From: Wolfgang Bangerth Date: Fri, 7 Oct 2011 21:17:33 +0000 (+0000) Subject: Silence a warning in icc and provide a default path for switches over X-Git-Tag: v8.0.0~3259 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d951509cb2632fb5f23bbfe42fa0ba19c10140b;p=dealii.git Silence a warning in icc and provide a default path for switches over 'dim'. git-svn-id: https://svn.dealii.org/trunk@24561 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/symmetric_tensor.h b/deal.II/include/deal.II/base/symmetric_tensor.h index 2bd7a3d17d..fcbdb526cd 100644 --- a/deal.II/include/deal.II/base/symmetric_tensor.h +++ b/deal.II/include/deal.II/base/symmetric_tensor.h @@ -1640,19 +1640,19 @@ namespace internal { switch (dim) { - case 1: - return data[0][0]; - - case 2: - // each entry of the tensor can be - // thought of as an entry in a - // matrix that maps the rolled-out - // rank-2 tensors into rolled-out - // rank-2 tensors. this is the - // format in which we store rank-4 - // tensors. determine which - // position the present entry is - // stored in + case 1: + return data[0][0]; + + case 2: + // each entry of the tensor can be + // thought of as an entry in a + // matrix that maps the rolled-out + // rank-2 tensors into rolled-out + // rank-2 tensors. this is the + // format in which we store rank-4 + // tensors. determine which + // position the present entry is + // stored in { unsigned int base_index[2] ; if ((indices[0] == 0) && (indices[1] == 0)) @@ -1672,16 +1672,16 @@ namespace internal return data[base_index[0]][base_index[1]]; } - case 3: - // each entry of the tensor can be - // thought of as an entry in a - // matrix that maps the rolled-out - // rank-2 tensors into rolled-out - // rank-2 tensors. this is the - // format in which we store rank-4 - // tensors. determine which - // position the present entry is - // stored in + case 3: + // each entry of the tensor can be + // thought of as an entry in a + // matrix that maps the rolled-out + // rank-2 tensors into rolled-out + // rank-2 tensors. this is the + // format in which we store rank-4 + // tensors. determine which + // position the present entry is + // stored in { unsigned int base_index[2] ; if ((indices[0] == 0) && (indices[1] == 0)) @@ -1726,7 +1726,12 @@ namespace internal return data[base_index[0]][base_index[1]]; } + + default: + Assert (false, ExcNotImplemented()); } + + return Number(); }