#include <Q0HexahedronFiniteElement.hpp>


Public Types | |
| enum | { numberOfDegreesOfFreedom = 1, numberOfVertexDegreesOfFreedom = 0, numberOfEdgeDegreesOfFreedom = 0, numberOfFaceDegreesOfFreedom = 0, numberOfVolumeDegreesOfFreedom = 1, numberOfFaceLivingDegreesOfFreedom = 0 } |
| enum | |
| typedef QuadratureFormulaQ0Hexahedron | QuadratureType |
| typedef TinyVector < numberOfDegreesOfFreedom > | ElementaryVector |
| typedef TinyMatrix < numberOfDegreesOfFreedom, numberOfDegreesOfFreedom > | ElementaryMatrix |
Public Member Functions | |
| real_t | W (const size_t &i, const TinyVector< 3 > &x) const |
| real_t | dxW (const size_t &i, const TinyVector< 3 > &x) const |
| real_t | dyW (const size_t &i, const TinyVector< 3 > &x) const |
| real_t | dzW (const size_t &i, const TinyVector< 3 > &x) const |
| const TinyVector < QuadratureType::numberOfQuadraturePoints, TinyVector< 3 > > & | integrationVertices () const |
| Q0HexahedronFiniteElement () | |
| ~Q0HexahedronFiniteElement () | |
| 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 Q0HexahedronFiniteElement & | instance () |
| static void | create () |
| static void | destroy () |
Static Public Attributes | |
| static const size_t | facesDOF [Hexahedron::NumberOfFaces][1] |
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 Q0HexahedronFiniteElement * | __pInstance |
Static Private Attributes | |
| static TinyVector< 3, real_t > | __massCenter |
Definition at line 32 of file Q0HexahedronFiniteElement.hpp.
typedef QuadratureFormulaQ0Hexahedron LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::QuadratureType [inherited] |
default quadrature type
Definition at line 46 of file LagrangianFiniteElement.hpp.
typedef TinyVector<numberOfDegreesOfFreedom> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::ElementaryVector [inherited] |
type of elementary vector
Definition at line 54 of file LagrangianFiniteElement.hpp.
typedef TinyMatrix<numberOfDegreesOfFreedom, numberOfDegreesOfFreedom> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::ElementaryMatrix [inherited] |
type of elementary matrix
Definition at line 59 of file LagrangianFiniteElement.hpp.
| anonymous enum |
| numberOfDegreesOfFreedom | |
| numberOfVertexDegreesOfFreedom | |
| numberOfEdgeDegreesOfFreedom | |
| numberOfFaceDegreesOfFreedom | |
| numberOfVolumeDegreesOfFreedom | |
| numberOfFaceLivingDegreesOfFreedom |
Definition at line 41 of file Q0HexahedronFiniteElement.hpp.
00041 { 00042 numberOfDegreesOfFreedom = 1, 00043 numberOfVertexDegreesOfFreedom = 0, 00044 numberOfEdgeDegreesOfFreedom = 0, 00045 numberOfFaceDegreesOfFreedom = 0, 00046 numberOfVolumeDegreesOfFreedom = 1, 00047 numberOfFaceLivingDegreesOfFreedom = 0 // degrees of freedom carried by a face 00048 };
anonymous enum [inherited] |
Definition at line 48 of file LagrangianFiniteElement.hpp.
00048 { 00049 numberOfQuadraturePoints = QuadratureType::numberOfQuadraturePoints 00050 };
| Q0HexahedronFiniteElement::Q0HexahedronFiniteElement | ( | ) | [inline] |
| Q0HexahedronFiniteElement::~Q0HexahedronFiniteElement | ( | ) | [inline] |
| static const TinyVector<3, real_t>& Q0HexahedronFiniteElement::massCenter | ( | ) | [inline, static] |
returns the mass center of the reference element
Definition at line 62 of file Q0HexahedronFiniteElement.hpp.
References __massCenter.
00063 { 00064 return __massCenter; 00065 }
| real_t Q0HexahedronFiniteElement::W | ( | const size_t & | i, | |
| const TinyVector< 3 > & | x | |||
| ) | const |
Computes a hat function at a given point
| i | the hat function number | |
| x | the evaluation point |
Definition at line 35 of file Q0HexahedronFiniteElement.cpp.
References ErrorHandler::unexpected.
00036 { 00037 if (i>0) { 00038 throw ErrorHandler(__FILE__,__LINE__, 00039 "unexpected basis function number", 00040 ErrorHandler::unexpected); 00041 } 00042 00043 return 1; 00044 }
| real_t Q0HexahedronFiniteElement::dxW | ( | const size_t & | i, | |
| const TinyVector< 3 > & | x | |||
| ) | const |
Computes a hat function derivative at a given point
| i | the hat function number | |
| x | the evaluation point |
Definition at line 47 of file Q0HexahedronFiniteElement.cpp.
References ErrorHandler::unexpected.
00048 { 00049 if (i>0) { 00050 throw ErrorHandler(__FILE__,__LINE__, 00051 "unexpected basis function number", 00052 ErrorHandler::unexpected); 00053 } 00054 00055 return 0; 00056 }
| real_t Q0HexahedronFiniteElement::dyW | ( | const size_t & | i, | |
| const TinyVector< 3 > & | x | |||
| ) | const |
Computes a hat function derivative at a given point
| i | the hat function number | |
| x | the evaluation point |
Definition at line 59 of file Q0HexahedronFiniteElement.cpp.
References ErrorHandler::unexpected.
00060 { 00061 if (i>0) { 00062 throw ErrorHandler(__FILE__,__LINE__, 00063 "unexpected basis function number", 00064 ErrorHandler::unexpected); 00065 } 00066 00067 return 0; 00068 }
| real_t Q0HexahedronFiniteElement::dzW | ( | const size_t & | i, | |
| const TinyVector< 3 > & | x | |||
| ) | const |
Computes a hat function derivative at a given point
| i | the hat function number | |
| x | the evaluation point |
Definition at line 71 of file Q0HexahedronFiniteElement.cpp.
References ErrorHandler::unexpected.
00072 { 00073 if (i>0) { 00074 throw ErrorHandler(__FILE__,__LINE__, 00075 "unexpected basis function number", 00076 ErrorHandler::unexpected); 00077 } 00078 00079 return 0; 00080 }
| const TinyVector<QuadratureType::numberOfQuadraturePoints, TinyVector<3> >& Q0HexahedronFiniteElement::integrationVertices | ( | ) | const [inline] |
Definition at line 110 of file Q0HexahedronFiniteElement.hpp.
References StaticBase< QuadratureFormulaQ0Hexahedron >::instance(), and QuadratureFormulaQ0Hexahedron::vertices().
00111 { 00112 return QuadratureType::instance().vertices(); 00113 }

| static Q0HexahedronFiniteElement & StaticBase< Q0HexahedronFiniteElement >::instance | ( | ) | [inline, static, inherited] |
Access to auto instanciated static;
Definition at line 46 of file StaticBase.hpp.
00047 { 00048 return *__pInstance; 00049 }
| static void StaticBase< Q0HexahedronFiniteElement >::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< Q0HexahedronFiniteElement >::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, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::__W | ( | const size_t & | i, | |
| const size_t & | j | |||
| ) | [inline, protected, inherited] |
Computes hat function value at quadrature point
| i | the hat function number | |
| j | the number of quadrature point |
Definition at line 81 of file LagrangianFiniteElement.hpp.
00082 { 00083 return self().W(i,self().integrationVertices()[j]); 00084 }
| real_t LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::__dxW | ( | const size_t & | i, | |
| const size_t & | j | |||
| ) | [inline, protected, inherited] |
Computes hat function derivative by x at quadrature point
| i | the hat function number | |
| j | the number of quadrature point |
Definition at line 94 of file LagrangianFiniteElement.hpp.
00095 { 00096 return self().dxW(i,self().integrationVertices()[j]); 00097 }
| real_t LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::__dyW | ( | const size_t & | i, | |
| const size_t & | j | |||
| ) | [inline, protected, inherited] |
Computes hat function derivative by y at quadrature point
| i | the hat function number | |
| j | the number of quadrature point |
Definition at line 107 of file LagrangianFiniteElement.hpp.
00108 { 00109 return self().dyW(i,self().integrationVertices()[j]); 00110 }
| real_t LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::__dzW | ( | const size_t & | i, | |
| const size_t & | j | |||
| ) | [inline, protected, inherited] |
Computes hat function derivative by z at quadrature point
| i | the hat function number | |
| j | the number of quadrature point |
Definition at line 120 of file LagrangianFiniteElement.hpp.
00121 { 00122 return self().dzW(i,self().integrationVertices()[j]); 00123 }
| const real_t& LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::W | ( | const size_t & | i, | |
| const size_t & | j | |||
| ) | const [inline, inherited] |
Read-only access to hat function value at a quadrature point
| i | the hat function number | |
| j | the number of quadrature point |
Definition at line 147 of file LagrangianFiniteElement.hpp.
00148 { 00149 return __w(i,j); 00150 }
| const real_t& LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::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
| i | the hat function number | |
| j | the number of quadrature point |
Definition at line 161 of file LagrangianFiniteElement.hpp.
00162 { 00163 return __dxw(i,j); 00164 }
| const real_t& LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::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
| i | the hat function number | |
| j | the number of quadrature point |
Definition at line 175 of file LagrangianFiniteElement.hpp.
00176 { 00177 return __dyw(i,j); 00178 }
| const real_t& LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::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
| i | the hat function number | |
| j | the number of quadrature point |
Definition at line 189 of file LagrangianFiniteElement.hpp.
00190 { 00191 return __dzw(i,j); 00192 }
| void LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::integrateWjWi | ( | ElementaryMatrix & | matElem, | |
| const ConformTransformation & | T | |||
| ) | const [inline, inherited] |
Computes elementary matrix associated to
on a given element using the associated conform transformation
| 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, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::integrateDWjWi | ( | ElementaryMatrix & | matElem, | |
| const size_t & | n, | |||
| const ConformTransformation & | T | |||
| ) | const [inline, inherited] |
Computes elementary matrix associated to
on a given element using the associated conform transformation
| matElem | the elementary matrix | |
| n | the in | |
| 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, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::integrateWjDWi | ( | ElementaryMatrix & | matElem, | |
| const size_t & | n, | |||
| const ConformTransformation & | T | |||
| ) | const [inline, inherited] |
Computes elementary matrix associated to
on a given element using the associated conform transformation
| matElem | the elementary matrix | |
| n | the in | |
| 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, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::integrateDWjDWi | ( | ElementaryMatrix & | matElem, | |
| const size_t & | n, | |||
| const size_t & | m, | |||
| const ConformTransformation & | T | |||
| ) | const [inline, inherited] |
Computes elementary matrix associated to
on a given element using the associated conform transformation
| matElem | the elementary matrix | |
| n | the in | |
| m | the in | |
| 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, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::integrateWj | ( | ElementaryVector & | vectElem, | |
| const ConformTransformation & | T, | |||
| const TinyVector< numberOfQuadraturePoints, real_t > & | f | |||
| ) | const [inline, inherited] |
Computes elementary vector associated to
on a given element using the associated conform transformation
| vectElem | the elementary vector | |
| T | the given transformation | |
| 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 }
TinyVector< 3, real_t > Q0HexahedronFiniteElement::__massCenter [static, private] |
mass center of the reference element
Definition at line 38 of file Q0HexahedronFiniteElement.hpp.
Referenced by massCenter().
const size_t Q0HexahedronFiniteElement::facesDOF [static] |
Initial value:
{{std::numeric_limits<size_t>::max()},
{std::numeric_limits<size_t>::max()},
{std::numeric_limits<size_t>::max()},
{std::numeric_limits<size_t>::max()},
{std::numeric_limits<size_t>::max()},
{std::numeric_limits<size_t>::max()}}
Definition at line 55 of file Q0HexahedronFiniteElement.hpp.
Q0HexahedronFiniteElement * StaticBase< Q0HexahedronFiniteElement >::__pInstance [static, protected, inherited] |
The static variable
Definition at line 37 of file StaticBase.hpp.
TinyMatrix<numberOfDegreesOfFreedom,numberOfQuadraturePoints> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::__w [protected, inherited] |
hat function values at quadrature points
Definition at line 127 of file LagrangianFiniteElement.hpp.
TinyMatrix<numberOfDegreesOfFreedom,numberOfQuadraturePoints> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::__dxw [protected, inherited] |
hat function dx values at quadrature points
Definition at line 130 of file LagrangianFiniteElement.hpp.
TinyMatrix<numberOfDegreesOfFreedom,numberOfQuadraturePoints> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::__dyw [protected, inherited] |
hat function dy values at quadrature points
Definition at line 133 of file LagrangianFiniteElement.hpp.
TinyMatrix<numberOfDegreesOfFreedom,numberOfQuadraturePoints> LagrangianFiniteElement< numberOfDegreesOfFreedom, Q0HexahedronFiniteElement , QuadratureFormulaQ0Hexahedron >::__dzw [protected, inherited] |
hat function dz values at quadrature points
Definition at line 136 of file LagrangianFiniteElement.hpp.
1.5.6