Nek5000
SEM for Incompressible NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Classes | Macros | Functions
findpts_local_imp.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hash_data
 
struct  findpts_local_data
 

Macros

#define obbox   TOKEN_PASTE(obbox_ ,D)
 
#define obbox_calc   TOKEN_PASTE(PREFIXED_NAME(obbox_calc_),D)
 
#define obbox_test   TOKEN_PASTE(obbox_test_ ,D)
 
#define hash_data   TOKEN_PASTE(findpts_local_hash_data_,D)
 
#define hash_index   TOKEN_PASTE(hash_index_ ,D)
 
#define hash_setfac   TOKEN_PASTE(hash_setfac_ ,D)
 
#define hash_range   TOKEN_PASTE(hash_range_ ,D)
 
#define hash_count   TOKEN_PASTE(hash_count_ ,D)
 
#define hash_opt_size   TOKEN_PASTE(hash_opt_size_ ,D)
 
#define hash_bb   TOKEN_PASTE(hash_bb_ ,D)
 
#define hash_build   TOKEN_PASTE(hash_build_ ,D)
 
#define hash_free   TOKEN_PASTE(hash_free_ ,D)
 
#define findpts_el_data   TOKEN_PASTE(findpts_el_data_ ,D)
 
#define findpts_el_pt   TOKEN_PASTE(findpts_el_pt_ ,D)
 
#define findpts_el_setup   TOKEN_PASTE(PREFIXED_NAME(findpts_el_setup_),D)
 
#define findpts_el_free   TOKEN_PASTE(PREFIXED_NAME(findpts_el_free_ ),D)
 
#define findpts_el   TOKEN_PASTE(PREFIXED_NAME(findpts_el_ ),D)
 
#define findpts_el_eval   TOKEN_PASTE(PREFIXED_NAME(findpts_el_eval_ ),D)
 
#define findpts_el_start   TOKEN_PASTE(findpts_el_start_ ,D)
 
#define findpts_el_points   TOKEN_PASTE(findpts_el_points_ ,D)
 
#define findpts_local_data   TOKEN_PASTE(findpts_local_data_,D)
 
#define map_points_to_els   TOKEN_PASTE(map_points_to_els_ ,D)
 
#define findpts_local_setup   TOKEN_PASTE(PREFIXED_NAME(findpts_local_setup_),D)
 
#define findpts_local_free   TOKEN_PASTE(PREFIXED_NAME(findpts_local_free_ ),D)
 
#define findpts_local   TOKEN_PASTE(PREFIXED_NAME(findpts_local_ ),D)
 
#define findpts_local_eval   TOKEN_PASTE(PREFIXED_NAME(findpts_local_eval_ ),D)
 
#define FOR_LOOP()
 
#define FOR_LOOP()
 
#define AT(T, var, i)   (T*)( (char*)var##_base +(i)*var##_stride )
 
#define CAT(T, var, i)   (const T*)((const char*)var##_base +(i)*var##_stride )
 
#define CATD(T, var, i, d)   (const T*)((const char*)var##_base[d]+(i)*var##_stride[d])
 

Functions

static uint hash_index (const struct hash_data *p, const double x[D])
 
static void hash_setfac (struct hash_data *p, const uint n)
 
static struct uint_range hash_range (const struct hash_data *p, unsigned d, const struct dbl_range r)
 
static uint hash_count (struct hash_data *p, const struct obbox *const obb, const uint nel, const uint n)
 
static uint hash_opt_size (struct hash_data *p, const struct obbox *const obb, const uint nel, const uint max_size)
 
static void hash_bb (struct hash_data *p, const struct obbox *const obb, const uint nel)
 
static void hash_build (struct hash_data *p, const struct obbox *const obb, const uint nel, const uint max_size)
 
static void hash_free (struct hash_data *p)
 
void findpts_local_setup (struct findpts_local_data *const fd, const double *const elx[D], const unsigned n[D], const uint nel, const unsigned m[D], const double bbox_tol, const uint max_hash_size, const unsigned npt_max, const double newt_tol)
 
void findpts_local_free (struct findpts_local_data *const fd)
 
static void map_points_to_els (struct array *const map, uint *const code_base, const unsigned code_stride, const double *const x_base[D], const unsigned x_stride[D], const uint npt, const struct findpts_local_data *const fd, buffer *buf)
 
void findpts_local (uint *const code_base, const unsigned code_stride, uint *const el_base, const unsigned el_stride, double *const r_base, const unsigned r_stride, double *const dist2_base, const unsigned dist2_stride, const double *const x_base[D], const unsigned x_stride[D], const uint npt, struct findpts_local_data *const fd, buffer *buf)
 
void findpts_local_eval (double *const out_base, const unsigned out_stride, const uint *const el_base, const unsigned el_stride, const double *const r_base, const unsigned r_stride, const uint npt, const double *const in, struct findpts_local_data *const fd)
 

Macro Definition Documentation

#define AT (   T,
  var,
  i 
)    (T*)( (char*)var##_base +(i)*var##_stride )

Definition at line 271 of file findpts_local_imp.h.

Referenced by findpts_local(), and findpts_local_eval().

#define CAT (   T,
  var,
  i 
)    (const T*)((const char*)var##_base +(i)*var##_stride )

Definition at line 273 of file findpts_local_imp.h.

Referenced by findpts_local_eval().

#define CATD (   T,
  var,
  i,
 
)    (const T*)((const char*)var##_base[d]+(i)*var##_stride[d])

Definition at line 275 of file findpts_local_imp.h.

Referenced by findpts_local().

#define findpts_el   TOKEN_PASTE(PREFIXED_NAME(findpts_el_ ),D)

Definition at line 18 of file findpts_local_imp.h.

Referenced by findpts_local().

#define findpts_el_data   TOKEN_PASTE(findpts_el_data_ ,D)

Definition at line 14 of file findpts_local_imp.h.

Referenced by findpts_local(), and findpts_local_eval().

#define findpts_el_eval   TOKEN_PASTE(PREFIXED_NAME(findpts_el_eval_ ),D)

Definition at line 19 of file findpts_local_imp.h.

Referenced by findpts_local_eval().

#define findpts_el_free   TOKEN_PASTE(PREFIXED_NAME(findpts_el_free_ ),D)

Definition at line 17 of file findpts_local_imp.h.

Referenced by findpts_local_free().

#define findpts_el_points   TOKEN_PASTE(findpts_el_points_ ,D)

Definition at line 21 of file findpts_local_imp.h.

Referenced by findpts_local().

#define findpts_el_pt   TOKEN_PASTE(findpts_el_pt_ ,D)

Definition at line 15 of file findpts_local_imp.h.

Referenced by findpts_local().

#define findpts_el_setup   TOKEN_PASTE(PREFIXED_NAME(findpts_el_setup_),D)

Definition at line 16 of file findpts_local_imp.h.

Referenced by findpts_local_setup().

#define findpts_el_start   TOKEN_PASTE(findpts_el_start_ ,D)

Definition at line 20 of file findpts_local_imp.h.

Referenced by findpts_local().

#define findpts_local   TOKEN_PASTE(PREFIXED_NAME(findpts_local_ ),D)

Definition at line 26 of file findpts_local_imp.h.

#define findpts_local_data   TOKEN_PASTE(findpts_local_data_,D)

Definition at line 22 of file findpts_local_imp.h.

#define findpts_local_eval   TOKEN_PASTE(PREFIXED_NAME(findpts_local_eval_ ),D)

Definition at line 27 of file findpts_local_imp.h.

#define findpts_local_free   TOKEN_PASTE(PREFIXED_NAME(findpts_local_free_ ),D)

Definition at line 25 of file findpts_local_imp.h.

#define findpts_local_setup   TOKEN_PASTE(PREFIXED_NAME(findpts_local_setup_),D)

Definition at line 24 of file findpts_local_imp.h.

#define FOR_LOOP ( )
Value:
do { uint i,j; WHEN_3D(uint k;) \
WHEN_3D(for(k=ir[2].min;k<ir[2].max;++k)) \
for(j=ir[1].min;j<ir[1].max;++j) \
for(i=ir[0].min;i<ir[0].max;++i) \
++count[(WHEN_3D(k*hn)+j)*hn+i]; \
} while(0)
#define uint
Definition: types.h:70
#define WHEN_3D(a)
Definition: findpts.c:79
for i
Definition: xxt_test.m:74

Referenced by hash_build().

#define FOR_LOOP ( )
Value:
do { uint i,j; WHEN_3D(uint k;) \
WHEN_3D(for(k=ir[2].min;k<ir[2].max;++k)) \
for(j=ir[1].min;j<ir[1].max;++j) \
for(i=ir[0].min;i<ir[0].max;++i) { \
uint index = (WHEN_3D(k*hn)+j)*hn+i; \
p->offset[p->offset[index+1]-count[index]]=el; \
--count[index]; \
} \
} while(0)
#define uint
Definition: types.h:70
p
Definition: xxt_test2.m:1
#define WHEN_3D(a)
Definition: findpts.c:79
for i
Definition: xxt_test.m:74
#define hash_bb   TOKEN_PASTE(hash_bb_ ,D)

Definition at line 11 of file findpts_local_imp.h.

Referenced by hash_build().

#define hash_build   TOKEN_PASTE(hash_build_ ,D)

Definition at line 12 of file findpts_local_imp.h.

Referenced by findpts_local_setup().

#define hash_count   TOKEN_PASTE(hash_count_ ,D)

Definition at line 9 of file findpts_local_imp.h.

Referenced by hash_opt_size().

#define hash_data   TOKEN_PASTE(findpts_local_hash_data_,D)

Definition at line 5 of file findpts_local_imp.h.

#define hash_free   TOKEN_PASTE(hash_free_ ,D)

Definition at line 13 of file findpts_local_imp.h.

Referenced by findpts_local_free().

#define hash_index   TOKEN_PASTE(hash_index_ ,D)

Definition at line 6 of file findpts_local_imp.h.

Referenced by map_points_to_els().

#define hash_opt_size   TOKEN_PASTE(hash_opt_size_ ,D)

Definition at line 10 of file findpts_local_imp.h.

Referenced by hash_build().

#define hash_range   TOKEN_PASTE(hash_range_ ,D)

Definition at line 8 of file findpts_local_imp.h.

Referenced by hash_build(), and hash_count().

#define hash_setfac   TOKEN_PASTE(hash_setfac_ ,D)

Definition at line 7 of file findpts_local_imp.h.

Referenced by hash_count(), and hash_opt_size().

#define map_points_to_els   TOKEN_PASTE(map_points_to_els_ ,D)

Definition at line 23 of file findpts_local_imp.h.

Referenced by findpts_local().

#define obbox   TOKEN_PASTE(obbox_ ,D)

Definition at line 2 of file findpts_local_imp.h.

Referenced by findpts_local_setup().

#define obbox_calc   TOKEN_PASTE(PREFIXED_NAME(obbox_calc_),D)

Definition at line 3 of file findpts_local_imp.h.

Referenced by findpts_local_setup().

#define obbox_test   TOKEN_PASTE(obbox_test_ ,D)

Definition at line 4 of file findpts_local_imp.h.

Referenced by map_points_to_els().

Function Documentation

void findpts_local ( uint *const  code_base,
const unsigned  code_stride,
uint *const  el_base,
const unsigned  el_stride,
double *const  r_base,
const unsigned  r_stride,
double *const  dist2_base,
const unsigned  dist2_stride,
const double *const  x_base[D],
const unsigned  x_stride[D],
const uint  npt,
struct findpts_local_data *const  fd,
buffer buf 
)
void findpts_local_eval ( double *const  out_base,
const unsigned  out_stride,
const uint *const  el_base,
const unsigned  el_stride,
const double *const  r_base,
const unsigned  r_stride,
const uint  npt,
const double *const  in,
struct findpts_local_data *const  fd 
)
void findpts_local_free ( struct findpts_local_data *const  fd)
void findpts_local_setup ( struct findpts_local_data *const  fd,
const double *const  elx[D],
const unsigned  n[D],
const uint  nel,
const unsigned  m[D],
const double  bbox_tol,
const uint  max_hash_size,
const unsigned  npt_max,
const double  newt_tol 
)
static void hash_bb ( struct hash_data p,
const struct obbox *const  obb,
const uint  nel 
)
static

Definition at line 128 of file findpts_local_imp.h.

References hash_data::bnd, D, dbl_range_merge(), dbl_range::max, dbl_range::min, uint, and x.

+ Here is the call graph for this function:

static void hash_build ( struct hash_data p,
const struct obbox *const  obb,
const uint  nel,
const uint  max_size 
)
static

Definition at line 144 of file findpts_local_imp.h.

References D, FOR_LOOP, hash_bb, hash_data::hash_n, hash_opt_size, hash_range, i, uint_range::max, dbl_range::max, hash_data::max, hash_data::offset, sum(), tcalloc, tmalloc, uint, WHEN_3D, and x.

+ Here is the call graph for this function:

static uint hash_count ( struct hash_data p,
const struct obbox *const  obb,
const uint  nel,
const uint  n 
)
static

Definition at line 96 of file findpts_local_imp.h.

References D, hash_range, hash_setfac, i, uint_range::max, uint_range::min, uint, and x.

static void hash_free ( struct hash_data p)
static

Definition at line 193 of file findpts_local_imp.h.

References hash_data::offset.

static uint hash_index ( const struct hash_data p,
const double  x[D] 
)
static

Definition at line 69 of file findpts_local_imp.h.

References hash_data::bnd, hash_data::fac, hash_index_aux(), hash_data::hash_n, dbl_range::min, n, uint, WHEN_3D, and x.

+ Here is the call graph for this function:

static uint hash_opt_size ( struct hash_data p,
const struct obbox *const  obb,
const uint  nel,
const uint  max_size 
)
static

Definition at line 112 of file findpts_local_imp.h.

References D, hash_count, hash_setfac, uint, and WHEN_3D.

static struct uint_range hash_range ( const struct hash_data p,
unsigned  d,
const struct dbl_range  r 
)
static

Definition at line 84 of file findpts_local_imp.h.

References iceil(), ifloor(), uint_range::max, uint_range::min, sint, and uint.

+ Here is the call graph for this function:

static void hash_setfac ( struct hash_data p,
const uint  n 
)
static
static void map_points_to_els ( struct array *const  map,
uint *const  code_base,
const unsigned  code_stride,
const double *const  x_base[D],
const unsigned  x_stride[D],
const uint  npt,
const struct findpts_local_data *const  fd,
buffer buf 
)
static