#include <DGMSolver.hpp>
Static Public Member Functions | |
static unsigned int | nchoosek (unsigned int n, unsigned int k) |
compute combinational number, n choose k, maximum output is std::numeric_limits<unsigned int>::max(); More... | |
static unsigned int | compute_numcols_vander_multivar (unsigned int kvars, unsigned int degree) |
compute the number of columns for a multivariate vandermonde matrix, given certen degree More... | |
static void | gen_multivar_monomial_basis (const int kvars, const double *vars, const int degree, std::vector< double > &basis) |
compute the monomial basis of mutiple variables, up to input degree, lexicographically ordered More... | |
static void | gen_vander_multivar (const int mrows, const int kvars, const double *us, const int degree, std::vector< double > &V) |
compute multivariate vandermonde matrix, monomial basis ordered in the same way as gen_multivar_monomial_basis More... | |
static void | rescale_matrix (int mrows, int ncols, double *V, double *ts) |
static void | compute_qtransposeB (int mrows, int ncols, const double *Q, int bncols, double *bs) |
static void | qr_polyfit_safeguarded (const int mrows, const int ncols, double *V, double *D, int *rank) |
static void | backsolve (int mrows, int ncols, double *R, int bncols, double *bs, double *ws) |
static void | backsolve_polyfit_safeguarded (int dim, int degree, const bool interp, int mrows, int ncols, double *R, int bncols, double *bs, const double *ws, int *degree_out) |
static void | vec_dotprod (const int len, const double *a, const double *b, double *c) |
static void | vec_scalarprod (const int len, const double *a, const double c, double *b) |
static void | vec_crossprod (const double a[3], const double b[3], double(&c)[3]) |
static double | vec_innerprod (const int len, const double *a, const double *b) |
static double | vec_2norm (const int len, const double *a) |
static double | vec_normalize (const int len, const double *a, double *b) |
static double | vec_distance (const int len, const double *a, const double *b) |
static void | vec_projoff (const int len, const double *a, const double *b, double *c) |
static void | vec_linear_operation (const int len, const double mu, const double *a, const double psi, const double *b, double *c) |
static void | get_tri_natural_coords (const int dim, const double *cornercoords, const int npts, const double *currcoords, double *naturalcoords) |
Private Member Functions | |
DGMSolver () | |
~DGMSolver () | |
Definition at line 8 of file DGMSolver.hpp.
|
inlineprivate |
Definition at line 10 of file DGMSolver.hpp.
|
inlineprivate |
Definition at line 11 of file DGMSolver.hpp.
|
static |
Definition at line 256 of file DGMSolver.cpp.
References moab::R.
Referenced by moab::HiReconstruction::eval_vander_bivar_cmf(), and moab::HiReconstruction::eval_vander_univar_cmf().
|
static |
Definition at line 300 of file DGMSolver.cpp.
Referenced by moab::HiReconstruction::eval_vander_bivar_cmf(), and moab::HiReconstruction::eval_vander_univar_cmf().
|
static |
compute the number of columns for a multivariate vandermonde matrix, given certen degree
If degree = 0, out put is 1; If kvars = 1, degree = k, output is k+1; If kvars = 2, degree = k, output is (k+2)*(k+1)/2;
Definition at line 42 of file DGMSolver.cpp.
References nchoosek().
Referenced by gen_multivar_monomial_basis(), and gen_vander_multivar().
|
static |
Definition at line 174 of file DGMSolver.cpp.
Referenced by moab::HiReconstruction::eval_vander_bivar_cmf(), and moab::HiReconstruction::eval_vander_univar_cmf().
|
static |
compute the monomial basis of mutiple variables, up to input degree, lexicographically ordered
if degree = 0, output basis = {1} If kvars = 1, vars = {u}, degree = k, basis = {1,u,...,u^k} If kvars = 2, vars = {u,v}, degree = k, basis = {1,u,v,u^2,uv,v^2,u^3,u^2*v,uv^2,v^3,...,u^k,u^k-1*v,...,uv^k-1,v^k} If kvars = 3, vars = {u,v,w}, degree = k, basis = {1,u,v,w,u^2,uv,uw,v^2,v*w,w^2,...,u^k,u^k-1v,u^k-1w,...,v^k,v^k-1w,...,vw^k-1,w^k}
kvars | Integer, number of variables |
vars | Pointer to array of doubles, size = kvars, variable values |
degree | Integer, maximum degree |
basis | Reference to vector, user input container to hold output which is appended to existing data; users don't have to preallocate for basis, this function will allocate interally |
Definition at line 58 of file DGMSolver.cpp.
References compute_numcols_vander_multivar().
|
static |
compute multivariate vandermonde matrix, monomial basis ordered in the same way as gen_multivar_monomial_basis
if degree = 0, V = {1,...,1}'; If kvars = 1, us = {u1;u2;..,;um}, degree = k, V = {1 u1 u1^2 ... u1^k;1 u2 u2^2 ... u2^k;...;1 um um^2 ... um^k}; *If kvars = 2, us = {u1 v1;u2 v2;...;um vm}, degree = k, V = {1 u1 v1 u1^2 u1v1 v1^2;...;1 um vm um^2 umvm vm^2};
mrows | Integer, number of points to evaluate Vandermonde matrix |
kvars | Integer, number of variables |
us | Pointer to array of doubles, size = mrow*kvars, variable values for all points. Stored in row-wise, like {u1 v1 u2 v2 ...} |
degree | Integer, maximum degree |
basis | Reference to vector, user input container to hold Vandermonde matrix which is appended to existing data; users don't have to preallocate for basis, this function will allocate interally; the Vandermonde matrix is stored in an array, columnwise, like {1 ... 1 u1 ...um u1^2 ... um^2 ...} |
Definition at line 100 of file DGMSolver.cpp.
References compute_numcols_vander_multivar().
Referenced by moab::HiReconstruction::eval_vander_bivar_cmf(), and moab::HiReconstruction::eval_vander_univar_cmf().
|
static |
Definition at line 667 of file DGMSolver.cpp.
References dim.
|
static |
compute combinational number, n choose k, maximum output is std::numeric_limits<unsigned int>::max();
Definition at line 19 of file DGMSolver.cpp.
Referenced by compute_numcols_vander_multivar().
|
static |
Definition at line 191 of file DGMSolver.cpp.
Referenced by moab::HiReconstruction::eval_vander_bivar_cmf(), and moab::HiReconstruction::eval_vander_univar_cmf().
|
static |
Definition at line 150 of file DGMSolver.cpp.
References vec_2norm().
Referenced by moab::HiReconstruction::eval_vander_bivar_cmf(), and moab::HiReconstruction::eval_vander_univar_cmf().
|
static |
Definition at line 544 of file DGMSolver.cpp.
References MB_SET_ERR_RET_VAL.
Referenced by rescale_matrix(), and vec_projoff().
|
static |
Definition at line 523 of file DGMSolver.cpp.
Referenced by moab::HiReconstruction::average_vertex_normal(), and moab::HiReconstruction::polyfit3d_surf_get_coeff().
|
static |
Definition at line 604 of file DGMSolver.cpp.
|
static |
|
static |
Definition at line 530 of file DGMSolver.cpp.
References MB_SET_ERR_RET_VAL.
Referenced by moab::HiReconstruction::compute_weights(), moab::HiReconstruction::polyfit3d_curve_get_coeff(), moab::HiReconstruction::polyfit3d_surf_get_coeff(), vec_projoff(), moab::HiReconstruction::walf3d_curve_vertex_eval(), and moab::HiReconstruction::walf3d_surf_vertex_eval().
|
static |
Definition at line 650 of file DGMSolver.cpp.
References MB_SET_ERR_RET.
Referenced by moab::HiReconstruction::average_vertex_normal(), moab::HiReconstruction::average_vertex_tangent(), moab::HiReconstruction::polyfit3d_curve_get_coeff(), moab::HiReconstruction::polyfit3d_surf_get_coeff(), and moab::HiReconstruction::walf3d_curve_vertex_eval().
|
static |
Definition at line 569 of file DGMSolver.cpp.
References MB_SET_ERR_RET_VAL.
Referenced by moab::HiReconstruction::average_vertex_normal(), moab::HiReconstruction::average_vertex_tangent(), and moab::HiReconstruction::polyfit3d_surf_get_coeff().
|
static |
Definition at line 614 of file DGMSolver.cpp.
References MB_SET_ERR_RET, vec_2norm(), and vec_innerprod().
Referenced by moab::HiReconstruction::polyfit3d_surf_get_coeff().
|
static |