moab
|
Shape function space for trilinear hexahedron, obtained by a pushforward of the canonical linear (affine) functions. More...
#include <ElemUtil.hpp>
Public Member Functions | |
QuadraticHex (const std::vector< CartVect > &vertices) | |
QuadraticHex () | |
virtual | ~QuadraticHex () |
virtual CartVect | evaluate (const CartVect &xi) const |
Evaluate the map on (calculate $ x = F($ )$ ) | |
virtual bool | inside_nat_space (const CartVect &xi, double &tol) const |
decide if within the natural param space, with a tolerance | |
virtual Matrix3 | jacobian (const CartVect &xi) const |
Evaluate the map's Jacobi matrix. | |
virtual double | evaluate_scalar_field (const CartVect &xi, const double *field_vertex_values) const |
Evaluate a scalar field at a point given field values at the vertices. | |
virtual double | integrate_scalar_field (const double *field_vertex_values) const |
Integrate a scalar field over the element given field values at the vertices. | |
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 |
Shape function space for trilinear hexahedron, obtained by a pushforward of the canonical linear (affine) functions.
Definition at line 146 of file ElemUtil.hpp.
moab::Element::QuadraticHex::QuadraticHex | ( | const std::vector< CartVect > & | vertices | ) | [inline] |
Definition at line 148 of file ElemUtil.hpp.
: Map(vertices){};
Definition at line 656 of file ElemUtil.cpp.
:Map(0) { }
moab::Element::QuadraticHex::~QuadraticHex | ( | ) | [virtual] |
Definition at line 659 of file ElemUtil.cpp.
{}
CartVect moab::Element::QuadraticHex::evaluate | ( | const CartVect & | xi | ) | const [virtual] |
double moab::Element::QuadraticHex::evaluate_scalar_field | ( | const CartVect & | xi, |
const double * | field_vertex_values | ||
) | const [virtual] |
Evaluate a scalar field at a point given field values at the vertices.
Implements moab::Element::Map.
Definition at line 728 of file ElemUtil.cpp.
bool moab::Element::QuadraticHex::inside_nat_space | ( | const CartVect & | xi, |
double & | tol | ||
) | const [virtual] |
decide if within the natural param space, with a tolerance
Implements moab::Element::Map.
Definition at line 697 of file ElemUtil.cpp.
{// just look at the box+tol here return ( xi[0]>=-1.-tol) && (xi[0]<=1.+tol) && ( xi[1]>=-1.-tol) && (xi[1]<=1.+tol) && ( xi[2]>=-1.-tol) && (xi[2]<=1.+tol); }
double moab::Element::QuadraticHex::integrate_scalar_field | ( | const double * | field_vertex_values | ) | const [virtual] |
Integrate a scalar field over the element given field values at the vertices.
Implements moab::Element::Map.
Definition at line 741 of file ElemUtil.cpp.
{ return 0.;// TODO: gaussian integration , probably 2x2x2 }
Matrix3 moab::Element::QuadraticHex::jacobian | ( | const CartVect & | xi | ) | const [virtual] |
Evaluate the map's Jacobi matrix.
Implements moab::Element::Map.
Definition at line 704 of file ElemUtil.cpp.
{ Matrix3 J(0.0); for (int i=0; i<27; i++) { const double sh[3]={ SH(corner[i][0], xi[0]), SH(corner[i][1], xi[1]), SH(corner[i][2], xi[2]) }; const double dsh[3]={ DSH(corner[i][0], xi[0]), DSH(corner[i][1], xi[1]), DSH(corner[i][2], xi[2]) }; for (int j=0; j<3; j++) { J(j,0)+=dsh[0]*sh[1]*sh[2]*vertex[i][j]; // dxj/dr first column J(j,1)+=sh[0]*dsh[1]*sh[2]*vertex[i][j]; // dxj/ds J(j,2)+=sh[0]*sh[1]*dsh[2]*vertex[i][j]; // dxj/dt } } return J; }
const int moab::Element::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 162 of file ElemUtil.hpp.
const unsigned int moab::Element::QuadraticHex::corner_count = 27 [static, protected] |
Definition at line 164 of file ElemUtil.hpp.
const double moab::Element::QuadraticHex::gauss[8][2] [static, protected] |
Definition at line 163 of file ElemUtil.hpp.
const unsigned int moab::Element::QuadraticHex::gauss_count = 8 [static, protected] |
Definition at line 165 of file ElemUtil.hpp.