Inner products, norms, distances.
[Mesh and mesh functions.]


Functions

double phelm::generic_scalar_cb (const Polynom &phi_i, const Polynom &phi_j, const Triangle &trk, const Mesh &m, int i1, int j1, int i2, int j2, void *user_data)
 Calculate inner product of two basis functions on flat domain.
double phelm::sphere_scalar_cb (const Polynom &phi_i, const Polynom &phi_j, const Triangle &trk, const Mesh &m, int i1, int j1, int i2, int j2, void *user_data)
 Calculate inner product of two basis functions on sphere.
double phelm::fast_scalar (const double *u, const double *v, const Mesh &m, Matrix &mat)
 Fast mesh inner product calculator.
double phelm::fast_norm (const double *u, const Mesh &m, Matrix &mat)
 Fast mesh norm calculator.
double phelm::fast_dist (const double *u, const double *v, const Mesh &m, Matrix &mat)
 Fast mesh distance calculator.
template<typename Functor , typename Data >
double phelm::scalar (const double *u, const double *v, const Mesh &m, Functor cb, Data user_data)
 Calculate inner product of two mesh vectors.
template<typename Functor , typename Data >
void phelm::generate_scalar_matrix (Matrix &mat, const Mesh &m, Functor cb, Data user_data)
 Create matrix for fast inner product computation.
template<typename Functor , typename Data >
double phelm::norm (const double *u, const Mesh &m, Functor cb, Data user_data)
 Calculate norm of mesh vector.
double phelm::norm (const double *u, const Mesh &m)
 Calculate norm of mesh vector on flat domain.
template<typename Functor , typename Data >
double phelm::dist (const double *u, const double *v, const Mesh &m, Functor cb, Data user_data)
 Calculate distance between two mesh vectors.
double phelm::dist (const double *u, const double *v, const Mesh &m)
 Calculate distance between two mesh vectors on flat domain.

Function Documentation

double phelm::dist ( const double *  u,
const double *  v,
const Mesh &  m 
) [inline]

Calculate distance between two mesh vectors on flat domain.

Parameters:
u - mesh vector
v - mesh vector
m - mesh
Returns:
distance between two mesh vectors on flat domain

Definition at line 572 of file phelm_generators.h.

template<typename Functor , typename Data >
double phelm::dist ( const double *  u,
const double *  v,
const Mesh &  m,
Functor  cb,
Data  user_data 
) [inline]

Calculate distance between two mesh vectors.

Parameters:
u - mesh vector
v - mesh vector
m - mesh
cb - callback that calculates inner product of two basis functions on a triangle
See also:
generic_scalar_cb, sphere_scalar_cb
Parameters:
user_data - user data that is passed to callback
Returns:
distance between two mesh vectors
Examples:
test_barvortex.cpp, test_chafe.cpp, test_laplace.cpp, test_schafe.cpp, test_slaplace.cpp, and test_system_laplace.cpp.

Definition at line 556 of file phelm_generators.h.

double phelm::fast_dist ( const double *  u,
const double *  v,
const Mesh &  m,
Matrix &  mat 
)

Fast mesh distance calculator.

See also:
generate_scalar_matrix
Parameters:
u - mesh function
v - mesh function
m - mesh
mat - matrix
Returns:
distance between u and v

Definition at line 419 of file phelm.cpp.

double phelm::fast_norm ( const double *  u,
const Mesh &  m,
Matrix &  mat 
)

Fast mesh norm calculator.

See also:
generate_scalar_matrix
Parameters:
u - mesh function
m - mesh
mat - matrix
Returns:
||u||

Definition at line 414 of file phelm.cpp.

double phelm::fast_scalar ( const double *  u,
const double *  v,
const Mesh &  m,
Matrix &  mat 
)

Fast mesh inner product calculator.

See also:
generate_scalar_matrix
Parameters:
u - mesh function
v - mesh function
m - mesh
mat - matrix
Returns:
(u, v)

Definition at line 406 of file phelm.cpp.

template<typename Functor , typename Data >
void phelm::generate_scalar_matrix ( Matrix &  mat,
const Mesh &  m,
Functor  cb,
Data  user_data 
) [inline]

Create matrix for fast inner product computation.

Parameters:
mat - output matrix
m - mesh
cb callback that calculates inner product of two basis functions on a triangle
See also:
generic_scalar_cb, sphere_scalar_cb
Parameters:
user_data - user data that is passed to callback

Definition at line 512 of file phelm_generators.h.

double phelm::generic_scalar_cb ( const Polynom &  phi_i,
const Polynom &  phi_j,
const Triangle &  trk,
const Mesh &  m,
int  i1,
int  j1,
int  i2,
int  j2,
void *  user_data 
)

Calculate inner product of two basis functions on flat domain.

Parameters:
phi_i - basis function
phi_j - basis function
trk - triangle
m - mesh
i1 - point number
j1 - point number
i2 - inner point number
j2 - inner point number
user_data - user data

Definition at line 396 of file phelm.cpp.

double phelm::norm ( const double *  u,
const Mesh &  m 
) [inline]

Calculate norm of mesh vector on flat domain.

Parameters:
u - mesh vector
m - mesh
Returns:
norm of mesh vector on flat domain

Definition at line 540 of file phelm_generators.h.

template<typename Functor , typename Data >
double phelm::norm ( const double *  u,
const Mesh &  m,
Functor  cb,
Data  user_data 
) [inline]

Calculate norm of mesh vector.

Parameters:
u - mesh vector
m - mesh
cb - callback that calculates inner product of two basis functions on a triangle
See also:
generic_scalar_cb, sphere_scalar_cb
Parameters:
user_data - user data that is passed to callback
Returns:
norm of mesh vector
Examples:
test_barvortex.cpp.

Definition at line 528 of file phelm_generators.h.

template<typename Functor , typename Data >
double phelm::scalar ( const double *  u,
const double *  v,
const Mesh &  m,
Functor  cb,
Data  user_data 
) [inline]

Calculate inner product of two mesh vectors.

Parameters:
u - mesh vector
v - mesh vector
m - mesh
cb - callback that calculates inner product of two basis functions on a triangle
See also:
generic_scalar_cb, sphere_scalar_cb
Parameters:
user_data - user data that is passed to callback
Returns:
inner product of two mesh vectors
Examples:
test_barvortex.cpp.

Definition at line 489 of file phelm_generators.h.

double phelm::sphere_scalar_cb ( const Polynom &  phi_i,
const Polynom &  phi_j,
const Triangle &  trk,
const Mesh &  m,
int  i1,
int  j1,
int  i2,
int  j2,
void *  user_data 
)

Calculate inner product of two basis functions on sphere.

Parameters:
phi_i - basis function
phi_j - basis function
trk - triangle
m - mesh
i1 - point number
j1 - point number
i2 - inner point number
j2 - inner point number
user_data - user data
Examples:
test_barvortex.cpp, test_schafe.cpp, and test_slaplace.cpp.

Definition at line 401 of file phelm.cpp.


Phelm Library
Copyright © 2009 Alexey Ozeritsky. All rights reserved.
http://resetius.ru