ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/solveur/src/sl_segment12.cpp
Revision: 253
Committed: Tue Jul 13 19:40:46 2010 UTC (14 years, 10 months ago) by francois
File size: 2034 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 7 #include "sl_segment12.h"
7 5 #include "fem_segment.h"
8     #include "fem_noeud.h"
9     //---------------------------------------------------------------------------
10     #pragma package(smart_init)
11    
12    
13    
14     SL_SEGMENT12::SL_SEGMENT12(FEM_SEGMENT *mgseg):SL_SEGMENT(mgseg)
15     {
16     }
17    
18     SL_SEGMENT12::SL_SEGMENT12(SL_SEGMENT12& mdd):SL_SEGMENT(mdd)
19     {
20     }
21    
22     SL_SEGMENT12::~SL_SEGMENT12()
23     {
24     }
25    
26    
27     int SL_SEGMENT12::nb_point_gauss(void)
28     {
29     return 2;
30     }
31    
32    
33    
34     int SL_SEGMENT12::nb_fonction_interpolation(void)
35     {
36     return 2;
37     }
38    
39     void SL_SEGMENT12::get_point_gauss(int num,double *xyz,double& poids)
40     {
41     switch (num)
42     {
43     case 1:xyz[0]=-0.57735026918962576450914878050196;poids=1.;break;
44     case 2:xyz[0]=0.57735026918962576450914878050196;poids=1.;break;
45     }
46     }
47    
48     double SL_SEGMENT12::get_fonction_interpolation(int num,double *uv)
49     {
50     double val;
51     switch (num)
52     {
53     case 1:val=0.5*(1-uv[0]);break;
54     case 2:val=0.5*(1+uv[0]);break;
55     }
56     return val;
57     }
58    
59     double SL_SEGMENT12::get_fonction_derive_interpolation(int num,int numvariable,double *uv)
60     {
61     double val;
62     switch (num)
63     {
64     case 1:val=-0.5;break;
65     case 2:val=0.5;break;
66     }
67     return val;
68    
69     }
70    
71     double SL_SEGMENT12::get_jacobien(double* jac,double *uv,int& li,int& col,double unite)
72     {
73     FEM_NOEUD* noeud1=((FEM_SEGMENT*) mai)->get_fem_noeud(0);
74     FEM_NOEUD* noeud2=((FEM_SEGMENT*) mai)->get_fem_noeud(1);
75     double *xyz1=noeud1->get_coord();
76     double *xyz2=noeud2->get_coord();
77     li=1;col=3;
78     jac[0]=unite*(-0.5*xyz1[0]+0.5*xyz2[0]);
79     jac[1]=unite*(-0.5*xyz1[1]+0.5*xyz2[1]);
80     jac[2]=unite*(-0.5*xyz1[2]+0.5*xyz2[2]);
81    
82     double L= 2* sqrt(jac[0]*jac[0]+jac[1]*jac[1]+jac[2]*jac[2]);
83     return L;
84     }
85    
86    
87    
88    
89    
90     void SL_SEGMENT12:: get_inverse_jacob(double* jac,double*j,double unite)
91     {
92     return;
93     }
94    
95     int SL_SEGMENT12::nb_point_extrapolation()
96     {
97     return 2;
98     }
99    
100    
101