Q2HexahedronFiniteElement Class Reference

#include <Q2HexahedronFiniteElement.hpp>

Inheritance diagram for Q2HexahedronFiniteElement:

Inheritance graph
[legend]
Collaboration diagram for Q2HexahedronFiniteElement:

Collaboration graph
[legend]

List of all members.

Public Types

enum  {
  numberOfDegreesOfFreedom = 27, numberOfVertexDegreesOfFreedom = 1, numberOfEdgeDegreesOfFreedom = 1, numberOfFaceDegreesOfFreedom = 1,
  numberOfVolumeDegreesOfFreedom = 1, numberOfFaceLivingDegreesOfFreedom = 9
}
enum  
typedef
QuadratureFormulaQ2Hexahedron 
QuadratureType
typedef TinyVector
< numberOfDegreesOfFreedom > 
ElementaryVector
typedef TinyMatrix
< numberOfDegreesOfFreedom,
numberOfDegreesOfFreedom > 
ElementaryMatrix

Public Member Functions

real_t W (const size_t &i, const TinyVector< 3, real_t > &x) const
real_t dxW (const size_t &i, const TinyVector< 3, real_t > &x) const
real_t dyW (const size_t &i, const TinyVector< 3, real_t > &x) const
real_t dzW (const size_t &i, const TinyVector< 3, real_t > &x) const
const TinyVector
< QuadratureType::numberOfQuadraturePoints,
TinyVector< 3, real_t > > & 
integrationVertices () const
 Q2HexahedronFiniteElement ()
 ~Q2HexahedronFiniteElement ()
const real_t & W (const size_t &i, const size_t &j) const
const real_t & dxW (const size_t &i, const size_t &j) const
const real_t & dyW (const size_t &i, const size_t &j) const
const real_t & dzW (const size_t &i, const size_t &j) const
void integrateWjWi (ElementaryMatrix &matElem, const ConformTransformation &T) const
void integrateDWjWi (ElementaryMatrix &matElem, const size_t &n, const ConformTransformation &T) const
void integrateWjDWi (ElementaryMatrix &matElem, const size_t &n, const ConformTransformation &T) const
void integrateDWjDWi (ElementaryMatrix &matElem, const size_t &n, const size_t &m, const ConformTransformation &T) const
void integrateWj (ElementaryVector &vectElem, const ConformTransformation &T, const TinyVector< numberOfQuadraturePoints, real_t > &f) const

Static Public Member Functions

static const TinyVector
< 3, real_t > & 
massCenter ()
static Q2HexahedronFiniteElementinstance ()
static void create ()
static void destroy ()

Static Public Attributes

static const size_t facesDOF [Hexahedron::NumberOfFaces][numberOfFaceLivingDegreesOfFreedom]

Protected Member Functions

real_t __W (const size_t &i, const size_t &j)
real_t __dxW (const size_t &i, const size_t &j)
real_t __dyW (const size_t &i, const size_t &j)
real_t __dzW (const size_t &i, const size_t &j)

Protected Attributes

TinyMatrix
< numberOfDegreesOfFreedom,
numberOfQuadraturePoints > 
__w
TinyMatrix
< numberOfDegreesOfFreedom,
numberOfQuadraturePoints > 
__dxw
TinyMatrix
< numberOfDegreesOfFreedom,
numberOfQuadraturePoints > 
__dyw
TinyMatrix
< numberOfDegreesOfFreedom,
numberOfQuadraturePoints > 
__dzw

Static Protected Attributes

static Q2HexahedronFiniteElement__pInstance

Private Member Functions

real_t __w1 (const real_t &x) const
real_t __w2 (const real_t &x) const
real_t __w3 (const real_t &x) const
real_t __dw1 (const real_t &x) const
real_t __dw2 (const real_t &x) const
real_t __dw3 (const real_t &x) const

Static Private Attributes

static TinyVector< 3, real_t > __massCenter


Detailed Description

Definition at line 32 of file Q2HexahedronFiniteElement.hpp.


Member Typedef Documentation

default quadrature type

Definition at line 46 of file LagrangianFiniteElement.hpp.

typedef TinyVector<numberOfDegreesOfFreedom> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::ElementaryVector [inherited]

type of elementary vector

Definition at line 54 of file LagrangianFiniteElement.hpp.

typedef TinyMatrix<numberOfDegreesOfFreedom, numberOfDegreesOfFreedom> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::ElementaryMatrix [inherited]

type of elementary matrix

Definition at line 59 of file LagrangianFiniteElement.hpp.


Member Enumeration Documentation

anonymous enum

Enumerator:
numberOfDegreesOfFreedom  DOF means Degrees of Freedom
numberOfVertexDegreesOfFreedom 
numberOfEdgeDegreesOfFreedom 
numberOfFaceDegreesOfFreedom 
numberOfVolumeDegreesOfFreedom 
numberOfFaceLivingDegreesOfFreedom 

Definition at line 71 of file Q2HexahedronFiniteElement.hpp.

00071        {
00072     numberOfDegreesOfFreedom = 27, 
00073     numberOfVertexDegreesOfFreedom = 1,
00074     numberOfEdgeDegreesOfFreedom = 1,
00075     numberOfFaceDegreesOfFreedom = 1,
00076     numberOfVolumeDegreesOfFreedom = 1,
00077     numberOfFaceLivingDegreesOfFreedom = 9 // degrees of freedom carried by a face
00078   };

anonymous enum [inherited]

Definition at line 48 of file LagrangianFiniteElement.hpp.

00048        {
00049     numberOfQuadraturePoints = QuadratureType::numberOfQuadraturePoints
00050   };


Constructor & Destructor Documentation

Q2HexahedronFiniteElement::Q2HexahedronFiniteElement (  )  [inline]

Definition at line 143 of file Q2HexahedronFiniteElement.hpp.

00144   {
00145     ;
00146   }

Q2HexahedronFiniteElement::~Q2HexahedronFiniteElement (  )  [inline]

Definition at line 148 of file Q2HexahedronFiniteElement.hpp.

00149   {
00150     ;
00151   }


Member Function Documentation

real_t Q2HexahedronFiniteElement::__w1 ( const real_t &  x  )  const [inline, private]

Definition at line 40 of file Q2HexahedronFiniteElement.hpp.

Referenced by dxW(), dyW(), dzW(), and W().

00041   {
00042     return (x-1)*(2*x-1);
00043   }

real_t Q2HexahedronFiniteElement::__w2 ( const real_t &  x  )  const [inline, private]

Definition at line 45 of file Q2HexahedronFiniteElement.hpp.

Referenced by dxW(), dyW(), dzW(), and W().

00046   {
00047     return 4*x*(1-x);
00048   }

real_t Q2HexahedronFiniteElement::__w3 ( const real_t &  x  )  const [inline, private]

Definition at line 50 of file Q2HexahedronFiniteElement.hpp.

Referenced by dxW(), dyW(), dzW(), and W().

00051   {
00052     return x*(2*x-1);
00053   }

real_t Q2HexahedronFiniteElement::__dw1 ( const real_t &  x  )  const [inline, private]

Definition at line 55 of file Q2HexahedronFiniteElement.hpp.

Referenced by dxW(), dyW(), and dzW().

00056   {
00057     return 4*x-3;
00058   }

real_t Q2HexahedronFiniteElement::__dw2 ( const real_t &  x  )  const [inline, private]

Definition at line 60 of file Q2HexahedronFiniteElement.hpp.

Referenced by dxW(), dyW(), and dzW().

00061   {
00062     return 4-8*x;
00063   }

real_t Q2HexahedronFiniteElement::__dw3 ( const real_t &  x  )  const [inline, private]

Definition at line 65 of file Q2HexahedronFiniteElement.hpp.

Referenced by dxW(), dyW(), and dzW().

00066   {
00067     return 4*x-1;
00068   }

static const TinyVector<3, real_t>& Q2HexahedronFiniteElement::massCenter (  )  [inline, static]

returns the mass center of the reference element

Returns:
__massCenter

Definition at line 90 of file Q2HexahedronFiniteElement.hpp.

References __massCenter.

00091   {
00092     return __massCenter;
00093   }

real_t Q2HexahedronFiniteElement::W ( const size_t &  i,
const TinyVector< 3, real_t > &  x 
) const

Computes a hat function at a given point

Parameters:
i the hat function number
x the evaluation point
Returns:
$ w_i(\mathbf{x}) $

Definition at line 36 of file Q2HexahedronFiniteElement.cpp.

References __w1(), __w2(), __w3(), and ErrorHandler::unexpected.

00037 {
00038   const real_t& x = X[0];
00039   const real_t& y = X[1];
00040   const real_t& z = X[2];
00041 
00042   switch (i) {
00043     // Vertices basis functions 
00044   case 0: {
00045     return __w1(x)*__w1(y)*__w1(z);
00046   }
00047   case 1: {
00048     return __w3(x)*__w1(y)*__w1(z);
00049   }
00050   case 2: {
00051     return __w3(x)*__w3(y)*__w1(z);
00052   }
00053   case 3: {
00054     return __w1(x)*__w3(y)*__w1(z);
00055   }
00056   case 4: {
00057     return __w1(x)*__w1(y)*__w3(z);
00058   }
00059   case 5: {
00060     return __w3(x)*__w1(y)*__w3(z);
00061   }
00062   case 6: {
00063     return __w3(x)*__w3(y)*__w3(z);
00064   }
00065   case 7: {
00066     return __w1(x)*__w3(y)*__w3(z);
00067   }
00068     // Edges basis functions
00069   case 8: {
00070     return __w2(x)*__w1(y)*__w1(z);
00071   }
00072   case 9: {
00073     return __w3(x)*__w2(y)*__w1(z);
00074   }
00075   case 10: {
00076     return __w2(x)*__w3(y)*__w1(z);
00077   }
00078   case 11: {
00079     return __w1(x)*__w2(y)*__w1(z);
00080   }
00081   case 12: {
00082     return __w1(x)*__w1(y)*__w2(z);
00083   }
00084   case 13: {
00085     return __w3(x)*__w1(y)*__w2(z);
00086   }
00087   case 14: {
00088     return __w3(x)*__w3(y)*__w2(z);
00089   }
00090   case 15: {
00091     return __w1(x)*__w3(y)*__w2(z);
00092   }
00093   case 16: {
00094     return __w2(x)*__w1(y)*__w3(z);
00095   }
00096   case 17: {
00097     return __w3(x)*__w2(y)*__w3(z);
00098   }
00099   case 18: {
00100     return __w2(x)*__w3(y)*__w3(z);
00101   }
00102   case 19: {
00103     return __w1(x)*__w2(y)*__w3(z);
00104   }
00105     // Faces basis functions
00106   case 20: {
00107     return __w2(x)*__w2(y)*__w1(z);
00108   }
00109   case 21: {
00110     return __w2(x)*__w1(y)*__w2(z);
00111   }
00112   case 22: {
00113     return __w3(x)*__w2(y)*__w2(z);
00114   }
00115   case 23: {
00116     return __w2(x)*__w3(y)*__w2(z);
00117   }
00118   case 24: {
00119     return __w1(x)*__w2(y)*__w2(z);
00120   }
00121   case 25: {
00122     return __w2(x)*__w2(y)*__w3(z);
00123   }
00124     // Volume basis functions
00125   case 26: {
00126     return __w2(x)*__w2(y)*__w2(z);
00127   }
00128   default: {
00129     throw ErrorHandler(__FILE__,__LINE__,
00130                        "unexpected basis function number",
00131                        ErrorHandler::unexpected);
00132     return 0.;
00133   }
00134   }
00135 }

Here is the call graph for this function:

real_t Q2HexahedronFiniteElement::dxW ( const size_t &  i,
const TinyVector< 3, real_t > &  x 
) const

Computes a hat function derivative at a given point

Parameters:
i the hat function number
x the evaluation point
Returns:
$ \partial_x w_i(\mathbf{x}) $

Definition at line 138 of file Q2HexahedronFiniteElement.cpp.

References __dw1(), __dw2(), __dw3(), __w1(), __w2(), __w3(), and ErrorHandler::unexpected.

00139 {
00140   const real_t& x = X[0];
00141   const real_t& y = X[1];
00142   const real_t& z = X[2];
00143 
00144   switch (i) {
00145     // Vertices basis functions 
00146   case 0: {
00147     return __dw1(x)*__w1(y)*__w1(z);
00148   }
00149   case 1: {
00150     return __dw3(x)*__w1(y)*__w1(z);
00151   }
00152   case 2: {
00153     return __dw3(x)*__w3(y)*__w1(z);
00154   }
00155   case 3: {
00156     return __dw1(x)*__w3(y)*__w1(z);
00157   }
00158   case 4: {
00159     return __dw1(x)*__w1(y)*__w3(z);
00160   }
00161   case 5: {
00162     return __dw3(x)*__w1(y)*__w3(z);
00163   }
00164   case 6: {
00165     return __dw3(x)*__w3(y)*__w3(z);
00166   }
00167   case 7: {
00168     return __dw1(x)*__w3(y)*__w3(z);
00169   }
00170     // Edges basis functions
00171   case 8: {
00172     return __dw2(x)*__w1(y)*__w1(z);
00173   }
00174   case 9: {
00175     return __dw3(x)*__w2(y)*__w1(z);
00176   }
00177   case 10: {
00178     return __dw2(x)*__w3(y)*__w1(z);
00179   }
00180   case 11: {
00181     return __dw1(x)*__w2(y)*__w1(z);
00182   }
00183   case 12: {
00184     return __dw1(x)*__w1(y)*__w2(z);
00185   }
00186   case 13: {
00187     return __dw3(x)*__w1(y)*__w2(z);
00188   }
00189   case 14: {
00190     return __dw3(x)*__w3(y)*__w2(z);
00191   }
00192   case 15: {
00193     return __dw1(x)*__w3(y)*__w2(z);
00194   }
00195   case 16: {
00196     return __dw2(x)*__w1(y)*__w3(z);
00197   }
00198   case 17: {
00199     return __dw3(x)*__w2(y)*__w3(z);
00200   }
00201   case 18: {
00202     return __dw2(x)*__w3(y)*__w3(z);
00203   }
00204   case 19: {
00205     return __dw1(x)*__w2(y)*__w3(z);
00206   }
00207     // Faces basis functions
00208   case 20: {
00209     return __dw2(x)*__w2(y)*__w1(z);
00210   }
00211   case 21: {
00212     return __dw2(x)*__w1(y)*__w2(z);
00213   }
00214   case 22: {
00215     return __dw3(x)*__w2(y)*__w2(z);
00216   }
00217   case 23: {
00218     return __dw2(x)*__w3(y)*__w2(z);
00219   }
00220   case 24: {
00221     return __dw1(x)*__w2(y)*__w2(z);
00222   }
00223   case 25: {
00224     return __dw2(x)*__w2(y)*__w3(z);
00225   }
00226     // Volume basis functions
00227   case 26: {
00228     return __dw2(x)*__w2(y)*__w2(z);
00229   }
00230   default: {
00231     throw ErrorHandler(__FILE__,__LINE__,
00232                        "unexpected basis function number",
00233                        ErrorHandler::unexpected);
00234     return 0.;
00235   }
00236   }
00237 }

Here is the call graph for this function:

real_t Q2HexahedronFiniteElement::dyW ( const size_t &  i,
const TinyVector< 3, real_t > &  x 
) const

Computes a hat function derivative at a given point

Parameters:
i the hat function number
x the evaluation point
Returns:
$ \partial_y w_i(\mathbf{x}) $

Definition at line 240 of file Q2HexahedronFiniteElement.cpp.

References __dw1(), __dw2(), __dw3(), __w1(), __w2(), __w3(), and ErrorHandler::unexpected.

00241 {
00242   const real_t& x = X[0];
00243   const real_t& y = X[1];
00244   const real_t& z = X[2];
00245 
00246   switch (i) {
00247     // Vertices basis functions 
00248   case 0: {
00249     return __w1(x)*__dw1(y)*__w1(z);
00250   }
00251   case 1: {
00252     return __w3(x)*__dw1(y)*__w1(z);
00253   }
00254   case 2: {
00255     return __w3(x)*__dw3(y)*__w1(z);
00256   }
00257   case 3: {
00258     return __w1(x)*__dw3(y)*__w1(z);
00259   }
00260   case 4: {
00261     return __w1(x)*__dw1(y)*__w3(z);
00262   }
00263   case 5: {
00264     return __w3(x)*__dw1(y)*__w3(z);
00265   }
00266   case 6: {
00267     return __w3(x)*__dw3(y)*__w3(z);
00268   }
00269   case 7: {
00270     return __w1(x)*__dw3(y)*__w3(z);
00271   }
00272     // Edges basis functions
00273   case 8: {
00274     return __w2(x)*__dw1(y)*__w1(z);
00275   }
00276   case 9: {
00277     return __w3(x)*__dw2(y)*__w1(z);
00278   }
00279   case 10: {
00280     return __w2(x)*__dw3(y)*__w1(z);
00281   }
00282   case 11: {
00283     return __w1(x)*__dw2(y)*__w1(z);
00284   }
00285   case 12: {
00286     return __w1(x)*__dw1(y)*__w2(z);
00287   }
00288   case 13: {
00289     return __w3(x)*__dw1(y)*__w2(z);
00290   }
00291   case 14: {
00292     return __w3(x)*__dw3(y)*__w2(z);
00293   }
00294   case 15: {
00295     return __w1(x)*__dw3(y)*__w2(z);
00296   }
00297   case 16: {
00298     return __w2(x)*__dw1(y)*__w3(z);
00299   }
00300   case 17: {
00301     return __w3(x)*__dw2(y)*__w3(z);
00302   }
00303   case 18: {
00304     return __w2(x)*__dw3(y)*__w3(z);
00305   }
00306   case 19: {
00307     return __w1(x)*__dw2(y)*__w3(z);
00308   }
00309     // Faces basis functions
00310   case 20: {
00311     return __w2(x)*__dw2(y)*__w1(z);
00312   }
00313   case 21: {
00314     return __w2(x)*__dw1(y)*__w2(z);
00315   }
00316   case 22: {
00317     return __w3(x)*__dw2(y)*__w2(z);
00318   }
00319   case 23: {
00320     return __w2(x)*__dw3(y)*__w2(z);
00321   }
00322   case 24: {
00323     return __w1(x)*__dw2(y)*__w2(z);
00324   }
00325   case 25: {
00326     return __w2(x)*__dw2(y)*__w3(z);
00327   }
00328     // Volume basis functions
00329   case 26: {
00330     return __w2(x)*__dw2(y)*__w2(z);
00331   }
00332   default: {
00333     throw ErrorHandler(__FILE__,__LINE__,
00334                        "unexpected basis function number",
00335                        ErrorHandler::unexpected);
00336     return 0.;
00337   }
00338   }
00339 }

Here is the call graph for this function:

real_t Q2HexahedronFiniteElement::dzW ( const size_t &  i,
const TinyVector< 3, real_t > &  x 
) const

Computes a hat function derivative at a given point

Parameters:
i the hat function number
x the evaluation point
Returns:
$ \partial_z w_i(\mathbf{x}) $

Definition at line 342 of file Q2HexahedronFiniteElement.cpp.

References __dw1(), __dw2(), __dw3(), __w1(), __w2(), __w3(), and ErrorHandler::unexpected.

00343 {
00344   const real_t& x = X[0];
00345   const real_t& y = X[1];
00346   const real_t& z = X[2];
00347 
00348   switch (i) {
00349     // Vertices basis functions 
00350   case 0: {
00351     return __w1(x)*__w1(y)*__dw1(z);
00352   }
00353   case 1: {
00354     return __w3(x)*__w1(y)*__dw1(z);
00355   }
00356   case 2: {
00357     return __w3(x)*__w3(y)*__dw1(z);
00358   }
00359   case 3: {
00360     return __w1(x)*__w3(y)*__dw1(z);
00361   }
00362   case 4: {
00363     return __w1(x)*__w1(y)*__dw3(z);
00364   }
00365   case 5: {
00366     return __w3(x)*__w1(y)*__dw3(z);
00367   }
00368   case 6: {
00369     return __w3(x)*__w3(y)*__dw3(z);
00370   }
00371   case 7: {
00372     return __w1(x)*__w3(y)*__dw3(z);
00373   }
00374     // Edges basis functions
00375   case 8: {
00376     return __w2(x)*__w1(y)*__dw1(z);
00377   }
00378   case 9: {
00379     return __w3(x)*__w2(y)*__dw1(z);
00380   }
00381   case 10: {
00382     return __w2(x)*__w3(y)*__dw1(z);
00383   }
00384   case 11: {
00385     return __w1(x)*__w2(y)*__dw1(z);
00386   }
00387   case 12: {
00388     return __w1(x)*__w1(y)*__dw2(z);
00389   }
00390   case 13: {
00391     return __w3(x)*__w1(y)*__dw2(z);
00392   }
00393   case 14: {
00394     return __w3(x)*__w3(y)*__dw2(z);
00395   }
00396   case 15: {
00397     return __w1(x)*__w3(y)*__dw2(z);
00398   }
00399   case 16: {
00400     return __w2(x)*__w1(y)*__dw3(z);
00401   }
00402   case 17: {
00403     return __w3(x)*__w2(y)*__dw3(z);
00404   }
00405   case 18: {
00406     return __w2(x)*__w3(y)*__dw3(z);
00407   }
00408   case 19: {
00409     return __w1(x)*__w2(y)*__dw3(z);
00410   }
00411     // Faces basis functions
00412   case 20: {
00413     return __w2(x)*__w2(y)*__dw1(z);
00414   }
00415   case 21: {
00416     return __w2(x)*__w1(y)*__dw2(z);
00417   }
00418   case 22: {
00419     return __w3(x)*__w2(y)*__dw2(z);
00420   }
00421   case 23: {
00422     return __w2(x)*__w3(y)*__dw2(z);
00423   }
00424   case 24: {
00425     return __w1(x)*__w2(y)*__dw2(z);
00426   }
00427   case 25: {
00428     return __w2(x)*__w2(y)*__dw3(z);
00429   }
00430     // Volume basis functions
00431   case 26: {
00432     return __w2(x)*__w2(y)*__dw2(z);
00433   }
00434   default: {
00435     throw ErrorHandler(__FILE__,__LINE__,
00436                        "unexpected basis function number",
00437                        ErrorHandler::unexpected);
00438     return 0.;
00439   }
00440   }
00441 }

Here is the call graph for this function:

const TinyVector<QuadratureType::numberOfQuadraturePoints, TinyVector<3, real_t> >& Q2HexahedronFiniteElement::integrationVertices (  )  const [inline]

Definition at line 138 of file Q2HexahedronFiniteElement.hpp.

References StaticBase< QuadratureFormulaQ2Hexahedron >::instance(), and QuadratureFormulaQ2Hexahedron::vertices().

00139   {
00140     return QuadratureType::instance().vertices();
00141   }

Here is the call graph for this function:

static Q2HexahedronFiniteElement & StaticBase< Q2HexahedronFiniteElement >::instance (  )  [inline, static, inherited]

Access to auto instanciated static;

Returns:
*__pInstance

Definition at line 46 of file StaticBase.hpp.

00047   {
00048     return *__pInstance;
00049   }

static void StaticBase< Q2HexahedronFiniteElement >::create (  )  [inline, static, inherited]

Creates __pInstance in Embedding class.

Definition at line 55 of file StaticBase.hpp.

Referenced by ThreadStaticCenter::ThreadStaticCenter().

00056   {
00057     __pInstance = new EmbeddingClass();
00058   }

static void StaticBase< Q2HexahedronFiniteElement >::destroy (  )  [inline, static, inherited]

Destroyes __autoInstanciated in Embedding class.

Definition at line 64 of file StaticBase.hpp.

Referenced by ThreadStaticCenter::~ThreadStaticCenter().

00065   {
00066     delete __pInstance;
00067   }

real_t LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::__W ( const size_t &  i,
const size_t &  j 
) [inline, protected, inherited]

Computes hat function value at quadrature point

Parameters:
i the hat function number
j the number of quadrature point
Returns:
the function value

Definition at line 81 of file LagrangianFiniteElement.hpp.

00082   {
00083     return self().W(i,self().integrationVertices()[j]);
00084   }

real_t LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::__dxW ( const size_t &  i,
const size_t &  j 
) [inline, protected, inherited]

Computes hat function derivative by x at quadrature point

Parameters:
i the hat function number
j the number of quadrature point
Returns:
the function's derivative value

Definition at line 94 of file LagrangianFiniteElement.hpp.

00095   {
00096     return self().dxW(i,self().integrationVertices()[j]);
00097   }

real_t LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::__dyW ( const size_t &  i,
const size_t &  j 
) [inline, protected, inherited]

Computes hat function derivative by y at quadrature point

Parameters:
i the hat function number
j the number of quadrature point
Returns:
the function's derivative value

Definition at line 107 of file LagrangianFiniteElement.hpp.

00108   {
00109     return self().dyW(i,self().integrationVertices()[j]);
00110   }

real_t LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::__dzW ( const size_t &  i,
const size_t &  j 
) [inline, protected, inherited]

Computes hat function derivative by z at quadrature point

Parameters:
i the hat function number
j the number of quadrature point
Returns:
the function's derivative value

Definition at line 120 of file LagrangianFiniteElement.hpp.

00121   {
00122     return self().dzW(i,self().integrationVertices()[j]);
00123   }

const real_t& LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::W ( const size_t &  i,
const size_t &  j 
) const [inline, inherited]

Read-only access to hat function value at a quadrature point

Parameters:
i the hat function number
j the number of quadrature point
Returns:
the function's value

Definition at line 147 of file LagrangianFiniteElement.hpp.

00148   {
00149     return __w(i,j);
00150   }

const real_t& LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::dxW ( const size_t &  i,
const size_t &  j 
) const [inline, inherited]

Read-only access to hat function's derivative by x value at a quadrature point

Parameters:
i the hat function number
j the number of quadrature point
Returns:
the function's value

Definition at line 161 of file LagrangianFiniteElement.hpp.

00162   {
00163     return __dxw(i,j);
00164   }

const real_t& LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::dyW ( const size_t &  i,
const size_t &  j 
) const [inline, inherited]

Read-only access to hat function's derivative by y value at a quadrature point

Parameters:
i the hat function number
j the number of quadrature point
Returns:
the function's value

Definition at line 175 of file LagrangianFiniteElement.hpp.

00176   {
00177     return __dyw(i,j);
00178   }

const real_t& LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::dzW ( const size_t &  i,
const size_t &  j 
) const [inline, inherited]

Read-only access to hat function's derivative by z value at a quadrature point

Parameters:
i the hat function number
j the number of quadrature point
Returns:
the function's value

Definition at line 189 of file LagrangianFiniteElement.hpp.

00190   {
00191     return __dzw(i,j);
00192   }

void LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::integrateWjWi ( ElementaryMatrix matElem,
const ConformTransformation &  T 
) const [inline, inherited]

Computes elementary matrix associated to $ \int w_j w_i $ on a given element using the associated conform transformation

Parameters:
matElem the elementary matrix
T the given transformation

Definition at line 203 of file LagrangianFiniteElement.hpp.

00205   {
00206     ElementaryMatrix tmp = 0;
00207 
00208     for (size_t k=0; k<numberOfQuadraturePoints; ++k) { // Loop on integration vertices
00209       for (size_t j=0; j<numberOfDegreesOfFreedom; ++j) {
00210         for (size_t i=0; i<=j; ++i) {
00211           tmp(i,j)
00212             += W(i,k) * W(j,k) * QuadratureType::instance().weight(k);
00213         }
00214       }
00215     }
00216 
00217     // for this operator, matElem is symetric.
00218     for (size_t j=0; j<numberOfDegreesOfFreedom; ++j)
00219       for (size_t i=j+1; i<numberOfDegreesOfFreedom; ++i)
00220         tmp(i,j) = tmp(j,i);
00221 
00222     matElem += tmp;
00223   }

void LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::integrateDWjWi ( ElementaryMatrix matElem,
const size_t &  n,
const ConformTransformation &  T 
) const [inline, inherited]

Computes elementary matrix associated to $ \int \partial_{x_n} w_j w_i $ on a given element using the associated conform transformation

Parameters:
matElem the elementary matrix
n the $ n $ in $ \partial_{x_n} $
T the given transformation

Definition at line 235 of file LagrangianFiniteElement.hpp.

00238   {
00239     ElementaryMatrix tmp = 0;
00240 
00241     for (size_t k=0; k<numberOfQuadraturePoints; ++k) { // Loop on integration vertices
00242       for (size_t j=0; j<numberOfDegreesOfFreedom; ++j) {
00243         const real_t fj
00244           = dxW(j,k)*T.invJacobian(0,n)
00245           + dyW(j,k)*T.invJacobian(1,n)
00246           + dzW(j,k)*T.invJacobian(2,n);
00247         for (size_t i=0; i<numberOfDegreesOfFreedom; ++i) {
00248           tmp(i,j)
00249             += fj * W(i,k)  * QuadratureType::instance().weight(k);
00250         }
00251       }
00252     }
00253     matElem += tmp;
00254   }

void LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::integrateWjDWi ( ElementaryMatrix matElem,
const size_t &  n,
const ConformTransformation &  T 
) const [inline, inherited]

Computes elementary matrix associated to $ \int w_j \partial_{x_n} w_i $ on a given element using the associated conform transformation

Parameters:
matElem the elementary matrix
n the $ n $ in $ \partial_{x_n} $
T the given transformation

Definition at line 266 of file LagrangianFiniteElement.hpp.

00269   {
00270     ElementaryMatrix tmp = 0;
00271 
00272     for (size_t k=0; k<numberOfQuadraturePoints; ++k) { // Loop on integration vertices
00273       for (size_t i=0; i<numberOfDegreesOfFreedom; ++i) {
00274         const real_t fi
00275           = dxW(i,k)*T.invJacobian(0,n)
00276           + dyW(i,k)*T.invJacobian(1,n)
00277           + dzW(i,k)*T.invJacobian(2,n);
00278         for (size_t j=0; j<numberOfDegreesOfFreedom; ++j) {
00279           tmp(i,j)
00280             += fi * W(j,k) * QuadratureType::instance().weight(k);
00281         }
00282       }
00283     }
00284     matElem += tmp;
00285   }

void LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::integrateDWjDWi ( ElementaryMatrix matElem,
const size_t &  n,
const size_t &  m,
const ConformTransformation &  T 
) const [inline, inherited]

Computes elementary matrix associated to $ \int \partial_{x_n} w_j \partial_{x_m} w_i $ on a given element using the associated conform transformation

Parameters:
matElem the elementary matrix
n the $ n $ in $ \partial_{x_n} $
m the $ m $ in $ \partial_{x_m} $
T the given transformation

Definition at line 298 of file LagrangianFiniteElement.hpp.

00302   {
00303     ElementaryMatrix tmp = 0;
00304 
00305     for (size_t k=0; k<numberOfQuadraturePoints; ++k) { // Loop on integration vertices
00306       for (size_t j=0; j<numberOfDegreesOfFreedom; ++j) {
00307         const real_t fj
00308           = dxW(j,k)*T.invJacobian(0,n)
00309           + dyW(j,k)*T.invJacobian(1,n)
00310           + dzW(j,k)*T.invJacobian(2,n);
00311         for (size_t i=0; i<numberOfDegreesOfFreedom; ++i) {
00312           tmp(i,j)
00313             += fj
00314             * (  dxW(i,k)*T.invJacobian(0,m)
00315                + dyW(i,k)*T.invJacobian(1,m)
00316                + dzW(i,k)*T.invJacobian(2,m) )
00317             * QuadratureType::instance().weight(k);
00318         }
00319       }
00320     }
00321 
00322     matElem += tmp;
00323   }

void LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::integrateWj ( ElementaryVector vectElem,
const ConformTransformation &  T,
const TinyVector< numberOfQuadraturePoints, real_t > &  f 
) const [inline, inherited]

Computes elementary vector associated to $ \int f w_i $ on a given element using the associated conform transformation

Parameters:
vectElem the elementary vector
T the given transformation
f $ f $ values at quadrature points

Definition at line 334 of file LagrangianFiniteElement.hpp.

00337   {
00338     vectElem = 0;
00339 
00340     for (size_t k=0; k<numberOfQuadraturePoints; ++k)
00341       for (size_t j=0; j<numberOfDegreesOfFreedom; ++j) {
00342         vectElem[j]
00343           += W(j,k)
00344           *  f[k]
00345           *  QuadratureType::instance().weight(k);
00346       }
00347   }


Member Data Documentation

TinyVector< 3, real_t > Q2HexahedronFiniteElement::__massCenter [static, private]

mass center of the reference element

Definition at line 38 of file Q2HexahedronFiniteElement.hpp.

Referenced by massCenter().

const size_t Q2HexahedronFiniteElement::facesDOF [static]

Initial value:

 {{ 0, 1, 2, 3, 8, 9,10,11,20},
   { 0, 1, 4, 5, 8,12,13,16,21},
   { 1, 2, 5, 6, 9,13,14,17,22},
   { 2, 3, 6, 7,10,14,15,18,23},
   { 0, 3, 4, 7,11,12,15,19,24},
   { 4, 5, 6, 7,16,17,18,19,25}}
Degrees of freedom living on faces

Definition at line 83 of file Q2HexahedronFiniteElement.hpp.

The static variable

Definition at line 37 of file StaticBase.hpp.

TinyMatrix<numberOfDegreesOfFreedom,numberOfQuadraturePoints> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::__w [protected, inherited]

hat function values at quadrature points

Definition at line 127 of file LagrangianFiniteElement.hpp.

TinyMatrix<numberOfDegreesOfFreedom,numberOfQuadraturePoints> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::__dxw [protected, inherited]

hat function dx values at quadrature points

Definition at line 130 of file LagrangianFiniteElement.hpp.

TinyMatrix<numberOfDegreesOfFreedom,numberOfQuadraturePoints> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::__dyw [protected, inherited]

hat function dy values at quadrature points

Definition at line 133 of file LagrangianFiniteElement.hpp.

TinyMatrix<numberOfDegreesOfFreedom,numberOfQuadraturePoints> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q2HexahedronFiniteElement , QuadratureFormulaQ2Hexahedron >::__dzw [protected, inherited]

hat function dz values at quadrature points

Definition at line 136 of file LagrangianFiniteElement.hpp.


The documentation for this class was generated from the following files:

Generated on Wed Nov 19 00:12:02 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6