Nek5000
SEM for Incompressible NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
findpts_el.h
Go to the documentation of this file.
1 #ifndef FINDPTS_EL_H
2 #define FINDPTS_EL_H
3 
4 #if !defined(NAME_H) || !defined(POLY_H)
5 #warning "findpts_el.h" requires "name.h", "poly.h"
6 #endif
7 
8 #define findpts_el_setup_2 PREFIXED_NAME(findpts_el_setup_2)
9 #define findpts_el_free_2 PREFIXED_NAME(findpts_el_free_2 )
10 #define findpts_el_2 PREFIXED_NAME(findpts_el_2 )
11 #define findpts_el_eval_2 PREFIXED_NAME(findpts_el_eval_2 )
12 
14  double x[2],r[2],oldr[2],dist2,dist2p,tr;
15  unsigned index,flags;
16 };
17 
18 struct findpts_el_gedge_2 { const double *x[2], *dxdn[2]; };
19 struct findpts_el_gpt_2 { double x[2], jac[4], hes[4]; };
20 
22  unsigned npt_max;
23  struct findpts_el_pt_2 *p;
24 
25  unsigned n[2];
26  double *z[2];
28  double *lag_data[2];
29  double *wtend[2];
30 
31  const double *x[2];
32 
33  unsigned side_init;
34  double *sides;
35  struct findpts_el_gedge_2 edge[4]; /* R S=-1; R S=1; ... */
36  struct findpts_el_gpt_2 pt[4];
37 
38  double *work;
39 };
40 
41 void findpts_el_setup_2(struct findpts_el_data_2 *const fd,
42  const unsigned n[2],
43  const unsigned npt_max);
44 void findpts_el_free_2(struct findpts_el_data_2 *const fd);
45 void findpts_el_2(struct findpts_el_data_2 *fd, unsigned npt, const double tol);
47  double *const out_base, const unsigned out_stride,
48  const double *const r_base, const unsigned r_stride, const unsigned pn,
49  const double *const in, struct findpts_el_data_2 *const fd);
50 
51 static void findpts_el_start_2(struct findpts_el_data_2 *const fd,
52  const double *const x[2])
53 {
54  fd->side_init=0,fd->x[0]=x[0],fd->x[1]=x[1];
55 }
56 
58  struct findpts_el_data_2 *const fd)
59 {
60  return fd->p;
61 }
62 
63 #define findpts_el_setup_3 PREFIXED_NAME(findpts_el_setup_3)
64 #define findpts_el_free_3 PREFIXED_NAME(findpts_el_free_3 )
65 #define findpts_el_3 PREFIXED_NAME(findpts_el_3 )
66 #define findpts_el_eval_3 PREFIXED_NAME(findpts_el_eval_3 )
67 
69  double x[3],r[3],oldr[3],dist2,dist2p,tr;
70  unsigned index,flags;
71 };
72 
73 struct findpts_el_gface_3 { const double *x[3], *dxdn[3]; };
74 struct findpts_el_gedge_3 { const double *x[3], *dxdn1[3], *dxdn2[3],
75  *d2xdn1[3], *d2xdn2[3]; };
76 struct findpts_el_gpt_3 { double x[3], jac[9], hes[18]; };
77 
79  unsigned npt_max;
80  struct findpts_el_pt_3 *p;
81 
82  unsigned n[3];
83  double *z[3];
85  double *lag_data[3];
86  double *wtend[3];
87 
88  const double *x[3];
89 
90  unsigned side_init;
91  double *sides;
92  struct findpts_el_gface_3 face[6]; /* ST R=-1,R=+1; TR S=-1,S=+1; ... */
93  struct findpts_el_gedge_3 edge[12]; /* R S=-1,T=-1; R S=1,T=-1; ... */
94  struct findpts_el_gpt_3 pt[8];
95 
96  double *work;
97 };
98 
99 void findpts_el_setup_3(struct findpts_el_data_3 *const fd,
100  const unsigned n[3],
101  const unsigned npt_max);
102 void findpts_el_free_3(struct findpts_el_data_3 *const fd);
103 void findpts_el_3(struct findpts_el_data_3 *const fd, const unsigned npt,
104  const double tol);
105 void findpts_el_eval_3(
106  double *const out_base, const unsigned out_stride,
107  const double *const r_base, const unsigned r_stride, const unsigned pn,
108  const double *const in, struct findpts_el_data_3 *const fd);
109 
110 static void findpts_el_start_3(struct findpts_el_data_3 *const fd,
111  const double *const x[3])
112 {
113  fd->side_init=0,fd->x[0]=x[0],fd->x[1]=x[1],fd->x[2]=x[2];
114 }
115 
117  struct findpts_el_data_3 *const fd)
118 {
119  return fd->p;
120 }
121 
122 #endif
#define findpts_el_eval_3
Definition: findpts_el.h:66
double oldr[3]
Definition: findpts_el.h:69
struct findpts_el_gpt_2 pt[4]
Definition: findpts_el.h:36
double r[3]
Definition: findpts_el.h:69
lagrange_fun * lag[2]
Definition: findpts_el.h:27
lagrange_fun * lag[3]
Definition: findpts_el.h:84
#define findpts_el_2
Definition: findpts_el.h:10
void lagrange_fun(double *restrict p, double *restrict data, unsigned n, int d, double x)
Definition: poly.c:20
const double * x[3]
Definition: findpts_el.h:74
#define findpts_el_eval_2
Definition: findpts_el.h:11
static void findpts_el_start_2(struct findpts_el_data_2 *const fd, const double *const x[2])
Definition: findpts_el.h:51
double x[3]
Definition: findpts_el.h:76
#define findpts_el_3
Definition: findpts_el.h:65
n
Definition: xxt_test.m:73
static struct findpts_el_pt_3 * findpts_el_points_3(struct findpts_el_data_3 *const fd)
Definition: findpts_el.h:116
#define x
double * wtend[3]
Definition: findpts_el.h:86
const double * x[2]
Definition: findpts_el.h:31
struct findpts_el_gpt_3 pt[8]
Definition: findpts_el.h:94
unsigned n[2]
Definition: findpts_el.h:25
double jac[9]
Definition: findpts_el.h:76
double jac[4]
Definition: findpts_el.h:19
const double * dxdn[3]
Definition: findpts_el.h:73
double * z[2]
Definition: findpts_el.h:26
double x[2]
Definition: findpts_el.h:19
static struct findpts_el_pt_2 * findpts_el_points_2(struct findpts_el_data_2 *const fd)
Definition: findpts_el.h:57
unsigned npt_max
Definition: findpts_el.h:79
double * wtend[2]
Definition: findpts_el.h:29
const double * dxdn2[3]
Definition: findpts_el.h:74
struct findpts_el_gface_3 face[6]
Definition: findpts_el.h:92
double * sides
Definition: findpts_el.h:34
unsigned n[3]
Definition: findpts_el.h:82
double x[2]
Definition: findpts_el.h:14
#define findpts_el_setup_2
Definition: findpts_el.h:8
#define findpts_el_free_2
Definition: findpts_el.h:9
unsigned index
Definition: findpts_el.h:15
#define findpts_el_free_3
Definition: findpts_el.h:64
const double * x[3]
Definition: findpts_el.h:88
double oldr[2]
Definition: findpts_el.h:14
#define findpts_el_setup_3
Definition: findpts_el.h:63
double * lag_data[3]
Definition: findpts_el.h:85
static void findpts_el_start_3(struct findpts_el_data_3 *const fd, const double *const x[3])
Definition: findpts_el.h:110
const double * x[2]
Definition: findpts_el.h:18
const double * d2xdn2[3]
Definition: findpts_el.h:74
unsigned flags
Definition: findpts_el.h:15
unsigned flags
Definition: findpts_el.h:70
double * z[3]
Definition: findpts_el.h:83
double hes[4]
Definition: findpts_el.h:19
struct findpts_el_pt_2 * p
Definition: findpts_el.h:23
unsigned npt_max
Definition: findpts_el.h:22
const double * dxdn1[3]
Definition: findpts_el.h:74
double * sides
Definition: findpts_el.h:91
double * lag_data[2]
Definition: findpts_el.h:28
struct findpts_el_pt_3 * p
Definition: findpts_el.h:80
double hes[18]
Definition: findpts_el.h:76
double x[3]
Definition: findpts_el.h:69
unsigned side_init
Definition: findpts_el.h:90
double r[2]
Definition: findpts_el.h:14
unsigned index
Definition: findpts_el.h:70
const double * x[3]
Definition: findpts_el.h:73
const double * d2xdn1[3]
Definition: findpts_el.h:74
const double * dxdn[2]
Definition: findpts_el.h:18
unsigned side_init
Definition: findpts_el.h:33
struct findpts_el_gedge_3 edge[12]
Definition: findpts_el.h:93
struct findpts_el_gedge_2 edge[4]
Definition: findpts_el.h:35