From: wolf Date: Tue, 25 Feb 2003 17:44:59 +0000 (+0000) Subject: Second derivatives in 3d are not zero, but rather constant. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ac3b071280854c85a51f15ce56bec26f2028ab7;p=dealii-svn.git Second derivatives in 3d are not zero, but rather constant. git-svn-id: https://svn.dealii.org/trunk@7247 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_nedelec.cc b/deal.II/deal.II/source/fe/fe_nedelec.cc index 231b5e3a5c..700a0f048f 100644 --- a/deal.II/deal.II/source/fe/fe_nedelec.cc +++ b/deal.II/deal.II/source/fe/fe_nedelec.cc @@ -625,11 +625,67 @@ FE_Nedelec<3>::shape_grad_grad_component (const unsigned int i, // first order Nedelec // elements. their second // derivatives on the unit cell - // are linear + // are constant, but non-zero case 1: { -//TODO: not true. this is what presently fails our "shapes" testcase - return Tensor<2,dim>(); + // the format is: first + // index=shape function + // number; second + // index=vector component, + // third and fourth + // index=component within + // second derivative + static const double unit_grad_grads[12][3][3][3] + = { + { { {0, 0, 0}, {0, 0, 1}, {0, 1, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0,-1, 0}, {-1, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0,-1}, {0,-1, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 1, 0}, { 1, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0,-1}, {0,-1, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 1, 0}, { 1, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0, 1}, {0, 1, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0,-1, 0}, {-1, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 1}, {0, 0, 0}, {1, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0,-1}, {0, 0, 0}, {-1, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0, 1}, {0, 0, 0}, {1, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} } }, + + { { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }, + { {0, 0,-1}, {0, 0, 0}, {-1, 0, 0} }, + { {0, 0, 0}, {0, 0, 0}, {0, 0, 0} } } }; + + return Tensor<2,dim>(unit_grad_grads[i][component]); }; // no other degrees