moab
|
#include <QuadraticHex.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 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 Member Functions | |
static double | SH (const int i, const double params) |
static double | DSH (const int i, const double params) |
Static Protected Attributes | |
static const int | corner [27][3] |
static const double | gauss [8][2] |
static const unsigned int | corner_count = 27 |
static const unsigned int | gauss_count = 8 |
Definition at line 10 of file QuadraticHex.hpp.
static bool moab::QuadraticHex::compatible | ( | EntityType | tp, |
int | numv, | ||
EvalSet & | eset | ||
) | [inline, static] |
Definition at line 39 of file QuadraticHex.hpp.
double moab::QuadraticHex::DSH | ( | const int | i, |
const double | params | ||
) | [static, protected] |
Definition at line 49 of file QuadraticHex.cpp.
{ switch (i) { case -1: return params-0.5; case 0: return -2*params; case 1: return params+0.5; default: return 0.; } }
static EvalSet moab::QuadraticHex::eval_set | ( | ) | [inline, static] |
Definition at line 34 of file QuadraticHex.hpp.
{ return EvalSet(evalFcn, reverseEvalFcn, jacobianFcn, integrateFcn, NULL, insideFcn); }
ErrorCode moab::QuadraticHex::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 60 of file QuadraticHex.cpp.
{ assert(params && field && num_tuples > 0); std::fill(result, result+num_tuples, 0.0); for (int i=0; i<27; i++) { const double sh = SH(corner[i][0], params[0]) * SH(corner[i][1], params[1]) * SH(corner[i][2], params[2]); for (int j = 0; j < num_tuples; j++) result[j] += sh * field[num_tuples*i+j]; } return MB_SUCCESS; }
int moab::QuadraticHex::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 118 of file QuadraticHex.cpp.
{ return EvalSet::inside_function(params, ndim, tol); }
ErrorCode moab::QuadraticHex::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.
Definition at line 102 of file QuadraticHex.cpp.
{ return MB_NOT_IMPLEMENTED; }
ErrorCode moab::QuadraticHex::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.
Definition at line 75 of file QuadraticHex.cpp.
{ assert(27 == nverts && params && verts); if (27 != nverts) return MB_FAILURE; Matrix3 *J = reinterpret_cast<Matrix3*>(result); for (int i=0; i<27; i++) { const double sh[3]={ SH(corner[i][0], params[0]), SH(corner[i][1], params[1]), SH(corner[i][2], params[2]) }; const double dsh[3]={ DSH(corner[i][0], params[0]), DSH(corner[i][1], params[1]), DSH(corner[i][2], params[2]) }; for (int j=0; j<3; j++) { (*J)(j,0)+=dsh[0]*sh[1]*sh[2]*verts[ndim*i+j]; // dxj/dr first column (*J)(j,1)+=sh[0]*dsh[1]*sh[2]*verts[ndim*i+j]; // dxj/ds (*J)(j,2)+=sh[0]*sh[1]*dsh[2]*verts[ndim*i+j]; // dxj/dt } } return MB_SUCCESS; }
ErrorCode moab::QuadraticHex::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 108 of file QuadraticHex.cpp.
{ assert(posn && verts); return EvalSet::evaluate_reverse(eval, jacob, ins, posn, verts, nverts, ndim, iter_tol, inside_tol, work, params, is_inside); }
double moab::QuadraticHex::SH | ( | const int | i, |
const double | params | ||
) | [static, protected] |
Definition at line 39 of file QuadraticHex.cpp.
{ switch (i) { case -1: return (params*params-params)/2; case 0: return 1-params*params; case 1: return (params*params+params)/2; default: return 0.; } }
const int moab::QuadraticHex::corner [static, protected] |
{ { -1, -1, -1 }, { 1, -1, -1 }, { 1, 1, -1 }, { -1, 1, -1 }, { -1, -1, 1 }, { 1, -1, 1 }, { 1, 1, 1 }, { -1, 1, 1 }, { 0, -1, -1 }, { 1, 0, -1 }, { 0, 1, -1 }, { -1, 0, -1 }, { -1, -1, 0 }, { 1, -1, 0 }, { 1, 1, 0 }, { -1, 1, 0 }, { 0, -1, 1 }, { 1, 0, 1 }, { 0, 1, 1 }, { -1, 0, 1 }, { 0, -1, 0 }, { 1, 0, 0 }, { 0, 1, 0 }, { -1, 0, 0 }, { 0, 0, -1 }, { 0, 0, 1 }, { 0, 0, 0 } }
Definition at line 53 of file QuadraticHex.hpp.
const unsigned int moab::QuadraticHex::corner_count = 27 [static, protected] |
Definition at line 55 of file QuadraticHex.hpp.
const double moab::QuadraticHex::gauss[8][2] [static, protected] |
Definition at line 54 of file QuadraticHex.hpp.
const unsigned int moab::QuadraticHex::gauss_count = 8 [static, protected] |
Definition at line 56 of file QuadraticHex.hpp.