12#ifndef ABBREVICOMMON_H_
13#define ABBREVICOMMON_H_
37enum elementTyp { pointEl, edgeEl, rectangleEl, triangleEl, quadrangleEl, hexahedronEl };
42enum dir1D { Ldir1D, Rdir1D };
43enum Ort1D { LOrt, MOrt, ROrt };
48enum dir2D { Wdir2D, Edir2D, Sdir2D, Ndir2D };
50enum dir2D_sons { SWdir2D, SEdir2D, NWdir2D, NEdir2D };
52enum local_dir_of_hex2D{ ND, ST, NT };
57enum dir3D { Wdir3D, Edir3D, Sdir3D, Ndir3D, Ddir3D, Tdir3D };
59enum dir3D_sons { WSDdir3D, ESDdir3D, WNDdir3D, ENDdir3D, WSTdir3D, ESTdir3D, WNTdir3D, ENTdir3D };
61enum local_dir_of_hex3D{ SED, NWD, NED, SWT, SET, NWT, NET };
63enum main_dir_3D { WE_dir, SN_dir, DT_dir };
66enum Edges_cell { SDed, NDed, STed, NTed, WDed, EDed, WTed, ETed,
67 SWed, SEed, NWed, NEed };
70inline double find_p ( Edges_cell ed,
double eta,
double xi,
double phi ) {
71 if ( ed<=NTed )
return eta;
72 if ( ed<=ETed )
return xi;
73 if ( ed>NEed ) cout <<
" error in find_p!" << endl;
80inline dir3D_sons Transform(Edges_cell ec, dir1D d) {
82 dir = (dir3D) ((ec >> 2) << 1);
83 if(dir<Sdir3D)
return (dir3D_sons)(d+4*((ec>>1)&1)+2*(ec&1));
84 if(dir>Ndir3D)
return (dir3D_sons)(2*((ec>>1)&1)+(ec&1)+4*d);
85 return (dir3D_sons)(4*((ec>>1)&1)+2*d+(ec&1));