Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
#include <SpectralQuad.hpp>
Static Public Member Functions | |
static ErrorCode | evalFcn (const double *params, const double *field, const int ndim, const int num_tuples, double *work, double *result) |
Forward-evaluation of field at parametric coordinates. | |
static ErrorCode | reverseEvalFcn (EvalFcn eval, JacobianFcn jacob, InsideFcn ins, const double *posn, const double *verts, const int nverts, const int ndim, const double iter_tol, const double inside_tol, double *work, double *params, int *is_inside) |
Reverse-evaluation of parametric coordinates at physical space position. | |
static ErrorCode | jacobianFcn (const double *params, const double *verts, const int nverts, const int ndim, double *work, double *result) |
Evaluate the jacobian at a specified parametric position. | |
static ErrorCode | integrateFcn (const double *field, const double *verts, const int nverts, const int ndim, const int num_tuples, double *work, double *result) |
Forward-evaluation of field at parametric coordinates. | |
static ErrorCode | initFcn (const double *verts, const int nverts, double *&work) |
Initialize this EvalSet. | |
static int | insideFcn (const double *params, const int ndim, const double tol) |
Function that returns whether or not the parameters are inside the natural space of the element. | |
static EvalSet | eval_set () |
static bool | compatible (EntityType tp, int numv, EvalSet &eset) |
Static Protected Attributes | |
static int | _n |
static double * | _z [2] |
static lagrange_data | _ld [2] |
static opt_data_2 | _data |
static double * | _odwork |
static bool | _init = false |
static double * | _glpoints |
Definition at line 12 of file SpectralQuad.hpp.
static bool moab::SpectralQuad::compatible | ( | EntityType | tp, |
int | numv, | ||
EvalSet & | eset | ||
) | [inline, static] |
Definition at line 66 of file SpectralQuad.hpp.
References eval_set(), and MBQUAD.
static EvalSet moab::SpectralQuad::eval_set | ( | ) | [inline, static] |
Definition at line 61 of file SpectralQuad.hpp.
Referenced by compatible().
{ return EvalSet( evalFcn, reverseEvalFcn, jacobianFcn, integrateFcn, initFcn ); }
CartVect moab::SpectralQuad::evalFcn | ( | const double * | params, |
const double * | field, | ||
const int | ndim, | ||
const int | num_tuples, | ||
double * | work, | ||
double * | result | ||
) | [static] |
Forward-evaluation of field at parametric coordinates.
Definition at line 78 of file SpectralQuad.cpp.
References moab::Element::SpectralQuad::_ld, moab::Element::SpectralQuad::_odwork, moab::Element::SpectralQuad::_xyz, lagrange_0(), and tensor_i2().
static ErrorCode moab::SpectralQuad::initFcn | ( | const double * | verts, |
const int | nverts, | ||
double *& | work | ||
) | [static] |
Initialize this EvalSet.
int moab::SpectralQuad::insideFcn | ( | const double * | params, |
const int | ndim, | ||
const double | tol | ||
) | [static] |
Function that returns whether or not the parameters are inside the natural space of the element.
Definition at line 166 of file SpectralQuad.cpp.
{
return EvalSet::inside( params, ndim, tol );
}
static ErrorCode moab::SpectralQuad::integrateFcn | ( | const double * | field, |
const double * | verts, | ||
const int | nverts, | ||
const int | ndim, | ||
const int | num_tuples, | ||
double * | work, | ||
double * | result | ||
) | [static] |
Forward-evaluation of field at parametric coordinates.
static ErrorCode moab::SpectralQuad::jacobianFcn | ( | const double * | params, |
const double * | verts, | ||
const int | nverts, | ||
const int | ndim, | ||
double * | work, | ||
double * | result | ||
) | [static] |
Evaluate the jacobian at a specified parametric position.
bool moab::SpectralQuad::reverseEvalFcn | ( | EvalFcn | eval, |
JacobianFcn | jacob, | ||
InsideFcn | ins, | ||
const double * | posn, | ||
const double * | verts, | ||
const int | nverts, | ||
const int | ndim, | ||
const double | iter_tol, | ||
const double | inside_tol, | ||
double * | work, | ||
double * | params, | ||
int * | is_inside | ||
) | [static] |
Reverse-evaluation of parametric coordinates at physical space position.
Definition at line 99 of file SpectralQuad.cpp.
References moab::Element::SpectralQuad::_data, moab::Element::SpectralQuad::_xyz, opt_findpt_2(), and opt_no_constraints_3.
{ params = init; // find nearest point double x_star[3]; xyz.get( x_star ); double r[2] = { 0, 0 }; // initial guess for parametric coords unsigned c = opt_no_constraints_3; double dist = opt_findpt_2( &_data, (const double**)_xyz, x_star, r, &c ); // if it did not converge, get out with throw... if( dist > 0.9e+30 ) { std::vector< CartVect > dummy; throw Map::EvaluationError( CartVect( x_star ), dummy ); } // c tells us if we landed inside the element or exactly on a face, edge, or node // also, dist shows the distance to the computed point. // copy parametric coords back params = r; return insideFcn( params, 2, inside_tol ); }
opt_data_2 moab::SpectralQuad::_data [static, protected] |
Definition at line 81 of file SpectralQuad.hpp.
real * moab::SpectralQuad::_glpoints [static, protected] |
Definition at line 86 of file SpectralQuad.hpp.
bool moab::SpectralQuad::_init = false [static, protected] |
Definition at line 85 of file SpectralQuad.hpp.
lagrange_data moab::SpectralQuad::_ld [static, protected] |
Definition at line 80 of file SpectralQuad.hpp.
int moab::SpectralQuad::_n [static, protected] |
Definition at line 78 of file SpectralQuad.hpp.
real * moab::SpectralQuad::_odwork [static, protected] |
Definition at line 82 of file SpectralQuad.hpp.
real * moab::SpectralQuad::_z [static, protected] |
Definition at line 79 of file SpectralQuad.hpp.