ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/solveur/src/sl_segment12.cpp
Revision: 1158
Committed: Thu Jun 13 22:18:49 2024 UTC (11 months ago) by francois
File size: 2953 byte(s)
Log Message:
compatibilité Ubuntu 22.04
Suppression des refeences à Windows
Ajout d'une banière

File Contents

# User Rev Content
1 francois 1158 //####//------------------------------------------------------------
2     //####//------------------------------------------------------------
3     //####// MAGiC
4     //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5     //####// Departement de Genie Mecanique - UQTR
6     //####//------------------------------------------------------------
7     //####// MAGIC est un projet de recherche de l equipe ERICCA
8     //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9     //####// http://www.uqtr.ca/ericca
10     //####// http://www.uqtr.ca/
11     //####//------------------------------------------------------------
12     //####//------------------------------------------------------------
13     //####//
14     //####// sl_segment12.cpp
15     //####//
16     //####//------------------------------------------------------------
17     //####//------------------------------------------------------------
18     //####// COPYRIGHT 2000-2024
19     //####// jeu 13 jun 2024 11:58:57 EDT
20     //####//------------------------------------------------------------
21     //####//------------------------------------------------------------
22 5 #include "gestionversion.h"
23    
24     #pragma hdrstop
25     #include <math.h>
26 7 #include "sl_segment12.h"
27 5 #include "fem_segment.h"
28     #include "fem_noeud.h"
29     #pragma package(smart_init)
30    
31    
32    
33     SL_SEGMENT12::SL_SEGMENT12(FEM_SEGMENT *mgseg):SL_SEGMENT(mgseg)
34     {
35     }
36    
37     SL_SEGMENT12::SL_SEGMENT12(SL_SEGMENT12& mdd):SL_SEGMENT(mdd)
38     {
39     }
40    
41     SL_SEGMENT12::~SL_SEGMENT12()
42     {
43     }
44    
45    
46     int SL_SEGMENT12::nb_point_gauss(void)
47     {
48     return 2;
49     }
50    
51    
52    
53     int SL_SEGMENT12::nb_fonction_interpolation(void)
54     {
55     return 2;
56     }
57    
58     void SL_SEGMENT12::get_point_gauss(int num,double *xyz,double& poids)
59     {
60     switch (num)
61     {
62     case 1:xyz[0]=-0.57735026918962576450914878050196;poids=1.;break;
63     case 2:xyz[0]=0.57735026918962576450914878050196;poids=1.;break;
64     }
65     }
66    
67     double SL_SEGMENT12::get_fonction_interpolation(int num,double *uv)
68     {
69     double val;
70     switch (num)
71     {
72     case 1:val=0.5*(1-uv[0]);break;
73     case 2:val=0.5*(1+uv[0]);break;
74     }
75     return val;
76     }
77    
78     double SL_SEGMENT12::get_fonction_derive_interpolation(int num,int numvariable,double *uv)
79     {
80     double val;
81     switch (num)
82     {
83     case 1:val=-0.5;break;
84     case 2:val=0.5;break;
85     }
86     return val;
87    
88     }
89    
90     double SL_SEGMENT12::get_jacobien(double* jac,double *uv,int& li,int& col,double unite)
91     {
92     FEM_NOEUD* noeud1=((FEM_SEGMENT*) mai)->get_fem_noeud(0);
93     FEM_NOEUD* noeud2=((FEM_SEGMENT*) mai)->get_fem_noeud(1);
94     double *xyz1=noeud1->get_coord();
95     double *xyz2=noeud2->get_coord();
96     li=1;col=3;
97     jac[0]=unite*(-0.5*xyz1[0]+0.5*xyz2[0]);
98     jac[1]=unite*(-0.5*xyz1[1]+0.5*xyz2[1]);
99     jac[2]=unite*(-0.5*xyz1[2]+0.5*xyz2[2]);
100    
101     double L= 2* sqrt(jac[0]*jac[0]+jac[1]*jac[1]+jac[2]*jac[2]);
102     return L;
103     }
104    
105    
106    
107    
108    
109     void SL_SEGMENT12:: get_inverse_jacob(double* jac,double*j,double unite)
110     {
111     return;
112     }
113    
114     int SL_SEGMENT12::nb_point_extrapolation()
115     {
116     return 2;
117     }
118    
119    
120