7 template<
UInt spaceDim,
UInt fieldDim >
32 friend class ExpressionAssembly::EvaluationDivI;
36 friend class ExpressionAssembly::EvaluationDivJ;
54 typedef MatrixSmall< fieldDim, spaceDim > matrix_Return_Type;
57 typedef std::vector< std::vector< array1D_Return_Type > > array2D_vector_Type;
60 typedef std::vector< std::vector< matrix_Return_Type > > array2D_matrix_Type;
63 typedef std::vector< std::vector< std::vector <matrix_Return_Type > > > array_3D_matrix_Type;
66 typedef MatrixSmall< spaceDim, spaceDim > matrix_d2Phi;
67 typedef std::vector< std::vector< std::vector< matrix_d2Phi > > > array_d2Phi;
75 static const UInt S_spaceDimension;
78 static const UInt S_fieldDimension;
104 ETCurrentFE (
const ETCurrentFE<spaceDim, fieldDim>& otherFE);
107 virtual ~ETCurrentFE();
131 template<
typename elementType>
132 void update (
const elementType& element,
const flag_Type& flag);
138 void showMe (std::ostream& out = std::cout)
const;
175 const array1D_Return_Type& phi (
const UInt& i,
const UInt& q)
const 177 ASSERT ( i < fieldDim * M_nbFEDof,
"No basis function with this index" );
178 ASSERT ( q < M_nbQuadPt,
"No quadrature point with this index" );
180 return ( M_phi[q][i] );
191 ASSERT ( M_isQuadNodeUpdated,
"Quadrature nodes have not been updated");
192 ASSERT ( q < M_nbQuadPt,
"No quadrature point with this index");
193 ASSERT ( coord < spaceDim,
"No such coordinate index");
194 return M_quadNode[q][coord];
204 ASSERT ( M_isWDetUpdated,
"Weighted determinant has not been updated");
205 ASSERT ( q < M_nbQuadPt,
"No quadrature point with this index");
219 ASSERT ( M_isDphiUpdated,
"Derivative of the basis functions have not been updated");
220 ASSERT ( i < fieldDim * M_nbFEDof,
"No basis function with this index");
221 ASSERT ( iCoor < fieldDim,
"No such coordinate index");
222 ASSERT ( dxi < spaceDim,
"No such coordinate index");
223 ASSERT ( q < M_nbQuadPt,
"No quadrature point with this index");
225 return M_dphi[q][i][iCoor][dxi];
234 MatrixSmall<spaceDim, 3>
const& dphi (
const UInt& i,
const UInt& q)
const 236 ASSERT ( M_isDphiUpdated,
"Derivative of the basis functions have not been updated");
237 ASSERT ( i < 3 * M_nbFEDof,
"No basis function with this index");
238 ASSERT ( q < M_nbQuadPt,
"No quadrature point with this index");
248 const array1D_Return_Type& divergence (
const UInt& i,
const UInt& q)
const 250 ASSERT ( M_isDivergenceUpdated,
"Divergence of the basis functions have not been updated");
251 ASSERT ( i < fieldDim * M_nbFEDof,
"No basis function with this index" );
252 ASSERT ( q < M_nbQuadPt,
"No quadrature point with this index" );
254 return ( M_divergence[q][i] );
266 ASSERT ( M_isLaplacianUpdated,
"Divergence of the basis functions have not been updated");
267 ASSERT ( i < fieldDim * M_nbFEDof,
"No basis function with this index" );
268 ASSERT ( q < M_nbQuadPt,
"No quadrature point with this index" );
270 return ( M_laplacian[q][i] );
279 ASSERT (M_isCellNodeUpdated,
"Cell has not been updated");
288 typedef std::vector< Real > array1D_Type;
291 typedef std::vector< array1D_Type > array2D_Type;
294 typedef std::vector< array2D_Type > array3D_Type;
296 typedef std::vector< std::vector< array1D_Return_Type > > arrayLaplacian_Type;
299 typedef std::vector< array3D_Type > array4D_Type;
308 void operator= (
const ETCurrentFE< spaceDim, fieldDim >& );
311 void setupInternalConstants();
314 template<
typename ElementType >
315 void updateCellNode (
const ElementType& element);
318 void updateQuadNode (
const UInt& iQuadPt);
321 void updateJacobian (
const UInt& iQuadPt);
324 void updateDetJacobian (
const UInt& iQuadPt );
327 void updateInverseJacobian (
const UInt& iQuadPt );
330 void updateWDet (
const UInt& iQuadPt );
333 void updateDphi (
const UInt& iQuadPt );
336 void updateD2phi (
const UInt& iQuadPt );
339 void updateDivergence (
const UInt& iQuadPt);
342 void updateLaplacian (
const UInt& iQuadPt);
367 array2D_vector_Type M_phi;
370 array2D_Type M_phiMap;
372 array3D_Type M_dphiReferenceFE;
374 array3D_Type M_dphiGeometricMap;
376 array4D_Type M_d2phiReferenceFE;
379 array2D_Type M_cellNode;
381 array2D_Type M_quadNode;
383 array3D_Type M_jacobian;
385 array1D_Type M_detJacobian;
389 array3D_Type M_tInverseJacobian;
392 array2D_matrix_Type M_dphi;
394 array2D_Type M_divergence;
400 arrayLaplacian_Type M_laplacian;
403 #ifdef HAVE_LIFEV_DEBUG 408 bool M_isCellNodeUpdated;
409 bool M_isQuadNodeUpdated;
410 bool M_isJacobianUpdated;
411 bool M_isDetJacobianUpdated;
412 bool M_isInverseJacobianUpdated;
413 bool M_isWDetUpdated;
415 bool M_isDphiUpdated;
416 bool M_isDivergenceUpdated;
417 bool M_isD2phiUpdated;
418 bool M_isLaplacianUpdated;
427 template<
UInt spaceDim,
UInt fieldDim >
428 const UInt ETCurrentFE< spaceDim, fieldDim >::S_spaceDimension = spaceDim;
430 template<
UInt spaceDim,
UInt fieldDim >
431 const UInt ETCurrentFE< spaceDim, fieldDim >::S_fieldDimension = fieldDim;
437 template<
UInt spaceDim,
UInt fieldDim >
438 ETCurrentFE<spaceDim, fieldDim>::
441 M_referenceFE (&refFE),
442 M_geometricMap (&geoMap),
443 M_quadratureRule (&qr),
445 M_nbFEDof (M_referenceFE->nbDof() ),
455 M_d2phiReferenceFE(),
456 M_dphiGeometricMap(),
463 M_tInverseJacobian(),
469 #ifdef HAVE_LIFEV_DEBUG 470 , M_isCellNodeUpdated (
false),
471 M_isQuadNodeUpdated (
false),
472 M_isJacobianUpdated (
false),
473 M_isDetJacobianUpdated (
false),
474 M_isInverseJacobianUpdated (
false),
475 M_isWDetUpdated (
false),
476 M_isPhiUpdated (
false),
477 M_isDphiUpdated (
false),
478 M_isDivergenceUpdated (
false),
479 M_isD2phiUpdated (
false),
480 M_isLaplacianUpdated (
false)
485 setupInternalConstants();
488 template<
UInt spaceDim,
UInt fieldDim >
489 ETCurrentFE<spaceDim, fieldDim>::
492 M_referenceFE (&refFE),
493 M_geometricMap (&geoMap),
494 M_quadratureRule (0),
496 M_nbFEDof (M_referenceFE->nbDof() ),
506 M_d2phiReferenceFE(),
507 M_dphiGeometricMap(),
514 M_tInverseJacobian(),
521 #ifdef HAVE_LIFEV_DEBUG 522 , M_isCellNodeUpdated (
false),
523 M_isQuadNodeUpdated (
false),
524 M_isJacobianUpdated (
false),
525 M_isDetJacobianUpdated (
false),
526 M_isInverseJacobianUpdated (
false),
527 M_isWDetUpdated (
false),
528 M_isPhiUpdated (
false),
529 M_isDphiUpdated (
false),
530 M_isDivergenceUpdated (
false),
531 M_isD2phiUpdated (
false),
532 M_isLaplacianUpdated (
false)
539 template<
UInt spaceDim,
UInt fieldDim >
540 ETCurrentFE<spaceDim, fieldDim>::
541 ETCurrentFE (
const ETCurrentFE<spaceDim, fieldDim>& otherFE)
543 M_referenceFE (otherFE.M_referenceFE),
544 M_geometricMap (otherFE.M_geometricMap),
545 M_quadratureRule (otherFE.M_quadratureRule),
547 M_nbFEDof (otherFE.M_nbFEDof),
548 M_nbMapDof (otherFE.M_nbMapDof),
549 M_nbQuadPt (otherFE.M_nbQuadPt),
551 M_currentId (otherFE.M_currentId),
552 M_currentLocalId (otherFE.M_currentLocalId),
554 M_phi (otherFE.M_phi),
555 M_phiMap (otherFE.M_phiMap),
556 M_dphiReferenceFE (otherFE.M_dphiReferenceFE),
557 M_d2phiReferenceFE (otherFE.M_d2phiReferenceFE),
558 M_dphiGeometricMap (otherFE.M_dphiGeometricMap),
560 M_cellNode (otherFE.M_cellNode),
561 M_quadNode (otherFE.M_quadNode),
562 M_jacobian (otherFE.M_jacobian),
563 M_detJacobian (otherFE.M_detJacobian),
564 M_wDet (otherFE.M_wDet),
565 M_tInverseJacobian (otherFE.M_tInverseJacobian),
566 M_dphi (otherFE.M_dphi),
567 M_divergence (otherFE.M_divergence),
569 M_d2phi (otherFE.M_d2phi),
570 M_laplacian (otherFE.M_laplacian)
572 #ifdef HAVE_LIFEV_DEBUG 574 , M_isCellNodeUpdated ( otherFE.M_isCellNodeUpdated ),
575 M_isQuadNodeUpdated ( otherFE.M_isQuadNodeUpdated ),
576 M_isJacobianUpdated ( otherFE.M_isJacobianUpdated ),
577 M_isDetJacobianUpdated ( otherFE.M_isDetJacobianUpdated ),
578 M_isInverseJacobianUpdated ( otherFE.M_isInverseJacobianUpdated ),
579 M_isWDetUpdated ( otherFE.M_isWDetUpdated ),
580 M_isPhiUpdated ( otherFE.M_isPhiUpdated ),
581 M_isDphiUpdated ( otherFE.M_isDphiUpdated ),
582 M_isDivergenceUpdated ( otherFE.M_isDivergenceUpdated ),
583 M_isD2phiUpdated ( otherFE.M_isD2phiUpdated ),
584 M_isLaplacianUpdated ( otherFE.M_isLaplacianUpdated )
589 template<
UInt spaceDim,
UInt fieldDim >
590 ETCurrentFE<spaceDim, fieldDim>::
598 template< UInt spaceDim, UInt fieldDim >
599 template<
typename elementType>
601 ETCurrentFE<spaceDim, fieldDim>::
602 update (
const elementType& element,
const flag_Type& flag)
604 ASSERT (M_referenceFE != 0,
"No reference FE for the update");
605 ASSERT (M_geometricMap != 0,
"No geometric mapping for the update");
606 ASSERT (M_quadratureRule != 0,
"No quadrature rule for the update");
608 #ifdef HAVE_LIFEV_DEBUG 610 M_isCellNodeUpdated =
false;
611 M_isQuadNodeUpdated =
false;
612 M_isJacobianUpdated =
false;
613 M_isDetJacobianUpdated =
false;
614 M_isInverseJacobianUpdated =
false;
615 M_isWDetUpdated =
false;
616 M_isDphiUpdated =
false;
617 M_isDivergenceUpdated =
false;
618 M_isD2phiUpdated =
false;
619 M_isLaplacianUpdated =
false;
623 if (flag & ET_UPDATE_ONLY_CELL_NODE)
625 updateCellNode (element);
629 for (
UInt i (0); i < M_nbQuadPt; ++i)
632 if ( flag & ET_UPDATE_ONLY_QUAD_NODE )
636 if ( flag & ET_UPDATE_ONLY_JACOBIAN )
640 if ( flag & ET_UPDATE_ONLY_DET_JACOBIAN )
642 updateDetJacobian (i);
644 if ( flag & ET_UPDATE_ONLY_T_INVERSE_JACOBIAN )
646 updateInverseJacobian (i);
648 if ( flag & ET_UPDATE_ONLY_W_DET_JACOBIAN )
652 if ( flag & ET_UPDATE_ONLY_DPHI )
656 if ( flag & ET_UPDATE_ONLY_DIVERGENCE )
658 updateDivergence (i);
660 if ( flag & ET_UPDATE_ONLY_D2PHI )
664 if ( flag & ET_UPDATE_ONLY_LAPLACIAN )
671 template<
UInt spaceDim,
UInt fieldDim >
673 ETCurrentFE<spaceDim, fieldDim>::
674 showMe (std::ostream& out)
const 676 out <<
" Number of FE Dof : " << M_nbFEDof << std::endl;
677 out <<
" Number of Map Dof : " << M_nbMapDof << std::endl;
678 out <<
" Number of QR point : " << M_nbQuadPt << std::endl;
681 out <<
" Cell Nodes : " << std::endl;
682 for (
UInt i (0); i < M_nbMapDof; ++i )
684 for (
UInt icoor (0); icoor < S_spaceDimension; ++icoor)
686 out << M_cellNode[i][icoor] <<
" ";
692 out <<
" Jacobian : " << std::endl;
693 for (
UInt iQuad (0); iQuad < M_nbQuadPt; ++iQuad)
695 for (
UInt iDim (0); iDim < S_spaceDimension; ++iDim)
697 for (
UInt jDim (0); jDim < S_spaceDimension; ++jDim)
699 out << M_jacobian[iQuad][iDim][jDim] <<
" ";
706 out <<
" Det jacobian : " << std::endl;
707 for (
UInt iQuad (0); iQuad < M_nbQuadPt; ++iQuad)
709 out << M_detJacobian[iQuad] <<
" ";
713 out <<
" T inverse Jacobian : " << std::endl;
714 for (
UInt iQuad (0); iQuad < M_nbQuadPt; ++iQuad)
716 for (
UInt iDim (0); iDim < S_spaceDimension; ++iDim)
718 for (
UInt jDim (0); jDim < S_spaceDimension; ++jDim)
720 out << M_tInverseJacobian[iQuad][iDim][jDim] <<
" ";
727 out <<
" DPhi : " << std::endl;
728 for (
UInt iQuad (0); iQuad < M_nbQuadPt; ++iQuad)
730 for (
UInt iDof (0); iDof < M_nbFEDof; ++iDof)
732 for (
UInt iCoor (0); iCoor < S_spaceDimension; ++iCoor)
734 for (
UInt jCoor (0); jCoor < S_spaceDimension; ++jCoor)
736 out << M_dphi[iQuad][iDof][iCoor][jCoor] <<
" ";
744 out <<
" Divergence : " << std::endl;
745 for (
UInt iQuad (0); iQuad < M_nbQuadPt; ++iQuad)
747 for (
UInt iDof (0); iDof < fieldDim * M_nbFEDof; ++iDof)
749 out << M_divergence[iQuad][iDof] <<
" ";
760 template<
UInt spaceDim,
UInt fieldDim >
762 ETCurrentFE<spaceDim, fieldDim>::
765 M_quadratureRule = &qr;
767 setupInternalConstants();
774 template<
UInt spaceDim,
UInt fieldDim >
776 ETCurrentFE<spaceDim, fieldDim>::
777 setupInternalConstants()
783 M_phi.resize ( M_nbQuadPt );
784 for (
UInt q ( 0 ); q < M_nbQuadPt; ++q )
787 M_phi[q].resize ( M_nbFEDof * 3 );
790 for (
UInt j ( 0 ); j < M_nbFEDof; ++j )
792 M_phi[q][j][0] = M_referenceFE->phi ( j, M_quadratureRule->quadPointCoor ( q ) );
795 for (
UInt k ( 1 ); k < S_fieldDimension; ++k )
797 M_phi[q][k * M_nbFEDof + j][k] = M_phi[q][j][0];
801 #ifdef HAVE_LIFEV_DEBUG 802 M_isPhiUpdated =
true;
806 M_phiMap.resize (M_nbQuadPt);
807 for (
UInt q (0); q < M_nbQuadPt; ++q)
809 M_phiMap[q].resize (M_nbMapDof);
810 for (
UInt i (0); i < M_nbMapDof; ++i)
817 M_dphiReferenceFE.resize (M_nbQuadPt);
818 for (
UInt q (0); q < M_nbQuadPt; ++q)
820 M_dphiReferenceFE[q].resize (M_nbFEDof);
821 for (
UInt i (0); i < M_nbFEDof; ++i)
823 M_dphiReferenceFE[q][i].resize (spaceDim);
824 for (
UInt j (0); j < spaceDim; ++j)
826 M_dphiReferenceFE[q][i][j] = M_referenceFE->dPhi (i, j, M_quadratureRule->quadPointCoor (q) );
832 M_dphiGeometricMap.resize (M_nbQuadPt);
833 for (
UInt q (0); q < M_nbQuadPt; ++q)
835 M_dphiGeometricMap[q].resize (M_nbMapDof);
836 for (
UInt i (0); i < M_nbMapDof; ++i)
838 M_dphiGeometricMap[q][i].resize (spaceDim);
839 for (
UInt j (0); j < spaceDim; ++j)
848 M_d2phiReferenceFE.resize (M_nbQuadPt);
849 for (
UInt q (0); q < M_nbQuadPt; ++q)
851 M_d2phiReferenceFE[q].resize (M_nbFEDof);
852 for (
UInt i (0); i < M_nbFEDof; ++i)
854 M_d2phiReferenceFE[q][i].resize (spaceDim);
855 for (
UInt j (0); j < spaceDim; ++j)
857 M_d2phiReferenceFE[q][i][j].resize (spaceDim);
858 for (
UInt k (0); k < spaceDim; ++k)
860 M_d2phiReferenceFE[q][i][j][k] = M_referenceFE->d2Phi (i, j, k, M_quadratureRule->quadPointCoor (q) );
870 M_cellNode.resize (M_nbMapDof);
871 for (
UInt i (0); i < M_nbMapDof; ++i)
873 M_cellNode[i].resize (spaceDim);
877 M_quadNode.resize (M_nbQuadPt);
878 for (
UInt i (0); i < M_nbQuadPt; ++i)
880 M_quadNode[i].resize (spaceDim);
884 M_jacobian.resize (M_nbQuadPt);
885 for (
UInt i (0); i < M_nbQuadPt; ++i)
887 M_jacobian[i].resize (spaceDim);
888 for (
UInt j (0); j < spaceDim; ++j)
890 M_jacobian[i][j].resize (spaceDim);
895 M_detJacobian.resize (M_nbQuadPt);
898 M_wDet.resize (M_nbQuadPt);
901 M_tInverseJacobian.resize (M_nbQuadPt);
902 for (
UInt i (0); i < M_nbQuadPt; ++i)
904 M_tInverseJacobian[i].resize (spaceDim);
905 for (
UInt j (0); j < spaceDim; ++j)
907 M_tInverseJacobian[i][j].resize (spaceDim);
912 M_dphi.resize (M_nbQuadPt);
913 for (
UInt i (0); i < M_nbQuadPt; ++i)
916 M_dphi[i].resize ( fieldDim * M_nbFEDof );
920 M_divergence.resize (M_nbQuadPt);
921 for (
UInt i (0); i < M_nbQuadPt; ++i)
924 M_divergence[i].resize ( fieldDim * M_nbFEDof );
928 M_d2phi.resize (M_nbQuadPt);
929 for (
UInt i (0); i < M_nbQuadPt; ++i)
932 M_d2phi[i].resize ( fieldDim * M_nbFEDof );
935 for (
UInt j (0); j < ( fieldDim * M_nbFEDof ); ++j)
937 M_d2phi[i][j].resize(fieldDim);
942 M_laplacian.resize (M_nbQuadPt);
943 for (
UInt i (0); i < M_nbQuadPt; ++i)
946 M_laplacian[i].resize ( fieldDim * M_nbFEDof );
950 template <
UInt spaceDim,
UInt fieldDim >
952 ETCurrentFE<spaceDim, fieldDim>::
953 updateQuadNode (
const UInt& iQuadPt)
956 ASSERT (M_isCellNodeUpdated,
"Cell must be updated to compute the quadrature node position");
959 #ifdef HAVE_LIFEV_DEBUG 960 M_isQuadNodeUpdated =
true;
963 for (
UInt iDim (0); iDim < S_spaceDimension; ++iDim)
965 M_quadNode[iQuadPt][iDim] = 0.0;
967 for (
UInt iDof (0); iDof < M_nbMapDof; ++iDof)
969 M_quadNode[iQuadPt][iDim] += M_cellNode[iDof][iDim] * M_phiMap[iQuadPt][iDof];
974 template<
UInt spaceDim,
UInt fieldDim >
976 ETCurrentFE<spaceDim, fieldDim>::
977 updateJacobian (
const UInt& iQuadPt)
980 ASSERT (M_isCellNodeUpdated,
"Cell must be updated to compute the jacobian");
983 #ifdef HAVE_LIFEV_DEBUG 984 M_isJacobianUpdated =
true;
987 Real partialSum (0.0);
988 for (
UInt iDim (0); iDim < S_spaceDimension; ++iDim)
990 for (
UInt jDim (0); jDim < S_spaceDimension; ++jDim)
993 for (
UInt iterNode (0); iterNode < M_nbMapDof; ++iterNode)
995 partialSum += M_cellNode[iterNode][iDim] * M_dphiGeometricMap[iQuadPt][iterNode][jDim];
998 M_jacobian[iQuadPt][iDim][jDim] = partialSum;
1003 template<
UInt spaceDim,
UInt fieldDim >
1004 void ETCurrentFE< spaceDim, fieldDim >::updateWDet (
const UInt& iQuadPt )
1006 ASSERT ( M_isDetJacobianUpdated,
1007 "Determinant of the jacobian must be updated to compute WDet" );
1009 #ifdef HAVE_LIFEV_DEBUG 1010 M_isWDetUpdated =
true;
1013 M_wDet[iQuadPt] = M_detJacobian[iQuadPt] * M_quadratureRule
->weight ( iQuadPt
);
1016 template<
UInt spaceDim,
UInt fieldDim >
1017 void ETCurrentFE< spaceDim, fieldDim >::updateDphi (
const UInt& iQuadPt )
1019 ASSERT ( M_isInverseJacobianUpdated,
1020 "Inverse jacobian must be updated to compute the derivative of the basis functions" );
1022 #ifdef HAVE_LIFEV_DEBUG 1023 M_isDphiUpdated =
true;
1026 Real partialSum ( 0.0 );
1030 for (
UInt iDof ( 0 ); iDof < M_nbFEDof; ++iDof )
1032 for (
UInt iCoor ( 0 ); iCoor < S_spaceDimension; ++iCoor )
1035 for (
UInt jCoor ( 0 ); jCoor < S_spaceDimension; ++jCoor )
1037 partialSum += M_tInverseJacobian[iQuadPt][iCoor][jCoor] * M_dphiReferenceFE[iQuadPt][iDof][jCoor];
1041 M_dphi[iQuadPt][iDof][0][iCoor] = partialSum;
1047 for (
UInt k ( 1 ); k < fieldDim; ++k)
1050 M_dphi[iQuadPt][k * M_nbFEDof + iDof][k][iCoor] = partialSum;
1059 template<
UInt spaceDim,
UInt fieldDim >
1060 void ETCurrentFE< spaceDim, fieldDim >::updateDivergence (
const UInt& iQuadPt )
1062 ASSERT ( M_isDphiUpdated,
1063 "Basis function derivatives must be updated to compute the divergence" );
1065 #ifdef HAVE_LIFEV_DEBUG 1066 M_isDivergenceUpdated =
true;
1069 Real partialSum ( 0.0 );
1073 for (
UInt iDof ( 0 ); iDof < fieldDim * M_nbFEDof; ++iDof )
1076 for (
UInt iCoor ( 0 ); iCoor < S_spaceDimension; ++iCoor )
1078 partialSum += M_dphi[iQuadPt][iDof][iCoor][iCoor];
1080 M_divergence[iQuadPt][iDof] = partialSum;
1090 template<
UInt spaceDim,
UInt fieldDim >
1091 void ETCurrentFE< spaceDim, fieldDim >::updateD2phi (
const UInt& iQuadPt )
1093 ASSERT ( M_isInverseJacobianUpdated,
1094 "Inverse jacobian must be updated to compute the derivative of the basis functions" );
1096 #ifdef HAVE_LIFEV_DEBUG 1097 M_isD2phiUpdated =
true;
1100 Real partialSum ( 0.0 );
1102 for (
UInt iDof ( 0 ); iDof < M_nbFEDof; ++iDof )
1104 for (
UInt iCoor ( 0 ); iCoor < S_spaceDimension; ++iCoor )
1106 for (
UInt jCoor ( 0 ); jCoor < S_spaceDimension; ++jCoor )
1109 for (
UInt k1 (0); k1 < S_spaceDimension; ++k1 )
1111 for (
UInt k2 (0) ; k2 < S_spaceDimension; ++k2 )
1113 partialSum += M_tInverseJacobian[iQuadPt][iCoor][k1]
1114 * M_d2phiReferenceFE[iQuadPt][iDof][k1][k2]
1115 * M_tInverseJacobian[iQuadPt][jCoor][k2];
1120 M_d2phi[iQuadPt][iDof][0][iCoor][jCoor] = partialSum;
1123 for (
UInt k ( 1 ); k < fieldDim; ++k)
1125 M_d2phi[iQuadPt][k * M_nbFEDof + iDof][k][iCoor][jCoor] = partialSum;
1132 template<
UInt spaceDim,
UInt fieldDim >
1133 void ETCurrentFE< spaceDim, fieldDim >::updateLaplacian (
const UInt& iQuadPt )
1135 ASSERT ( M_isD2phiUpdated,
1136 "Basis function second derivatives must be updated to compute the laplacian" );
1138 #ifdef HAVE_LIFEV_DEBUG 1139 M_isLaplacianUpdated =
true;
1142 Real partialSum ( 0.0 );
1144 for (
UInt iDof ( 0 ); iDof < M_nbFEDof; ++iDof )
1146 for (
UInt k ( 0 ); k < fieldDim; ++k )
1149 for (
UInt iCoor ( 0 ); iCoor < S_spaceDimension; ++iCoor )
1151 partialSum += M_d2phi[iQuadPt][iDof][k][iCoor][iCoor];
1154 M_laplacian[iQuadPt][iDof][k] = partialSum;
1157 for (
UInt k ( 1 ); k < fieldDim; ++k)
1159 M_laplacian[iQuadPt][k * M_nbFEDof + iDof][k] = M_laplacian[iQuadPt][iDof][0];
1165 template< UInt spaceDim, UInt fieldDim >
1166 template<
typename ElementType >
1168 ETCurrentFE<spaceDim, fieldDim>::
1169 updateCellNode (
const ElementType& element)
1172 #ifdef HAVE_LIFEV_DEBUG 1173 M_isCellNodeUpdated =
true;
1176 M_currentId = element.id();
1177 M_currentLocalId = element.localId();
1179 for (
UInt i (0); i < M_nbMapDof; ++i )
1181 for (
UInt icoor (0); icoor < S_spaceDimension; ++icoor)
1183 M_cellNode[i][icoor] = element.point (i).coordinate (icoor);
GeometricMap - Structure for the geometrical mapping.
const Real & weight(const UInt &ig) const
weight(ig) is the ig-th quadrature weight
friend class ExpressionAssembly::EvaluationLaplacianJ
Friend to allow direct access to the raw data.
uint32_type flag_Type
bit-flag with up to 32 different flags
friend class ExpressionAssembly::EvaluationPhiI
Friend to allow direct access to the raw data.
Real dPhi(UInt i, UInt icoor, const GeoVector &v) const
return the value of the icoor-th derivative of the i-th basis function on point v ...
friend class ExpressionAssembly::EvaluationDphiI
Friend to allow direct access to the raw data.
const GeoVector & quadPointCoor(const UInt &ig) const
quadPointCoor(ig) is the full coordinates of the quadrature point ig
const UInt & nbDof() const
Return the number of degrees of freedom for this reference element.
double Real
Generic real data.
friend class ExpressionAssembly::EvaluationLaplacianI
Friend to allow direct access to the raw data.
The class for a reference Lagrangian finite element.
friend class ExpressionAssembly::EvaluationDphiJ
Friend to allow direct access to the raw data.
QuadratureRule - The basis class for storing and accessing quadrature rules.
Real phi(UInt i, const GeoVector &v) const
Return the value of the i-th basis function in the point v.
friend class ExpressionAssembly::EvaluationPhiJ
Friend to allow direct access to the raw data.
const UInt & nbQuadPt() const
Getter for the number of quadrature points.
uint32_type UInt
generic unsigned integer (used mainly for addressing)