1 // GetDP - Copyright (C) 1997-2021 P. Dular and C. Geuzaine, University of Liege
2 //
3 // See the LICENSE.txt file for license information. Please report all
4 // issues on https://gitlab.onelab.info/getdp/getdp/issues.
5 
6 #include "ProData.h"
7 #include "BF.h"
8 
9 #define ARGS 					\
10   struct Element * Element, int NumEntity, 	\
11   double u, double v, double w,  double *s
12 
13 /* ------------------------------------------------------------------------ */
14 /*  B F _ W i r e                                                           */
15 /* ------------------------------------------------------------------------ */
16 #define BF(BF_Wire_X,BF_Node_X)		\
17   s[1] = s[2] = 0. ;					\
18   (BF_Node_X)(Element, NumEntity, u, v, w, &s[0]) ;
19 
BF_Wire(ARGS)20 void BF_Wire(ARGS) { BF("BF_Wire",BF_Node) ; }
21 #undef BF
22 
23 /* ------------------------------------------------------------------------ */
24 /*  B F _ D i v W i r e                                                           */
25 /* ------------------------------------------------------------------------ */
26 #define BF(BF_DivWire_X,BF_GradNode_X)		       \
27   (BF_GradNode_X)(Element, NumEntity, u, v, w, &s[0]) ;
28 
BF_DivWire(ARGS)29 void BF_DivWire(ARGS) { BF("BF_DivWire",BF_GradNode) ; }
30 #undef BF
31 
32 /* ------------------------------------------------------------------------ */
33 /*  B F _ P e r p e n d i c u l a r E d g e                                 */
34 /* ------------------------------------------------------------------------ */
35 
36 #define BF(BF_PerpendicularEdge_X,BF_Node_X)		\
37   s[0] = s[1] = 0. ;					\
38   (BF_Node_X)(Element, NumEntity, u, v, w, &s[2]) ;
39 
BF_PerpendicularEdge(ARGS)40 void BF_PerpendicularEdge(ARGS) { BF("BF_PerpendicularEdge",BF_Node) ; }
BF_PerpendicularEdge_2E(ARGS)41 void BF_PerpendicularEdge_2E(ARGS) { BF("BF_PerpendicularEdge_2E",BF_Node_2E) ; }
BF_PerpendicularEdge_2F(ARGS)42 void BF_PerpendicularEdge_2F(ARGS) { BF("BF_PerpendicularEdge_2F",BF_Node_2F) ; }
BF_PerpendicularEdge_2V(ARGS)43 void BF_PerpendicularEdge_2V(ARGS) { BF("BF_PerpendicularEdge_2V",BF_Node_2V) ; }
BF_PerpendicularEdge_3E(ARGS)44 void BF_PerpendicularEdge_3E(ARGS) { BF("BF_PerpendicularEdge_3E",BF_Node_3E) ; }
BF_PerpendicularEdge_3F(ARGS)45 void BF_PerpendicularEdge_3F(ARGS) { BF("BF_PerpendicularEdge_3F",BF_Node_3F) ; }
BF_PerpendicularEdge_3V(ARGS)46 void BF_PerpendicularEdge_3V(ARGS) { BF("BF_PerpendicularEdge_3V",BF_Node_3V) ; }
47 
48 #undef BF
49 
50 /* ------------------------------------------------------------------------ */
51 /*  B F _ C u r l P e r p e n d i c u l a r E d g e                         */
52 /* ------------------------------------------------------------------------ */
53 
54 #define BF(BF_CurlPerpendicularEdge_X,BF_GradNode_X)	\
55   double ss ;						\
56   (BF_GradNode_X)(Element, NumEntity, u, v, w, s) ;	\
57   ss = s[0] ;  s[0] = s[1] ;  s[1] = -ss ;
58 
BF_CurlPerpendicularEdge(ARGS)59 void BF_CurlPerpendicularEdge(ARGS) { BF("BF_CurlPerpendicularEdge",BF_GradNode) ; }
BF_CurlPerpendicularEdge_2E(ARGS)60 void BF_CurlPerpendicularEdge_2E(ARGS) { BF("BF_CurlPerpendicularEdge_2E",BF_GradNode_2E) ; }
BF_CurlPerpendicularEdge_2F(ARGS)61 void BF_CurlPerpendicularEdge_2F(ARGS) { BF("BF_CurlPerpendicularEdge_2F",BF_GradNode_2F) ; }
BF_CurlPerpendicularEdge_2V(ARGS)62 void BF_CurlPerpendicularEdge_2V(ARGS) { BF("BF_CurlPerpendicularEdge_2V",BF_GradNode_2V) ; }
BF_CurlPerpendicularEdge_3E(ARGS)63 void BF_CurlPerpendicularEdge_3E(ARGS) { BF("BF_CurlPerpendicularEdge_3E",BF_GradNode_3E) ; }
BF_CurlPerpendicularEdge_3F(ARGS)64 void BF_CurlPerpendicularEdge_3F(ARGS) { BF("BF_CurlPerpendicularEdge_3F",BF_GradNode_3F) ; }
BF_CurlPerpendicularEdge_3V(ARGS)65 void BF_CurlPerpendicularEdge_3V(ARGS) { BF("BF_CurlPerpendicularEdge_3V",BF_GradNode_3V) ; }
66 
67 #undef BF
68 
69 /* ------------------------------------------------------------------------ */
70 /*  B F _ P e r p e n d i c u l a r F a c e t                               */
71 /* ------------------------------------------------------------------------ */
72 
73 #define BF(BF_PerpendicularFacet_X,BF_Edge_X)	\
74   double ss ;					\
75   (BF_Edge_X)(Element, NumEntity, u, v, w, s) ;	\
76   ss = s[0] ;  s[0] = -s[1] ;  s[1] = ss ;
77 
BF_PerpendicularFacet(ARGS)78 void BF_PerpendicularFacet(ARGS) { BF("BF_PerpendicularFacet",BF_Edge) ; }
BF_PerpendicularFacet_2E(ARGS)79 void BF_PerpendicularFacet_2E(ARGS) { BF("BF_PerpendicularFacet_2E",BF_Edge_2E) ; }
BF_PerpendicularFacet_2F(ARGS)80 void BF_PerpendicularFacet_2F(ARGS) { BF("BF_PerpendicularFacet_2F",BF_Edge_2F) ; }
BF_PerpendicularFacet_2V(ARGS)81 void BF_PerpendicularFacet_2V(ARGS) { BF("BF_PerpendicularFacet_2V",BF_Edge_2V) ; }
BF_PerpendicularFacet_3E(ARGS)82 void BF_PerpendicularFacet_3E(ARGS) { BF("BF_PerpendicularFacet_3E",BF_Edge_3E) ; }
BF_PerpendicularFacet_3F_a(ARGS)83 void BF_PerpendicularFacet_3F_a(ARGS) { BF("BF_PerpendicularFacet_3F_a",BF_Edge_3F_a) ; }
BF_PerpendicularFacet_3F_b(ARGS)84 void BF_PerpendicularFacet_3F_b(ARGS) { BF("BF_PerpendicularFacet_3F_b",BF_Edge_3F_b) ; }
BF_PerpendicularFacet_3F_c(ARGS)85 void BF_PerpendicularFacet_3F_c(ARGS) { BF("BF_PerpendicularFacet_3F_c",BF_Edge_3F_c) ; }
BF_PerpendicularFacet_3V(ARGS)86 void BF_PerpendicularFacet_3V(ARGS) { BF("BF_PerpendicularFacet_3V",BF_Edge_3V) ; }
BF_PerpendicularFacet_4E(ARGS)87 void BF_PerpendicularFacet_4E(ARGS) { BF("BF_PerpendicularFacet_4E",BF_Edge_4E) ; }
BF_PerpendicularFacet_4F(ARGS)88 void BF_PerpendicularFacet_4F(ARGS) { BF("BF_PerpendicularFacet_4F",BF_Edge_4F) ; }
BF_PerpendicularFacet_4V(ARGS)89 void BF_PerpendicularFacet_4V(ARGS) { BF("BF_PerpendicularFacet_4V",BF_Edge_4V) ; }
90 
91 #undef BF
92 
93 /* ------------------------------------------------------------------------ */
94 /*  B F _ D i v P e r p e n d i c u l a r F a c e t                         */
95 /* ------------------------------------------------------------------------ */
96 
97 #define BF(BF_DivPerpendicularFacet_X,BF_CurlEdge_X)	\
98   (BF_CurlEdge_X)(Element, NumEntity, u, v, w, s) ;	\
99   s[0] = -s[2] ; s[2] = 0. ;
100 
BF_DivPerpendicularFacet(ARGS)101 void BF_DivPerpendicularFacet(ARGS){ BF("BF_DivPerpendicularFacet",BF_CurlEdge) ; }
BF_DivPerpendicularFacet_2E(ARGS)102 void BF_DivPerpendicularFacet_2E(ARGS){ BF("BF_DivPerpendicularFacet_2E",BF_CurlEdge_2E) ; }
BF_DivPerpendicularFacet_2F(ARGS)103 void BF_DivPerpendicularFacet_2F(ARGS){ BF("BF_DivPerpendicularFacet_2F",BF_CurlEdge_2F) ; }
BF_DivPerpendicularFacet_2V(ARGS)104 void BF_DivPerpendicularFacet_2V(ARGS){ BF("BF_DivPerpendicularFacet_2V",BF_CurlEdge_2V) ; }
BF_DivPerpendicularFacet_3E(ARGS)105 void BF_DivPerpendicularFacet_3E(ARGS){ BF("BF_DivPerpendicularFacet_3E",BF_CurlEdge_3E) ; }
BF_DivPerpendicularFacet_3F_a(ARGS)106 void BF_DivPerpendicularFacet_3F_a(ARGS){ BF("BF_DivPerpendicularFacet_3F_a",BF_CurlEdge_3F_a) ; }
BF_DivPerpendicularFacet_3F_b(ARGS)107 void BF_DivPerpendicularFacet_3F_b(ARGS){ BF("BF_DivPerpendicularFacet_3F_b",BF_CurlEdge_3F_b) ; }
BF_DivPerpendicularFacet_3F_c(ARGS)108 void BF_DivPerpendicularFacet_3F_c(ARGS){ BF("BF_DivPerpendicularFacet_3F_c",BF_CurlEdge_3F_c) ; }
BF_DivPerpendicularFacet_3V(ARGS)109 void BF_DivPerpendicularFacet_3V(ARGS){ BF("BF_DivPerpendicularFacet_3V",BF_CurlEdge_3V) ; }
BF_DivPerpendicularFacet_4E(ARGS)110 void BF_DivPerpendicularFacet_4E(ARGS){ BF("BF_DivPerpendicularFacet_4E",BF_CurlEdge_4E) ; }
BF_DivPerpendicularFacet_4F(ARGS)111 void BF_DivPerpendicularFacet_4F(ARGS){ BF("BF_DivPerpendicularFacet_4F",BF_CurlEdge_4F) ; }
BF_DivPerpendicularFacet_4V(ARGS)112 void BF_DivPerpendicularFacet_4V(ARGS){ BF("BF_DivPerpendicularFacet_4V",BF_CurlEdge_4V) ; }
113 
114 #undef BF
115 
116 #undef ARGS
117