ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/solveur/src/sl_segment11.cpp
Revision: 253
Committed: Tue Jul 13 19:40:46 2010 UTC (14 years, 10 months ago) by francois
File size: 1813 byte(s)
Log Message:
changement de hiearchie et utilisation de ccmake + mise a jour

File Contents

# User Rev Content
1 5 #include "gestionversion.h"
2     //---------------------------------------------------------------------------
3    
4     #pragma hdrstop
5     #include <math.h>
6     #include "sl_segment11.h"
7     #include "fem_noeud.h"
8    
9     //---------------------------------------------------------------------------
10     #pragma package(smart_init)
11    
12    
13    
14     SL_SEGMENT11::SL_SEGMENT11(FEM_SEGMENT *mgseg):SL_SEGMENT(mgseg)
15     {
16     }
17    
18     SL_SEGMENT11::SL_SEGMENT11(SL_SEGMENT11& mdd):SL_SEGMENT(mdd)
19     {
20     }
21    
22     SL_SEGMENT11::~SL_SEGMENT11()
23     {
24     }
25    
26     int SL_SEGMENT11::nb_point_gauss(void)
27     {
28     return 1;
29     }
30    
31     int SL_SEGMENT11::nb_fonction_interpolation(void)
32     {
33     return 2;
34     }
35    
36     void SL_SEGMENT11::get_point_gauss(int num,double *xyz,double& poids)
37     {
38     xyz[0]=0.;
39     poids=2.;
40     }
41    
42     double SL_SEGMENT11::get_fonction_interpolation(int num,double *uv)
43     {
44     double val;
45     switch (num)
46     {
47     case 1:val=0.5*(1-uv[0]);break;
48     case 2:val=0.5*(1+uv[0]);break;
49     }
50     return val;
51     }
52    
53     double SL_SEGMENT11::get_fonction_derive_interpolation(int num,int numvariable,double *uv)
54     {
55     double val;
56     switch (num)
57     {
58     case 1:val=-0.5;break;
59     case 2:val=0.5;break;
60     }
61     return val;
62    
63     }
64    
65     double SL_SEGMENT11::get_jacobien(double* jac,double *uv,int& li,int& col,double unite)
66     {
67     FEM_NOEUD* noeud1=((FEM_SEGMENT*)mai)->get_fem_noeud(0);
68     FEM_NOEUD* noeud2=((FEM_SEGMENT*)mai)->get_fem_noeud(1);
69     double *xyz1=noeud1->get_coord();
70     double *xyz2=noeud2->get_coord();
71     li=1;col=3;
72    
73     jac[0]=unite*(xyz2[0]-xyz1[0]);
74     jac[1]=unite*(xyz2[1]-xyz1[1]);
75     jac[2]=unite*(xyz2[2]-xyz1[2]);
76     double L= sqrt(jac[0]*jac[0]+jac[1]*jac[1]+jac[2]*jac[2]);
77     return L;
78     }
79    
80    
81     void SL_SEGMENT11:: get_inverse_jacob(double* jac,double*j,double unite)
82     {
83     return;
84     }
85    
86    
87    
88    
89     int SL_SEGMENT11::nb_point_extrapolation()
90     {
91     return 2;
92     }
93    
94    
95    
96