Nek5000
SEM for Incompressible NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Classes | Macros | Functions | Variables
findpts.c File Reference
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include "c99.h"
#include "name.h"
#include "types.h"
#include "fail.h"
#include "mem.h"
#include "poly.h"
#include "obbox.h"
#include "findpts_el.h"
#include "findpts_local.h"
#include "gs_defs.h"
#include "comm.h"
#include "crystal.h"
#include "sarray_transfer.h"
#include "sort.h"
#include "sarray_sort.h"
#include "findpts_imp.h"
+ Include dependency graph for findpts.c:

Go to the source code of this file.

Classes

struct  ulong_range
 
struct  proc_index
 
struct  handle
 

Macros

#define CODE_INTERNAL   0
 
#define CODE_BORDER   1
 
#define CODE_NOT_FOUND   2
 
#define D   2
 
#define WHEN_3D(a)
 
#define D   3
 
#define WHEN_3D(a)   a
 
#define ffindpts_setup   FORTRAN_NAME(findpts_setup,FINDPTS_SETUP)
 
#define ffindpts_free   FORTRAN_NAME(findpts_free ,FINDPTS_FREE )
 
#define ffindpts   FORTRAN_NAME(findpts ,FINDPTS )
 
#define ffindpts_eval   FORTRAN_NAME(findpts_eval ,FINDPTS_EVAL )
 
#define CHECK_HANDLE(func)
 

Functions

static slong lfloor (double x)
 
static slong lceil (double x)
 
static ulong hash_index_aux (double low, double fac, ulong n, double x)
 
static void set_bit (unsigned char *const p, const uint i)
 
static unsigned get_bit (const unsigned char *const p, const uint i)
 
static unsigned byte_bits (const unsigned char x)
 
static uint count_bits (unsigned char *p, uint n)
 
void ffindpts_setup (sint *const handle, const MPI_Fint *const comm, const sint *const np, const sint *ndim, const double *const xm, const double *const ym, const double *const zm, const sint *const nr, const sint *const ns, const sint *const nt, const sint *const nel, const sint *const mr, const sint *const ms, const sint *const mt, const double *const bbox_tol, const sint *const loc_hash_size, const sint *const gbl_hash_size, const sint *const npt_max, const double *const newt_tol)
 
void ffindpts_free (const sint *const handle)
 
void ffindpts (const sint *const handle, sint *const code_base, const sint *const code_stride, sint *const proc_base, const sint *const proc_stride, sint *const el_base, const sint *const el_stride, double *const r_base, const sint *const r_stride, double *const dist2_base, const sint *const dist2_stride, const double *const x_base, const sint *const x_stride, const double *const y_base, const sint *const y_stride, const double *const z_base, const sint *const z_stride, const sint *const npt)
 
void ffindpts_eval (const sint *const handle, double *const out_base, const sint *const out_stride, const sint *const code_base, const sint *const code_stride, const sint *const proc_base, const sint *const proc_stride, const sint *const el_base, const sint *const el_stride, const double *const r_base, const sint *const r_stride, const sint *const npt, const double *const in)
 

Variables

static struct handlehandle_array = 0
 
static int handle_max = 0
 
static int handle_n = 0
 

Macro Definition Documentation

#define CHECK_HANDLE (   func)
Value:
struct handle *h; \
fail(1,__FILE__,__LINE__,func ": invalid handle")
void * data
Definition: findpts.c:197
static struct handle * handle_array
Definition: findpts.c:198
static int handle_n
Definition: findpts.c:200
void fail(int status, const char *file, unsigned line, const char *fmt,...)
Definition: fail.c:47

Definition at line 252 of file findpts.c.

Referenced by ffindpts(), ffindpts_eval(), and ffindpts_free().

#define CODE_BORDER   1

Definition at line 29 of file findpts.c.

Referenced by findpts_local().

#define CODE_INTERNAL   0

Definition at line 28 of file findpts.c.

Referenced by findpts(), and findpts_local().

#define CODE_NOT_FOUND   2

Definition at line 30 of file findpts.c.

Referenced by findpts(), findpts_eval(), findpts_local(), and map_points_to_els().

#define D   2
#define D   3

Definition at line 78 of file findpts.c.

#define ffindpts   FORTRAN_NAME(findpts ,FINDPTS )

Definition at line 194 of file findpts.c.

#define ffindpts_eval   FORTRAN_NAME(findpts_eval ,FINDPTS_EVAL )

Definition at line 195 of file findpts.c.

#define ffindpts_free   FORTRAN_NAME(findpts_free ,FINDPTS_FREE )

Definition at line 193 of file findpts.c.

#define ffindpts_setup   FORTRAN_NAME(findpts_setup,FINDPTS_SETUP)

Definition at line 192 of file findpts.c.

#define WHEN_3D (   a)

Definition at line 79 of file findpts.c.

Referenced by hash_build(), hash_index(), hash_opt_size(), and table_from_hash().

#define WHEN_3D (   a)    a

Definition at line 79 of file findpts.c.

Function Documentation

static unsigned byte_bits ( const unsigned char  x)
static

Definition at line 58 of file findpts.c.

References sum().

Referenced by count_bits().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint count_bits ( unsigned char *  p,
uint  n 
)
static

Definition at line 65 of file findpts.c.

References byte_bits(), n, sum(), and uint.

Referenced by hash_build().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ffindpts ( const sint *const  handle,
sint *const  code_base,
const sint *const  code_stride,
sint *const  proc_base,
const sint *const  proc_stride,
sint *const  el_base,
const sint *const  el_stride,
double *const  r_base,
const sint *const  r_stride,
double *const  dist2_base,
const sint *const  dist2_stride,
const double *const  x_base,
const sint *const  x_stride,
const double *const  y_base,
const sint *const  y_stride,
const double *const  z_base,
const sint *const  z_stride,
const sint *const  npt 
)

Definition at line 267 of file findpts.c.

References CHECK_HANDLE, findpts_2(), findpts_3(), PREFIXED_NAME, sint, and uint.

+ Here is the call graph for this function:

void ffindpts_eval ( const sint *const  handle,
double *const  out_base,
const sint *const  out_stride,
const sint *const  code_base,
const sint *const  code_stride,
const sint *const  proc_base,
const sint *const  proc_stride,
const sint *const  el_base,
const sint *const  el_stride,
const double *const  r_base,
const sint *const  r_stride,
const sint *const  npt,
const double *const  in 
)

Definition at line 311 of file findpts.c.

References CHECK_HANDLE, findpts_eval_2(), findpts_eval_3(), PREFIXED_NAME, sint, and uint.

+ Here is the call graph for this function:

void ffindpts_free ( const sint *const  handle)

Definition at line 257 of file findpts.c.

References CHECK_HANDLE, findpts_free_2(), findpts_free_3(), and PREFIXED_NAME.

+ Here is the call graph for this function:

void ffindpts_setup ( sint *const  handle,
const MPI_Fint *const  comm,
const sint *const  np,
const sint ndim,
const double *const  xm,
const double *const  ym,
const double *const  zm,
const sint *const  nr,
const sint *const  ns,
const sint *const  nt,
const sint *const  nel,
const sint *const  mr,
const sint *const  ms,
const sint *const  mt,
const double *const  bbox_tol,
const sint *const  loc_hash_size,
const sint *const  gbl_hash_size,
const sint *const  npt_max,
const double *const  newt_tol 
)

Definition at line 202 of file findpts.c.

References buffer_init, comm_init_check, handle::data, elx, fail(), handle_max, handle_n, mr, n, handle::ndim, nr, ns, tmalloc, trealloc, and uint.

+ Here is the call graph for this function:

static unsigned get_bit ( const unsigned char *const  p,
const uint  i 
)
static

Definition at line 51 of file findpts.c.

References uint.

static ulong hash_index_aux ( double  low,
double  fac,
ulong  n,
double  x 
)
static

Definition at line 38 of file findpts.c.

References i, lfloor(), slong, and ulong.

Referenced by hash_index().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static slong lceil ( double  x)
static

Definition at line 36 of file findpts.c.

Referenced by hash_bb(), and hash_range().

+ Here is the caller graph for this function:

static slong lfloor ( double  x)
static

Definition at line 35 of file findpts.c.

Referenced by hash_index_aux(), and hash_range().

+ Here is the caller graph for this function:

static void set_bit ( unsigned char *const  p,
const uint  i 
)
static

Definition at line 44 of file findpts.c.

References uint.

Variable Documentation

struct handle* handle_array = 0
static

Definition at line 198 of file findpts.c.

int handle_max = 0
static

Definition at line 199 of file findpts.c.

Referenced by ffindpts_setup().

int handle_n = 0
static

Definition at line 200 of file findpts.c.

Referenced by ffindpts_setup().