moab
SpectralFuncs.hpp File Reference
#include "float.h"

Go to the source code of this file.

Classes

struct  lagrange_data
struct  findpt_data_2
struct  findpt_data_3
struct  opt_face_data_3
struct  opt_edge_data_3
struct  opt_point_data_3
struct  opt_data_3
struct  opt_edge_data_2
struct  opt_point_data_2
struct  opt_data_2

Defines

#define INTEGER   int
#define GLOBAL_INT   long
#define floorr   floor
#define ceilr   ceil
#define sqrtr   sqrt
#define fabsr   fabs
#define cosr   cos
#define sinr   sin
#define EPS   (128*DBL_EPSILON)
#define PI   3.1415926535897932384626433832795028841971693993751058209749445923
#define uint   uint_
#define ulong   ulong_
#define sint   sint_
#define slong   slong_

Typedefs

typedef double real
typedef signed INTEGER sint
typedef unsigned INTEGER uint
typedef signed GLOBAL_INT slong
typedef unsigned GLOBAL_INT ulong
typedef int(* findpt_func )(void *, const real *, int, uint *, real *, real *)

Functions

void legendre_matrix (const real *x, int m, real *P, int n)
void legendre_matrix_t (const real *x, int m, real *P, int n)
void legendre_row (real x, real *P, int n)
void gauss_nodes (real *z, int n)
void lobatto_nodes (real *z, int n)
void gauss_weights (const real *z, real *w, int n)
void lobatto_weights (const real *z, real *w, int n)
void gauss_to_legendre (const real *z, const real *w, int n, real *J)
void gauss_to_legendre_t (const real *z, const real *w, int n, real *J)
void lobatto_to_legendre (const real *z, const real *w, int n, real *J)
void lagrange_weights (const real *z, unsigned n, const real *x, unsigned m, real *J, real *work)
void lagrange_weights_deriv (const real *z, unsigned n, const real *x, unsigned m, real *J, real *D, real *work)
void lagrange_setup (lagrange_data *p, const real *z, unsigned n)
void lagrange_free (lagrange_data *p)
void lagrange_0 (lagrange_data *p, real x)
void lagrange_1 (lagrange_data *p, real x)
void lagrange_2 (lagrange_data *p, real x)
void lagrange_2u (lagrange_data *p)
void tensor_c1 (const real *R, unsigned mr, unsigned nr, const real *u, real *v)
void tensor_r1 (const real *R, unsigned mr, unsigned nr, const real *u, real *v)
void tensor_c2 (const real *R, unsigned mr, unsigned nr, const real *S, unsigned ms, unsigned ns, const real *u, real *v, real *work)
void tensor_r2 (const real *R, unsigned mr, unsigned nr, const real *S, unsigned ms, unsigned ns, const real *u, real *v, real *work)
void tensor_c3 (const real *R, unsigned mr, unsigned nr, const real *S, unsigned ms, unsigned ns, const real *T, unsigned mt, unsigned nt, const real *u, real *v, real *work1, real *work2)
void tensor_r3 (const real *R, unsigned mr, unsigned nr, const real *S, unsigned ms, unsigned ns, const real *T, unsigned mt, unsigned nt, const real *u, real *v, real *work1, real *work2)
real tensor_i1 (const real *Jr, unsigned nr, const real *u)
real tensor_i2 (const real *Jr, unsigned nr, const real *Js, unsigned ns, const real *u, real *work)
real tensor_i3 (const real *Jr, unsigned nr, const real *Js, unsigned ns, const real *Jt, unsigned nt, const real *u, real *work)
real tensor_ig1 (const real *Jr, const real *Dr, unsigned nr, const real *u, real *g)
real tensor_ig2 (const real *Jr, const real *Dr, unsigned nr, const real *Js, const real *Ds, unsigned ns, const real *u, real *g, real *work)
real tensor_ig3 (const real *Jr, const real *Dr, unsigned nr, const real *Js, const real *Ds, unsigned ns, const real *Jt, const real *Dt, unsigned nt, const real *u, real *g, real *work)
findpt_data_2findpt_setup_2 (const real *const xw[2], const unsigned n[2], uint nel, uint max_hash_size, real bbox_tol)
findpt_data_3findpt_setup_3 (const real *const xw[3], const unsigned n[3], uint nel, uint max_hash_size, real bbox_tol)
void findpt_free_2 (findpt_data_2 *p)
void findpt_free_3 (findpt_data_3 *p)
const realfindpt_allbnd_2 (const findpt_data_2 *p)
const realfindpt_allbnd_3 (const findpt_data_3 *p)
int findpt_2 (findpt_data_2 *p, const real x[2], int guess, uint *el, real r[2], real *dist)
int findpt_3 (findpt_data_3 *p, const real x[3], int guess, uint *el, real r[3], real *dist)
void findpt_weights_2 (findpt_data_2 *p, const real r[2])
void findpt_weights_3 (findpt_data_3 *p, const real r[3])
double findpt_eval_2 (findpt_data_2 *p, const real *u)
double findpt_eval_3 (findpt_data_3 *p, const real *u)
void opt_alloc_3 (opt_data_3 *p, lagrange_data *ld)
void opt_free_3 (opt_data_3 *p)
double opt_findpt_3 (opt_data_3 *p, const real *const elx[3], const real xstar[3], real r[3], unsigned *constr)
void opt_vol_set_intp_3 (opt_data_3 *p, const real r[3])
void opt_alloc_2 (opt_data_2 *p, lagrange_data *ld)
void opt_free_2 (opt_data_2 *p)
double opt_findpt_2 (opt_data_2 *p, const real *const elx[2], const real xstar[2], real r[2], unsigned *constr)

Variables

const unsigned opt_no_constraints_2 = 3+1
const unsigned opt_no_constraints_3 = 9+3+1

Define Documentation

#define ceilr   ceil

Definition at line 54 of file SpectralFuncs.hpp.

#define cosr   cos

Definition at line 57 of file SpectralFuncs.hpp.

#define EPS   (128*DBL_EPSILON)

Definition at line 59 of file SpectralFuncs.hpp.

#define fabsr   fabs

Definition at line 56 of file SpectralFuncs.hpp.

#define floorr   floor

Definition at line 53 of file SpectralFuncs.hpp.

#define GLOBAL_INT   long

Definition at line 27 of file SpectralFuncs.hpp.

#define INTEGER   int

Definition at line 18 of file SpectralFuncs.hpp.

#define PI   3.1415926535897932384626433832795028841971693993751058209749445923

Definition at line 60 of file SpectralFuncs.hpp.

#define sinr   sin

Definition at line 58 of file SpectralFuncs.hpp.

#define sint   sint_

Definition at line 66 of file SpectralFuncs.hpp.

#define slong   slong_

Definition at line 67 of file SpectralFuncs.hpp.

#define sqrtr   sqrt

Definition at line 55 of file SpectralFuncs.hpp.

#define uint   uint_

Definition at line 64 of file SpectralFuncs.hpp.

#define ulong   ulong_

Definition at line 65 of file SpectralFuncs.hpp.


Typedef Documentation

typedef int(* findpt_func)(void *, const real *, int, uint *, real *, real *)

Definition at line 372 of file SpectralFuncs.hpp.

typedef double real

Definition at line 52 of file SpectralFuncs.hpp.

typedef signed INTEGER sint

Definition at line 69 of file SpectralFuncs.hpp.

typedef signed GLOBAL_INT slong

Definition at line 74 of file SpectralFuncs.hpp.

typedef unsigned INTEGER uint

Definition at line 70 of file SpectralFuncs.hpp.

typedef unsigned GLOBAL_INT ulong

Definition at line 75 of file SpectralFuncs.hpp.


Function Documentation

int findpt_2 ( findpt_data_2 p,
const real  x[2],
int  guess,
uint el,
real  r[2],
real dist 
)
int findpt_3 ( findpt_data_3 p,
const real  x[3],
int  guess,
uint el,
real  r[3],
real dist 
)
const real* findpt_allbnd_2 ( const findpt_data_2 p)
const real* findpt_allbnd_3 ( const findpt_data_3 p)
double findpt_eval_2 ( findpt_data_2 p,
const real u 
) [inline]

Definition at line 391 of file SpectralFuncs.hpp.

{
  return tensor_i2(p->ld[0].J,p->ld[0].n,
                   p->ld[1].J,p->ld[1].n,
                   u, p->od_work);
}
double findpt_eval_3 ( findpt_data_3 p,
const real u 
) [inline]

Definition at line 398 of file SpectralFuncs.hpp.

{
  return tensor_i3(p->ld[0].J,p->ld[0].n,
                   p->ld[1].J,p->ld[1].n,
                   p->ld[2].J,p->ld[2].n,
                   u, p->od_work);
}
findpt_data_2* findpt_setup_2 ( const real *const  xw[2],
const unsigned  n[2],
uint  nel,
uint  max_hash_size,
real  bbox_tol 
)
findpt_data_3* findpt_setup_3 ( const real *const  xw[3],
const unsigned  n[3],
uint  nel,
uint  max_hash_size,
real  bbox_tol 
)
void findpt_weights_2 ( findpt_data_2 p,
const real  r[2] 
) [inline]

Definition at line 378 of file SpectralFuncs.hpp.

{
  lagrange_0(&p->ld[0],r[0]);
  lagrange_0(&p->ld[1],r[1]);
}
void findpt_weights_3 ( findpt_data_3 p,
const real  r[3] 
) [inline]

Definition at line 384 of file SpectralFuncs.hpp.

{
  lagrange_0(&p->ld[0],r[0]);
  lagrange_0(&p->ld[1],r[1]);
  lagrange_0(&p->ld[2],r[2]);
}
void gauss_nodes ( real z,
int  n 
)
void gauss_to_legendre ( const real z,
const real w,
int  n,
real J 
)
void gauss_to_legendre_t ( const real z,
const real w,
int  n,
real J 
)
void gauss_weights ( const real z,
real w,
int  n 
)
void lagrange_0 ( lagrange_data p,
real  x 
)
void lagrange_1 ( lagrange_data p,
real  x 
)
void lagrange_2 ( lagrange_data p,
real  x 
)
void lagrange_2u ( lagrange_data p)
void lagrange_setup ( lagrange_data p,
const real z,
unsigned  n 
)
void lagrange_weights ( const real z,
unsigned  n,
const real x,
unsigned  m,
real J,
real work 
)
void lagrange_weights_deriv ( const real z,
unsigned  n,
const real x,
unsigned  m,
real J,
real D,
real work 
)
void legendre_matrix ( const real x,
int  m,
real P,
int  n 
)
void legendre_matrix_t ( const real x,
int  m,
real P,
int  n 
)
void legendre_row ( real  x,
real P,
int  n 
)
void lobatto_nodes ( real z,
int  n 
)
void lobatto_to_legendre ( const real z,
const real w,
int  n,
real J 
)
void lobatto_weights ( const real z,
real w,
int  n 
)
void opt_alloc_2 ( opt_data_2 p,
lagrange_data ld 
)
void opt_alloc_3 ( opt_data_3 p,
lagrange_data ld 
)
double opt_findpt_2 ( opt_data_2 p,
const real *const  elx[2],
const real  xstar[2],
real  r[2],
unsigned *  constr 
)
double opt_findpt_3 ( opt_data_3 p,
const real *const  elx[3],
const real  xstar[3],
real  r[3],
unsigned *  constr 
)
void opt_free_2 ( opt_data_2 p)
void opt_free_3 ( opt_data_3 p)
void opt_vol_set_intp_3 ( opt_data_3 p,
const real  r[3] 
)
void tensor_c1 ( const real R,
unsigned  mr,
unsigned  nr,
const real u,
real v 
)
void tensor_c2 ( const real R,
unsigned  mr,
unsigned  nr,
const real S,
unsigned  ms,
unsigned  ns,
const real u,
real v,
real work 
)
void tensor_c3 ( const real R,
unsigned  mr,
unsigned  nr,
const real S,
unsigned  ms,
unsigned  ns,
const real T,
unsigned  mt,
unsigned  nt,
const real u,
real v,
real work1,
real work2 
)
real tensor_i1 ( const real Jr,
unsigned  nr,
const real u 
)
real tensor_i2 ( const real Jr,
unsigned  nr,
const real Js,
unsigned  ns,
const real u,
real work 
)
real tensor_i3 ( const real Jr,
unsigned  nr,
const real Js,
unsigned  ns,
const real Jt,
unsigned  nt,
const real u,
real work 
)
real tensor_ig1 ( const real Jr,
const real Dr,
unsigned  nr,
const real u,
real g 
)
real tensor_ig2 ( const real Jr,
const real Dr,
unsigned  nr,
const real Js,
const real Ds,
unsigned  ns,
const real u,
real g,
real work 
)
real tensor_ig3 ( const real Jr,
const real Dr,
unsigned  nr,
const real Js,
const real Ds,
unsigned  ns,
const real Jt,
const real Dt,
unsigned  nt,
const real u,
real g,
real work 
)
void tensor_r1 ( const real R,
unsigned  mr,
unsigned  nr,
const real u,
real v 
)
void tensor_r2 ( const real R,
unsigned  mr,
unsigned  nr,
const real S,
unsigned  ms,
unsigned  ns,
const real u,
real v,
real work 
)
void tensor_r3 ( const real R,
unsigned  mr,
unsigned  nr,
const real S,
unsigned  ms,
unsigned  ns,
const real T,
unsigned  mt,
unsigned  nt,
const real u,
real v,
real work1,
real work2 
)

Variable Documentation

const unsigned opt_no_constraints_2 = 3+1

Definition at line 445 of file SpectralFuncs.hpp.

const unsigned opt_no_constraints_3 = 9+3+1

Definition at line 446 of file SpectralFuncs.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines