]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Go for some of the still missing pieces of the Nedelec elements.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 29 Jul 2002 09:08:11 +0000 (09:08 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 29 Jul 2002 09:08:11 +0000 (09:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@6299 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_nedelec.cc
deal.II/deal.II/source/fe/fe_nedelec_3d.cc

index 45ab85556c326f8bf1efe8bbba3ec95d5661ae71..77ab9f3cf9894a4919c18efbdb4ccba59f7a66e7 100644 (file)
@@ -703,6 +703,12 @@ FE_Nedelec<dim>::fill_fe_values (const Mapping<dim>                   &mapping,
   if (flags & update_values)
     {
       std::vector<Tensor<1,dim> > shape_values (n_q_points);
+
+      Assert (data.shape_values.n_rows() == dofs_per_cell * dim,
+             ExcInternalError());
+      Assert (data.shape_values.n_cols() == n_q_points,
+             ExcInternalError());
+      
       for (unsigned int k=0; k<dofs_per_cell; ++k)
        {
                                           // first transform shape
@@ -715,12 +721,9 @@ FE_Nedelec<dim>::fill_fe_values (const Mapping<dim>                   &mapping,
                                          mapping_data);
 
                                           // then copy over to target:
-         Assert (data.shape_values[k].size() == n_q_points*dim,
-                 ExcInternalError());
-         unsigned index = 0;
          for (unsigned int q=0; q<n_q_points; ++q)
-           for (unsigned int d=0; d<dim; ++d, ++index)
-             data.shape_values[k][index] = shape_values[q][d];
+           for (unsigned int d=0; d<dim; ++d)
+             data.shape_values[k*dim+d][q] = shape_values[q][d];
        };
     };
   
index b4df5e25b0d3adb1455598746f8a6d4fe780003c..6c1fd0cc287f40e9c5299d1c9afbdf4bba01f65a 100644 (file)
@@ -182,15 +182,19 @@ namespace FE_Nedelec_3d
 {
   static const double constraint_q1[] =
   {
-       0
-//TODO[WB]     
-//     .25,.25,.25,.25,
-//     .5,.5,0.,0.,
-//     0.,.5,.5,0.,
-//     0.,0.,.5,.5,
-//     .5,0.,0.,.5
+       0, .5, 0, .5,  // first the four interior lines
+       .5, 0, .5, 0,
+       0, .5, 0, .5,
+       .5, 0, .5, 0,
+       1, 0, 0, 0,  // then the two child lines of each of the four outer ones.
+       1, 0, 0, 0,  // since the shape functions are constant on each line, 
+       0, 1, 0, 0,  // the two child lines get the same weights
+       0, 1, 0, 0,
+       0, 0, 1, 0,
+       0, 0, 1, 0,
+       0, 0, 0, 1,
+       0, 0, 0, 1
   };
-
 };
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.