3 #ifndef __any_elements_H
4 #define __any_elements_H
7 #include <mix/DoubleAr.H>
8 #include <mix/ObjectsAr.H>
9 #include <mix/geometry.H>
14 typedef enum{NORMAL=0,MODEL=1,TOP=2, TEMP=3} border_flag;
54 double *e,*d,*f,*h,*v,*ztop,*plr,*segm,*aux,*tgpsic;
57 :e(NULL),d(NULL),f(NULL),h(NULL),v(NULL),ztop(NULL),
58 plr(NULL),segm(NULL),aux(NULL),tgpsic(NULL)
69 if(NULL!=ztop) free(ztop);
70 if(NULL!=plr) free(plr);
71 if(NULL!=segm) free(segm);
72 if(NULL!=aux) free(aux);
73 if(NULL!=tgpsic) free(tgpsic);
77 pVP.clean(); pVS.clean(); pKP.clean(); pKS.clean();
78 xTop.clean(); yTop.clean(); zTop.clean();
81 void allocate_mem_buf (
int count){
82 e=(
double*) calloc(2*(count+1),
sizeof(double));
83 d=(
double*) calloc(2*(count+1),
sizeof(double));
84 f=(
double*) calloc(2*(count+1),
sizeof(double));
85 h=(
double*) calloc(2*(count+1),
sizeof(double));
86 v=(
double*) calloc(2*(count+1),
sizeof(double));
87 ztop=(
double*) calloc(2*(count+1),
sizeof(double));
88 plr=(
double*) calloc(2*(count+1),
sizeof(double));
89 segm=(
double*) calloc(2*(count+1),
sizeof(double));
90 aux=(
double*) calloc(2*(count+1),
sizeof(double));
91 tgpsic=(
double*) calloc(2*(count+1),
sizeof(double));
117 int get_body(
int ib)
const;
119 void set_bodies(
int i1,
int i2){iBodies[0]=i1;iBodies[1]=i2;};
120 border_flag kind() {
return bf;};
121 int another_body(
int iB){
122 if(iBodies[0]==iB)
return iBodies[1];
else
123 if (iBodies[1]==iB)
return iBodies[0];
144 void swap_borders(
int,
int);
147 Logic numerated_borders()
const{
148 if(aBordersNums.count()>0)
152 void clear_borders();
153 void set_number(
int i){iNumber=i;};
154 int n_of_borders()
const {
return aBorders.count();};
164 void fix_numbers(
const IntAr&aBorderNumbers);
165 const IntAr& borders_numbers()
const{
return aBordersNums;};
167 IntAr neighbors(
int iNumber)
const;
174 int number()
const{
return iNumber;};
176 void set_vp(
double vp){gp.fVP=vp;gp2rp();};
177 void set_kp(
double kp){gp.fAn_KP=kp;gp2rp();};
178 void set_vs(
double vs){gp.fVS=vs;gp2rp();};
179 void set_ks(
double ks){gp.fAn_KS=ks;gp2rp();};
181 const any_borders& borders()
const {
return aBorders;};
188 if((i>=aBorders.count())||(i<0))
213 any_ex_border(){iSpline=-1; bf=NORMAL; iBodies[0]=iBodies[1]=-5;};
215 int get_body(
int ib) ;
216 int spline()
const {
return iSpline;};
217 border_flag kind() {
return bf;};
231 virtual int n_of_borders()
const {
return aBorders.count();};
236 int get_border(
int i);
237 int number()
const{
return iNumber;};
Definition: any_elements.H:43
Definition: any_elements.H:98
Definition: any_elements.H:221
Definition: any_elements.H:22
Definition: any_elements.H:108
Definition: any_elements.H:201
Definition: DoubleAr.H:14
Definition: any_elements.H:207
Definition: any_elements.H:134
Definition: any_elements.H:33