1 line
13 KiB
C++
1 line
13 KiB
C++
|
#include "GeomHexalin.h"
#include <math.h>
#include "GeomSeg.h"
#include "GeomQuadrangle.h"
#include "MathUtil.h"
// constructeur
// la dimension est 3, on a 8 pt d'integration, 8 noeuds et 6 faces, 12 aretes
GeomHexalin::GeomHexalin() :
ElemGeom(3,8,8,6,12)
{ // coordonnees des points d'integration
double a = 1./sqrt(3);
ptInteg(1) = Coordonnee(a,a,a);
ptInteg(2) = Coordonnee(a,a,-a);
ptInteg(3) = Coordonnee(a,-a,a);
ptInteg(4) = Coordonnee(a,-a,-a);
ptInteg(5) = Coordonnee(-a,a,a);
ptInteg(6) = Coordonnee(-a,a,-a);
ptInteg(7) = Coordonnee(-a,-a,a);
ptInteg(8) = Coordonnee(-a,-a,-a);
// poids d'integration
for (int i =1;i<=Nbi();i++)
WI(i)= 1.;
//--------------------------------
//def des arretes
//--------------------------------
int nbil =1; // nb de pt d'integ par ligne
int nbnel =2; // nb de noeud du segment
seg(1) = new GeomSeg(nbil,nbnel);
for (int il=2;il<= NBSE; il++) // ici NBSE = 12
seg(il) = seg(1);
// def des tableaux de connection des noeuds des aretes
for (int i =1;i<=NBSE;i++) NONS(i).Change_taille(2);
// la description est fait selon le fichier EIMail
NONS(1)(1) = 1;NONS(1)(2) = 2;NONS(2)(1) = 2;NONS(2)(2) = 3;
NONS(3)(1) = 3;NONS(3)(2) = 4;NONS(4)(1) = 4;NONS(4)(2) = 1;
NONS(5)(1) = 1;NONS(5)(2) = 5;NONS(6)(1) = 2;NONS(6)(2) = 6;
NONS(7)(1) = 3;NONS(7)(2) = 7;NONS(8)(1) = 4;NONS(8)(2) = 8;
NONS(9)(1) = 5;NONS(9)(2) = 6;NONS(10)(1) = 6;NONS(10)(2) = 7;
NONS(11)(1) = 7;NONS(11)(2) = 8;NONS(12)(1) = 8;NONS(12)(2) = 5;
//--------------------------------
//def des faces
//--------------------------------
int nbis =4; // nb de pt d'integ par facee
int nbnes =4; // nb de noeud de la face
face(1) = new GeomQuadrangle(nbis,nbnes);
for (int is=2;is<= NBFE; is++) // ici NBFE = 6
face(is) = face(1);
// def des tableaux de connection des noeuds des faces
for (int i =1;i<=NBFE;i++) NONF(i).Change_taille(4);
// connection entre les noeuds des faces et les noeuds des elements
NONF(1)(1)= 1;
NONF(1)(2)= 4;
NONF(1)(3)= 3;
NONF(1)(4)= 2;
NONF(2)(1)= 1;
NONF(2)(2)= 5;
NONF(2)(3)= 8;
NONF(2)(4)= 4;
NONF(3)(1)= 1;
NONF(3)(2)= 2;
NONF(3)(3)= 6;
NONF(3)(4)= 5;
NONF(4)(1)= 5;
NONF(4)(2)= 6;
NONF(4)(3)= 7;
NONF(4)(4)= 8;
NONF(5)(1)= 2;
NONF(5)(2)= 3;
NONF(5)(3)= 7;
NONF(5)(4)= 6;
NONF(6)(1)= 3;
NONF(6)(2)= 4;
NONF(6)(3)= 8;
NONF(6)(4)= 7;
// fonctions d'interpolation globales
PHI(6,7) = 0.1314458557658023;
PHI(1,5) = 0.3522081090086454E-1;
PHI(4,5) = 0.1314458557658023;
PHI(4,7) = 0.3522081090086454E-1;
PHI(3,2) = 0.4905626121623443;
PHI(7,6) = 0.3522081090086454E-1;
PHI(2,4) = 0.4905626121623443;
PHI(4,3) = 0.9437387837655943E-2;
PHI(5,5) = 0.1314458557658023;
PHI(3,6) = 0.1314458557658023;
PHI(2,8) = 0.1314458557658023;
PHI(7,7) = 0.3522081090086454E-1;
PHI(1,2) = 0.3522081090086454E-1;
PHI(8,4) = 0.9437387837655943E-2;
PHI(2,1) = 0.3522081090086454E-1;
PHI(4,2) = 0.1314458557658023;
PHI(1,6) = 0.1314458557658023;
PHI(3,3) = 0.3522081090086454E-1;
PHI(3,7) = 0.9437387837655943E-2;
PHI(6,5) = 0.3522081090086454E-1;
PHI(5,3) = 0.1314458557658023;
PHI(8,5) = 0.4905626121623443;
PHI(6,8) = 0.3522081090086454E-1;
PHI(4,6) = 0.4905626121623443;
PHI(8,6) = 0.1314458557658023;
PHI(1,1) = 0.9437387837655943E-2;
PHI(2,5) = 0.9437387837655943E-2;
PHI(6,4) = 0.1314458557658023;
PHI(6,6) = 0.9437387837655943E-2;
PHI(3,4) = 0.1314458557658023;
PHI(7,4) = 0.3522081090086454E-1;
PHI(4,8) = 0.1314458557658023;
PHI(1,3) = 0.3522081090086454E-1;
PHI(1,7) = 0.1314458557658023;
PHI(8,8) = 0.3522081090086454E-1;
|