![]() |
|||||
![]() |
14 Novembre 2005 | By LPX | |||
- Création d'une classe (SfGpState) intermédiaire à GpStateBase et MechanicalGpState ou Thermal GpState contenant
- la matrice Jacobienne (jacobianMatrix) (ATTENTION : selon le contexte, il s'agira de la matrice (GP1) ou de son inverse (GP0)!!!)
- le determinant de celle ci (detJ)
- Suppression des tableaux J1, J0Inv, J1t, detJ, detJt, .... au profit du gpState
- FourthOrderTensor3D::operator():
le test sur les i,j,k,l empechait l'optimisation de la fonction (sous pc) !!!
inline double
FourthOrderTensor3D::operator() (int i, int j, int k, int l) const
{
if(i>=0 && i<=2 && j>=0 && j<=2 && k>=0 && k<=2 && l>=0 && l<=2)
{
return x[i][j][k][l];
}
else
{
FATAL_ERROR("");
return 0.;
}
}résultat Quantify : (routine appelante)
MechanicalVolumeIntegrationMethods<Dimension2D>::getElementaryStiffness
temps fct + descendants = 385845.12Remplace par :
inline double
FourthOrderTensor3D::operator() (int i, int j, int k, int l) const
{
assert(i>=0 && i<=2 && j>=0 && j<=2 && k>=0 && k<=2 && l>=0 && l<=2);
return x[i][j][k][l];}
résultat Quantify : (routine appelante)
MechanicalVolumeIntegrationMethods<Dimension2D>::getElementaryStiffness
temps fct + descendants = 55987.20
- FourthOrderTensor2D/3D::Q1SQ2 :
Inlining de ces fonctions (qui sont au "top" des fonctions consommant du CPU)
- FourthOrderTensor3D::setToZero
- FourthOrderTensor3D:: operator *=
Explicitation des fonctions (à la place de la quadruple boucle) : gain important d'apres quantify (à vérifier sur batterie)
- Remplacement de qq copies de Matr3 en récuperation de leur reference qd cela est possible
- Inlining de fonction dyadic (la fonction Matr3.dyadic(SymMatr3) est "inlinable" alors que SymMatr3.dyadic(Matr3) ne l'est pas)
(sachant que le transfert de jaco/detJ coute un peu)
CPU 0 |
CPU 1 | GAIN |
chinook |
20451.61 | 19932.50 | 0.03 |
AlphaLinux |
51559.35 |
49796.8149 | 0.04 |
Gaston |
12273.33 |
11375.92 | 0.08 |
CygWin |
29194.3576 | 27215.9286 | 0.07 |
\oo_meta\mtMaterials\SfGpState.h/cpp
![]() |
![]() |
|||
created :14 Novembre 2005 | modified : 14 Novembre 2005 | |||
contact :L.Papeleux@ulg.ac.be | ||||